defines.o9 revision 240121
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 */
17660786Sps#define	CMDBUF_SIZE	512	/* Buffer for multichar commands */
17760786Sps#define	UNGOT_SIZE	100	/* Max chars to unget() */
17860786Sps#define	LINEBUF_SIZE	1024	/* Max size of line in input file */
17960786Sps#define	OUTBUF_SIZE	1024	/* Output buffer */
18060786Sps#define	PROMPT_SIZE	200	/* Max size of prompt string */
18160786Sps#define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
18260786Sps#define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
18360786Sps#define	TAGLINE_SIZE	512	/* Max size of line in tags file */
18489019Sps#define	TABSTOP_MAX	32	/* Max number of custom tab stops */
18560786Sps
18660786Sps/* Define to `long' if <sys/types.h> doesn't define.  */
18760786Sps#define off_t long
18860786Sps
18960786Sps/* Define if you need to in order for stat and other things to work.  */
19060786Sps#define _POSIX_SOURCE 0
19160786Sps
19260786Sps/* Define as the return type of signal handlers (int or void).  */
19360786Sps#if _OSK_MWC32
19460786Sps#define RETSIGTYPE int
19560786Sps#else
19660786Sps#define RETSIGTYPE void
19760786Sps#endif
19860786Sps
19960786Sps
20060786Sps/*
20160786Sps * Regular expression library.
20260786Sps * Define exactly one of the following to be 1:
20360786Sps * HAVE_POSIX_REGCOMP: POSIX regcomp() and regex.h
20460786Sps * HAVE_RE_COMP: BSD re_comp()
20560786Sps * HAVE_REGCMP: System V regcmp()
20660786Sps * HAVE_V8_REGCOMP: Henry Spencer V8 regcomp() and regexp.h
20760786Sps * NO_REGEX: pattern matching is supported, but without metacharacters.
20860786Sps */
20960786Sps#define HAVE_POSIX_REGCOMP 0
21060786Sps#define HAVE_RE_COMP 0
21160786Sps#define HAVE_REGCMP 0
21260786Sps#define HAVE_V8_REGCOMP 1
21360786Sps#define NO_REGEX 0
21460786Sps#define HAVE_REGEXEC2 1
21560786Sps
21660786Sps/* Define HAVE_VOID if your compiler supports the "void" type. */
21760786Sps#define HAVE_VOID 1
21860786Sps
21960786Sps/* Define HAVE_CONST if your compiler supports the "const" modifier. */
22060786Sps#define HAVE_CONST 0
22160786Sps
22260786Sps/* Define HAVE_TIME_T if your system supports the "time_t" type. */
22360786Sps#define HAVE_TIME_T 1
22460786Sps
22560786Sps/* Define HAVE_STRERROR if you have the strerror() function. */
22660786Sps#define HAVE_STRERROR 0
22760786Sps
22860786Sps/* Define HAVE_FILENO if you have the fileno() macro. */
22960786Sps#define HAVE_FILENO 1
23060786Sps
23160786Sps/* Define HAVE_ERRNO if you have the errno variable */
23260786Sps/* Define MUST_DEFINE_ERRNO if you have errno but it is not define 
23360786Sps * in errno.h */
23460786Sps#define HAVE_ERRNO 1
23560786Sps#define MUST_DEFINE_ERRNO 0
23660786Sps
23760786Sps/* Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable */
23860786Sps#define HAVE_SYS_ERRLIST 0
23960786Sps
24060786Sps/* Define HAVE_OSPEED if your termcap library has the ospeed variable */
24160786Sps/* Define MUST_DEFINE_OSPEED if you have ospeed but it is not defined
24260786Sps * in termcap.h. */
24360786Sps#define HAVE_OSPEED 0
24460786Sps#define MUST_DEFINE_OSPEED 0
24560786Sps
24660786Sps/* Define HAVE_LOCALE if you have locale.h and setlocale. */
24760786Sps#define HAVE_LOCALE 0
24860786Sps
24960786Sps/* Define HAVE_TERMIOS_FUNCS if you have tcgetattr/tcsetattr */
25060786Sps#define HAVE_TERMIOS_FUNCS 0
25160786Sps
25260786Sps/* Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower */
25360786Sps#define HAVE_UPPER_LOWER 1
25460786Sps
25560786Sps/* Define if you have the _setjmp function.  */
25660786Sps#define HAVE__SETJMP 1
25760786Sps
25860786Sps/* Define if you have the memcpy function.  */
25960786Sps#define HAVE_MEMCPY 1
26060786Sps
26160786Sps/* Define if you have the popen function.  */
26260786Sps#define HAVE_POPEN 1
26360786Sps
26460786Sps/* Define if you have the sigsetmask function.  */
26560786Sps#define HAVE_SIGSETMASK 0
26660786Sps
26763128Sps/* Define if you have the sigprocmask function.  */
26863128Sps#define HAVE_SIGPROCMASK	0
26963128Sps
27063128Sps/* Define if you have the sigset_t type and sigemptyset macro */
27163128Sps#define HAVE_SIGSET_T	0
27263128Sps#define HAVE_SIGEMPTYSET	0
27363128Sps
27460786Sps/* Define if you have the stat function.  */
27560786Sps#define HAVE_STAT 0
27660786Sps
27760786Sps/* Define if you have the strchr function.  */
27860786Sps#define HAVE_STRCHR 0
27960786Sps
28060786Sps/* Define if you have the system function.  */
28160786Sps#define HAVE_SYSTEM 1
28260786Sps
283161475Sdelphij/* Define if you have the snprintf function.  */
284161475Sdelphij#define HAVE_SNPRINTF	0
285161475Sdelphij
28660786Sps/* Define if you have the <ctype.h> header file.  */
28760786Sps#define HAVE_CTYPE_H 1
28860786Sps
289173682Sdelphij/* Define if you have the <wctype.h> header file.  */
290173682Sdelphij#define HAVE_WCTYPE_H 0
291173682Sdelphij
29260786Sps/* Define if you have the <errno.h> header file.  */
29360786Sps#define HAVE_ERRNO_H 1
29460786Sps
29560786Sps/* Define if you have the <fcntl.h> header file.  */
29660786Sps#define HAVE_FCNTL_H 0
29760786Sps
29860786Sps/* Define if you have the <limits.h> header file.  */
29960786Sps#define HAVE_LIMITS_H  0
30060786Sps
30160786Sps/* Define if you have the <stdio.h> header file.  */
30260786Sps#define HAVE_STDIO_H 1
30360786Sps
30460786Sps/* Define if you have the <string.h> header file.  */
30560786Sps#define HAVE_STRING_H 1
30660786Sps
30760786Sps/* Define if you have the <stdlib> header file. */
30860786Sps#if _OSK_MWC32
30960786Sps#define HAVE_STDLIB_H 0
31060786Sps#else
31160786Sps#define HAVE_STDLIB_H 1
31260786Sps#endif
31360786Sps
31460786Sps/* Define if you have the <sys/ioctl.h> header file.  */
31560786Sps#define HAVE_SYS_IOCTL_H 0
31660786Sps
31760786Sps/* Define if you have the <sys/ptem.h> header file.  */
31860786Sps#define HAVE_SYS_PTEM_H 0
31960786Sps
32060786Sps/* Define if you have the <sys/stream.h> header file.  */
32160786Sps#define HAVE_SYS_STREAM_H 0
32260786Sps
32360786Sps/* Define if you have the <termcap.h> header file.  */
32460786Sps#define HAVE_TERMCAP_H 1
32560786Sps
32660786Sps/* Define if you have the <termio.h> header file.  */
32760786Sps#define HAVE_TERMIO_H 0
32860786Sps
32960786Sps/* Define if you have the <termios.h> header file.  */
33060786Sps#define HAVE_TERMIOS_H 0
33160786Sps
33260786Sps/* Define if you have the <time.h> header file.  */
33360786Sps#define HAVE_TIME_H 1
33460786Sps
33560786Sps/* Define if you have the <unistd.h> header file.  */
33660786Sps#define HAVE_UNISTD_H 0
33760786Sps
33860786Sps/* Define if you have the <values.h> header file.  */
33960786Sps#define HAVE_VALUES_H 0
340