160786Sps/*
2240121Sdelphij * Copyright (C) 1984-2012  Mark Nudelman
360786Sps *
460786Sps * You may distribute under the terms of either the GNU General Public
560786Sps * License or the Less License, as specified in the README file.
660786Sps *
7240121Sdelphij * For more information, see the README file.
860786Sps */
960786Sps
1060786Sps
1160786Sps/* OS/9 definition file for less.  */
1260786Sps/*
1360786Sps * This file has 2 sections:
1460786Sps * User preferences.
1560786Sps * Settings always true for OS-9 systems. 
1660786Sps */
1760786Sps
1860786Sps/* User preferences.  */
1960786Sps
2060786Sps/*
2160786Sps * SECURE is 1 if you wish to disable a bunch of features in order to
2260786Sps * be safe to run by unprivileged users.
2360786Sps */
2460786Sps#define	SECURE		0
2560786Sps
2660786Sps/*
2760786Sps * SHELL_ESCAPE is 1 if you wish to allow shell escapes.
2860786Sps * (This is possible only if your system supplies the system() function.)
2960786Sps */
3060786Sps#define	SHELL_ESCAPE	(!SECURE)
3160786Sps
3260786Sps/*
3360786Sps * EXAMINE is 1 if you wish to allow examining files by name from within less.
3460786Sps */
3560786Sps#define	EXAMINE		(!SECURE)
3660786Sps
3760786Sps/*
3860786Sps * TAB_COMPLETE_FILENAME is 1 if you wish to allow the TAB key
3960786Sps * to complete filenames at prompts.
4060786Sps */
4160786Sps#define	TAB_COMPLETE_FILENAME	1
4260786Sps
4360786Sps/*
4460786Sps * CMD_HISTORY is 1 if you wish to allow keys to cycle through
4560786Sps * previous commands at prompts.
4660786Sps */
4760786Sps#define	CMD_HISTORY	1
4860786Sps
4960786Sps/*
5060786Sps * HILITE_SEARCH is 1 if you wish to have search targets to be 
5160786Sps * displayed in standout mode.
5260786Sps */
5360786Sps#define	HILITE_SEARCH	1
5460786Sps
5560786Sps/*
5660786Sps * EDITOR is 1 if you wish to allow editor invocation (the "v" command).
5760786Sps * (This is possible only if your system supplies the system() function.)
5860786Sps * EDIT_PGM is the name of the (default) editor to be invoked.
5960786Sps */
6060786Sps#define	EDITOR		(!SECURE)
6160786Sps#define	EDIT_PGM	"umacs"
6260786Sps
6360786Sps/*
6460786Sps * TAGS is 1 if you wish to support tag files.
6560786Sps */
6660786Sps#define	TAGS		(!SECURE)
6760786Sps
6860786Sps/*
6960786Sps * USERFILE is 1 if you wish to allow a .less file to specify 
7060786Sps * user-defined key bindings.
7160786Sps */
7260786Sps#define	USERFILE	(!SECURE)
7360786Sps
7460786Sps/*
7560786Sps * GLOB is 1 if you wish to have shell metacharacters expanded in filenames.
7660786Sps * This will generally work if your system provides the "popen" function
7760786Sps * and the "echo" shell command.
7860786Sps */
7960786Sps#define	GLOB		(!SECURE)
8060786Sps
8160786Sps/*
8260786Sps * PIPEC is 1 if you wish to have the "|" command
8360786Sps * which allows the user to pipe data into a shell command.
8460786Sps */
8560786Sps#define	PIPEC		(!SECURE)
8660786Sps
8760786Sps/*
8860786Sps * LOGFILE is 1 if you wish to allow the -l option (to create log files).
8960786Sps */
9060786Sps#define	LOGFILE		(!SECURE)
9160786Sps
9260786Sps/*
9360786Sps * GNU_OPTIONS is 1 if you wish to support the GNU-style command
9460786Sps * line options --help and --version.
9560786Sps */
9660786Sps#define	GNU_OPTIONS	1
9760786Sps
9860786Sps/*
9960786Sps * ONLY_RETURN is 1 if you want RETURN to be the only input which
10060786Sps * will continue past an error message.
10160786Sps * Otherwise, any key will continue past an error message.
10260786Sps */
10360786Sps#define	ONLY_RETURN	0
10460786Sps
10560786Sps/*
10660786Sps * LESSKEYFILE is the filename of the default lesskey output file 
10760786Sps * (in the HOME directory).
10860786Sps * LESSKEYFILE_SYS is the filename of the system-wide lesskey output file.
10960786Sps * DEF_LESSKEYINFILE is the filename of the default lesskey input 
11060786Sps * (in the HOME directory).
111161475Sdelphij * LESSHISTFILE is the filename of the history file
112161475Sdelphij * (in the HOME directory).
11360786Sps */
11460786Sps#define	LESSKEYFILE		".less"
11560786Sps#define	LESSKEYFILE_SYS		"/.sysless"
11660786Sps#define	DEF_LESSKEYINFILE	".lesskey"
117161475Sdelphij#define LESSHISTFILE		".lesshst"
11860786Sps
11960786Sps
12060786Sps/* Settings always true for OS-9.  */
12160786Sps
12260786Sps/* This is not needed; it is defined by the compiler. */
12360786Sps/* #define _OSK 1 */
12460786Sps#define OS2 		0
12560786Sps#define MSDOS_COMPILER	0
12660786Sps
12760786Sps/*
12860786Sps * Pathname separator character.
12960786Sps */
13060786Sps#define	PATHNAME_SEP	"/"
13160786Sps
13260786Sps/*
13360786Sps * HAVE_SYS_TYPES_H is 1 if your system has <sys/types.h>.
13460786Sps */
13560786Sps#define HAVE_SYS_TYPES_H 0
13660786Sps
13760786Sps/*
13860786Sps * Define if you have the <sgstat.h> header file.
13960786Sps */
14060786Sps#define HAVE_SGSTAT_H	1
14160786Sps
14260786Sps/*
14360786Sps * HAVE_PERROR is 1 if your system has the perror() call.
14460786Sps * (Actually, if it has sys_errlist, sys_nerr and errno.)
14560786Sps */
14660786Sps#if _OSK_MWC32
14760786Sps#define	HAVE_PERROR	0
14860786Sps#else
14960786Sps#define	HAVE_PERROR	1
15060786Sps#endif
15160786Sps
15260786Sps/*
15360786Sps * HAVE_TIME is 1 if your system has the time() call.
15460786Sps */
15560786Sps#define	HAVE_TIME	1
15660786Sps
15760786Sps/*
15860786Sps * HAVE_SHELL is 1 if your system supports a SHELL command interpreter.
15960786Sps */
16060786Sps#define	HAVE_SHELL 0
16160786Sps
16260786Sps/*
16360786Sps * Default shell metacharacters and meta-escape character.
16460786Sps */
16560786Sps#define DEF_METACHARS   "; \t\n'\"()<>|&^`#\\"
16660786Sps#define DEF_METAESCAPE  "\\"
16760786Sps
16860786Sps/* 
16960786Sps * HAVE_DUP is 1 if your system has the dup() call.
17060786Sps */
17160786Sps#define	HAVE_DUP 0
17260786Sps
17360786Sps/*
17460786Sps * Sizes of various buffers.
17560786Sps */
176251154Sdelphij#if 0 /* old sizes for small memory machines
17760786Sps#define	CMDBUF_SIZE	512	/* Buffer for multichar commands */
17860786Sps#define	UNGOT_SIZE	100	/* Max chars to unget() */
17960786Sps#define	LINEBUF_SIZE	1024	/* Max size of line in input file */
18060786Sps#define	OUTBUF_SIZE	1024	/* Output buffer */
18160786Sps#define	PROMPT_SIZE	200	/* Max size of prompt string */
18260786Sps#define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
18360786Sps#define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
18460786Sps#define	TAGLINE_SIZE	512	/* Max size of line in tags file */
18589019Sps#define	TABSTOP_MAX	32	/* Max number of custom tab stops */
186251154Sdelphij#else /* more reasonable sizes for modern machines */
187251154Sdelphij#define	CMDBUF_SIZE	2048	/* Buffer for multichar commands */
188251154Sdelphij#define	UNGOT_SIZE	200	/* Max chars to unget() */
189251154Sdelphij#define	LINEBUF_SIZE	1024	/* Initial max size of line in input file */
190251154Sdelphij#define	OUTBUF_SIZE	1024	/* Output buffer */
191251154Sdelphij#define	PROMPT_SIZE	2048	/* Max size of prompt string */
192251154Sdelphij#define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
193251154Sdelphij#define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
194251154Sdelphij#define	TAGLINE_SIZE	1024	/* Max size of line in tags file */
195251154Sdelphij#define	TABSTOP_MAX	128	/* Max number of custom tab stops */
196251154Sdelphij#endif
19760786Sps
19860786Sps/* Define to `long' if <sys/types.h> doesn't define.  */
19960786Sps#define off_t long
20060786Sps
20160786Sps/* Define if you need to in order for stat and other things to work.  */
20260786Sps#define _POSIX_SOURCE 0
20360786Sps
20460786Sps/* Define as the return type of signal handlers (int or void).  */
20560786Sps#if _OSK_MWC32
20660786Sps#define RETSIGTYPE int
20760786Sps#else
20860786Sps#define RETSIGTYPE void
20960786Sps#endif
21060786Sps
21160786Sps
21260786Sps/*
21360786Sps * Regular expression library.
21460786Sps * Define exactly one of the following to be 1:
21560786Sps * HAVE_POSIX_REGCOMP: POSIX regcomp() and regex.h
21660786Sps * HAVE_RE_COMP: BSD re_comp()
21760786Sps * HAVE_REGCMP: System V regcmp()
21860786Sps * HAVE_V8_REGCOMP: Henry Spencer V8 regcomp() and regexp.h
21960786Sps * NO_REGEX: pattern matching is supported, but without metacharacters.
22060786Sps */
22160786Sps#define HAVE_POSIX_REGCOMP 0
22260786Sps#define HAVE_RE_COMP 0
22360786Sps#define HAVE_REGCMP 0
22460786Sps#define HAVE_V8_REGCOMP 1
22560786Sps#define NO_REGEX 0
22660786Sps#define HAVE_REGEXEC2 1
22760786Sps
22860786Sps/* Define HAVE_VOID if your compiler supports the "void" type. */
22960786Sps#define HAVE_VOID 1
23060786Sps
23160786Sps/* Define HAVE_CONST if your compiler supports the "const" modifier. */
23260786Sps#define HAVE_CONST 0
23360786Sps
23460786Sps/* Define HAVE_TIME_T if your system supports the "time_t" type. */
23560786Sps#define HAVE_TIME_T 1
23660786Sps
23760786Sps/* Define HAVE_STRERROR if you have the strerror() function. */
23860786Sps#define HAVE_STRERROR 0
23960786Sps
24060786Sps/* Define HAVE_FILENO if you have the fileno() macro. */
24160786Sps#define HAVE_FILENO 1
24260786Sps
24360786Sps/* Define HAVE_ERRNO if you have the errno variable */
24460786Sps/* Define MUST_DEFINE_ERRNO if you have errno but it is not define 
24560786Sps * in errno.h */
24660786Sps#define HAVE_ERRNO 1
24760786Sps#define MUST_DEFINE_ERRNO 0
24860786Sps
24960786Sps/* Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable */
25060786Sps#define HAVE_SYS_ERRLIST 0
25160786Sps
25260786Sps/* Define HAVE_OSPEED if your termcap library has the ospeed variable */
25360786Sps/* Define MUST_DEFINE_OSPEED if you have ospeed but it is not defined
25460786Sps * in termcap.h. */
25560786Sps#define HAVE_OSPEED 0
25660786Sps#define MUST_DEFINE_OSPEED 0
25760786Sps
25860786Sps/* Define HAVE_LOCALE if you have locale.h and setlocale. */
25960786Sps#define HAVE_LOCALE 0
26060786Sps
26160786Sps/* Define HAVE_TERMIOS_FUNCS if you have tcgetattr/tcsetattr */
26260786Sps#define HAVE_TERMIOS_FUNCS 0
26360786Sps
26460786Sps/* Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower */
26560786Sps#define HAVE_UPPER_LOWER 1
26660786Sps
26760786Sps/* Define if you have the _setjmp function.  */
26860786Sps#define HAVE__SETJMP 1
26960786Sps
27060786Sps/* Define if you have the memcpy function.  */
27160786Sps#define HAVE_MEMCPY 1
27260786Sps
27360786Sps/* Define if you have the popen function.  */
27460786Sps#define HAVE_POPEN 1
27560786Sps
27660786Sps/* Define if you have the sigsetmask function.  */
27760786Sps#define HAVE_SIGSETMASK 0
27860786Sps
27963128Sps/* Define if you have the sigprocmask function.  */
28063128Sps#define HAVE_SIGPROCMASK	0
28163128Sps
28263128Sps/* Define if you have the sigset_t type and sigemptyset macro */
28363128Sps#define HAVE_SIGSET_T	0
28463128Sps#define HAVE_SIGEMPTYSET	0
28563128Sps
28660786Sps/* Define if you have the stat function.  */
28760786Sps#define HAVE_STAT 0
28860786Sps
28960786Sps/* Define if you have the strchr function.  */
29060786Sps#define HAVE_STRCHR 0
29160786Sps
29260786Sps/* Define if you have the system function.  */
29360786Sps#define HAVE_SYSTEM 1
29460786Sps
295161475Sdelphij/* Define if you have the snprintf function.  */
296161475Sdelphij#define HAVE_SNPRINTF	0
297161475Sdelphij
29860786Sps/* Define if you have the <ctype.h> header file.  */
29960786Sps#define HAVE_CTYPE_H 1
30060786Sps
301173682Sdelphij/* Define if you have the <wctype.h> header file.  */
302173682Sdelphij#define HAVE_WCTYPE_H 0
303173682Sdelphij
30460786Sps/* Define if you have the <errno.h> header file.  */
30560786Sps#define HAVE_ERRNO_H 1
30660786Sps
30760786Sps/* Define if you have the <fcntl.h> header file.  */
30860786Sps#define HAVE_FCNTL_H 0
30960786Sps
31060786Sps/* Define if you have the <limits.h> header file.  */
31160786Sps#define HAVE_LIMITS_H  0
31260786Sps
31360786Sps/* Define if you have the <stdio.h> header file.  */
31460786Sps#define HAVE_STDIO_H 1
31560786Sps
31660786Sps/* Define if you have the <string.h> header file.  */
31760786Sps#define HAVE_STRING_H 1
31860786Sps
31960786Sps/* Define if you have the <stdlib> header file. */
32060786Sps#if _OSK_MWC32
32160786Sps#define HAVE_STDLIB_H 0
32260786Sps#else
32360786Sps#define HAVE_STDLIB_H 1
32460786Sps#endif
32560786Sps
32660786Sps/* Define if you have the <sys/ioctl.h> header file.  */
32760786Sps#define HAVE_SYS_IOCTL_H 0
32860786Sps
32960786Sps/* Define if you have the <sys/ptem.h> header file.  */
33060786Sps#define HAVE_SYS_PTEM_H 0
33160786Sps
33260786Sps/* Define if you have the <sys/stream.h> header file.  */
33360786Sps#define HAVE_SYS_STREAM_H 0
33460786Sps
33560786Sps/* Define if you have the <termcap.h> header file.  */
33660786Sps#define HAVE_TERMCAP_H 1
33760786Sps
33860786Sps/* Define if you have the <termio.h> header file.  */
33960786Sps#define HAVE_TERMIO_H 0
34060786Sps
34160786Sps/* Define if you have the <termios.h> header file.  */
34260786Sps#define HAVE_TERMIOS_H 0
34360786Sps
34460786Sps/* Define if you have the <time.h> header file.  */
34560786Sps#define HAVE_TIME_H 1
34660786Sps
34760786Sps/* Define if you have the <unistd.h> header file.  */
34860786Sps#define HAVE_UNISTD_H 0
34960786Sps
35060786Sps/* Define if you have the <values.h> header file.  */
35160786Sps#define HAVE_VALUES_H 0
352