2 # SPDX-License-Identifier: LGPL-2.1-or-later
4 """Generate %-from-name.gperf from %-list.txt
9 name
, prefix
, input = sys
.argv
[1:]
14 _Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"")
18 struct {}_name {{ const char* name; int id; }};
22 for line
in open(input):
24 s
= line
.replace('_', '-')
25 print("{}, {}{}".format(s
, prefix
, line
))