defines.o9 revision 170256
10Sduke/* 20Sduke * Copyright (C) 1984-2007 Mark Nudelman 30Sduke * 410420Salanb * You may distribute under the terms of either the GNU General Public 50Sduke * License or the Less License, as specified in the README file. 60Sduke * 70Sduke * For more information about less, or for information on how to 80Sduke * contact the author, see the README file. 90Sduke */ 100Sduke 110Sduke 120Sduke/* OS/9 definition file for less. */ 130Sduke/* 140Sduke * This file has 2 sections: 150Sduke * User preferences. 160Sduke * Settings always true for OS-9 systems. 170Sduke */ 180Sduke 190Sduke/* User preferences. */ 200Sduke 211472Strims/* 221472Strims * SECURE is 1 if you wish to disable a bunch of features in order to 231472Strims * be safe to run by unprivileged users. 240Sduke */ 250Sduke#define SECURE 0 260Sduke 270Sduke/* 280Sduke * SHELL_ESCAPE is 1 if you wish to allow shell escapes. 290Sduke * (This is possible only if your system supplies the system() function.) 300Sduke */ 310Sduke#define SHELL_ESCAPE (!SECURE) 320Sduke 330Sduke/* 340Sduke * EXAMINE is 1 if you wish to allow examining files by name from within less. 350Sduke */ 360Sduke#define EXAMINE (!SECURE) 370Sduke 380Sduke/* 390Sduke * TAB_COMPLETE_FILENAME is 1 if you wish to allow the TAB key 400Sduke * to complete filenames at prompts. 410Sduke */ 420Sduke#define TAB_COMPLETE_FILENAME 1 430Sduke 440Sduke/* 450Sduke * CMD_HISTORY is 1 if you wish to allow keys to cycle through 4612040Ssspitsyn * previous commands at prompts. 4712040Ssspitsyn */ 4812040Ssspitsyn#define CMD_HISTORY 1 4912040Ssspitsyn 5012040Ssspitsyn/* 5112040Ssspitsyn * HILITE_SEARCH is 1 if you wish to have search targets to be 5212040Ssspitsyn * displayed in standout mode. 5312040Ssspitsyn */ 5412040Ssspitsyn#define HILITE_SEARCH 1 5512040Ssspitsyn 5612040Ssspitsyn/* 5712040Ssspitsyn * EDITOR is 1 if you wish to allow editor invocation (the "v" command). 5812040Ssspitsyn * (This is possible only if your system supplies the system() function.) 5912040Ssspitsyn * EDIT_PGM is the name of the (default) editor to be invoked. 6012040Ssspitsyn */ 6112040Ssspitsyn#define EDITOR (!SECURE) 6212040Ssspitsyn#define EDIT_PGM "umacs" 6312040Ssspitsyn 6412040Ssspitsyn/* 6512040Ssspitsyn * TAGS is 1 if you wish to support tag files. 6612040Ssspitsyn */ 6712040Ssspitsyn#define TAGS (!SECURE) 6812040Ssspitsyn 6912040Ssspitsyn/* 7012040Ssspitsyn * USERFILE is 1 if you wish to allow a .less file to specify 7112040Ssspitsyn * user-defined key bindings. 7212040Ssspitsyn */ 7312040Ssspitsyn#define USERFILE (!SECURE) 7412040Ssspitsyn 750Sduke/* 7610420Salanb * GLOB is 1 if you wish to have shell metacharacters expanded in filenames. 7712040Ssspitsyn * This will generally work if your system provides the "popen" function 7812040Ssspitsyn * and the "echo" shell command. 7910420Salanb */ 800Sduke#define GLOB (!SECURE) 810Sduke 8212040Ssspitsyn/* 8312040Ssspitsyn * PIPEC is 1 if you wish to have the "|" command 8412040Ssspitsyn * which allows the user to pipe data into a shell command. 8512040Ssspitsyn */ 8612040Ssspitsyn#define PIPEC (!SECURE) 8712040Ssspitsyn 8812040Ssspitsyn/* 8912040Ssspitsyn * LOGFILE is 1 if you wish to allow the -l option (to create log files). 9012040Ssspitsyn */ 9112040Ssspitsyn#define LOGFILE (!SECURE) 9212040Ssspitsyn 9312040Ssspitsyn/* 9412040Ssspitsyn * GNU_OPTIONS is 1 if you wish to support the GNU-style command 9512040Ssspitsyn * line options --help and --version. 960Sduke */ 970Sduke#define GNU_OPTIONS 1 9810420Salanb 990Sduke/* 1000Sduke * ONLY_RETURN is 1 if you want RETURN to be the only input which 1010Sduke * will continue past an error message. 1020Sduke * Otherwise, any key will continue past an error message. 10310420Salanb */ 1040Sduke#define ONLY_RETURN 0 1050Sduke 1060Sduke/* 1070Sduke * LESSKEYFILE is the filename of the default lesskey output file 1080Sduke * (in the HOME directory). 1090Sduke * LESSKEYFILE_SYS is the filename of the system-wide lesskey output file. 1100Sduke * DEF_LESSKEYINFILE is the filename of the default lesskey input 1110Sduke * (in the HOME directory). 1120Sduke * LESSHISTFILE is the filename of the history file 1130Sduke * (in the HOME directory). 1140Sduke */ 1150Sduke#define LESSKEYFILE ".less" 1160Sduke#define LESSKEYFILE_SYS "/.sysless" 1170Sduke#define DEF_LESSKEYINFILE ".lesskey" 1180Sduke#define LESSHISTFILE ".lesshst" 1190Sduke 1200Sduke 1210Sduke/* Settings always true for OS-9. */ 1220Sduke 1230Sduke/* This is not needed; it is defined by the compiler. */ 1240Sduke/* #define _OSK 1 */ 1250Sduke#define OS2 0 1260Sduke#define MSDOS_COMPILER 0 1270Sduke 1280Sduke/* 1290Sduke * Pathname separator character. 1300Sduke */ 1310Sduke#define PATHNAME_SEP "/" 1320Sduke 1330Sduke/* 1340Sduke * HAVE_SYS_TYPES_H is 1 if your system has <sys/types.h>. 1350Sduke */ 1360Sduke#define HAVE_SYS_TYPES_H 0 1370Sduke 1380Sduke/* 1390Sduke * Define if you have the <sgstat.h> header file. 1400Sduke */ 1410Sduke#define HAVE_SGSTAT_H 1 1420Sduke 1430Sduke/* 1440Sduke * HAVE_PERROR is 1 if your system has the perror() call. 1450Sduke * (Actually, if it has sys_errlist, sys_nerr and errno.) 1460Sduke */ 1470Sduke#if _OSK_MWC32 1480Sduke#define HAVE_PERROR 0 1490Sduke#else 1500Sduke#define HAVE_PERROR 1 1510Sduke#endif 1520Sduke 1530Sduke/* 1540Sduke * HAVE_TIME is 1 if your system has the time() call. 1550Sduke */ 1560Sduke#define HAVE_TIME 1 1570Sduke 1580Sduke/* 1590Sduke * HAVE_SHELL is 1 if your system supports a SHELL command interpreter. 1600Sduke */ 1610Sduke#define HAVE_SHELL 0 1620Sduke 1630Sduke/* 1640Sduke * Default shell metacharacters and meta-escape character. 1650Sduke */ 1660Sduke#define DEF_METACHARS "; \t\n'\"()<>|&^`#\\" 1670Sduke#define DEF_METAESCAPE "\\" 1680Sduke 1690Sduke/* 1700Sduke * HAVE_DUP is 1 if your system has the dup() call. 1710Sduke */ 1720Sduke#define HAVE_DUP 0 1730Sduke 1740Sduke/* 1750Sduke * Sizes of various buffers. 1760Sduke */ 1770Sduke#define CMDBUF_SIZE 512 /* Buffer for multichar commands */ 1780Sduke#define UNGOT_SIZE 100 /* Max chars to unget() */ 1790Sduke#define LINEBUF_SIZE 1024 /* Max size of line in input file */ 1800Sduke#define OUTBUF_SIZE 1024 /* Output buffer */ 1810Sduke#define PROMPT_SIZE 200 /* Max size of prompt string */ 1820Sduke#define TERMBUF_SIZE 2048 /* Termcap buffer for tgetent */ 1830Sduke#define TERMSBUF_SIZE 1024 /* Buffer to hold termcap strings */ 1840Sduke#define TAGLINE_SIZE 512 /* Max size of line in tags file */ 1850Sduke#define TABSTOP_MAX 32 /* Max number of custom tab stops */ 1860Sduke 1870Sduke/* Define to `long' if <sys/types.h> doesn't define. */ 1880Sduke#define off_t long 1890Sduke 1900Sduke/* Define if you need to in order for stat and other things to work. */ 1910Sduke#define _POSIX_SOURCE 0 1920Sduke 1930Sduke/* Define as the return type of signal handlers (int or void). */ 1940Sduke#if _OSK_MWC32 1950Sduke#define RETSIGTYPE int 1960Sduke#else 1970Sduke#define RETSIGTYPE void 1980Sduke#endif 1990Sduke 2000Sduke 2010Sduke/* 2020Sduke * Regular expression library. 2030Sduke * Define exactly one of the following to be 1: 2040Sduke * HAVE_POSIX_REGCOMP: POSIX regcomp() and regex.h 2050Sduke * HAVE_RE_COMP: BSD re_comp() 2060Sduke * HAVE_REGCMP: System V regcmp() 2070Sduke * HAVE_V8_REGCOMP: Henry Spencer V8 regcomp() and regexp.h 2080Sduke * NO_REGEX: pattern matching is supported, but without metacharacters. 2090Sduke */ 2100Sduke#define HAVE_POSIX_REGCOMP 0 2110Sduke#define HAVE_RE_COMP 0 2120Sduke#define HAVE_REGCMP 0 2130Sduke#define HAVE_V8_REGCOMP 1 2140Sduke#define NO_REGEX 0 2150Sduke#define HAVE_REGEXEC2 1 2160Sduke 2170Sduke/* Define HAVE_VOID if your compiler supports the "void" type. */ 2180Sduke#define HAVE_VOID 1 2190Sduke 2200Sduke/* Define HAVE_CONST if your compiler supports the "const" modifier. */ 2210Sduke#define HAVE_CONST 0 2220Sduke 2230Sduke/* Define HAVE_TIME_T if your system supports the "time_t" type. */ 2240Sduke#define HAVE_TIME_T 1 2250Sduke 2260Sduke/* Define HAVE_STRERROR if you have the strerror() function. */ 2270Sduke#define HAVE_STRERROR 0 2280Sduke 2290Sduke/* Define HAVE_FILENO if you have the fileno() macro. */ 2300Sduke#define HAVE_FILENO 1 2310Sduke 2320Sduke/* Define HAVE_ERRNO if you have the errno variable */ 2330Sduke/* Define MUST_DEFINE_ERRNO if you have errno but it is not define 2340Sduke * in errno.h */ 2350Sduke#define HAVE_ERRNO 1 2360Sduke#define MUST_DEFINE_ERRNO 0 2370Sduke 2380Sduke/* Define HAVE_SYS_ERRLIST if you have the sys_errlist[] variable */ 2390Sduke#define HAVE_SYS_ERRLIST 0 2400Sduke 2410Sduke/* Define HAVE_OSPEED if your termcap library has the ospeed variable */ 2420Sduke/* Define MUST_DEFINE_OSPEED if you have ospeed but it is not defined 2430Sduke * in termcap.h. */ 2440Sduke#define HAVE_OSPEED 0 2450Sduke#define MUST_DEFINE_OSPEED 0 2460Sduke 2470Sduke/* Define HAVE_LOCALE if you have locale.h and setlocale. */ 2480Sduke#define HAVE_LOCALE 0 2490Sduke 2500Sduke/* Define HAVE_TERMIOS_FUNCS if you have tcgetattr/tcsetattr */ 2510Sduke#define HAVE_TERMIOS_FUNCS 0 2520Sduke 2530Sduke/* Define HAVE_UPPER_LOWER if you have isupper, islower, toupper, tolower */ 2540Sduke#define HAVE_UPPER_LOWER 1 2550Sduke 2560Sduke/* Define if you have the _setjmp function. */ 2570Sduke#define HAVE__SETJMP 1 2580Sduke 2590Sduke/* Define if you have the memcpy function. */ 2600Sduke#define HAVE_MEMCPY 1 2610Sduke 2620Sduke/* Define if you have the popen function. */ 2630Sduke#define HAVE_POPEN 1 2640Sduke 2650Sduke/* Define if you have the sigsetmask function. */ 2660Sduke#define HAVE_SIGSETMASK 0 2670Sduke 2680Sduke/* Define if you have the sigprocmask function. */ 2690Sduke#define HAVE_SIGPROCMASK 0 2700Sduke 2710Sduke/* Define if you have the sigset_t type and sigemptyset macro */ 2720Sduke#define HAVE_SIGSET_T 0 2730Sduke#define HAVE_SIGEMPTYSET 0 2740Sduke 2750Sduke/* Define if you have the stat function. */ 2760Sduke#define HAVE_STAT 0 2770Sduke 2780Sduke/* Define if you have the strchr function. */ 2790Sduke#define HAVE_STRCHR 0 2800Sduke 2810Sduke/* Define if you have the system function. */ 2820Sduke#define HAVE_SYSTEM 1 2830Sduke 2840Sduke/* Define if you have the snprintf function. */ 2850Sduke#define HAVE_SNPRINTF 0 2860Sduke 2870Sduke/* Define if you have the <ctype.h> header file. */ 2880Sduke#define HAVE_CTYPE_H 1 2890Sduke 2900Sduke/* Define if you have the <errno.h> header file. */ 2910Sduke#define HAVE_ERRNO_H 1 2920Sduke 2930Sduke/* Define if you have the <fcntl.h> header file. */ 2940Sduke#define HAVE_FCNTL_H 0 2950Sduke 2960Sduke/* Define if you have the <limits.h> header file. */ 2970Sduke#define HAVE_LIMITS_H 0 2980Sduke 2990Sduke/* Define if you have the <stdio.h> header file. */ 3000Sduke#define HAVE_STDIO_H 1 3010Sduke 3020Sduke/* Define if you have the <string.h> header file. */ 3030Sduke#define HAVE_STRING_H 1 3040Sduke 3050Sduke/* Define if you have the <stdlib> header file. */ 3060Sduke#if _OSK_MWC32 3070Sduke#define HAVE_STDLIB_H 0 3080Sduke#else 3090Sduke#define HAVE_STDLIB_H 1 3100Sduke#endif 3110Sduke 3120Sduke/* Define if you have the <sys/ioctl.h> header file. */ 3130Sduke#define HAVE_SYS_IOCTL_H 0 3140Sduke 3150Sduke/* Define if you have the <sys/ptem.h> header file. */ 3160Sduke#define HAVE_SYS_PTEM_H 0 3170Sduke 3180Sduke/* Define if you have the <sys/stream.h> header file. */ 3190Sduke#define HAVE_SYS_STREAM_H 0 3200Sduke 3210Sduke/* Define if you have the <termcap.h> header file. */ 3220Sduke#define HAVE_TERMCAP_H 1 3230Sduke 3240Sduke/* Define if you have the <termio.h> header file. */ 3250Sduke#define HAVE_TERMIO_H 0 3260Sduke 3270Sduke/* Define if you have the <termios.h> header file. */ 3280Sduke#define HAVE_TERMIOS_H 0 3290Sduke 3300Sduke/* Define if you have the <time.h> header file. */ 3310Sduke#define HAVE_TIME_H 1 3320Sduke 3330Sduke/* Define if you have the <unistd.h> header file. */ 3340Sduke#define HAVE_UNISTD_H 0 3350Sduke 3360Sduke/* Define if you have the <values.h> header file. */ 3370Sduke#define HAVE_VALUES_H 0 3380Sduke