clang-format

This commit is contained in:
2024-09-10 13:03:02 -04:00
parent 53c617d779
commit d66450e427
381 changed files with 28864 additions and 34170 deletions

View File

@@ -37,57 +37,28 @@
#define MAXNAMES 32
static const char *const names[MAXNAMES] = {
"allspice",
"anise",
"basil",
"cardamom",
"cayenne",
"cilantro",
"cinnamon",
"cloves",
"coriander",
"cumin",
"dill",
"fennel",
"fenugreek",
"galangal",
"ginger",
"horseradish",
"lemongrass",
"licorice",
"mace",
"marjoram",
"mustard",
"nutmeg",
"oregano",
"parsley",
"paprika",
"pepper",
"saffron",
"sage",
"rosemary",
"thyme",
"turmeric",
"wasabi",
"allspice", "anise", "basil", "cardamom", "cayenne",
"cilantro", "cinnamon", "cloves", "coriander", "cumin",
"dill", "fennel", "fenugreek", "galangal", "ginger",
"horseradish", "lemongrass", "licorice", "mace", "marjoram",
"mustard", "nutmeg", "oregano", "parsley", "paprika",
"pepper", "saffron", "sage", "rosemary", "thyme",
"turmeric", "wasabi",
};
const char *
name_get(unsigned name)
{
assert(name < MAXNAMES);
return names[name];
const char *name_get(unsigned name) {
assert(name < MAXNAMES);
return names[name];
}
unsigned
name_find(const char *namestr)
{
unsigned i;
unsigned name_find(const char *namestr) {
unsigned i;
for (i=0; i<MAXNAMES; i++) {
if (!strcmp(namestr, names[i])) {
return i;
}
}
errx(1, "Encountered unknown/unexpected name %s", namestr);
return 0;
for (i = 0; i < MAXNAMES; i++) {
if (!strcmp(namestr, names[i])) {
return i;
}
}
errx(1, "Encountered unknown/unexpected name %s", namestr);
return 0;
}