1People tell me that HP uses compressed man pages named like
2	/usr/man/man1.Z/ls.1
3that is, the directory instead of the file has an extension.
4I have no access to HP machines, and do not know the details
5of this situation (what happens to cat files? to .so files?),
6but perhaps this man is usable in such a situation if one puts
7	MAN_HP_DIREXT=.Z
8in the environment. Untested.
9
10Tell me if this works, and if not what is wrong. 
11I may yet gain access to an HP-UX box and verify this myself.
12flc - flucifredi@acm.org
13
14P.S.
15
16A report mentions cat1.Z cat1m.Z cat2.Z ... cat8.Z
17man1 man1.Z man1m man1m.Z ... man8 man8.Z man9.Z
18subdirectories of /usr/share/man,
19where the cat dirs are owned by bin:bin with mode 0777
20and the man dirs are owned by bin:bin with mode 0555.
21
22Scott Marovich adds:
23
24As far as your GNU software is concerned, the first very important point is:
25The paths used for compressed manual pages represent only the tip of a very
26deep iceberg:  Historically, HP-UX derives from A.T.&T. UNIX System V (and
27System III before that) with some selected BSD features added later, and it
28doesn't even purport to be GNU-compatible.  For many years HP sold a binary
29HP-UX port of the A.T.&T. Documenter's Work Bench as an optional product, and
30HP-UX's versions of "man(1)" and "nroff(1)" (etc.) strive to be DWB-compatible.
31Similarly, the manual pages use only plain, old, simple A.T.&T. "man(7)" macros,
32HP-UX's standard data-compression utility command is "compress(1)"/"zcat(1)"
33instead "gzip(1)", and HP-UX follows System V conventions about where to cache
34formatted pages: they go into directories such as "/usr[/share]/man/cat*"
35instead of "/var/cache/man" like under Linux.  System V "man(1)" can optionally
36accept compressed input and/or produce compressed output, and it has a built-in
37algorithm for deciding which directories to use.  Assuming, for example, that
38manual page "foo.1" is requested, the algorithm works like this:
39
40(Output-directory search:)
41If a "/usr[/share]/man/cat1.Z" directory exists, look for a cached (formatted,
42compressed) "foo.1" file in it; otherwise, if a "/usr[/share]/man/cat1"
43directory exists, look for a cached (formatted, uncompressed) "foo.1" file in
44it; otherwise, no formatted-and-cached form of the page exists.  After an input
45page is formatted, it will be compressed and cached if the "cat1.Z" directory
46exists, or cached without compression if only the "cat1" directory exists, or
47discarded if neither exist.
48
49(Input-directory search:)
50If "/usr[/share]/man/man1.Z/foo.1" exists, then decompress and format this file;
51otherwise, if "/usr[/share]/man/foo.1" exists, then format this uncompressed
52file; otherwise, assume that the manual page is missing.
53
54Notice that:
55
561. Priority is automatically given to fetching and storing manual pages in
57   compressed form if the necessary directories exist.
58
592. Unlike GNU-compatible path naming schemes, the "regular" files containing
60   [un]formatted manual-page text do *not* have ".Z" (let alone ".gz") suffixes;
61only their containing directories do.
62
63As far as these file's protection modes are concerned, that's partly up to a
64local HP-UX system administrator.  If one prefers not to have "man(1)" be a
65set-UID/GID binary, then the usual custom is:
66
67     man?[.Z] directories   : mode 555
68     man?[.Z]/<name>.* files: mode 444
69     cat?[.Z] directories   : mode 777
70     cat?[.Z]/<name>.* files: mode 666
71
72i.e., any user can delete any other user's cached, formatted pages.  If one
73prefers to run "man(1)" as a set-UID/GID program for a little more control,
74then an alternative scheme is, say:
75
76     cat?[.Z] directories   : mode 755/575
77     cat?[.Z]/<name>.* files: mode 644/464
78
79You also expressed some curiousity about the treatment of ".so" directives in
80compressed manual pages.  The answer is simple: there aren't any.  ".so" is
81rarely used in general, so the HP department responsible for producing HP-UX's
82manual pages decided to "soelim(1)" the small number of exceptions (before
83compressing the result) in order to avoid dealing with this problem.
84