1 /* 2 * Copyright (c) 1988 Mark Nudleman 3 * Copyright (c) 1988 Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms are permitted 7 * provided that the above copyright notice and this paragraph are 8 * duplicated in all such forms and that any documentation, 9 * advertising materials, and other materials related to such 10 * distribution and use acknowledge that the software was developed 11 * by Mark Nudleman and the University of California, Berkeley. The 12 * name of Mark Nudleman or the 13 * University may not be used to endorse or promote products derived 14 * from this software without specific prior written permission. 15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 18 * 19 * @(#)less.h 5.6 (Berkeley) 07/25/88 20 */ 21 22 /* 23 * Standard include file for "less". 24 */ 25 26 /* 27 * Language details. 28 */ 29 #define public /* PUBLIC FUNCTION */ 30 31 /* 32 * Special types and constants. 33 */ 34 typedef long POSITION; 35 /* 36 * {{ Warning: if POSITION is changed to other than "long", 37 * you may have to change some of the printfs which use "%ld" 38 * to print a variable of type POSITION. }} 39 */ 40 41 #define NULL_POSITION ((POSITION)(-1)) 42 43 /* 44 * The type of signal handler functions. 45 * Usually int, although it should be void. 46 */ 47 typedef int HANDLER; 48 49 50 #define FILENAME 128 /* Max size of a filename */ 51 52 #define EOI (0) 53 54 #define READ_INTR (-2) 55 56 /* How quiet should we be? */ 57 #define NOT_QUIET 0 /* Ring bell at eof and for errors */ 58 #define LITTLE_QUIET 1 /* Ring bell only for errors */ 59 #define VERY_QUIET 2 /* Never ring bell */ 60 61 /* How should we prompt? */ 62 #define PR_SHORT 0 /* Prompt with colon */ 63 #define PR_MEDIUM 1 /* Prompt with message */ 64 #define PR_LONG 2 /* Prompt with longer message */ 65 66 /* How should we handle backspaces? */ 67 #define BS_SPECIAL 0 /* Do special things for underlining and bold */ 68 #define BS_NORMAL 1 /* \b treated as normal char; actually output */ 69 #define BS_CONTROL 2 /* \b treated as control char; prints as ^H */ 70 71 /* Special chars used to tell put_line() to do something special */ 72 #define UL_CHAR '\201' /* Enter underline mode */ 73 #define UE_CHAR '\202' /* Exit underline mode */ 74 #define BO_CHAR '\203' /* Enter boldface mode */ 75 #define BE_CHAR '\204' /* Exit boldface mode */ 76 77 #define CONTROL(c) ((c)&037) 78 79 #include <sys/param.h> 80 #include <sys/file.h> 81 82 /* Library function declarations */ 83 off_t lseek(); 84 char *calloc(); 85 86 #include "funcs.h" 87