From f118bfae6ef1e4ffdb25aff50ea427616253f6ca Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 16 Jan 2015 21:15:05 +0000 Subject: 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@. --- main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.c b/main.c index 6c005a66..6c818252 100644 --- a/main.c +++ b/main.c @@ -19,6 +19,7 @@ #include "config.h" #include +#include /* MACHINE */ #include #include @@ -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; -- cgit