diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/genlang | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tools/genlang b/tools/genlang index ac49e594d3..d0b0f145ef 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -658,6 +658,20 @@ extern unsigned char *language_strings[]; | |||
658 | /* this contains the concatenation of all strings, separated by \\0 chars */ | 658 | /* this contains the concatenation of all strings, separated by \\0 chars */ |
659 | extern const unsigned char core_language_builtin[]; | 659 | extern const unsigned char core_language_builtin[]; |
660 | 660 | ||
661 | #include "${prefix}_enum.h" | ||
662 | |||
663 | MOO | ||
664 | ; | ||
665 | |||
666 | close(HFILE_CORE); | ||
667 | |||
668 | open(HFILE_CORE, ">${prefix}_enum.h") || | ||
669 | die "couldn't create file ${prefix}_enum.h\n"; | ||
670 | |||
671 | print HFILE_CORE <<MOO | ||
672 | /* This file was automatically generated using genlang */ | ||
673 | #ifndef _LANG_ENUM_H_ | ||
674 | #define _LANG_ENUM_H_ | ||
661 | /* The enum below contains all available strings */ | 675 | /* The enum below contains all available strings */ |
662 | enum \{ | 676 | enum \{ |
663 | MOO | 677 | MOO |
@@ -702,8 +716,13 @@ MOO | |||
702 | printf HFILE_CORE (" %s, /* 0x%x */\n", $name, $i); | 716 | printf HFILE_CORE (" %s, /* 0x%x */\n", $name, $i); |
703 | } | 717 | } |
704 | 718 | ||
705 | # Output end of enum | 719 | # Output end of lang_enum.h |
706 | print HFILE_CORE "\n};\n/* end of generated enum list */\n"; | 720 | print HFILE_CORE <<MOO |
721 | }; | ||
722 | /* end of generated enum list */ | ||
723 | #endif /* _LANG_ENUM_H_ */ | ||
724 | MOO | ||
725 | ; | ||
707 | 726 | ||
708 | # Output the target phrases for the source file | 727 | # Output the target phrases for the source file |
709 | for $i (0 .. $idcount[$users{"core"}]-1) { | 728 | for $i (0 .. $idcount[$users{"core"}]-1) { |