vendor.h revision 6448b35c
1/*
2
3Copyright (c) 1991  X Consortium
4
5Permission is hereby granted, free of charge, to any person obtaining
6a copy of this software and associated documentation files (the
7"Software"), to deal in the Software without restriction, including
8without limitation the rights to use, copy, modify, merge, publish,
9distribute, sublicense, and/or sell copies of the Software, and to
10permit persons to whom the Software is furnished to do so, subject to
11the following conditions:
12
13The above copyright notice and this permission notice shall be included
14in all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
20OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22OTHER DEALINGS IN THE SOFTWARE.
23
24Except as contained in this notice, the name of the X Consortium shall
25not be used in advertising or otherwise to promote the sale, use or
26other dealings in this Software without prior written authorization
27from the X Consortium.
28
29*/
30
31/* Vendor-specific definitions */
32#ifdef HAVE_CONFIG_H
33# include "config.h"
34#endif
35
36#ifdef CSRG_BASED
37#include <sys/param.h>
38#endif
39
40#define SUFFIX "suffix"
41#define FOLD "fold"
42#define FOLDSUFFIX "foldsuffix"
43#define MNULL 0
44#define MSUFFIX 1
45#define MFOLD 2
46#define MFOLDSUFFIX 3
47
48/*
49 * The directories to search.  Assume that the manual directories are more
50 * complete than the cat directories.
51 */
52
53#define SEARCHDIR  MAN
54#define SEARCHOTHER CAT
55
56/*
57 * The default manual page directory.
58 *
59 * The MANPATH environment variable will override this.
60 */
61
62#ifndef SYSMANPATH
63
64#if defined(__OpenBSD__) || defined(__DARWIN__)
65#  define SYSMANPATH "/usr/share/man:/usr/local/man:/usr/X11R6/man"
66#elif defined(SVR4) && defined(sun)
67#  define SYSMANPATH "/usr/share/man:/usr/X11/man:/usr/openwin/share/man:/usr/dt/share/man:/usr/sfw/share/man"
68#endif
69
70#ifndef SYSMANPATH
71#  define SYSMANPATH "/usr/share/man"
72#endif
73
74#endif
75
76/*
77 * Compression Definitions.
78 */
79
80#define COMPRESSION_EXTENSION "Z"
81#define UNCOMPRESS_FORMAT     "zcat < %s >> %s"
82#define COMPRESS              "compress"
83#define GZIP_EXTENSION "gz"
84#define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
85#define GZIP_COMPRESS "gzip"
86#define BZIP2_EXTENSION "bz2"
87#define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s"
88#define BZIP2_COMPRESS "bzip2"
89#define LZMA_EXTENSION "lzma"
90#define UNLZMA_FORMAT "unlzma -c -d < %s >> %s"
91#define LZMA_COMPRESS "lzma"
92
93
94/*
95 * The command filters for the manual and apropos searches.
96 */
97
98#define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
99
100#ifndef HANDLE_ROFFSEQ
101# if defined(CSRG_BASED)
102#  define FORMAT "| eqn | tbl | nroff -mandoc"
103# elif defined(linux) || defined(__CYGWIN__)
104#  define FORMAT "| pic | eqn | tbl -Tlatin1 | GROFF_NO_SGR= groff -Tlatin1 -mandoc"
105# else
106#  define FORMAT "| neqn | nroff -man"  /* The format command. */
107# endif
108# define TBL "tbl"
109#else                           /* HANDLE_ROFFSEQ */
110# if defined(linux)
111#  define ZSOELIM	"zsoelim"
112# else
113#  define ZSOELIM	"soelim"
114#endif
115# define EQN		"eqn"
116# define TBL		"tbl"
117# define GRAP		"grap"
118# define ROFF_PIC	"pic"
119# define VGRIND		"vgrind"
120# define REFER		"refer"
121# if defined(CSRG_BASED)
122#  define FORMAT	"nroff -mandoc"
123# elif defined(linux) || defined(__CYGWIN__)
124#  define FORMAT	"GROFF_NO_SGR= groff -Tlatin1 -mandoc"
125# elif defined(__DARWIN__)
126#  define FORMAT	"nroff -man"
127# else
128#  define FORMAT	"GROFF_NO_SGR= groff -Tlatin1 -man"
129# endif
130# define DEFAULT_MANROFFSEQ "et"
131#endif                          /*HANDLE_ROFFSEQ */
132
133/*
134 * Names of the man and cat dirs.
135 */
136
137#define MAN "man"
138#define CAT "cat"
139
140/* Solaris has nroff man pages in "man" and sgml man pages in "sman" */
141#if defined(sun) && defined(SVR4)
142#  define SFORMAT		"/usr/lib/sgml/sgml2roff"
143#  define SMAN			"sman"
144#  undef SEARCHOTHER
145#  define SEARCHOTHER 		SMAN
146#  define SGMLENT_EXTENSION	"ent"   /* SGML entity files end in ".ent" */
147#endif
148
149
150typedef struct _SectionList {
151    struct _SectionList *next;
152    char *label;                /* section label */
153    char *directory;            /* section directory */
154    int flags;
155} SectionList;
156
157extern char *CreateManpageName(const char *entry, int section, int flags);
158extern void AddStandardSections(SectionList ** list, const char *path);
159extern void AddNewSection(SectionList ** list, const char *path,
160                          const char *file, const char *label, int flags);
161