-/* $Id: mandocdb.c,v 1.205 2015/10/22 22:06:43 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.206 2015/11/06 16:30:33 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
static int treescan(void);
static size_t utf8(unsigned int, char [7]);
-extern char *__progname;
-
static char tempfilename[32];
static int nodb; /* no database changes */
static int mparse_options; /* abort the parse early */
{
struct manconf conf;
struct mparse *mp;
- const char *path_arg;
+ const char *path_arg, *progname;
size_t j, sz;
int ch, i;
ohash_delete(&mlinks);
return exitcode;
usage:
+ progname = getprogname();
fprintf(stderr, "usage: %s [-aDnpQ] [-C file] [-Tutf8]\n"
" %s [-aDnpQ] [-Tutf8] dir ...\n"
" %s [-DnpQ] [-Tutf8] -d dir [file ...]\n"
" %s [-Dnp] -u dir [file ...]\n"
" %s [-Q] -t file ...\n",
- __progname, __progname, __progname,
- __progname, __progname);
+ progname, progname, progname, progname, progname);
return (int)MANDOCLEVEL_BADARG;
}