summaryrefslogtreecommitdiff
path: root/zup.h
diff options
context:
space:
mode:
authorThomas Albers <thomas@thomaslabs.org>2023-08-10 10:37:52 +0200
committerThomas Albers <thomas@thomaslabs.org>2023-08-10 10:37:52 +0200
commit312dea1d673365656cf98d282fb2bce64289a11d (patch)
tree6ae5f5e118dcb70275181ffecd3541560cc1bdd2 /zup.h
parentd75ccbc5e113a09aa3b25f4c61e5b674bc51bed7 (diff)
Make param global
Diffstat (limited to 'zup.h')
-rw-r--r--zup.h10
1 files changed, 5 insertions, 5 deletions
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);