erpt: include all known types/categories in autogen

This commit is contained in:
Michael Scire 2020-04-10 03:33:30 -07:00
parent 50ea19e7a2
commit eca5ac01b8
2 changed files with 4 additions and 2 deletions

View file

@ -396,11 +396,11 @@ def main(argc, argv):
with open(argv[1]+'.hpp', 'w') as out:
out.write(HEADER)
out.write('#define AMS_ERPT_FOREACH_FIELD_TYPE(HANDLER) \\\n')
for tp in sorted(list(set(types))):
for tp in sorted(list(set(types + FIELD_TYPES.keys()))):
out.write((' HANDLER(%%-%ds %%-2d) \\\n' % (mt+1)) % (typ_to_string(tp)+',', tp))
out.write('\n')
out.write('#define AMS_ERPT_FOREACH_CATEGORY(HANDLER) \\\n')
for ct in sorted(list(set(cats))):
for ct in sorted(list(set(cats + CATEGORIES.keys()))):
out.write((' HANDLER(%%-%ds %%-3d) \\\n' % (mc+1)) % (cat_to_string(ct)+',', ct))
out.write('\n')
out.write('#define AMS_ERPT_FOREACH_FIELD(HANDLER) \\\n')