]> diplodocus.org Git - nmh/blob - h/nmh.h
Added mhshow-suffix-text entry.
[nmh] / h / nmh.h
1
2 /*
3 * nmh.h -- system configuration header file
4 */
5
6 #ifdef HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9
10 #include <unistd.h>
11 #include <stdio.h>
12 #include <ctype.h>
13 #ifndef NDEBUG
14 /* See etc/gen-ctype-checked.c. */
15 # include <sbr/ctype-checked.h>
16 #endif
17 #include <assert.h>
18
19 #ifdef HAVE_STDBOOL_H
20 # include <stdbool.h>
21 #else
22 # define bool int
23 # define true 1
24 # define false 0
25 #endif
26
27 #include <sys/stat.h>
28 #include <sys/wait.h>
29
30 # include <dirent.h>
31 #define NLENGTH(dirent) strlen((dirent)->d_name)
32
33 #include <stdlib.h>
34 #include <stdarg.h>
35 #include <string.h>
36
37 #ifdef HAVE_SYS_PARAM_H
38 # include <sys/param.h>
39 #endif
40
41 #include <locale.h>
42 #include <limits.h>
43 #include <errno.h>
44
45 /*
46 * we should be getting this value from pathconf(_PC_PATH_MAX)
47 */
48 #ifndef PATH_MAX
49 # ifdef MAXPATHLEN
50 # define PATH_MAX MAXPATHLEN
51 # else
52 /* so we will just pick something */
53 # define PATH_MAX 1024
54 # endif
55 #endif
56
57 /*
58 * we should get this value from sysconf(_SC_NGROUPS_MAX)
59 */
60 #ifndef NGROUPS_MAX
61 # ifdef NGROUPS
62 # define NGROUPS_MAX NGROUPS
63 # else
64 # define NGROUPS_MAX 16
65 # endif
66 #endif
67
68 /*
69 * we should be getting this value from sysconf(_SC_OPEN_MAX)
70 */
71 #ifndef OPEN_MAX
72 # ifdef NOFILE
73 # define OPEN_MAX NOFILE
74 # else
75 /* so we will just pick something */
76 # define OPEN_MAX 64
77 # endif
78 #endif
79
80 #ifndef HAVE_GETLINE
81 ssize_t getline(char **lineptr, size_t *n, FILE *stream);
82 #endif
83
84 /*
85 * Defaults for programs if they aren't configured in a user's profile
86 */
87
88 #define DEFAULT_PAGER "more"
89 #define DEFAULT_EDITOR "vi"