diff options
author | 1999-12-12 15:08:14 +0000 | |
---|---|---|
committer | 1999-12-12 15:08:14 +0000 | |
commit | ec9bcedc03c0284de6147a7e5bb26714c449d4b8 (patch) | |
tree | 961d84c18862c71d97a57ce789dc3840106d661d | |
parent | Use socklen_t (diff) | |
download | wireguard-openbsd-ec9bcedc03c0284de6147a7e5bb26714c449d4b8.tar.xz wireguard-openbsd-ec9bcedc03c0284de6147a7e5bb26714c449d4b8.zip |
better error msg. hook to parse command line options. reviewed by pjanzen@
-rw-r--r-- | games/hunt/huntd/conf.c | 16 | ||||
-rw-r--r-- | games/hunt/huntd/conf.h | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/games/hunt/huntd/conf.c b/games/hunt/huntd/conf.c index 20e85326cdf..d3db9ae99e3 100644 --- a/games/hunt/huntd/conf.c +++ b/games/hunt/huntd/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.3 1999/08/30 23:35:50 d Exp $ */ +/* $OpenBSD: conf.c,v 1.4 1999/12/12 15:08:14 d Exp $ */ /* David Leonard <d@openbsd.org>, 1999. Public domain. */ #include <stdio.h> @@ -231,7 +231,7 @@ parse_line(buf, fnm, line) p++; if (*p++ != '=') { - logx(LOG_ERR, "%s:%d: expected `='", fnm, *line); + logx(LOG_ERR, "%s:%d: expected `=' after %s", fnm, *line, word); return; } @@ -312,3 +312,15 @@ config() log(LOG_WARNING, "%s", nm); } } + +/* + * Parse a single configuration argument given on the command line + */ +void +config_arg(arg) + char *arg; +{ + int line = 0; + + parse_line(arg, "*Initialisation*", &line); +} diff --git a/games/hunt/huntd/conf.h b/games/hunt/huntd/conf.h index fb88e07acb0..63bd83301c4 100644 --- a/games/hunt/huntd/conf.h +++ b/games/hunt/huntd/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.2 1999/02/01 06:53:55 d Exp $ */ +/* $OpenBSD: conf.h,v 1.3 1999/12/12 15:08:14 d Exp $ */ /* Configuration option variables for the server: */ @@ -51,3 +51,5 @@ extern int conf_mindshot; extern int conf_simstep; void config __P((void)); +void config_arg __P((char *)); + |