]> git.lizzy.rs Git - dragonnet.git/commitdiff
Add 'do not edit' notice to generated types
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 22 Jan 2022 17:40:25 +0000 (18:40 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 22 Jan 2022 17:40:25 +0000 (18:40 +0100)
typegen/main.c

index 575e019143076da9539b6dd47601a411c1a3ec68..6c397defaa02a27609b3ffe54ca1344bdcae61ae 100644 (file)
@@ -544,6 +544,10 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv)
        fp = NULL;
 
        FILE *c_fp = fopen("dnet-types.c", "w");
+       fprintf(c_fp, "/*\n");
+       fprintf(c_fp, "\tThis file was automatically generated by Dragonnet.\n");
+       fprintf(c_fp, "\tDo NOT edit it manually. Instead, edit types.dnet and re-run DragonnetTypegen.\n");
+       fprintf(c_fp, "*/\n\n");
        fprintf(c_fp, "#include <stdlib.h>\n");
        fprintf(c_fp, "#include <string.h>\n");
        fprintf(c_fp, "#include <dragonnet/recv.h>\n");
@@ -552,6 +556,10 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv)
        fprintf(c_fp, "#include \"dnet-types.h\"\n\n");
 
        FILE *h_fp = fopen("dnet-types.h", "w");
+       fprintf(h_fp, "/*\n");
+       fprintf(h_fp, "\tThis file was automatically generated by Dragonnet.\n");
+       fprintf(h_fp, "\tDo NOT edit it manually. Instead, edit types.dnet and re-run DragonnetTypegen.\n");
+       fprintf(h_fp, "*/\n\n");
        fprintf(h_fp, "#include <dragontype/number.h>\n\n");
        fprintf(h_fp, "#define htobe8(x) (x)\n");
        fprintf(h_fp, "#define be8toh(x) (x)\n\n");