From 04e65faa724cfa1cdd43042086fef4fc4631fa61 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 23 Feb 2009 12:45:19 +0000 Subject: More in-file documentation and Linux-isation. Moved mdoc_macros table definition into macro.c, where it belongs. --- mmain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mmain.c') diff --git a/mmain.c b/mmain.c index b652b5c1..8ceddb0c 100644 --- a/mmain.c +++ b/mmain.c @@ -57,6 +57,8 @@ static int msg_warn(void *, int, int, #ifdef __linux__ extern int getsubopt(char **, char *const *, char **); +extern size_t strlcpy(char *, const char *, size_t); +extern size_t strlcat(char *, const char *, size_t); #endif @@ -106,7 +108,6 @@ mmain_getopt(struct mmain *p, int argc, char *argv[], size_t sz; extern int optind; - extern int optreset; sz = strlcpy(opts, "vW:", 32); assert(sz < 32); @@ -116,6 +117,8 @@ mmain_getopt(struct mmain *p, int argc, char *argv[], assert(sz < 32); } + optind = 1; + /* LINTED */ while (-1 != (c = getopt(argc, argv, opts))) switch (c) { -- cgit