Hi all,      I used pkg_add to add jdk and after installation, it told me to 
add /usr/local/jdk-1.7.0/man to man.conf. Therefore, I googled on modifying 
man.conf and came across the OpenBSD man page 
online:http://man.openbsd.org/OpenBSD-current/man5/man.conf.5
I cut-and-pasted the EXAMPLES section into /etc/man.conf exactly as stated from 
the webpage and then added an extra line for the jdk manpath:manpath 
/usr/share/man 
manpath /usr/X11R6/man 
manpath /usr/local/man
manpath /usr/local/jdk-1.7.0/man
And after this, "man java" worked fine, but "man man", "man printf", "man 
man.conf" etc. stopped working! After a bit of debugging, I found that the 
problem was that the manpath lines for the first two lines had trailing spaces 
at the end (I had cut/pasted them from the webpage above, but it appears the 
page has the trailing spaces in it as well). So I figured I should fix man so 
that it properly handles trailing spaces in man.conf. Here's my patch to fix 
this:
$ cvs -d [email protected]:/cvs diffcvs server: Diffing .Index: 
manpath.c===================================================================RCS 
file: /cvs/src/usr.bin/mandoc/manpath.c,vretrieving revision 1.17diff -u -p 
-r1.17 manpath.c--- manpath.c   7 Nov 2015 17:58:52 -0000       1.17+++ 
manpath.c   23 May 2016 06:15:00 -0000@@ -176,7 +176,14 @@ manconf_file(struct 
manconf *conf, const                ep = cp + linelen;                if 
(ep[-1] != '\n')                        break;-               *--ep = '\0';+    
           ep--;+               while (ep > cp && isspace(*ep)) {+              
         *ep = '\0';+                       ep--;+               }+             
  if (ep == cp)+                       continue;+                while 
(isspace((unsigned char)*cp))                        cp++;                if 
(*cp == '#')
Cheers,Mayukh                                     

Reply via email to