53
50
* complete than the cat directories.
56
#if ( defined(UTEK) || defined(apollo) || defined(Lynx) )
57
# define SEARCHDIR CAT
59
# define SEARCHDIR MAN
62
#if ( defined(sgi) || (defined(i386) && (defined(SYSV) || defined(SVR4)) && !defined(sun)) || (defined(BSD) && (BSD >= 199103)) || defined(linux) || defined(__CYGWIN__) )
55
#if (defined(sgi) || (defined(SVR4) && !defined(sun)) || (defined(BSD) && (BSD >= 199103)) || defined(linux) || defined(__CYGWIN__) )
63
56
# define SEARCHOTHER CAT
67
60
* The default manual page directory.
69
* The MANPATH enviornment variable will override this.
62
* The MANPATH environment variable will override this.
75
# define SYSMANPATH "/usr/catman/u_man:/usr/catman/a_man"
76
#elif defined(__bsdi__)
77
68
# define SYSMANPATH "/usr/share/man:/usr/contrib/man:/usr/contrib/isode/man:/usr/local/man"
78
69
#elif defined(__OpenBSD__) || defined(__DARWIN__)
79
70
# define SYSMANPATH "/usr/share/man:/usr/local/man:/usr/X11R6/man"
81
72
# define SYSMANPATH "/usr/share/man:/usr/X11/man:/usr/openwin/share/man:/usr/dt/share/man:/usr/sfw/share/man"
82
73
#elif defined(SVR4) || defined(__osf__) || (defined(BSD) && (BSD >= 199103))
83
74
# define SYSMANPATH "/usr/share/man"
85
# define SYSMANPATH "/usr/catman/local_man:/usr/catman/u_man:/usr/catman/a_man:/usr/catman/p_man:/usr/catman/ada_man"
86
#elif defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)
87
# define SYSMANPATH "/usr/catman/u_man:/usr/catman/p_man"
89
76
# define SYSMANPATH "/usr/catman/a_man:/usr/catman/g_man:/usr/catman/p_man:/usr/catman/u_man:/usr/man/p_man:/usr/man/u_man:/usr/man"
99
86
* Compression Definitions.
102
#if defined( macII ) || defined( hcx ) || \
103
(defined(SYSV) && defined(i386) && !defined(ISC) && \
104
!defined(__UNIXWARE__) && !defined(__SCO__) && !defined(sun)) || defined(sgi)
105
90
# define COMPRESSION_EXTENSION "z"
106
91
# define UNCOMPRESS_FORMAT "pcat %s > %s"
107
# define NO_COMPRESS /* mac can't handle using pack as a filter and
108
xman needs it to be done that way. */
110
# define COMPRESSION_EXTENSION "C"
111
# define UNCOMPRESS_FORMAT "ccat < %s > %s"
112
# define COMPRESS "compact"
92
# define NO_COMPRESS /* mac can't handle using pack as a filter and
93
xman needs it to be done that way. */
113
94
#elif defined (ISC) || defined(__SCO__) || defined(__UNIXWARE__)
114
# define COMPRESSION_EXTENSION "Z" /* dummy */
95
# define COMPRESSION_EXTENSION "Z" /* dummy */
115
96
# if !defined(__SCO__) && !defined(__UNIXWARE__)
116
# define COMPRESSION_EXTENSIONS "zZF" /* pack, compress, freeze */
97
# define COMPRESSION_EXTENSIONS "zZF" /* pack, compress, freeze */
118
# define COMPRESSION_EXTENSIONS "zZ" /* pack, compress */
99
# define COMPRESSION_EXTENSIONS "zZ" /* pack, compress */
120
101
# define UNCOMPRESS_FORMAT uncompress_format
121
102
# define UNCOMPRESS_FORMAT_1 "pcat %s > %s"
124
105
# define NO_COMPRESS
126
107
# define COMPRESSION_EXTENSION "Z"
128
# define UNCOMPRESS_FORMAT "zcat < %s > %s"
130
# define UNCOMPRESS_FORMAT "zcat < %s >> %s"
108
# define UNCOMPRESS_FORMAT "zcat < %s >> %s"
132
109
# define COMPRESS "compress"
133
110
# define GZIP_EXTENSION "gz"
135
# define GUNZIP_FORMAT "gzip -c -d < %s > %s"
137
# define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
111
# define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
139
112
# define GZIP_COMPRESS "gzip"
140
113
# define BZIP2_EXTENSION "bz2"
114
# define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s"
115
# define BZIP2_COMPRESS "bzip2"
141
116
# define LZMA_EXTENSION "lzma"
143
# define BUNZIP2_FORMAT "bunzip2 -c -d < %s > %s"
144
# define UNLZMA_FORMAT "unlzma -c -d < %s > %s"
146
# define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s"
147
# define UNLZMA_FORMAT "unlzma -c -d < %s >> %s"
149
# define BZIP2_COMPRESS "bzip2"
117
# define UNLZMA_FORMAT "unlzma -c -d < %s >> %s"
150
118
# define LZMA_COMPRESS "lzma"
156
124
* The command filters for the manual and apropos searches.
159
#if (defined(hpux) || defined(macII) || defined(CRAY) || defined(ultrix) || \
161
128
# define NO_MANPATH_SUPPORT
165
# ifdef NO_MANPATH_SUPPORT
166
# define APROPOS_FORMAT ("man -k %s | pr -h Apropos > %s")
168
# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
131
#ifdef NO_MANPATH_SUPPORT
132
# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
171
/* with mkstemp the temp output file is already created */
172
# ifdef NO_MANPATH_SUPPORT
173
# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
175
# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
134
# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
179
137
#ifndef HANDLE_ROFFSEQ
181
# define FORMAT "| nroff -man" /* The format command. */
182
# elif defined(CSRG_BASED)
138
# if defined(CSRG_BASED)
183
139
# define FORMAT "| eqn | tbl | nroff -mandoc"
184
140
# elif defined(BSD) && (BSD >= 199103)
185
141
# define FORMAT "| eqn | tbl | nroff -man"
186
142
# elif defined(linux) || defined(__CYGWIN__)
187
143
# define FORMAT "| pic | eqn | tbl -Tlatin1 | GROFF_NO_SGR= groff -Tlatin1 -mandoc"
189
# define FORMAT "| neqn | nroff -man" /* The format command. */
145
# define FORMAT "| neqn | nroff -man" /* The format command. */
191
147
# define TBL "tbl"
192
#else /* HANDLE_ROFFSEQ */
148
#else /* HANDLE_ROFFSEQ */
193
149
# if defined(linux)
194
150
# define ZSOELIM "zsoelim"
211
167
# define FORMAT "groff -man"
213
169
# define DEFAULT_MANROFFSEQ "et"
214
#endif /*HANDLE_ROFFSEQ */
170
#endif /*HANDLE_ROFFSEQ */
217
173
* Names of the man and cat dirs.
223
179
#define MAN "man"
227
* The Apple, Cray,, SYSV386, and HCX folks put the preformatted pages in the
230
#if (defined(macII) || defined(CRAY) || defined(hcx) || \
231
(defined(SYSV) && defined(i386))) && !defined(SCO) && !defined(sun)
234
183
# define CAT "cat."
236
185
# define CAT "cat"
242
191
# define SMAN "sman"
243
192
# undef SEARCHOTHER
244
193
# define SEARCHOTHER SMAN
245
# define SGMLENT_EXTENSION "ent" /* SGML entity files end in ".ent" */
194
# define SGMLENT_EXTENSION "ent" /* SGML entity files end in ".ent" */
249
198
typedef struct _SectionList {
250
struct _SectionList * next;
251
char * label; /* section label */
252
char * directory; /* section directory */
199
struct _SectionList *next;
200
char *label; /* section label */
201
char *directory; /* section directory */
256
extern char * CreateManpageName(char * entry, int section, int flags);
257
extern void AddStandardSections(SectionList **list, char * path);
258
extern void AddNewSection(SectionList **list, char * path, char * file, char * label, int flags);
205
extern char *CreateManpageName(const char *entry, int section, int flags);
206
extern void AddStandardSections(SectionList ** list, const char *path);
207
extern void AddNewSection(SectionList ** list, const char *path,
208
const char *file, const char *label, int flags);