+def get_specials(specials):
+ template = """ {{
+ .words = {},
+ .message = {},
+ }},
+"""
+ spc_str = ""
+ for special in specials:
+ contents = special[1]
+
+ if contents["words"] == None:
+ words_str = get_string_group([])
+ else:
+ words_str = get_string_group(contents["words"])
+
+ if contents["message"] == None:
+ message = "NULL"
+ else:
+ message = make_c_string(contents["message"])
+
+ spc_str += template.format(words_str, message)
+ global ignore
+ if contents.get("oldstyle", True) == False:
+ for word in contents["words"]:
+ if len(word) == 1:
+ ignore += word.upper()
+ spc_str = spc_str[:-1] # trim trailing newline
+ return spc_str
+