Skip to content

Commit

Permalink
fix: Only use C-style comments in output
Browse files Browse the repository at this point in the history
  • Loading branch information
lhearachel committed Dec 26, 2024
1 parent 7543818 commit 2d27d0c
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 42 deletions.
6 changes: 3 additions & 3 deletions src/generate.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static const char *enum_header_fmt = ""
static const char *enum_footer_fmt = ""
"};\n"
"\n"
"#endif // %s_ENUM\n"
"#endif /* %s_ENUM */\n"
"\n"
"";

Expand All @@ -85,7 +85,7 @@ static const char *defs_header_fmt = ""

static const char *defs_footer_fmt = ""
"\n"
"#endif // defined(%s_DEFS) || !defined(%s_ENUM)\n"
"#endif /* defined(%s_DEFS) || !defined(%s_ENUM) */\n"
"\n"
"";

Expand Down Expand Up @@ -121,7 +121,7 @@ static const char *lookup_table_pascal_fmt = ""
static const char *lookup_footer_fmt = ""
"};\n"
"\n"
"#endif // %s_LOOKUP\n"
"#endif /* %s_LOOKUP */\n"
"\n"
"";

Expand Down
6 changes: 3 additions & 3 deletions tests/append.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum stdin {
STDOUT_APPENDED_PLUS_2 = 11,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -57,7 +57,7 @@ enum stdin {
#define STDOUT_APPENDED_PLUS_1 10
#define STDOUT_APPENDED_PLUS_2 11

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -81,6 +81,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/append_prepend.test
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ enum stdin {
STDOUT_APPENDED_PLUS_2 = 14,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -67,7 +67,7 @@ enum stdin {
#define STDOUT_APPENDED_PLUS_1 13
#define STDOUT_APPENDED_PLUS_2 14

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -94,6 +94,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/base.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ enum stdin {
STDOUT_BLASTOISE = 8,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -47,7 +47,7 @@ enum stdin {
#define STDOUT_WARTORTLE 7
#define STDOUT_BLASTOISE 8

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -68,6 +68,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/bitmask.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum stdin {
STDOUT_BLASTOISE = (1 << 8),
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -49,7 +49,7 @@ enum stdin {
#define STDOUT_WARTORTLE (1 << 7)
#define STDOUT_BLASTOISE (1 << 8)

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/leader.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum stdin {
LEADER_BLASTOISE = 8,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -49,7 +49,7 @@ enum stdin {
#define LEADER_WARTORTLE 7
#define LEADER_BLASTOISE 8

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct stdin_entry stdin_lookup[] = {
{ LEADER_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/override.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum stdin {
STDOUT_BLASTOISE = 15,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -49,7 +49,7 @@ enum stdin {
#define STDOUT_WARTORTLE 14
#define STDOUT_BLASTOISE 15

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/pascal.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum Stdin {
STDOUT_BLASTOISE = 8,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -49,7 +49,7 @@ enum Stdin {
#define STDOUT_WARTORTLE 7
#define STDOUT_BLASTOISE 8

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct StdinEntry StdinLookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/prepend.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum stdin {
STDOUT_BLASTOISE = 11,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -57,7 +57,7 @@ enum stdin {
#define STDOUT_WARTORTLE 10
#define STDOUT_BLASTOISE 11

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -81,6 +81,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/preproc_guard.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum stdin {
STDOUT_BLASTOISE = 8,
};

#endif // GUARD_ENUM
#endif /* GUARD_ENUM */

#if defined(GUARD_DEFS) || !defined(GUARD_ENUM)

Expand All @@ -49,7 +49,7 @@ enum stdin {
#define STDOUT_WARTORTLE 7
#define STDOUT_BLASTOISE 8

#endif // defined(GUARD_DEFS) || !defined(GUARD_ENUM)
#endif /* defined(GUARD_DEFS) || !defined(GUARD_ENUM) */

#ifdef GUARD_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // GUARD_LOOKUP
#endif /* GUARD_LOOKUP */

#endif // GUARD_STDOUT
6 changes: 3 additions & 3 deletions tests/snake_casing.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum stdin {
STDOUT_MIME_JR = 7,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -44,7 +44,7 @@ enum stdin {
#define STDOUT_MR_MIME 6
#define STDOUT_MIME_JR 7

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -64,6 +64,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_PORYGON_Z, "PORYGON_Z" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/start_from.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum stdin {
STDOUT_BLASTOISE = 13,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -49,7 +49,7 @@ enum stdin {
#define STDOUT_WARTORTLE 12
#define STDOUT_BLASTOISE 13

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct stdin_entry stdin_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/tag_case.test
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum MyTag {
STDOUT_BLASTOISE = 8,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -51,7 +51,7 @@ enum MyTag {
#define STDOUT_WARTORTLE 7
#define STDOUT_BLASTOISE 8

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -72,6 +72,6 @@ const struct MyTagEntry MyTagLookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT
6 changes: 3 additions & 3 deletions tests/tag_name.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum my_tag {
STDOUT_BLASTOISE = 8,
};

#endif // METANG_ENUM
#endif /* METANG_ENUM */

#if defined(METANG_DEFS) || !defined(METANG_ENUM)

Expand All @@ -49,7 +49,7 @@ enum my_tag {
#define STDOUT_WARTORTLE 7
#define STDOUT_BLASTOISE 8

#endif // defined(METANG_DEFS) || !defined(METANG_ENUM)
#endif /* defined(METANG_DEFS) || !defined(METANG_ENUM) */

#ifdef METANG_LOOKUP

Expand All @@ -70,6 +70,6 @@ const struct my_tag_entry my_tag_lookup[] = {
{ STDOUT_WARTORTLE, "WARTORTLE" },
};

#endif // METANG_LOOKUP
#endif /* METANG_LOOKUP */

#endif // METANG_STDOUT

0 comments on commit 2d27d0c

Please sign in to comment.