diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-16 21:15:05 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-16 21:15:05 +0000 |
commit | f118bfae6ef1e4ffdb25aff50ea427616253f6ca (patch) | |
tree | d3468360c99d3b1f29da0ead9f56d50bb05082ca /main.c | |
parent | cc7ec05a25c9d24fc87089bd37a6aa1fd17568eb (diff) | |
download | mandoc-f118bfae6ef1e4ffdb25aff50ea427616253f6ca.tar.gz |
Let man(1) show manuals for the current architecture by default,
and support the MACHINE environment variable as documented in man(1).
Missing feature reported by pascal@.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include "config.h" #include <sys/types.h> +#include <sys/param.h> /* MACHINE */ #include <assert.h> #include <ctype.h> @@ -328,6 +329,10 @@ main(int argc, char *argv[]) argv++; argc--; } + if (search.arch == NULL) + search.arch = getenv("MACHINE"); + if (search.arch == NULL) + search.arch = MACHINE; } rc = MANDOCLEVEL_OK; |