|
@@ -245,12 +245,14 @@ let close_file ctx =
|
|
|
close_out ch;
|
|
|
end
|
|
|
|
|
|
+let bom = "\xEF\xBB\xBF"
|
|
|
+
|
|
|
let open_file ctx file =
|
|
|
if ctx.curfile <> "" then close_file ctx;
|
|
|
let version_major = ctx.version / 1000 in
|
|
|
let version_minor = (ctx.version mod 1000) / 100 in
|
|
|
let version_revision = (ctx.version mod 100) in
|
|
|
- if file <> "hlc.json" then line ctx (sprintf "// Generated by HLC %d.%d.%d (HL v%d)" version_major version_minor version_revision ctx.hlcode.version);
|
|
|
+ if file <> "hlc.json" then line ctx (sprintf "%s// Generated by HLC %d.%d.%d (HL v%d)" bom version_major version_minor version_revision ctx.hlcode.version);
|
|
|
ctx.curfile <- file
|
|
|
|
|
|
let string_data_limit = 64
|