fprintf ob "};\n";
(* dump struct init func *)
- fprintf ob "\nstatic void %s_init(void)\n{\n" pkg.name;
+ fprintf ob "\nstatic void (%s_init)(void)\n{\n" pkg.name;
List.iter (function (m, _, _) ->
if not (fst m.typ) then
let init, f, l = m.init in
let warn ob = output_endline ob "/*** THIS FILE IS AUTOGENERATED !!! ***/"
let process fn file l =
- try Unix.unlink file with _ -> ();
+ (try Unix.unlink file with _ -> ());
let ob = open_out_gen [ Open_trunc ; Open_wronly; Open_creat ] 0o444 file in
warn ob; fn ob l; close_out ob