xref: /freebsd/contrib/tcsh/ed.decls.h (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1 /*
2  * ed.decls.h: Editor external definitions
3  */
4 /*-
5  * Copyright (c) 1980, 1991 The Regents of the University of California.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the University nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  */
32 #ifndef _h_ed_decls
33 #define _h_ed_decls
34 
35 /*
36  * ed.chared.c
37  */
38 extern	int	InsertStr		(Char *);
39 extern	int	ExpandHistory		(void);
40 extern	void	DeleteBack		(int);
41 extern	void	SetKillRing		(int);
42 extern	CCRETVAL GetHistLine		(void);
43 
44 /*
45  * ed.init.c
46  */
47 #ifdef SIG_WINDOW
48 extern	void	check_window_size	(int);
49 extern	void	window_change		(int);
50 #endif /* SIG_WINDOW */
51 extern	int	ed_Setup		(int);
52 extern	void	ed_Init			(void);
53 extern	int	Cookedmode		(void);
54 extern	int	Rawmode			(void);
55 extern	void	ed_set_tty_eight_bit	(void);
56 
57 extern	void	QuoteModeOn		(void);
58 extern	void	QuoteModeOff		(void);
59 extern	void	ResetInLine		(int);
60 extern	int	Load_input_line		(void);
61 
62 /*
63  * ed.term.c:
64  */
65 extern	void	dosetty			(Char **, struct command *);
66 extern	int	tty_getty 		(int, ttydata_t *);
67 extern	int	tty_setty 		(int, ttydata_t *);
68 extern	void	tty_getchar 		(ttydata_t *, unsigned char *);
69 extern	void	tty_setchar 		(ttydata_t *, unsigned char *);
70 extern	speed_t	tty_getspeed 		(ttydata_t *);
71 extern	int	tty_gettabs 		(ttydata_t *);
72 extern	int	tty_geteightbit		(ttydata_t *);
73 extern	int	tty_cooked_mode		(ttydata_t *);
74 #ifdef _IBMR2
75 extern	void	tty_setdisc		(int, int);
76 #endif /* _IBMR2 */
77 
78 /*
79  * ed.screen.c
80  */
81 extern	void	terminit		(void);
82 extern	void	SetAttributes		(Char);
83 extern	void	so_write		(Char *, int);
84 extern	void	ClearScreen		(void);
85 extern	void	MoveToLine		(int);
86 extern	void	MoveToChar		(int);
87 extern	void	ClearEOL		(int);
88 extern	void	Insert_write		(Char *, int);
89 extern	void	DeleteChars		(int);
90 extern	void	TellTC			(void);
91 extern	void	SetTC			(char *, char *);
92 extern	void	EchoTC			(Char **);
93 extern	int 	SetArrowKeys		(const CStr *, XmapVal *, int);
94 extern	int 	IsArrowKey		(Char *);
95 extern	void	ResetArrowKeys		(void);
96 extern	void	DefaultArrowKeys	(void);
97 extern	int 	ClearArrowKeys		(const CStr *);
98 extern	void 	PrintArrowKeys		(const CStr *);
99 extern	void	BindArrowKeys		(void);
100 extern	void	SoundBeep		(void);
101 extern	int	CanWeTab		(void);
102 extern	void	ChangeSize		(int, int);
103 #ifdef SIG_WINDOW
104 extern	int	GetSize			(int *, int *);
105 #endif /* SIG_WINDOW */
106 extern	void	ClearToBottom		(void);
107 extern	void	GetTermCaps		(void);
108 extern	void	StartHighlight		(void);
109 extern	void	StopHighlight		(void);
110 
111 /*
112  * ed.defns.c
113  */
114 extern	void	editinit		(void);
115 extern	void	ed_InitNLSMaps		(void);
116 #ifdef DEBUG_EDIT
117 extern	void	CheckMaps		(void);
118 #endif
119 extern	void	ed_InitMaps		(void);
120 extern	void	ed_InitEmacsMaps	(void);
121 extern	void	ed_InitVIMaps		(void);
122 
123 extern  CCRETVAL	e_unassigned		(Char);
124 extern	CCRETVAL	e_insert		(Char);
125 extern	CCRETVAL	e_newline		(Char);
126 extern	CCRETVAL	e_delprev		(Char);
127 extern	CCRETVAL	e_delnext		(Char);
128 /* added by mtk@ari.ncl.omron.co.jp (920818) */
129 extern	CCRETVAL	e_delnext_eof		(Char);
130 extern	CCRETVAL	e_delnext_list		(Char);
131 extern	CCRETVAL	e_delnext_list_eof	(Char);	/* for ^D */
132 extern	CCRETVAL	e_toend			(Char);
133 extern	CCRETVAL	e_tobeg			(Char);
134 extern	CCRETVAL	e_charback		(Char);
135 extern	CCRETVAL	e_charfwd		(Char);
136 extern	CCRETVAL	e_quote			(Char);
137 extern	CCRETVAL	e_startover		(Char);
138 extern	CCRETVAL	e_redisp		(Char);
139 extern	CCRETVAL	e_wordback		(Char);
140 extern	CCRETVAL	e_wordfwd		(Char);
141 extern	CCRETVAL	v_wordbegnext		(Char);
142 extern	CCRETVAL	e_uppercase		(Char);
143 extern	CCRETVAL	e_lowercase		(Char);
144 extern	CCRETVAL	e_capitalcase		(Char);
145 extern	CCRETVAL	e_cleardisp		(Char);
146 extern	CCRETVAL	e_complete		(Char);
147 extern	CCRETVAL	e_correct		(Char);
148 extern	CCRETVAL	e_correctl		(Char);
149 extern	CCRETVAL	e_up_hist		(Char);
150 extern	CCRETVAL	e_down_hist		(Char);
151 extern	CCRETVAL	e_up_search_hist	(Char);
152 extern	CCRETVAL	e_down_search_hist	(Char);
153 extern	CCRETVAL	e_helpme		(Char);
154 extern	CCRETVAL	e_list_choices		(Char);
155 extern	CCRETVAL	e_delwordprev		(Char);
156 extern	CCRETVAL	e_delwordnext		(Char);
157 extern	CCRETVAL	e_digit			(Char);
158 extern	CCRETVAL	e_argdigit		(Char);
159 extern	CCRETVAL	v_zero			(Char);
160 extern	CCRETVAL	e_killend		(Char);
161 extern	CCRETVAL	e_killbeg		(Char);
162 extern	CCRETVAL	e_metanext		(Char);
163 #ifdef notdef
164 extern	CCRETVAL	e_extendnext		(Char);
165 #endif
166 extern	CCRETVAL	e_send_eof		(Char);
167 extern	CCRETVAL	e_charswitch		(Char);
168 extern	CCRETVAL	e_gcharswitch		(Char);
169 extern	CCRETVAL	e_which			(Char);
170 extern	CCRETVAL	e_yank_kill		(Char);
171 extern	CCRETVAL	e_tty_dsusp		(Char);
172 extern	CCRETVAL	e_tty_flusho		(Char);
173 extern	CCRETVAL	e_tty_quit		(Char);
174 extern	CCRETVAL	e_tty_tsusp		(Char);
175 extern	CCRETVAL	e_tty_stopo		(Char);
176 extern	CCRETVAL	e_tty_starto		(Char);
177 extern	CCRETVAL	e_argfour		(Char);
178 extern	CCRETVAL	e_set_mark		(Char);
179 extern	CCRETVAL	e_exchange_mark		(Char);
180 extern	CCRETVAL	e_last_item		(Char);
181 extern	CCRETVAL	v_cmd_mode		(Char);
182 extern	CCRETVAL	v_insert		(Char);
183 extern	CCRETVAL	v_replmode		(Char);
184 extern	CCRETVAL	v_replone		(Char);
185 extern	CCRETVAL	v_substline		(Char);
186 extern	CCRETVAL	v_substchar		(Char);
187 extern	CCRETVAL	v_add			(Char);
188 extern	CCRETVAL	v_addend		(Char);
189 extern	CCRETVAL	v_insbeg		(Char);
190 extern	CCRETVAL	v_chgtoend		(Char);
191 extern	CCRETVAL	e_killregion		(Char);
192 extern	CCRETVAL	e_killall		(Char);
193 extern	CCRETVAL	e_copyregion		(Char);
194 extern	CCRETVAL	e_tty_int		(Char);
195 extern	CCRETVAL	e_run_fg_editor		(Char);
196 extern	CCRETVAL	e_list_eof		(Char);
197 extern	int     	e_expand_history_rne	(Char);
198 extern	CCRETVAL	e_expand_history	(Char);
199 extern	CCRETVAL	e_magic_space		(Char);
200 extern	CCRETVAL	e_list_glob		(Char);
201 extern	CCRETVAL	e_expand_glob		(Char);
202 extern	CCRETVAL	e_insovr		(Char);
203 extern	CCRETVAL	v_cm_complete		(Char);
204 extern	CCRETVAL	e_copyprev		(Char);
205 extern	CCRETVAL	v_change_case		(Char);
206 extern	CCRETVAL	e_expand		(Char);
207 extern	CCRETVAL	e_expand_vars		(Char);
208 extern	CCRETVAL	e_toggle_hist		(Char);
209 extern  CCRETVAL        e_load_average		(Char);
210 extern  CCRETVAL        v_delprev		(Char);
211 extern  CCRETVAL        v_delmeta		(Char);
212 extern  CCRETVAL        v_wordfwd		(Char);
213 extern  CCRETVAL        v_wordback		(Char);
214 extern  CCRETVAL        v_endword		(Char);
215 extern  CCRETVAL        v_eword			(Char);
216 extern  CCRETVAL        v_undo			(Char);
217 extern  CCRETVAL        v_ush_meta		(Char);
218 extern  CCRETVAL        v_dsh_meta		(Char);
219 extern  CCRETVAL        v_rsrch_fwd		(Char);
220 extern  CCRETVAL        v_rsrch_back		(Char);
221 extern  CCRETVAL        v_char_fwd		(Char);
222 extern  CCRETVAL        v_char_back		(Char);
223 extern  CCRETVAL        v_chgmeta		(Char);
224 extern	CCRETVAL	e_inc_fwd		(Char);
225 extern	CCRETVAL	e_inc_back		(Char);
226 extern	CCRETVAL	v_rchar_fwd		(Char);
227 extern	CCRETVAL	v_rchar_back		(Char);
228 extern  CCRETVAL        v_charto_fwd		(Char);
229 extern  CCRETVAL        v_charto_back		(Char);
230 extern  CCRETVAL        e_normalize_path	(Char);
231 extern  CCRETVAL        e_normalize_command	(Char);
232 extern  CCRETVAL        e_stuff_char		(Char);
233 extern  CCRETVAL        e_list_all		(Char);
234 extern  CCRETVAL        e_complete_all		(Char);
235 extern  CCRETVAL        e_complete_fwd		(Char);
236 extern  CCRETVAL        e_complete_back		(Char);
237 extern  CCRETVAL        e_dabbrev_expand	(Char);
238 extern  CCRETVAL	e_copy_to_clipboard	(Char);
239 extern  CCRETVAL	e_paste_from_clipboard	(Char);
240 extern  CCRETVAL	e_dosify_next		(Char);
241 extern  CCRETVAL	e_dosify_prev		(Char);
242 extern  CCRETVAL	e_page_up		(Char);
243 extern  CCRETVAL	e_page_down		(Char);
244 extern  CCRETVAL	e_yank_pop		(Char);
245 extern  CCRETVAL	e_newline_hold		(Char);
246 extern  CCRETVAL	e_newline_down_hist	(Char);
247 
248 /*
249  * ed.inputl.c
250  */
251 extern	int	Inputl			(void);
252 extern	int	GetCmdChar		(Char);
253 extern	int	GetNextChar		(Char *);
254 extern	void    UngetNextChar		(Char);
255 extern	void	PushMacro		(Char *);
256 
257 /*
258  * ed.refresh.c
259  */
260 extern	void	ClearLines		(void);
261 extern	void	ClearDisp		(void);
262 extern	void	Refresh			(void);
263 extern	void	RefCursor		(void);
264 extern	void	RefPlusOne		(int);
265 extern	void	PastBottom		(void);
266 
267 /*
268  * ed.xmap.c
269  */
270 extern  XmapVal *XmapStr		(CStr *);
271 extern  XmapVal *XmapCmd		(int);
272 extern	void	 AddXkey		(const CStr *, XmapVal *, int);
273 extern	void	 ClearXkey		(KEYCMD *, const CStr *);
274 extern	int	 GetXkey		(CStr *, XmapVal *);
275 extern	void	 ResetXmap		(void);
276 extern	int	 DeleteXkey		(const CStr *);
277 extern	void	 PrintXkey		(const CStr *);
278 extern	void	 printOne		(const Char *, const XmapVal *, int);
279 extern	eChar		  parseescape	(const Char **);
280 extern	unsigned char    *unparsestring	(const CStr *, const Char *);
281 
282 #endif /* _h_ed_decls */
283