From 8f7b07b0a049c3bafabf2cfc98e4bf31f228028c Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sat, 22 Jan 2022 18:40:25 +0100 Subject: [PATCH] Add 'do not edit' notice to generated types --- typegen/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/typegen/main.c b/typegen/main.c index 575e019..6c397de 100644 --- a/typegen/main.c +++ b/typegen/main.c @@ -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 \n"); fprintf(c_fp, "#include \n"); fprintf(c_fp, "#include \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 \n\n"); fprintf(h_fp, "#define htobe8(x) (x)\n"); fprintf(h_fp, "#define be8toh(x) (x)\n\n"); -- 2.44.0