Home | History | Annotate | Line # | Download | only in more
less.h revision 1.4
      1 /*	$NetBSD: less.h,v 1.4 2003/08/07 09:27:59 agc Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1988, 1993
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. Neither the name of the University nor the names of its contributors
     16  *    may be used to endorse or promote products derived from this software
     17  *    without specific prior written permission.
     18  *
     19  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29  * SUCH DAMAGE.
     30  *
     31  *	@(#)less.h	8.1 (Berkeley) 6/6/93
     32  */
     33 
     34 /*
     35  * Copyright (c) 1988 Mark Nudleman
     36  *
     37  * Redistribution and use in source and binary forms, with or without
     38  * modification, are permitted provided that the following conditions
     39  * are met:
     40  * 1. Redistributions of source code must retain the above copyright
     41  *    notice, this list of conditions and the following disclaimer.
     42  * 2. Redistributions in binary form must reproduce the above copyright
     43  *    notice, this list of conditions and the following disclaimer in the
     44  *    documentation and/or other materials provided with the distribution.
     45  * 3. All advertising materials mentioning features or use of this software
     46  *    must display the following acknowledgement:
     47  *	This product includes software developed by the University of
     48  *	California, Berkeley and its contributors.
     49  * 4. Neither the name of the University nor the names of its contributors
     50  *    may be used to endorse or promote products derived from this software
     51  *    without specific prior written permission.
     52  *
     53  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     54  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     55  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     56  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     57  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     58  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     59  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     60  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     61  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     62  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     63  * SUCH DAMAGE.
     64  *
     65  *	@(#)less.h	8.1 (Berkeley) 6/6/93
     66  */
     67 
     68 #define	NULL_POSITION	((off_t)(-1))
     69 
     70 #define	EOI		(0)
     71 #define	READ_INTR	(-2)
     72 
     73 /* Special chars used to tell put_line() to do something special */
     74 #define	UL_CHAR		'\201'		/* Enter underline mode */
     75 #define	UE_CHAR		'\202'		/* Exit underline mode */
     76 #define	BO_CHAR		'\203'		/* Enter boldface mode */
     77 #define	BE_CHAR		'\204'		/* Exit boldface mode */
     78 
     79 #define	CONTROL_CHAR(c)		(iscntrl(c))
     80 #define	CARAT_CHAR(c)		((c == '\177') ? '?' : (c | 0100))
     81 
     82 #define	TOP		(0)
     83 #define	TOP_PLUS_ONE	(1)
     84 #define	BOTTOM		(-1)
     85 #define	BOTTOM_PLUS_ONE	(-2)
     86 #define	MIDDLE		(-3)
     87 
     88 #define	A_INVALID		-1
     89 
     90 #define	A_AGAIN_SEARCH		1
     91 #define	A_B_LINE		2
     92 #define	A_B_SCREEN		3
     93 #define	A_B_SCROLL		4
     94 #define	A_B_SEARCH		5
     95 #define	A_DIGIT			6
     96 #define	A_EXAMINE		7
     97 #define	A_FREPAINT		8
     98 #define	A_F_LINE		9
     99 #define	A_F_SCREEN		10
    100 #define	A_F_SCROLL		11
    101 #define	A_F_SEARCH		12
    102 #define	A_GOEND			13
    103 #define	A_GOLINE		14
    104 #define	A_GOMARK		15
    105 #define	A_HELP			16
    106 #define	A_NEXT_FILE		17
    107 #define	A_PERCENT		18
    108 #define	A_PREFIX		19
    109 #define	A_PREV_FILE		20
    110 #define	A_QUIT			21
    111 #define	A_REPAINT		22
    112 #define	A_SETMARK		23
    113 #define	A_STAT			24
    114 #define	A_VISUAL		25
    115 #define	A_TAGFILE		26
    116 #define	A_FILE_LIST		27
    117