commit 1913561f62b9f7263159329d1e6902b66fc92649
parent fb7a2ce307a76027534d2601f361cd06dff8938b
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Tue, 5 Jan 2021 12:34:43 -0800
Remove ENOCMD macro
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/main.c b/main.c
@@ -31,8 +31,6 @@
#include "gawk.h"
#include "util.h"
-#define ENOCOM "Not a command"
-
static char tmpdir[] = "/tmp/gawk-XXXXXXXXXXX";
static int fatal;
@@ -281,7 +279,7 @@ run_command(int argc, char const **argv, int depth, char const **addr)
c = get_command(*argv, commands, LEN(commands));
if (c == NULL) {
- warn(0, "'%s': %s.", *argv, ENOCOM);
+ warn(0, "'%s': Not a command.", *argv);
return ERROR;
}
return c(argc, argv, depth, addr);
@@ -319,7 +317,7 @@ execute(char const *cache, char *input, int depth, char const **addr)
if (commands[i] == NULL) {
if (i == 0)
return run_command(acs[0], avs[0], depth, addr);
- warn(errno, "'%s': %s.", avs[i][0], ENOCOM);
+ warn(0, "'%s': Not a command.", avs[i][0]);
return ERROR;
}
}