From 312dea1d673365656cf98d282fb2bce64289a11d Mon Sep 17 00:00:00 2001 From: Thomas Albers Date: Thu, 10 Aug 2023 10:37:52 +0200 Subject: Make param global --- zup.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'zup.h') diff --git a/zup.h b/zup.h index 7631e93..463f121 100644 --- a/zup.h +++ b/zup.h @@ -71,14 +71,14 @@ min(int x, int y) return x > y ? y : x; } -extern int verbose; +extern struct param param; static inline void msg(int level, const char *fmt, ...) { va_list ap; va_start(ap, fmt); - if (verbose >= level) { + if (param.verbose >= level) { fprintf(stderr, "DEBUG [%d]: ", level); vfprintf(stderr, fmt, ap); } @@ -105,13 +105,13 @@ int open_tty(const char *port, int baud); int -run_commands(int fd, const struct param *param, int ncmd, char **cmds); +run_commands(int fd, int ncmd, char **cmds); int -run_line(int fd, struct param *param, char *line, const char *sep); +run_line(int fd, char *line, const char *sep); void -repl(int fd, struct param *param); +repl(int fd); void print_error(int error); -- cgit v1.2.3