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