From: Elias Fleckenstein Date: Sat, 22 Jan 2022 17:55:50 +0000 (+0100) Subject: More include fixes X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=04d65cbf5f92dd7f47400092b517a2bc6c1defa8;p=dragonnet.git More include fixes --- diff --git a/typegen/main.c b/typegen/main.c index 8186f4f..ed47820 100644 --- a/typegen/main.c +++ b/typegen/main.c @@ -548,11 +548,14 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv) 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"); fprintf(c_fp, "#include \n"); + fprintf(c_fp, "#include \n"); + fprintf(c_fp, "#include \n"); + fprintf(c_fp, "#include \n"); fprintf(c_fp, "#include \n\n"); + fprintf(h_fp, "#define htobe8(x) (x)\n"); + fprintf(h_fp, "#define be8toh(x) (x)\n\n"); fprintf(c_fp, "#include \"dnet-types.h\"\n\n"); FILE *h_fp = fopen("dnet-types.h", "w"); @@ -560,12 +563,9 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv) 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, "#include \n\n"); + fprintf(h_fp, "#include \n"); + fprintf(h_fp, "#include \n"); fprintf(h_fp, "#include \n"); - fprintf(h_fp, "#include \n"); - fprintf(h_fp, "#define htobe8(x) (x)\n"); - fprintf(h_fp, "#define be8toh(x) (x)\n\n"); fprintf(h_fp, "typedef char *string;\n\n"); fprintf(h_fp, "typedef struct {\n\tu32 siz;\n\tu8 *data;\n} *Blob;\n\n"); fprintf(h_fp, "typedef struct {\n");