From 4a3f93b3453d2c344b89cf1f975869ceadf96600 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Oct 2021 10:28:50 +0200 Subject: [PATCH] gen_messages: Use dragontype numbers instead of stdint --- gen_messages.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gen_messages.c b/gen_messages.c index 67b8d0f..127ebca 100644 --- a/gen_messages.c +++ b/gen_messages.c @@ -28,7 +28,7 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv) fclose(fp); fp = fopen("messages.h", "w"); - fprintf(fp, "#include \n\n"); + fprintf(fp, "#include \n\n"); char **msgs; size_t msgs_len = split(&msgs, data, "\n"); @@ -47,21 +47,21 @@ int main(__attribute((unused)) int argc, __attribute((unused)) char **argv) char type[10]; if (strcmp(tokens[0], "\ts8") == 0) - strcpy(type, "int8_t "); + strcpy(type, "s8 "); else if (strcmp(tokens[0], "\ts16") == 0) - strcpy(type, "int16_t "); + strcpy(type, "s16 "); else if (strcmp(tokens[0], "\ts32") == 0) - strcpy(type, "int32_t "); + strcpy(type, "s32 "); else if (strcmp(tokens[0], "\ts64") == 0) - strcpy(type, "int64_t "); + strcpy(type, "s64 "); else if (strcmp(tokens[0], "\tu8") == 0) - strcpy(type, "uint8_t "); + strcpy(type, "u8 "); else if (strcmp(tokens[0], "\tu16") == 0) - strcpy(type, "uint16_t "); + strcpy(type, "u16 "); else if (strcmp(tokens[0], "\tu32") == 0) - strcpy(type, "uint32_t "); + strcpy(type, "u32 "); else if (strcmp(tokens[0], "\tu64") == 0) - strcpy(type, "uint64_t "); + strcpy(type, "u64 "); fprintf(fp, "\t%s%s;\n", type, tokens[1]); free(tokens); -- 2.44.0