tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Respect MACHINE.
@ 2011-12-14 10:44 Kristaps Dzonsons
  2011-12-14 11:36 ` Ingo Schwarze
  0 siblings, 1 reply; 3+ messages in thread
From: Kristaps Dzonsons @ 2011-12-14 10:44 UTC (permalink / raw)
  To: tech

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

Hi,

The enclosed small patch respects the MACHINE variable as stipulated in 
man(1).  This isn't mentioned in apropos(1) or whatis(1), but it makes 
sense to be consistent with man(1)'s environment (MANPATH, etc.).  Thoughts?

Thanks,

Kristaps

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1547 bytes --]

Index: apropos.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/apropos.1,v
retrieving revision 1.13
diff -u -r1.13 apropos.1
--- apropos.1	12 Dec 2011 02:00:49 -0000	1.13
+++ apropos.1	14 Dec 2011 10:38:06 -0000
@@ -238,6 +238,10 @@
 .El
 .Sh ENVIRONMENT
 .Bl -tag -width Ds
+.It Ev MACHINE
+Case-insensitive architecture.
+Overriden by
+.Fl S .
 .It Ev MANPATH
 Colon-separated paths overriding the default list of paths searched for
 manual databases.
Index: apropos.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/apropos.c,v
retrieving revision 1.24
diff -u -r1.24 apropos.c
--- apropos.c	12 Dec 2011 02:00:49 -0000	1.24
+++ apropos.c	14 Dec 2011 10:38:06 -0000
@@ -62,6 +62,7 @@
 	auxpaths = defpaths = NULL;
 	conf_file = NULL;
 	e = NULL;
+	opts.arch = getenv("MACHINE");
 
 	while (-1 != (ch = getopt(argc, argv, "C:M:m:S:s:")))
 		switch (ch) {
Index: whatis.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/whatis.1,v
retrieving revision 1.4
diff -u -r1.4 whatis.1
--- whatis.1	12 Dec 2011 02:00:49 -0000	1.4
+++ whatis.1	14 Dec 2011 10:38:06 -0000
@@ -110,6 +110,10 @@
 .Dl $ apropos -- -i 'Nm~[[:<:]]term[[:>:]]'
 .Sh ENVIRONMENT
 .Bl -tag -width Ds
+.It Ev MACHINE
+Case-insensitive architecture.
+Overriden by
+.Fl S .
 .It Ev MANPATH
 Colon-separated paths overriding the default list of paths searched for
 manual databases.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-14 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 10:44 Respect MACHINE Kristaps Dzonsons
2011-12-14 11:36 ` Ingo Schwarze
2011-12-14 13:08   ` Kristaps Dzonsons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).