extern.h revision 1.4 1 1.4 snj /* $NetBSD: extern.h,v 1.4 2009/10/21 01:07:44 snj Exp $ */
2 1.1 christos
3 1.1 christos /*
4 1.1 christos * Copyright (c) 1997 Christos Zoulas. All rights reserved.
5 1.1 christos *
6 1.1 christos * Redistribution and use in source and binary forms, with or without
7 1.1 christos * modification, are permitted provided that the following conditions
8 1.1 christos * are met:
9 1.1 christos * 1. Redistributions of source code must retain the above copyright
10 1.1 christos * notice, this list of conditions and the following disclaimer.
11 1.1 christos * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 christos * notice, this list of conditions and the following disclaimer in the
13 1.1 christos * documentation and/or other materials provided with the distribution.
14 1.1 christos *
15 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 1.1 christos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 1.1 christos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 1.1 christos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 1.1 christos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 1.1 christos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 1.1 christos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 1.1 christos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 1.1 christos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 1.1 christos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 1.1 christos */
26 1.1 christos /* ch.c */
27 1.1 christos int ch_seek __P((off_t));
28 1.1 christos int ch_end_seek __P((void));
29 1.1 christos int ch_beg_seek __P((void));
30 1.1 christos off_t ch_length __P((void));
31 1.1 christos off_t ch_tell __P((void));
32 1.1 christos int ch_forw_get __P((void));
33 1.1 christos int ch_back_get __P((void));
34 1.1 christos void ch_init __P((int, int));
35 1.1 christos int ch_addbuf __P((int));
36 1.1 christos
37 1.1 christos /* command.c */
38 1.1 christos void start_mca __P((int, char *));
39 1.1 christos int prompt __P((void));
40 1.1 christos void commands __P((void));
41 1.1 christos void editfile __P((void));
42 1.1 christos void showlist __P((void));
43 1.1 christos
44 1.1 christos /* decode.c */
45 1.1 christos void noprefix __P((void));
46 1.1 christos int cmd_decode __P((int));
47 1.1 christos int cmd_search __P((char *, char *));
48 1.1 christos
49 1.1 christos /* help.c */
50 1.1 christos void help __P((void));
51 1.1 christos
52 1.1 christos /* input.c */
53 1.1 christos off_t forw_line __P((off_t));
54 1.1 christos off_t back_line __P((off_t));
55 1.1 christos
56 1.1 christos /* line.c */
57 1.1 christos void prewind __P((void));
58 1.1 christos int pappend __P((int));
59 1.1 christos off_t forw_raw_line __P((off_t));
60 1.1 christos off_t back_raw_line __P((off_t));
61 1.1 christos
62 1.1 christos /* linenum.c */
63 1.1 christos void clr_linenum __P((void));
64 1.1 christos void add_lnum __P((int, off_t));
65 1.1 christos int find_linenum __P((off_t));
66 1.1 christos int currline __P((int));
67 1.1 christos
68 1.1 christos /* main.c */
69 1.1 christos int edit __P((char *));
70 1.1 christos void next_file __P((int));
71 1.1 christos void prev_file __P((int));
72 1.1 christos int main __P((int, char **));
73 1.1 christos char *save __P((char *));
74 1.1 christos void quit __P((void)) __attribute__((noreturn));
75 1.1 christos
76 1.1 christos /* option.c */
77 1.1 christos int option __P((int, char **));
78 1.1 christos
79 1.1 christos /* os.c */
80 1.1 christos void lsystem __P((char *));
81 1.1 christos int iread __P((int, char *, int));
82 1.1 christos void intread __P((void));
83 1.1 christos char *glob __P((char *));
84 1.1 christos char *bad_file __P((char *, char *, u_int));
85 1.1 christos void strtcpy __P((char *, char *, int));
86 1.1 christos
87 1.1 christos /* output.c */
88 1.1 christos void put_line __P((void));
89 1.1 christos void flush __P((void));
90 1.1 christos void purge __P((void));
91 1.2 pk int putchr __P((int));
92 1.1 christos void putstr __P((char *));
93 1.1 christos void error __P((char *));
94 1.1 christos void ierror __P((char *));
95 1.1 christos
96 1.1 christos /* position.c */
97 1.1 christos off_t position __P((int));
98 1.1 christos void add_forw_pos __P((off_t));
99 1.1 christos void add_back_pos __P((off_t));
100 1.1 christos void copytable __P((void));
101 1.1 christos void pos_clear __P((void));
102 1.1 christos int onscreen __P((off_t));
103 1.1 christos
104 1.1 christos /* prim.c */
105 1.1 christos void eof_check __P((void));
106 1.1 christos void squish_check __P((void));
107 1.1 christos void forw __P((int, off_t, int));
108 1.1 christos void back __P((int, off_t, int));
109 1.1 christos void forward __P((int, int));
110 1.1 christos void backward __P((int, int));
111 1.1 christos void prepaint __P((off_t));
112 1.1 christos void repaint __P((void));
113 1.1 christos void jump_forw __P((void));
114 1.1 christos void jump_back __P((int));
115 1.1 christos void jump_percent __P((int));
116 1.1 christos void jump_loc __P((off_t));
117 1.1 christos void init_mark __P((void));
118 1.1 christos void setmark __P((int));
119 1.1 christos void lastmark __P((void));
120 1.1 christos void gomark __P((int));
121 1.1 christos int get_back_scroll __P((void));
122 1.1 christos int search __P((int, char *, int, int));
123 1.1 christos
124 1.1 christos /* screen.c */
125 1.1 christos void raw_mode __P((int));
126 1.1 christos void get_term __P((void));
127 1.1 christos void init __P((void));
128 1.1 christos void deinit __P((void));
129 1.1 christos void home __P((void));
130 1.1 christos void add_line __P((void));
131 1.1 christos void lower_left __P((void));
132 1.1 christos void bell __P((void));
133 1.1 christos void clear __P((void));
134 1.1 christos void clear_eol __P((void));
135 1.1 christos void so_enter __P((void));
136 1.1 christos void so_exit __P((void));
137 1.1 christos void ul_enter __P((void));
138 1.1 christos void ul_exit __P((void));
139 1.1 christos void bo_enter __P((void));
140 1.1 christos void bo_exit __P((void));
141 1.1 christos void backspace __P((void));
142 1.1 christos void putbs __P((void));
143 1.1 christos
144 1.1 christos /* signal.c */
145 1.1 christos void winch __P((int));
146 1.1 christos void init_signals __P((int));
147 1.1 christos void psignals __P((void));
148 1.1 christos
149 1.1 christos /* ttyin.c */
150 1.1 christos void open_getchr __P((void));
151 1.1 christos int getchr __P((void));
152 1.1 christos
153 1.1 christos extern char **av;
154 1.1 christos extern char *current_file;
155 1.1 christos extern char *current_name;
156 1.1 christos extern char *firstsearch;
157 1.1 christos extern char *line;
158 1.1 christos extern char *next_name;
159 1.1 christos extern int ac;
160 1.1 christos extern int any_display;
161 1.1 christos extern int auto_wrap;
162 1.1 christos extern int back_scroll;
163 1.1 christos extern int be_width;
164 1.1 christos extern int bo_width;
165 1.1 christos extern int bs_mode;
166 1.1 christos extern int caseless;
167 1.1 christos extern int cbufs;
168 1.1 christos extern int cmdstack;
169 1.1 christos extern int curr_ac;
170 1.1 christos extern int erase_char;
171 1.1 christos extern int errmsgs;
172 1.1 christos extern int file;
173 1.1 christos extern int hit_eof;
174 1.1 christos extern int ignaw;
175 1.1 christos extern int ispipe;
176 1.1 christos extern int kill_char;
177 1.1 christos extern int linenums;
178 1.1 christos extern int lnloop;
179 1.1 christos extern int quit_at_eof;
180 1.1 christos extern int quitting;
181 1.1 christos extern int reading;
182 1.1 christos extern int retain_below;
183 1.1 christos extern int sc_height;
184 1.1 christos extern int sc_width;
185 1.1 christos extern int sc_window;
186 1.1 christos extern int screen_trashed;
187 1.3 chs extern int scroll_lines;
188 1.1 christos extern int se_width;
189 1.1 christos extern int short_file;
190 1.1 christos extern int sigs;
191 1.1 christos extern int so_width;
192 1.1 christos extern int squeeze;
193 1.1 christos extern int tabstop;
194 1.1 christos extern int top_scroll;
195 1.1 christos extern int ue_width;
196 1.1 christos extern int ul_width;
197 1.1 christos extern int werase_char;
198