gawk

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

commit e6f3227996454801b472913ab72e7efd258efa6e
parent f6775db81d8a8d18bedc151cd907c6f537551bf0
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Tue, 22 Dec 2020 00:22:22 -0800

Cleanup header

Diffstat:
Mmain.c | 15+++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/main.c b/main.c @@ -17,8 +17,7 @@ #include <sys/socket.h> #include <sys/stat.h> -#include <sys/types.h> -#include <sys/wait.h> + #include <ctype.h> #include <err.h> #include <errno.h> @@ -33,17 +32,17 @@ #define LEN(X) (sizeof(X) / sizeof(*X)) -#define BUFSIZE 4096 -#define ARGV_MAX 16 -#define ARG_SEP ":\t " -#define CMD_SEP ";\n" +#define BUFSIZE 4096 +#define ARGV_MAX 16 +#define ARG_SEP ":\t " +#define CMD_SEP ";\n" + +enum gphitem { GI_INFO, GI_PATH, GI_HOST, GI_PORT, GI_NULL }; typedef int (command)(int, const char **, int, const char **); typedef int (filter)(const char *, int, const char **, command); typedef int (stack_command)(int, const char **, int, const char *, const char *, const char *); -enum gphitem { GI_INFO, GI_PATH, GI_HOST, GI_PORT, GI_NULL }; - int gawk(const char *, const char *, const char *); static int timeout = 5 * 1000;