diff --git a/src/mkhelp.pl b/src/mkhelp.pl index 842a42f59423284f270fd36356f5db033b910ee3..a5877d5afc3d0a0f9f78873e274ddc24afc3d552 100644 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -69,16 +69,25 @@ print "void hugehelp(void)\n"; print "{\n"; print "puts (\n"; +$outsize=0; for(@out) { chop; $new = $_; + $outsize += length($new); + $new =~ s/\\/\\\\/g; $new =~ s/\"/\\\"/g; printf("\"%s\\n\"\n", $new); + if($outsize > 10000) { + # terminate and make another puts() call here + print ");\n puts(\n"; + $outsize=0; + } + } print " ) ;\n}\n"