forget difference between big and small commands - obsolete with vm.
[minix.git] / commands / yap / term.h
blobfb696a2934a82c541feb8bc67060af2732ae02c7
1 /* Copyright (c) 1985 Ceriel J.H. Jacobs */
3 /* $Header$ */
5 /* All terminal and terminal dependent stuff */
7 # ifndef _TERM_
8 # define PUBLIC extern
9 # else
10 # define PUBLIC
11 # endif
13 # if USG_TTY
14 # include <termio.h>
15 # elif POSIX_TTY
16 # include <termios.h>
17 # else
18 # include <sgtty.h>
19 # endif
21 #include <sys/types.h>
22 #include <signal.h>
23 #include <sys/ioctl.h>
25 /* Terminal setting */
27 PUBLIC int expandtabs; /* Tabs need expanding? */
28 PUBLIC int stupid; /* Stupid terminal */
29 PUBLIC int hardcopy; /* Hardcopy terminal */
31 /* termcap stuff */
32 PUBLIC
33 char *CE, /* clear to end of line */
34 *CL, /* clear screen */
35 *SO, /* stand out */
36 *SE, /* stand end */
37 *US, /* underline start */
38 *UE, /* underline end */
39 *UC, /* underline character */
40 *MD, /* bold start */
41 *ME, /* attributes (like bold) off */
42 *TI, /* initialize for CM */
43 *TE, /* End of CM */
44 *CM, /* Cursor addressing */
45 *TA, /* Tab */
46 *SR, /* Scroll reverse */
47 *AL; /* insert line */
48 PUBLIC
49 int LINES, /* # of lines on screen */
50 COLS, /* # of colums */
51 AM, /* Automatic margins */
52 XN, /* newline ignored after wrap */
53 DB; /* terminal retains lines below */
54 PUBLIC
55 char HO[20], /* Sequence to get to home position */
56 BO[20]; /* sequence to get to lower left hand corner */
57 PUBLIC
58 int erasech, /* users erase character */
59 killch; /* users kill character */
60 PUBLIC struct state *sppat; /* Special patterns to be recognized */
61 PUBLIC char
62 *BC; /* Back space */
64 #define backspace() putline(BC)
65 #define clrscreen() tputs(CL,LINES,fputch)
66 #define clrtoeol() tputs(CE,1,fputch)
67 #define scrollreverse() tputs(SR,LINES,fputch)
68 #ifdef VT100_PATCH
69 #define insert_line(l) ins_line(l)
70 #define standout() tputs(SO,1,fputch)
71 #define standend() tputs(SE,1,fputch)
72 #define underline() tputs(US,1,fputch)
73 #define end_underline() tputs(UE,1,fputch)
74 #define bold() tputs(MD,1,fputch)
75 #define end_bold() tputs(ME,1,fputch)
76 #define underchar() tputs(UC,1,fputch)
77 # else
78 #define insert_line() tputs(AL,LINES,fputch)
79 #define standout() putline(SO)
80 #define standend() putline(SE)
81 #define underline() putline(US)
82 #define end_underline() putline(UE)
83 #define bold() putline(MD)
84 #define end_bold() putline(ME)
85 #define underchar() putline(UC)
86 # endif
87 #define givetab() tputs(TA,1,fputch)
89 VOID inittty();
91 * void inittty()
93 * Initialises the terminal (sets it in cbreak mode, etc)
96 VOID resettty();
98 * void resettty()
100 * resets the terminal to the mode in which it was before yap was invoked
103 VOID ini_terminal();
105 * void ini_terminal()
107 * Handles the termcap entry for your terminal. In some cases, the terminal
108 * will be considered stupid.
111 VOID mgoto();
113 * void mgoto(n)
114 * int n; Line to go to
116 * Put the cursor at the start of the n'th screen line.
117 * This can be done in several ways (of course).
120 VOID clrbline();
122 * void clrbline()
124 * clears the bottom line, by either clearing it to end of line,
125 * or pushing it of the screen by inserting a line before it.
128 VOID home();
129 VOID bottom();
131 * Obvious
134 #ifdef WINDOW
135 int window();
136 #endif
137 # undef PUBLIC