Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 9a77d8ae5217da605d9a30977cff2639 > files > 20

camlmix-1.3.1-4.mga5.i586.rpm

##
(* Load this file and line directives will be printed.
   Very useful if you use camlmix for preprocessing OCaml programs.

   Example: camlmix xpp.mlx foo.mlx -o foo.ml -clean *)

let line_directive () =
  Printf.sprintf "\n# %i %S;;\n%s" 
    !Camlmix.line
    !Camlmix.source 
    (String.make (!Camlmix.char - 1) ' ')

let current_printer = !Camlmix.printer
let _ = Camlmix.printer := (fun s -> 
			      print (line_directive ()); 
			      current_printer s)