gawk

[old] Sed-like interface to the Gopher protocol
Log | Files | Refs | LICENSE

commit e326bb8703a35dffd7fe28423c22063ef8883f22
parent 568530934d76588ee7dc8454e4e4013ee431d01f
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Thu, 24 Dec 2020 01:11:15 -0800

Raise an error if cgoto() is not called on a directory

Diffstat:
Mmain.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c @@ -530,7 +530,10 @@ cextern(int argc, const char **argv, int index, const char **item) int cgoto(int argc, const char **argv, int index, const char **item) { - return gawk(itemtoaddr(item)); + if (**item == '1') + return gawk(itemtoaddr(item)); + warnc(EFTYPE, "%d", index); + return ERROR; } item_command *