summaryrefslogtreecommitdiff
path: root/games/hunt/huntd
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-12-12 15:08:15 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-12-12 15:08:15 +0000
commit42d9ff5a49e35174f7edbed66e82415dd63b36e9 (patch)
tree0b991d56f83df10502f7ccdebd3cc12175cb9b8f /games/hunt/huntd
parentdac0bb50f711072edfaa8d4343b7d4647bcaa3dc (diff)
better error msg. hook to parse command line options. reviewed by pjanzen@
Diffstat (limited to 'games/hunt/huntd')
-rw-r--r--games/hunt/huntd/conf.c16
-rw-r--r--games/hunt/huntd/conf.h4
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 *));
+