summaryrefslogtreecommitdiff
path: root/listing.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-01-21 13:08:25 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-01-21 14:11:37 +1000
commit9510dedad875099c32993246188050ea73ab1a9f (patch)
tree2471fbf77a8fef9e3e57ac4cb757472d6cb96016 /listing.c
parentff6a19ed8898ee8c79b2b2a2f87806353d89f5d4 (diff)
Replace WARN[1-9], ERROR[1-9], etc. with their unnumbered version
Those macros date back to when varargs weren't a thing but they've been #defined to the same value for 17 years now. Patch generated with: for action in WARN INFO ERROR ACTION FATAL WSGO; do sed -i "s/${action}[1-9]/${action}/g" `git ls-files` done Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'listing.c')
-rw-r--r--listing.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/listing.c b/listing.c
index 497aa78..dc1cee9 100644
--- a/listing.c
+++ b/listing.c
@@ -279,7 +279,7 @@ AddDirectory(char *head, char *ptrn, char *rest, char *map)
tmp = strchr(tmp, ')');
if ((tmp == NULL) || (tmp[1] != '\0'))
{
- ERROR1("File and map must have the format file(map)\n");
+ ERROR("File and map must have the format file(map)\n");
return 0;
}
*map = '\0';
@@ -388,7 +388,7 @@ AddMatchingFiles(char *head_in)
|| (head
&& ((strchr(head, '(') != NULL) || (strchr(head, ')') != NULL))))
{
- ERROR1("Files/maps to list must have the form file(map)\n");
+ ERROR("Files/maps to list must have the form file(map)\n");
ACTION("Illegal specifier ignored\n");
return 0;
}
@@ -425,14 +425,14 @@ GenerateListing(char *out_name)
if (nFilesListed < 1)
{
- ERROR1("Must specify at least one file or pattern to list\n");
+ ERROR("Must specify at least one file or pattern to list\n");
return 0;
}
if ((!out_name) || ((out_name[0] == '-') && (out_name[1] == '\0')))
outFile = stdout;
else if ((outFile = fopen(out_name, "w")) == NULL)
{
- ERROR1("Cannot open \"%s\" to write keyboard description\n",
+ ERROR("Cannot open \"%s\" to write keyboard description\n",
out_name);
ACTION("Exiting\n");
return 0;
@@ -460,7 +460,7 @@ GenerateListing(char *out_name)
if (stat(list[i].file, &sbuf) < 0)
{
if (oldWarningLevel > 5)
- WARN1("Couldn't open \"%s\"\n", list[i].file);
+ WARN("Couldn't open \"%s\"\n", list[i].file);
continue;
}
if (S_ISDIR(sbuf.st_mode))
@@ -474,7 +474,7 @@ GenerateListing(char *out_name)
if (!inputFile)
{
if (oldWarningLevel > 5)
- WARN1("Couldn't open \"%s\"\n", list[i].file);
+ WARN("Couldn't open \"%s\"\n", list[i].file);
continue;
}
setScanState(list[i].file, 1);