home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / question / 10924 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.8 KB

  1. Xref: sparky comp.unix.questions:10924 comp.windows.x.apps:986
  2. Newsgroups: comp.unix.questions,comp.windows.x.apps
  3. Path: sparky!uunet!mcsun!sun4nl!fwi.uva.nl!casper
  4. From: casper@fwi.uva.nl (Casper H.S. Dik)
  5. Subject: Re: backward MANPATH ?
  6. Message-ID: <1992Sep10.141452.13036@fwi.uva.nl>
  7. Sender: news@fwi.uva.nl
  8. Nntp-Posting-Host: adam.fwi.uva.nl
  9. Organization: FWI, University of Amsterdam
  10. References: <1992Sep9.191751.22333@eng.ufl.edu>
  11. Date: Thu, 10 Sep 1992 14:14:52 GMT
  12. Lines: 44
  13.  
  14. ruck@zeta.ee.ufl.edu (John R Ruckstuhl Jr) writes:
  15.  
  16. >Sanity check, please --
  17. >Regarding "man" (SunOS 4.1.1) and "xman" utilities,
  18.  
  19. >These utilities output the manpage found !last! in the MANPATH, 
  20. >so one might suggest the MANPATH be constructed backwards (relative to
  21. >the construction of other "paths" like PATH, LDPATH, etc.).
  22.  
  23. >E.g., 
  24. >If       PATH  is like  /usr/bin:/usr/local/bin ,
  25. >then  MANPATH  is like  /usr/local/man:/usr/man .
  26.  
  27. Strange. On my version of SunOS 4.1.1, man(1) searches the MANPATH
  28. in the order specified in MANPATH.
  29. Man has some serious brain damage, though. The search algorithm is something
  30. like:
  31.  
  32.     for chapter in 1 n l 6 8 2 3 4 5 7 p o
  33.         for suffix in getsuffixlist(chapter) !!!!!
  34.         for dir in $MANPATH
  35.             if ( -r $dir/man$chapter/$program.$chapter$suffix)
  36.                 found
  37.             if ( -r $dir/cat$chapter/$program.$chapter$suffix)
  38.                 found
  39.  
  40.  
  41. The MANPATH should be in the outer loop, of course.
  42.  
  43. With MANPATH = /usr/man:/usr/local/man, man now prefers
  44. /usr/local/man/cut.1 over /usr/man/man1/cut.1v
  45. The suffixlist for chapter one expands to ``<nothing> b c g m p r s v w''
  46. and man tries:
  47.     /usr/man/man1/cut.1
  48.     /usr/man/cat1/cut.1
  49.     /usr/local/man/man1/cut.1 <- found !
  50.  
  51. And you wanted it to find /usr/man/man1/cut.1v!!
  52.  
  53. Casper
  54.  
  55. -- 
  56.                         |    Casper H.S. Dik
  57.                         |    casper@fwi.uva.nl
  58.