X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=tools%2Fcpkg2c.mll;h=388973a06b126cc5904ac34f72294eafb1def280;hp=0abfe8b9dd2b938fab1de937b3377c7c59131b3a;hb=981e10e224fde4de5d40adcee1deda89df2715ca;hpb=74188c72520968a68bfedbbb7f8e51d251a03f72 diff --git a/tools/cpkg2c.mll b/tools/cpkg2c.mll index 0abfe8b..388973a 100644 --- a/tools/cpkg2c.mll +++ b/tools/cpkg2c.mll @@ -496,7 +496,7 @@ and ext_member m f = parse 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 @@ -627,7 +627,7 @@ int luaopen_%s(lua_State *L) 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