2 * Standard include file for "less".
6 * Include the file of compile-time options.
16 #define public /* PUBLIC FUNCTION */
19 * Special types and constants.
21 typedef long POSITION;
23 * {{ Warning: if POSITION is changed to other than "long",
24 * you may have to change some of the printfs which use "%ld"
25 * to print a variable of type POSITION. }}
28 #define NULL_POSITION ((POSITION)(-1))
31 * The type of an interrupt handler.
36 * An IFILE represents an input file.
38 #define IFILE VOID_POINTER
39 #define NULL_IFILE ((IFILE)NULL)
42 * The structure used to represent a "screen position".
43 * This consists of a file position, and a screen line number.
44 * The meaning is that the line starting at the given file
45 * position is displayed on the ln-th line of the screen.
46 * (Screen lines before ln are empty.)
60 #define NULL_PARG ((PARG *)NULL)
68 #define READ_INTR (-2)
70 /* How quiet should we be? */
71 #define NOT_QUIET 0 /* Ring bell at eof and for errors */
72 #define LITTLE_QUIET 1 /* Ring bell only for errors */
73 #define VERY_QUIET 2 /* Never ring bell */
75 /* How should we prompt? */
76 #define PR_SHORT 0 /* Prompt with colon */
77 #define PR_MEDIUM 1 /* Prompt with message */
78 #define PR_LONG 2 /* Prompt with longer message */
80 /* How should we handle backspaces? */
81 #define BS_SPECIAL 0 /* Do special things for underlining and bold */
82 #define BS_NORMAL 1 /* \b treated as normal char; actually output */
83 #define BS_CONTROL 2 /* \b treated as control char; prints as ^H */
85 /* How should we search? */
86 #define SRCH_FORW 0 /* Search forward from current position */
87 #define SRCH_BACK 1 /* Search backward from current position */
88 #define SRCH_NOMATCH 0100 /* Search for non-matching lines */
89 #define SRCH_PAST_EOF 0200 /* Search past end-of-file, into next file */
90 #define SRCH_FIRST_FILE 0400 /* Search starting at the first file */
92 #define SRCH_DIR(t) ((t) & 01)
93 #define SRCH_REVERSE(t) ((t) ^ 01)
95 /* Special chars used to tell put_line() to do something special */
102 #define CONTROL(c) ((c)&037)
103 #define ESC CONTROL('[')
105 #define SIGNAL(sig,func) signal(sig,func)
107 /* Library function declarations */
109 #define BAD_LSEEK ((offset_t)-1)
110 VOID_POINTER calloc();
112 #define ch_zero() ((POSITION)0)