Commit | Line | Data |
---|---|---|
00ba3d1d JH |
1 | /* |
2 | * config.h | |
3 | * | |
4 | * If you haven't read the README file, now might be a good time. | |
5 | * | |
6 | * This file is edited by configure, so you shouldn't have to. | |
7 | * If that doesn't work, edit this file to match your site. | |
8 | * | |
9 | * Sorry it's so long, but there are lots of things you might want to | |
10 | * customize for your site. | |
11 | * | |
12 | * Copyright (c) 1990, 1991, John W. Eaton. | |
13 | * | |
14 | * You may distribute under the terms of the GNU General Public | |
15 | * License as specified in the file COPYING that comes with the man | |
16 | * distribution. | |
17 | * | |
18 | * John W. Eaton | |
19 | * jwe@che.utexas.edu | |
20 | * Department of Chemical Engineering | |
21 | * The University of Texas at Austin | |
22 | * Austin, Texas 78712 | |
23 | */ | |
24 | ||
25 | #ifdef COMPRESS | |
26 | #define DO_COMPRESS | |
27 | #define DO_UNCOMPRESS | |
28 | #endif | |
29 | ||
30 | /* | |
31 | * This is the size of a number of internal buffers. It should | |
32 | * probably not be less than 512. | |
33 | */ | |
34 | #ifndef BUFSIZ | |
35 | #define BUFSIZ 1024 | |
36 | #endif | |
37 | ||
38 | /* | |
39 | * This should be at least the size of the longest path. | |
40 | */ | |
41 | #ifndef MAXPATHLEN | |
42 | #define MAXPATHLEN 1024 | |
43 | #endif | |
44 | ||
45 | /* | |
46 | * This is the maximum number of directories expected in the manpath. | |
47 | */ | |
48 | #ifndef MAXDIRS | |
49 | #define MAXDIRS 64 | |
50 | #endif | |
51 | ||
52 | /* | |
53 | * This is the name of the group that owns the preformatted man pages. | |
54 | * If you are running man as a setgid program, you should make sure | |
55 | * that all of the preformatted man pages and the directories that | |
56 | * they live in are readable and writeable and owned by this group. | |
57 | */ | |
58 | #ifdef SECURE_MAN_UID | |
59 | #define MAN_USER "" | |
60 | #endif | |
61 | ||
62 | /* | |
63 | * It's probably best to define absolute paths to all of these. If | |
64 | * you don't, you'll be depending on the user's path to be correct | |
65 | * when system () is called. This can result in weird behavior that's | |
66 | * hard to track down, especially after you forget how this program | |
67 | * works... If you don't have some of these programs, simply define | |
68 | * them to be empty strings (i.e. ""). As a minimum, you must have | |
69 | * nroff installed. | |
70 | */ | |
71 | #ifndef APROPOS | |
78ed81a3 | 72 | #define APROPOS "%apropos%" |
00ba3d1d JH |
73 | #endif |
74 | ||
75 | #ifndef WHATIS | |
78ed81a3 | 76 | #define WHATIS "%whatis%" |
00ba3d1d JH |
77 | #endif |
78 | ||
79 | #ifndef PAGER | |
78ed81a3 | 80 | #define PAGER "%pager%" |
00ba3d1d JH |
81 | #endif |
82 | ||
83 | #ifdef HAS_TROFF | |
84 | #ifndef TROFF | |
78ed81a3 | 85 | #define TROFF "%troff%" |
00ba3d1d JH |
86 | #endif |
87 | #endif | |
88 | ||
89 | #ifndef NROFF | |
78ed81a3 | 90 | #define NROFF "%nroff%" |
00ba3d1d JH |
91 | #endif |
92 | ||
93 | #ifndef EQN | |
78ed81a3 | 94 | #define EQN "%eqn%" |
00ba3d1d JH |
95 | #endif |
96 | ||
97 | #ifndef NEQN | |
78ed81a3 | 98 | #define NEQN "%neqn%" |
00ba3d1d JH |
99 | #endif |
100 | ||
101 | #ifndef TBL | |
78ed81a3 | 102 | #define TBL "%tbl%" |
00ba3d1d JH |
103 | #endif |
104 | ||
105 | #ifndef COL | |
78ed81a3 | 106 | #define COL "%col%" |
00ba3d1d JH |
107 | #endif |
108 | ||
109 | #ifndef VGRIND | |
78ed81a3 | 110 | #define VGRIND "%vgrind%" |
00ba3d1d JH |
111 | #endif |
112 | ||
113 | #ifndef REFER | |
78ed81a3 | 114 | #define REFER "%refer%" |
00ba3d1d JH |
115 | #endif |
116 | ||
117 | #ifndef GRAP | |
78ed81a3 | 118 | #define GRAP "%grap%" |
00ba3d1d JH |
119 | #endif |
120 | ||
121 | #ifndef PIC | |
78ed81a3 | 122 | #define PIC "%pic%" |
00ba3d1d JH |
123 | #endif |
124 | ||
125 | /* | |
126 | * Define the absolute path to the configuration file. | |
127 | */ | |
128 | #ifndef MAN_MAIN | |
78ed81a3 | 129 | static char config_file[] = "%manpath_config_file%" ; |
00ba3d1d JH |
130 | #endif |
131 | ||
132 | /* | |
133 | * Define the uncompression program(s) to use for those preformatted | |
134 | * pages that end in the given character. If you add extras here, you | |
135 | * may need to change man.c. | |
136 | */ | |
137 | #ifdef DO_UNCOMPRESS | |
138 | /* .F files */ | |
139 | #define FCAT "" | |
140 | /* .Y files */ | |
141 | #define YCAT "" | |
142 | /* .Z files */ | |
78ed81a3 | 143 | #define ZCAT "%zcat%" |
00ba3d1d JH |
144 | #endif |
145 | ||
146 | /* | |
147 | * This is the standard program to use on this system for compressing | |
148 | * pages once they have been formatted, and the character to tack on | |
149 | * to the end of those files. The program listed is expected to read | |
150 | * from the standard input and write compressed output to the standard | |
151 | * output. | |
152 | */ | |
153 | #ifdef DO_COMPRESS | |
154 | #define COMPRESSOR "" | |
155 | #define COMPRESS_EXT "" | |
156 | #endif | |
157 | ||
158 | /* | |
159 | * Define the standard manual sections. For example, if your man | |
160 | * directory tree has subdirectories man1, man2, man3, mann, | |
161 | * and man3foo, std_sections[] would have "1", "2", "3", "n", and | |
162 | * "3foo". Directories are searched in the order they appear. Having | |
163 | * extras isn't fatal, it just slows things down a bit. | |
164 | * | |
165 | * Note that this is just for directories to search. If you have | |
166 | * files like .../man3/foobar.3Xtc, you don't need to have "3Xtc" in | |
167 | * the list below -- this is handled separately, so that `man 3Xtc foobar', | |
168 | * `man 3 foobar', and `man foobar' should find the file .../man3/foo.3Xtc, | |
169 | * (assuming, of course, that there isn't a .../man1/foo.1 or somesuch | |
170 | * that we would find first). | |
171 | * | |
172 | * Note that this list should be in the order that you want the | |
173 | * directories to be searched. Is there a standard for this? What is | |
174 | * the normal order? If anyone knows, please tell me! | |
175 | */ | |
176 | #ifndef MANPATH_MAIN | |
177 | static char *std_sections[] = | |
178 | { | |
179 | "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "p", "o", NULL | |
180 | }; | |
181 | #endif | |
182 | ||
183 | /* | |
184 | * Not all systems define these in stat.h. | |
185 | */ | |
186 | #ifndef S_IRUSR | |
187 | #define S_IRUSR 00400 /* read permission: owner */ | |
188 | #endif | |
189 | #ifndef S_IWUSR | |
190 | #define S_IWUSR 00200 /* write permission: owner */ | |
191 | #endif | |
192 | #ifndef S_IRGRP | |
193 | #define S_IRGRP 00040 /* read permission: group */ | |
194 | #endif | |
195 | #ifndef S_IWGRP | |
196 | #define S_IWGRP 00020 /* write permission: group */ | |
197 | #endif | |
198 | #ifndef S_IROTH | |
199 | #define S_IROTH 00004 /* read permission: other */ | |
200 | #endif | |
201 | #ifndef S_IWOTH | |
202 | #define S_IWOTH 00002 /* write permission: other */ | |
203 | #endif | |
204 | ||
205 | /* | |
206 | * This is the mode used for formatted pages that we create. If you | |
207 | * are using the setgid option, you should use 664. If you are not, | |
208 | * you should use 666 and make the cat* directories mode 777. | |
209 | */ | |
210 | #ifndef CATMODE | |
211 | #ifdef SECURE_MAN_UID | |
212 | #define CATMODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | |
213 | #else | |
214 | #define CATMODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH | |
215 | #endif | |
216 | #endif |