defines.o9 revision 225736
1260684Skaiw/*
2260684Skaiw * Copyright (C) 1984-2011  Mark Nudelman
3276371Semaste *
4260684Skaiw * You may distribute under the terms of either the GNU General Public
5260684Skaiw * License or the Less License, as specified in the README file.
6260684Skaiw *
7260684Skaiw * For more information about less, or for information on how to 
8260684Skaiw * contact the author, see the README file.
9260684Skaiw */
10260684Skaiw
11260684Skaiw
12260684Skaiw/* OS/9 definition file for less.  */
13260684Skaiw/*
14260684Skaiw * This file has 2 sections:
15260684Skaiw * User preferences.
16260684Skaiw * Settings always true for OS-9 systems. 
17260684Skaiw */
18260684Skaiw
19260684Skaiw/* User preferences.  */
20260684Skaiw
21260684Skaiw/*
22260684Skaiw * SECURE is 1 if you wish to disable a bunch of features in order to
23260684Skaiw * be safe to run by unprivileged users.
24260684Skaiw */
25260684Skaiw#define	SECURE		0
26260684Skaiw
27295577Semaste/*
28260684Skaiw * SHELL_ESCAPE is 1 if you wish to allow shell escapes.
29260684Skaiw * (This is possible only if your system supplies the system() function.)
30260684Skaiw */
31260684Skaiw#define	SHELL_ESCAPE	(!SECURE)
32260684Skaiw
33260684Skaiw/*
34260684Skaiw * EXAMINE is 1 if you wish to allow examining files by name from within less.
35260684Skaiw */
36260684Skaiw#define	EXAMINE		(!SECURE)
37260684Skaiw
38260684Skaiw/*
39260684Skaiw * TAB_COMPLETE_FILENAME is 1 if you wish to allow the TAB key
40260684Skaiw * to complete filenames at prompts.
41260684Skaiw */
42260684Skaiw#define	TAB_COMPLETE_FILENAME	1
43260684Skaiw
44260684Skaiw/*
45260684Skaiw * CMD_HISTORY is 1 if you wish to allow keys to cycle through
46260684Skaiw * previous commands at prompts.
47260684Skaiw */
48260684Skaiw#define	CMD_HISTORY	1
49260684Skaiw
50260684Skaiw/*
51260684Skaiw * HILITE_SEARCH is 1 if you wish to have search targets to be 
52278611Semaste * displayed in standout mode.
53260684Skaiw */
54260684Skaiw#define	HILITE_SEARCH	1
55260684Skaiw
56260684Skaiw/*
57260684Skaiw * EDITOR is 1 if you wish to allow editor invocation (the "v" command).
58260684Skaiw * (This is possible only if your system supplies the system() function.)
59260684Skaiw * EDIT_PGM is the name of the (default) editor to be invoked.
60260684Skaiw */
61260684Skaiw#define	EDITOR		(!SECURE)
62260684Skaiw#define	EDIT_PGM	"umacs"
63260684Skaiw
64260684Skaiw/*
65260684Skaiw * TAGS is 1 if you wish to support tag files.
66260684Skaiw */
67260684Skaiw#define	TAGS		(!SECURE)
68260684Skaiw
69260684Skaiw/*
70260684Skaiw * USERFILE is 1 if you wish to allow a .less file to specify 
71260684Skaiw * user-defined key bindings.
72260684Skaiw */
73260684Skaiw#define	USERFILE	(!SECURE)
74260684Skaiw
75260684Skaiw/*
76260684Skaiw * GLOB is 1 if you wish to have shell metacharacters expanded in filenames.
77260684Skaiw * This will generally work if your system provides the "popen" function
78260684Skaiw * and the "echo" shell command.
79260684Skaiw */
80260684Skaiw#define	GLOB		(!SECURE)
81260684Skaiw
82260684Skaiw/*
83260684Skaiw * PIPEC is 1 if you wish to have the "|" command
84260684Skaiw * which allows the user to pipe data into a shell command.
85260684Skaiw */
86260684Skaiw#define	PIPEC		(!SECURE)
87260684Skaiw
88260684Skaiw/*
89260684Skaiw * LOGFILE is 1 if you wish to allow the -l option (to create log files).
90260684Skaiw */
91260684Skaiw#define	LOGFILE		(!SECURE)
92276371Semaste
93260684Skaiw/*
94260684Skaiw * GNU_OPTIONS is 1 if you wish to support the GNU-style command
95295577Semaste * line options --help and --version.
96295577Semaste */
97260684Skaiw#define	GNU_OPTIONS	1
98260684Skaiw
99260684Skaiw/*
100260684Skaiw * ONLY_RETURN is 1 if you want RETURN to be the only input which
101260684Skaiw * will continue past an error message.
102260684Skaiw * Otherwise, any key will continue past an error message.
103260684Skaiw */
104260684Skaiw#define	ONLY_RETURN	0
105295577Semaste
106295577Semaste/*
107260684Skaiw * LESSKEYFILE is the filename of the default lesskey output file 
108260684Skaiw * (in the HOME directory).
109260684Skaiw * LESSKEYFILE_SYS is the filename of the system-wide lesskey output file.
110260684Skaiw * DEF_LESSKEYINFILE is the filename of the default lesskey input 
111260684Skaiw * (in the HOME directory).
112260684Skaiw * LESSHISTFILE is the filename of the history file
113260684Skaiw * (in the HOME directory).
114260684Skaiw */
115260684Skaiw#define	LESSKEYFILE		".less"
116260684Skaiw#define	LESSKEYFILE_SYS		"/.sysless"
117260684Skaiw#define	DEF_LESSKEYINFILE	".lesskey"
118260684Skaiw#define LESSHISTFILE		".lesshst"
119260684Skaiw
120260684Skaiw
121260684Skaiw/* Settings always true for OS-9.  */
122260684Skaiw
123260684Skaiw/* This is not needed; it is defined by the compiler. */
124260684Skaiw/* #define _OSK 1 */
125260684Skaiw#define OS2 		0
126260684Skaiw#define MSDOS_COMPILER	0
127260684Skaiw
128260684Skaiw/*
129260684Skaiw * Pathname separator character.
130260684Skaiw */
131260684Skaiw#define	PATHNAME_SEP	"/"
132260684Skaiw
133260684Skaiw/*
134260684Skaiw * HAVE_SYS_TYPES_H is 1 if your system has <sys/types.h>.
135260684Skaiw */
136260684Skaiw#define HAVE_SYS_TYPES_H 0
137260684Skaiw
138260684Skaiw/*
139260684Skaiw * Define if you have the <sgstat.h> header file.
140260684Skaiw */
141260684Skaiw#define HAVE_SGSTAT_H	1
142260684Skaiw
143260684Skaiw/*
144260684Skaiw * HAVE_PERROR is 1 if your system has the perror() call.
145260684Skaiw * (Actually, if it has sys_errlist, sys_nerr and errno.)
146260684Skaiw */
147260684Skaiw#if _OSK_MWC32
148260684Skaiw#define	HAVE_PERROR	0
149260684Skaiw#else
150260684Skaiw#define	HAVE_PERROR	1
151260684Skaiw#endif
152260684Skaiw
153260684Skaiw/*
154260684Skaiw * HAVE_TIME is 1 if your system has the time() call.
155260684Skaiw */
156260684Skaiw#define	HAVE_TIME	1
157260684Skaiw
158260684Skaiw/*
159260684Skaiw * HAVE_SHELL is 1 if your system supports a SHELL command interpreter.
160260684Skaiw */
161260684Skaiw#define	HAVE_SHELL 0
162260684Skaiw
163260684Skaiw/*
164260684Skaiw * Default shell metacharacters and meta-escape character.
165260684Skaiw */
166260684Skaiw#define DEF_METACHARS   "; \t\n'\"()<>|&^`#\\"
167260684Skaiw#define DEF_METAESCAPE  "\\"
168260684Skaiw
169260684Skaiw/* 
170260684Skaiw * HAVE_DUP is 1 if your system has the dup() call.
171260684Skaiw */
172260684Skaiw#define	HAVE_DUP 0
173260684Skaiw
174260684Skaiw/*
175260684Skaiw * Sizes of various buffers.
176260684Skaiw */
177260684Skaiw#define	CMDBUF_SIZE	512	/* Buffer for multichar commands */
178260684Skaiw#define	UNGOT_SIZE	100	/* Max chars to unget() */
179260684Skaiw#define	LINEBUF_SIZE	1024	/* Max size of line in input file */
180260684Skaiw#define	OUTBUF_SIZE	1024	/* Output buffer */
181260684Skaiw#define	PROMPT_SIZE	200	/* Max size of prompt string */
182260684Skaiw#define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
183260684Skaiw#define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
184260684Skaiw#define	TAGLINE_SIZE	512	/* Max size of line in tags file */
185260684Skaiw#define	TABSTOP_MAX	32	/* Max number of custom tab stops */
186260684Skaiw
187260684Skaiw/* Define to `long' if <sys/types.h> doesn't define.  */
188260684Skaiw#define off_t long
189260684Skaiw
190260684Skaiw/* Define if you need to in order for stat and other things to work.  */
191260684Skaiw#define _POSIX_SOURCE 0
192260684Skaiw
193280932Semaste/* Define as the return type of signal handlers (int or void).  */
194260684Skaiw#if _OSK_MWC32
195260684Skaiw#define RETSIGTYPE int
196260684Skaiw#else
197260684Skaiw#define RETSIGTYPE void
198260684Skaiw#endif
199260684Skaiw
200260684Skaiw
201260684Skaiw/*
202260684Skaiw * Regular expression library.
203260684Skaiw * Define exactly one of the following to be 1:
204260684Skaiw * HAVE_POSIX_REGCOMP: POSIX regcomp() and regex.h
205260684Skaiw * HAVE_RE_COMP: BSD re_comp()
206260684Skaiw * HAVE_REGCMP: System V regcmp()
207260684Skaiw * HAVE_V8_REGCOMP: Henry Spencer V8 regcomp() and regexp.h
208260684Skaiw * NO_REGEX: pattern matching is supported, but without metacharacters.
209260684Skaiw */
210260684Skaiw#define HAVE_POSIX_REGCOMP 0
211260684Skaiw#define HAVE_RE_COMP 0
212260684Skaiw#define HAVE_REGCMP 0
213260684Skaiw#define HAVE_V8_REGCOMP 1
214260684Skaiw#define NO_REGEX 0
215260684Skaiw#define HAVE_REGEXEC2 1
216260684Skaiw
217260684Skaiw/* Define HAVE_VOID if your compiler supports the "void" type. */
218260684Skaiw#define HAVE_VOID 1
219260684Skaiw
220260684Skaiw/* Define HAVE_CONST if your compiler supports the "const" modifier. */
221260684Skaiw#define HAVE_CONST 0
222260684Skaiw
223260684Skaiw/* Define HAVE_TIME_T if your system supports the "time_t" type. */
224260684Skaiw#define HAVE_TIME_T 1
225260684Skaiw
226260684Skaiw/* Define HAVE_STRERROR if you have the strerror() function. */
227260684Skaiw#define HAVE_STRERROR 0
228260684Skaiw
229260684Skaiw/* Define HAVE_FILENO if you have the fileno() macro. */
230260684Skaiw#define HAVE_FILENO 1
231260684Skaiw
232260684Skaiw/* Define HAVE_ERRNO if you have the errno variable */
233260684Skaiw/* Define MUST_DEFINE_ERRNO if you have errno but it is not define 
234260684Skaiw * in errno.h */
235260684Skaiw#define HAVE_ERRNO 1
236260684Skaiw#define MUST_DEFINE_ERRNO 0
237260684Skaiw
238260684Skaiw/* Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable */
239260684Skaiw#define HAVE_SYS_ERRLIST 0
240260684Skaiw
241260684Skaiw/* Define HAVE_OSPEED if your termcap library has the ospeed variable */
242260684Skaiw/* Define MUST_DEFINE_OSPEED if you have ospeed but it is not defined
243260684Skaiw * in termcap.h. */
244260684Skaiw#define HAVE_OSPEED 0
245260684Skaiw#define MUST_DEFINE_OSPEED 0
246260684Skaiw
247260684Skaiw/* Define HAVE_LOCALE if you have locale.h and setlocale. */
248260684Skaiw#define HAVE_LOCALE 0
249260684Skaiw
250260684Skaiw/* Define HAVE_TERMIOS_FUNCS if you have tcgetattr/tcsetattr */
251260684Skaiw#define HAVE_TERMIOS_FUNCS 0
252260684Skaiw
253260684Skaiw/* Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower */
254260684Skaiw#define HAVE_UPPER_LOWER 1
255260684Skaiw
256260684Skaiw/* Define if you have the _setjmp function.  */
257260684Skaiw#define HAVE__SETJMP 1
258260684Skaiw
259260684Skaiw/* Define if you have the memcpy function.  */
260260684Skaiw#define HAVE_MEMCPY 1
261260684Skaiw
262276371Semaste/* Define if you have the popen function.  */
263276371Semaste#define HAVE_POPEN 1
264260684Skaiw
265260684Skaiw/* Define if you have the sigsetmask function.  */
266260684Skaiw#define HAVE_SIGSETMASK 0
267260684Skaiw
268260684Skaiw/* Define if you have the sigprocmask function.  */
269260684Skaiw#define HAVE_SIGPROCMASK	0
270260684Skaiw
271260684Skaiw/* Define if you have the sigset_t type and sigemptyset macro */
272260684Skaiw#define HAVE_SIGSET_T	0
273260684Skaiw#define HAVE_SIGEMPTYSET	0
274260684Skaiw
275260684Skaiw/* Define if you have the stat function.  */
276260684Skaiw#define HAVE_STAT 0
277260684Skaiw
278260684Skaiw/* Define if you have the strchr function.  */
279260684Skaiw#define HAVE_STRCHR 0
280260684Skaiw
281260684Skaiw/* Define if you have the system function.  */
282260684Skaiw#define HAVE_SYSTEM 1
283260684Skaiw
284260684Skaiw/* Define if you have the snprintf function.  */
285260684Skaiw#define HAVE_SNPRINTF	0
286260684Skaiw
287260684Skaiw/* Define if you have the <ctype.h> header file.  */
288260684Skaiw#define HAVE_CTYPE_H 1
289260684Skaiw
290260684Skaiw/* Define if you have the <wctype.h> header file.  */
291260684Skaiw#define HAVE_WCTYPE_H 0
292260684Skaiw
293260684Skaiw/* Define if you have the <errno.h> header file.  */
294260684Skaiw#define HAVE_ERRNO_H 1
295260684Skaiw
296260684Skaiw/* Define if you have the <fcntl.h> header file.  */
297260684Skaiw#define HAVE_FCNTL_H 0
298260684Skaiw
299260684Skaiw/* Define if you have the <limits.h> header file.  */
300260684Skaiw#define HAVE_LIMITS_H  0
301260684Skaiw
302260684Skaiw/* Define if you have the <stdio.h> header file.  */
303260684Skaiw#define HAVE_STDIO_H 1
304260684Skaiw
305260684Skaiw/* Define if you have the <string.h> header file.  */
306260684Skaiw#define HAVE_STRING_H 1
307260684Skaiw
308260684Skaiw/* Define if you have the <stdlib> header file. */
309260684Skaiw#if _OSK_MWC32
310260684Skaiw#define HAVE_STDLIB_H 0
311260684Skaiw#else
312260684Skaiw#define HAVE_STDLIB_H 1
313260684Skaiw#endif
314260684Skaiw
315260684Skaiw/* Define if you have the <sys/ioctl.h> header file.  */
316260684Skaiw#define HAVE_SYS_IOCTL_H 0
317260684Skaiw
318260684Skaiw/* Define if you have the <sys/ptem.h> header file.  */
319260684Skaiw#define HAVE_SYS_PTEM_H 0
320260684Skaiw
321260684Skaiw/* Define if you have the <sys/stream.h> header file.  */
322260684Skaiw#define HAVE_SYS_STREAM_H 0
323260684Skaiw
324260684Skaiw/* Define if you have the <termcap.h> header file.  */
325260684Skaiw#define HAVE_TERMCAP_H 1
326260684Skaiw
327260684Skaiw/* Define if you have the <termio.h> header file.  */
328260684Skaiw#define HAVE_TERMIO_H 0
329260684Skaiw
330260684Skaiw/* Define if you have the <termios.h> header file.  */
331260684Skaiw#define HAVE_TERMIOS_H 0
332276371Semaste
333276371Semaste/* Define if you have the <time.h> header file.  */
334260684Skaiw#define HAVE_TIME_H 1
335260684Skaiw
336260684Skaiw/* Define if you have the <unistd.h> header file.  */
337260684Skaiw#define HAVE_UNISTD_H 0
338260684Skaiw
339276371Semaste/* Define if you have the <values.h> header file.  */
340260684Skaiw#define HAVE_VALUES_H 0
341260684Skaiw