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