datadoc: add newlines to generated source files

This commit is contained in:
2021-08-12 16:22:10 +10:00
parent 83603ba26a
commit 806bf3f452

View File

@@ -100,13 +100,12 @@ int main(int argc, char **argv)
fprintf(fpout, "const int datatoc_%s_size = %d;\n", argv[1], (int)size);
fprintf(fpout, "const char datatoc_%s[] = {\n", argv[1]);
while (size--) {
/* if we want to open in an editor
* this is nicer to avoid very long lines */
#ifdef VERBOSE
/* Even though this file is generated and doesn't need new-lines,
* these files may be loaded by developers when looking up symbols.
* Avoid a very long single line that may lock-up some editors. */
if (size % 32 == 31) {
fprintf(fpout, "\n");
}
#endif
// fprintf(fpout, "\\x%02x", getc(fpin));
fprintf(fpout, "%3d,", getc(fpin));