From 668d4d545d8d492db11e35f07ea7744ff322935a 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index a79523bf..30e076f2 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.215 2015/01/15 04:26:39 schwarze Exp $ */ +/* $Id: main.c,v 1.216 2015/01/16 21:15:05 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze @@ -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 v1.2.3-56-ge451