ref: 76e8aed8f3cc5210ff974c0be7c145233e36e351
parent: d7b6eea294156408552a78e9d0f19fce6d80f91d
author: Gergo ERDI <gergo@erdi.hu>
date: Sat Jan 13 16:16:58 EST 2024
Match the output format of `mhs -ofoo.c`. This avoids a segfault when compiling via `.comb` files.
--- a/Tools/Addcombs.hs
+++ b/Tools/Addcombs.hs
@@ -23,9 +23,9 @@
file <- hGetContents ifile
let size = length file
chunks = chunkify 20 file
- hPutStrLn ofile $ "const unsigned char combexprdata[] = {"+ hPutStrLn ofile $ "static unsigned char combexprdata[] = {"mapM_ (hPutStrLn ofile . showChunk) chunks
- hPutStrLn ofile "0 };"
+ hPutStrLn ofile "};"
hPutStrLn ofile "const unsigned char *combexpr = combexprdata;"
hPutStrLn ofile $ "const int combexprlen = " ++ show size ++ ";"
-- hClose ifile
--
⑨