/*
 *   This file was automatically generated by cextract version 1.2.
 *   Manual editing now recommended, since I've done a whole lot of it.
 *
 *   Created: Thu May 14 15:44:40 1992
 *
 * $Header: /usr/build/vile/vile/RCS/proto.h,v 1.742 2015/09/06 20:25:25 tom Exp $
 *
 */

#ifndef VILE_PROTO_H
#define VILE_PROTO_H 1
/* *INDENT-OFF* */

#ifdef __cplusplus
extern "C" {
#endif

extern SIGT catchintr (int ACTUAL_SIG_ARGS);
extern char *init_state_value (int n);
extern char *strncpy0 (char *t, const char *f, size_t l);
extern char *vile_getenv (const char *name);
extern char *vl_strncat (char *dest, const char *src, size_t destlen);
extern char *vl_strncpy (char *dest, const char *src, size_t destlen);
extern int call_cmdfunc (const CMDFUNC *p, int f, int n);
extern int no_memory (const char *s);
extern int rdonly (void);
extern int writeall (int f, int n, int promptuser, int leaving, int autowriting, int all);
extern void do_repeats (int *cp, int *fp, int *np);
extern void exit_program (int code) GCC_NORETURN;
extern void init_mode_value (struct VAL *, MODECLASS c, int n);
extern void not_interrupted (void);
extern void setup_handler (int sig, void (*disp) (int ACTUAL_SIG_ARGS));
extern void tcap_init_fkeys (void);
extern void tcap_setup_locale (char *real_locale, char *fake_locale);
extern void tidy_exit (int code) GCC_NORETURN;

#ifndef interrupted
extern int interrupted (void);
#endif

#ifndef strmalloc
extern char *strmalloc (const char *s);
#endif

#if OPT_HEAPSIZE
extern char *track_realloc (char *mp, UINT nbytes);
extern char *track_malloc (UINT nbytes);
extern void track_free (char *mp);
#endif

#ifndef valid_line_bp
extern int valid_line_bp(LINE *lp, BUFFER *bp);
#endif

#ifndef valid_line_wp
extern int valid_line_wp(LINE *lp, WINDOW *wp);
#endif

#ifndef valid_buffer
extern int valid_buffer(BUFFER *bp);
#endif

#ifndef valid_window
extern int valid_window(WINDOW *wp);
#endif

/* screen-drivers */
#if OPT_XTERM
extern void xterm_open (TERM *);
extern void xterm_close (void);
extern void xterm_mopen (void);
extern void xterm_mclose (void);
extern void xterm_settitle (const char *t);
#if OPT_XTERM >= 3
extern int xterm_mouse_t (int f, int n);
extern int xterm_mouse_T (int f, int n);
#endif
#endif

#if OPT_PERL
/* perl.xs (perl.c) */
extern	void	perl_default_region(void);
extern	void	perl_free_handle(void *);
extern	int	perl_free_callback(char *);
extern  void	perl_free_deferred(void);
extern	void	perl_init(int *, char ***, char ***);
extern	void	perl_exit(void);
#if OPT_NAMEBST
extern	int	perl_call_sub(void *, int, int, int);
extern	void	perl_free_sub(void *);
#endif
#endif

#if OPT_PERL || OPT_PLUGIN
/* api.c */
extern void api_free_private(void *);
/* There are others as well, but the rest are found in api.h */
#endif

/* basic.c */
extern int can_set_nmmark (int c);
extern int column_after (int c, int col, int list);
extern int column_sizes (WINDOW *wp, const char *text, unsigned limit, int *used);
extern int firstchar (LINE *lp);
extern int getgoal (LINE *dlp);
extern int gonmmark (int c);
extern int lastchar (LINE *lp);
extern int next_column (LINE *lp, int off, int col);
extern int next_sw (int col);
extern int next_tabcol (int col);
extern int nextchar (LINE *lp, int off);
extern int setmark (void);
extern int show_mark_is_set (int c);
extern int vl_gotoline (int n);
extern void swapmark (void);

#if OPT_MOUSE
extern	int setcursor (int row, int col);
extern	int setwmark (int row, int col);
#endif

#define bytes_to_bol(lp,off) (off)
#define bytes_to_eol(lp,off) (llength(lp) - off)

#if OPT_MULTIBYTE

extern int char_at_dot(void);
extern int bytes_at(LINE *lp, int off);
extern int bytes_before(LINE *lp, int off);
extern int chars_to_eol(LINE *lp, int off);
extern int chars_to_bol(LINE *lp, int off);
extern int count_bytes(LINE *lp, int off, int chars);
extern int count_chars(LINE *lp, int off, int bytes);
extern int mb_cellwidth(WINDOW *wp, const char *text, int limit);

extern int tb_bytes_before(TBUFF *text, int off);

extern int str_wcs_width(const char *text);
extern int tb_wcs_width(TBUFF *text);

#define CTypeOf(ch)         (b_is_utfXX(curbp) ? vl_ctype_bits(ch,TRUE) : vlCTYPE(ch))
#define HasCType(type,ch)   ((CTypeOf(ch) & type) != 0)
#define CharAtDot()         char_at_mark(DOT)
#define BytesAt(lp,off)     (b_is_utfXX(curbp) ? bytes_at(lp,off) : 1)
#define BytesBefore(lp,off) (b_is_utfXX(curbp) ? bytes_before(lp,off) : (off)!=0)

#define str_columns(s)      str_wcs_width(s)
#define tb_columns(s)       tb_wcs_width(s)

#define TbBytesBefore(tb,off) (b_is_utfXX(curbp) ? tb_bytes_before(tb,off) : (off)!=0)

#else

#define chars_to_eol(lp,off) bytes_to_bol(lp,off)
#define chars_to_bol(lp,off) bytes_to_eol(lp,off)
#define count_bytes(lp, off, chars) (chars)
#define count_chars(lp, off, bytes) (bytes)

#define CTypeOf(ch)         vlCTYPE(ch)
#define HasCType(type,ch)   ((CTypeOf(ch) & type) != 0)
#define CharAtDot()         char_at_mark(DOT)
#define BytesAt(lp,off) 1
#define BytesBefore(lp,off) ((off)!=0)

#define tb_bytes_before(s,n) 1

#define str_columns(s)      strlen(s)
#define tb_columns(s)       (int) tb_length(s)

#define TbBytesBefore(tb,off) ((off)!=0)

#endif

#if SMALLER	/* cancel 'neproto.h' */
extern int gotobob (int f, int n);
extern int gotoeob (int f, int n);
#endif

/* bind.c */
extern BINDINGS * vl_get_binding (const char *name);
extern char *cfg_locate (char *fname, UINT hflag);
extern char *kbd_engl (const char *prompt, char *buffer, UINT which);
extern char *kcod2prc (int c, char *seq);
extern char *kcod2pstr (int c, char *seq, int limit);
extern const CMDFUNC *engl2fnc (const char *fname);
extern const CMDFUNC *kcod2fnc (const BINDINGS *bs, int c);
extern const char * fnc2engl(const CMDFUNC * cfp);
extern int cmd_complete (DONE_ARGS);
extern int eol_command (EOL_ARGS);
extern int fnc2kcod (const CMDFUNC *);
extern int fnc2kins (const CMDFUNC *);
extern int kbd_complete (DONE_ARGS, const char *table, size_t size_entry);
extern int kbd_engl_stat (const char *prompt, char *buffer, UINT which, int stated);
extern int kbd_erase_to_end (int column);
extern int kbd_length (void);
extern int kbd_putc (int c);
extern int kcod2escape_seq (int c, char *ptr, size_t limit);
extern int no_such_function (const char *fname);
extern int ourstrstr (const char *haystack, const char *needle, int anchor);
extern void kbd_erase (void);
extern void kbd_finish (KBD_DATA *save);
extern void kbd_init (void);
extern void kbd_start (KBD_DATA *save);
extern void kbd_unquery (void);
extern void popdown_completions (const char *old_bname, WINDOW *old_wp);

#if DISP_X11
extern char *fnc2pstr (const CMDFUNC *f);
#endif

#if OPT_EVAL
extern const char *prc2engl (const char *skey);
#endif

#if OPT_MENUS
extern char *give_accelerator ( char * );
#endif

#if OPT_NAMEBST
extern int delete_namebst(const char *name, int release, int redefining, UINT which);
extern int insert_namebst(const char *name, const CMDFUNC *cmd, int ro, UINT which);
extern int rename_namebst(const char *oldname, const char *newname, UINT which);
extern int search_namebst(const char *name, UINT which);
extern void build_namebst(const NTAB *nametbl, int lo, int hi, UINT which);
#endif

#if OPT_TRACE
extern void trace_alarm (const char *file, int lineno);
#define kbd_alarm() trace_alarm(__FILE__, __LINE__)
#else
extern void kbd_alarm (void);
#endif

/* buffer.c */
extern BUFFER *bfind (const char *bname, UINT bflag);
extern BUFFER *find_alt (void);
extern BUFFER *find_any_buffer (const char *name);
extern BUFFER *find_b_file (const char *fname);
extern BUFFER *find_b_hist(int number);
extern BUFFER *find_b_name (const char *name);
extern BUFFER *find_bp (BUFFER *bp1);
extern BUFFER *getfile2bp (const char *fname, int ok_to_ask, int cmdline);
extern BUFFER *make_bp (const char *fname, UINT flags);
extern BUFFER *make_ro_bp(const char *bname, UINT flags);
extern BUFFER *zotbuf2 (BUFFER *bp);
extern WINDOW *bp2any_wp (BUFFER *bp);
extern char *add_brackets(char *dst, const char *src);
extern char *hist_lookup (int c);
extern char *next_buffer_line(const char *bname);
extern char *strip_brackets(char *dst, const char *src);
extern int add_line_at (BUFFER *bp, LINE *prevp, const char *text, int len);
extern int addline (BUFFER *bp, const char *text, int len);
extern int any_changed_buf (BUFFER **bpp);
extern int any_unread_buf (BUFFER **bpp);
extern int ask_for_bname(const char *prompt, char *bufn, size_t len);
extern int bclear (BUFFER *bp);
extern int bname_complete (DONE_ARGS);
extern int bsizes (BUFFER *bp);
extern int buffer_in_use (BUFFER *bp);
extern int buffer_is_solo (BUFFER *bp);
extern int buffer_is_visible (BUFFER *bp);
extern int delink_bp (BUFFER *bp);
extern int kill_that_buffer (BUFFER *bp);
extern int popupbuff (BUFFER *bp);
extern int renamebuffer(BUFFER *rbp, char *bufname);
extern int shiftwid_val (BUFFER *bp);
extern int swbuffer (BUFFER *bp);
extern int swbuffer_lfl (BUFFER *bp, int lockfl, int this_window);
extern int tabstop_val (BUFFER *bp);
extern int zotbuf (BUFFER *bp);
extern int zotwp (BUFFER *bp);
extern void buffer_flags (char *dst, BUFFER *bp);
extern void chg_buff (BUFFER *bp, unsigned flag);
extern void imply_alt (char *fname, int copy, int lockfl);
extern void make_current (BUFFER *nbp);
extern void set_bname (BUFFER *bp, const char *name);
extern void set_editor_title(void);
extern void sortlistbuffers (void);
extern void unchg_buff (BUFFER *bp, unsigned flag);
extern void undispbuff (BUFFER *bp, WINDOW *wp);

#if !OPT_MAJORMODE
extern int has_C_suffix (BUFFER *bp);
#endif

#if OPT_MODELINE
extern void do_modelines(BUFFER *bp);
#endif

#if OPT_UPBUFF
extern void updatelistbuffers (void);
extern void update_scratch (const char *name, UpBuffFunc func);
#else
#define updatelistbuffers()
#define update_scratch(name, func)
#endif

/* charsets.c */
extern int vl_wcwidth(int code);

#if OPT_MULTIBYTE

extern int aligned_charset (BUFFER *bp, UCHAR *buffer, B_COUNT *length);
extern int check_utf8 (UCHAR * buffer, B_COUNT length);
extern int cleanup_charset (BUFFER *bp, UCHAR *buffer, B_COUNT *length);
extern int vl_check_utf8 (const char *source, B_COUNT limit);
extern int vl_conv_to_utf32 (UINT * target, const char *source, B_COUNT limit);
extern int vl_conv_to_utf8 (UCHAR * target, UINT source, B_COUNT limit);
extern void found_utf8 (BUFFER *bp);

extern const char *byteorder2s(int code);
extern const char *encoding2s(int code);

extern int decode_bom (BUFFER *bp, UCHAR *buffer, B_COUNT *length);
extern int decode_charset (BUFFER *bp, LINE *lp);
extern int deduce_charset (BUFFER *bp, UCHAR *buffer, B_COUNT *length, int always);
extern int encode_charset(BUFFER *bp, const char *buf, int nbuf, const char *ending);
extern int write_bom (BUFFER *bp);

#else

#define decode_bom(bp, buffer, length) /* nothing */
#define decode_charset(bp, lp) /* nothing */
#define deduce_charset(bp, buffer, length, always) /* nothing */
#define encode_charset(bp, buf, nbuf, ending) /* nothing */
#define write_bom(bp) /* nothing */

#endif

/* csrch.c */

/* display.c */
extern LINE *b2printf (BUFFER *bp, const char *fmt, ...) VILE_PRINTF(2,3);
extern LINE *b2vprintf (BUFFER *bp, const char *fmt, va_list ap);
extern char *lsprintf (char *buf, const char *fmt, ...) VILE_PRINTF(2,3);
extern int bputc (int c);
extern int bputsn (const char *src, int len);
extern int col_limit (WINDOW *wp);
extern int format_int (char *buf, UINT number, UINT radix);
extern int im_waiting (int flag);
extern int is_vtinit (void);
extern int mk_to_vcol (WINDOW *wp, MARK mark, int expanded, int col, int adjust);
extern int mlsavec (int c);
extern int nu_width (WINDOW *wp);
extern int offs2col (WINDOW *wp, LINE *lp, C_NUM offset);
extern int update (int force);
extern int video_alloc (VIDEO **vpp);
extern int vtinit (void);
extern void bottomleft (void);
extern void bpadc (int c, int count);
extern void bprintf (/*@observer@*/ const char *fmt, ...) VILE_PRINTF(1,2);
extern void dbgwrite (const char *fmt, ...) VILE_PRINTF(1,2);
extern void hilite (int row, int colfrom, int colto, int on);
extern void kbd_flush (void);
extern void kbd_openup (void);
extern void kbd_overlay (const char *s);
extern void mlerase (void);
extern void mlerror (const char *s);
extern void mlforce (const char *fmt, ...) VILE_PRINTF(1,2);
extern void mlprompt (const char *fmt, ...) VILE_PRINTF(1,2);
extern void mlwarn (const char *fmt, ...) VILE_PRINTF(1,2);
extern void mlwrite (const char *fmt, ...) VILE_PRINTF(1,2);
extern void movecursor (int row, int col);
extern void newscreensize (int h, int w);
extern void tprintf (const char *fmt, ...) VILE_PRINTF(1,2);
extern void upmode (void);

#if !DISP_X11
extern void getscreensize (int *widthp, int *heightp);
#if defined(SIGWINCH)
extern SIGT sizesignal (int ACTUAL_SIG_ARGS);
#endif
#endif

#ifdef WMDLINEWRAP
extern int line_height (WINDOW *wp, LINE *lp);
#else
#define line_height(wp,lp) 1
#endif

#if defined(WMDLINEWRAP) || OPT_MOUSE
extern WINDOW *row2window (int row);
extern int col2offs (WINDOW *wp, LINE *lp, C_NUM col);
#endif

#if OPT_EXTRA_COLOR
extern int bputsn_attr(const char *src, int len, int attr);
extern int bputsn_xcolor(const char *src, int len, XCOLOR_CODES code);
#else
#define bputsn_attr(src, len, attr) bputsn(src, len)
#define bputsn_xcolor(src, len, code) bputsn(src, len)
#endif

#if OPT_MLFORMAT || OPT_POSFORMAT || OPT_TITLE
extern void special_formatter(TBUFF **result, const char *fs, WINDOW *wp);
#endif

#if OPT_WORKING
extern SIGT imworking (int ACTUAL_SIG_ARGS);
#endif

extern	int	allow_working_msg (void);

#if OPT_PSCREEN
extern	OUTC_DCL psc_putchar	(int c);
extern	void	psc_eeol	(void);
extern	void	psc_eeop	(void);
extern	void	psc_flush	(void);
extern	void	psc_move	(int row, int col);
extern	void	psc_rev		(UINT huh);
#endif	/* OPT_PSCREEN */

#if OPT_UPBUFF
extern	BUFFER * recomputing_buf (void);
extern	WINDOW * recomputing_win (void);
extern	int is_recomputing (WINDOW *wp);
#else
#define is_recomputing(wp) FALSE
#endif

/* djhandl.c */
#if CC_DJGPP
extern ULONG was_ctrl_c_hit (void);
extern void want_ctrl_c (int yes);
extern void clear_hard_error (void);
extern void hard_error_catch_setup (void);
extern void hard_error_teardown (void);
extern int did_hard_error_occur (void);
#endif

/* eightbit.c */
extern char * vl_get_encoding (char **target, const char *locale);
extern char * vl_get_locale (char **target);
extern char * vl_narrowed (const char *wide);
extern const char * vl_mb_to_utf8 (int code);
extern int vl_8bit_builtin (void);
extern int vl_8bit_to_ucs(int *result, int code);
extern int vl_is_8bit_encoding (const char * value);
extern int vl_is_latin1_encoding (const char * value);
extern int vl_is_utf8_encoding (const char * value);
extern int vl_mb_is_8bit (int value);
extern int vl_ucs_to_8bit (int *result, int code);
extern void vl_8bit_ctype_init (int wide, int ch);
extern void vl_close_mbterm (void);
extern void vl_init_8bit (const char *wide, const char *narrow);
extern void vl_open_mbterm (void);

/* statevar.c */
extern const char * safe_getenv(const char *s);

#if OPT_EVAL
extern char * get_cdpath (void);
extern char * get_findpath (void);
extern char * get_shell (void);
extern void setcmdstatus(int s);
#else
#define get_cdpath() getenv("CDPATH")
#define get_findpath() getenv("VILE_FINDPATH")
#define get_shell()  getenv("SHELL")
#define setcmdstatus(s) /*nothing*/
#endif

#if OPT_SHELL && DISP_X11
extern char * get_xdisplay (void);
extern char * get_xshell (void);
extern char * get_xshellflags (void);
#endif

/* eval.c */
extern UINT mac_tokens (void);
extern char * get_directory (void);
extern char * get_token (char *src, TBUFF **tok, int (*endfunc) (EOL_ARGS), int eolchar, int *actual);
extern char * get_token1 (char *src, TBUFF **tok, int (*endfunc) (EOL_ARGS), int eolchar, int *actual);
extern char * get_token2 (char *src, TBUFF **tok, int (*endfunc) (EOL_ARGS), int eolchar, int *actual);
extern char * mac_tokval (TBUFF **tok);
extern char * mac_unquotedarg (TBUFF **tok);
extern char * mklower (char *str);
extern char * mktrimmed (char *str);
extern char * render_boolean (TBUFF **rp, int i);
extern char * render_int (TBUFF **rp, int i);
extern char * render_long (TBUFF **rp, long i);
extern char * render_ulong (TBUFF **rp, ULONG i);
extern char * skip_space_tab(char *src);
extern const char * status2s (int val);
extern const char * skip_cblanks (const char *str);
extern const char * skip_cnumber (const char *str);
extern const char * skip_cstring (const char *str);
extern const char * skip_ctext (const char *str);
extern const char * tokval (const char *tokn);
extern int eval_fchanged (BUFFER *bp);
extern int is_falsem (const char *val);
extern int is_truem (const char *val);
extern int mac_literalarg (TBUFF **tok);
extern int mac_token (TBUFF **tok);
extern int macroize (TBUFF **p, TBUFF *src, int skip);
extern int must_quote_token (const char * values, size_t last);
extern int s2status (const char *val);
extern int scan_bool (const char *s );
extern int toktyp (const char *tokn);
extern int vl_lookup_statevar(const char *vname);
extern long absol (long x);
extern void append_quoted_token (TBUFF ** dst, const char * values, size_t last);
extern void path_quote (TBUFF **result, const char *path);

#ifdef const
#define skip_blanks(s) skip_cblanks(s)
#define skip_number(s) skip_cnumber(s)
#define skip_string(s) skip_cstring(s)
#define skip_text(s) skip_ctext(s)
#else
extern char *skip_blanks (char *str);
extern char *skip_number (char *str);
extern char *skip_string (char *str);
extern char *skip_text (char *str);
#endif

#if OPT_EVAL
extern LINE *label2lp (BUFFER *bp, const char *label);
extern int rmv_tempvar (const char *name);
extern int set_state_variable (const char *name, const char *value);
extern long scan_long (const char *s);
#define scan_int(s) (int)scan_long(s)
#else
#define gtenv(name) getenv(name)
#define rmv_tempvar(name) /* nothing */
#define scan_int(s) atoi(s)
#define set_state_variable(name, value) /* nothing */
#endif

extern int vl_lookup_func (const char *name);

#if OPT_EVAL || DISP_X11
extern int stol (const char *val);
#endif

#if OPT_EVAL || OPT_COLOR
extern int set_palette (const char *value);
#endif

#if OPT_EVAL || !SMALLER
extern char *mkupper (char *str);
#endif

#if OPT_COLOR
extern int set_ctrans (const char *value);
#endif

#if OPT_MACRO_ARGS
extern void restore_arguments(BUFFER *bp);
extern int save_arguments(BUFFER *bp);
#else
#define restore_arguments(cfp) /*nothing*/
#define save_arguments(cfp) 1
#endif

#if OPT_SHOW_CTYPE
extern void rebuild_charclasses(int print_lo, int print_hi);
#else
#define rebuild_charclasses(print_lo, print_hi) /* nothing */
#endif

#if OPT_SHOW_COLORS && OPT_UPBUFF
extern void relist_descolor(void);
#else
#define relist_descolor() /*nothing*/
#endif

#if OPT_UPBUFF
extern void updatelistvariables(void);
extern void update_char_classes(void);
#else
#define updatelistvariables()	/*nothing */
#define update_char_classes()	/*nothing */
#endif

#if (SYS_WINNT||SYS_VMS)
extern char *render_hex(TBUFF **rp, UINT i);
#endif

/* exec.c */
extern DIRECTIVE dname_to_dirnum (char **cmdp, size_t length);
extern const char *skip_linespecs (const char *buffer, int cpos, int *done);
extern int do_source (char *fname, int n, int optional);
extern int dobuf (BUFFER *bp, int limit, int real_cmd_count);
extern int docmd (char *cline, int execflag, int f, int n);
extern int dofile (char *fname);
extern int end_named_cmd (void);
extern int execute (const CMDFUNC *execfunc, int f, int n);
extern int more_named_cmd (void);
extern int user_operator (void);

/* file.c */
extern SIGT imdying (int ACTUAL_SIG_ARGS);
extern int bp2readin (BUFFER *bp, int lockfl);
extern int fileuid_compare (FUID *fuid1, FUID *fuid2);
extern int fileuid_get (const char *fname, FUID *fuid);
extern int fileuid_same (BUFFER *bp, FUID *fuid);
extern int getfile (char *fname, int lockfl);
extern int ifile (char *fname, int belowthisline, FILE *haveffp);
extern int kwrite (char *fn, int msgf);
extern int no_file_found (void);
extern int no_file_name (const char *fname);
extern int no_such_file (const char *fname);
extern int readin (char *fname, int lockfl, BUFFER *bp, int mflg);
extern int same_fname (const char *fname, BUFFER *bp, int lengthen);
extern int set_files_to_edit(const char *prompt, int appflag);
extern int slowreadf (BUFFER *bp, int *nlinep);
extern int write_enc_region (void);
extern int writeout (const char *fn, BUFFER *bp, int forced, int msgf);
extern int write_region(BUFFER *bp, REGION *rp, int encoded, int *nlines, B_COUNT *nchars);
extern int writeregion (void);
extern time_t file_modified (char *path);
extern void explicit_dosmode(BUFFER *bp, RECORD_SEP record_sep);
extern void fileuid_invalidate (BUFFER *bp);
extern void fileuid_set (BUFFER *bp, FUID *fuid);
extern void fileuid_set_if_valid(BUFFER *bp, const char *fname);
extern void makename (char *bname, const char *fname);
extern void markWFMODE (BUFFER *bp);
extern void set_last_file_edited (const char *);
extern void unqname (char *name);

#ifdef MDCHK_MODTIME
extern int ask_shouldchange (BUFFER *bp);
extern int check_file_changed (BUFFER *bp, char *fn);
extern int check_visible_files_changed (void);
#endif

#ifdef MDCHK_MODTIME
extern int get_modtime (BUFFER *bp, time_t *the_time);
extern void set_modtime (BUFFER *bp, char *fn);
#endif

#if SMALLER	/* cancel neproto.h */
extern int filesave (int f, int n);
#endif

/* filec.c */
extern char *filec_expand (void);
extern int mlreply_dir (const char *prompt, TBUFF **buf, char *result);
extern int mlreply_file (const char *prompt, TBUFF **buf, UINT flag, char *result);

#if COMPLETE_FILES || COMPLETE_DIRS
extern int fill_directory_buffer(BUFFER *bp, char *path, size_t dots);
extern int path_completion (DONE_ARGS);
extern void init_filec(const char *buffer_name);
#else
#define init_filec(buffer_name) /* nothing */
#endif

/* fileio.c */
extern int ffaccess (char *fn, UINT mode);
extern int ffclose (void);
extern int ffexists (char *p);
extern int ffhasdata (void);
extern int ffputc (int c);
extern int ffputline (const char *buf, int nbuf, const char *ending);
extern int ffread (char *buf, B_COUNT want, B_COUNT *have);
extern int ffronly (char *fn);
extern int ffropen (char *fn);
extern int ffsize (B_COUNT *have);
extern int ffwopen (char *fn, int forced);
extern int file_stat (const char *fn, struct stat *sb);
extern void ffrewind (void);
extern void ffseek (B_COUNT n);

#if OPT_ENCRYPT
extern void ffdocrypt (int crypting);
#endif

/* finderr.c */
#if OPT_FINDERR
extern const char * get_febuff (void);
extern void set_febuff (const char *name);
#endif

#if OPT_UPBUFF
extern	int	free_err_exps(BUFFER *bp);
extern	void	update_err_regex(void);
#else
#define update_err_regex()	/*nothing */
#define free_err_exps(bp)	/*nothing */
#endif

/* glob.c */
extern	char **	glob_free   (char **list_of_items);
extern	char **	glob_string (char *item);
extern	int	doglob (char *path);
extern	int	glob_length (char **list_of_items);
extern	int	glob_match_leaf(char *leaf, char *pattern);
extern	int	string_has_wildcards(const char *item);

#if !SYS_UNIX
extern	int	glob_needed (char **list_of_items);
extern	void	expand_wild_args (int *argcp, char ***argvp);
#endif

/* globals.c */

/* history.c */
#if OPT_HISTORY
extern	int	edithistory (TBUFF **buffer, size_t *position, int *given, UINT options, int (*func)(EOL_ARGS), int eolchar);
extern	void	hst_append (TBUFF *cmd, int glue, int can_extend);
extern	void	hst_append_s (char *cmd, int glue, int can_extend);
extern	void	hst_flush (void);
extern	void	hst_glue (int c);
extern	void	hst_init (int c);
extern	void	hst_remove (const char *cmd);
extern	void	hst_reset (void);
#else
#define	hst_append(p,c,e)
#define	hst_append_s(p,c,e)
#define	hst_flush()
#define	hst_glue(c)
#define	hst_init(c)
#define	hst_remove(p)
#define	hst_reset()
#endif

/* input.c */
extern char *add_backslashes (char *text);
extern char *add_backslashes2 (char *text, const char *find);
extern char *user_reply (const char *prompt, const char *dftval);
extern int adjust_chartype (CHARTYPE *mask);
extern int dotcmdbegin (void);
extern int dotcmdfinish (void);
extern int end_string (void);
extern int eol_history (EOL_ARGS);
extern int eol_null (EOL_ARGS);
extern int get_recorded_char (int eatit);
extern int is_edit_char (int c);
extern int kbd_delimiter (void);
extern int kbd_is_pushed_back (void);
extern int kbd_mac_recording (void);
extern int kbd_replaying (int match);
extern int kbd_reply (const char *prompt, TBUFF **extbuf, int (*efunc)(EOL_ARGS), int eolchar, KBD_OPTIONS options, int (*cfunc)(DONE_ARGS));
extern int kbd_seq (void);
extern int kbd_seq_nomap (void);
extern int kbd_show_response (TBUFF **dst, char *src, size_t bufn, int eolchar, KBD_OPTIONS options);
extern int kbd_string (const char *prompt, char *extbuf, size_t bufn, int eolchar, KBD_OPTIONS options, int (*func)(DONE_ARGS));
extern int kbd_string2 (const char *prompt, TBUFF **result, int eolchar, KBD_OPTIONS options, int (*complete)(DONE_ARGS));
extern int kbm_started (int macnum, int force);
extern int keystroke (void);
extern int keystroke8 (void);
extern int keystroke_avail (void);
extern int keystroke_raw8 (void);
extern int mapped_keystroke (void);
extern int mlquickask (const char *prompt, const char *respchars, int *cp);
extern int mlreply (const char *prompt, char *buf, UINT bufn);
extern int mlreply2 (const char *prompt, TBUFF **buf);
extern int mlreply_no_bs (const char *prompt, char *buf, UINT bufn);
extern int mlreply_no_opts (const char *prompt, char *buf, UINT bufn);
extern int mlreply_reg (const char *prompt, char *cbuf, int *retp, int at_dft);
extern int mlreply_reg_count (const char *cmd, int state, int *retp, int *next);
extern int mlyesno (const char *prompt);
extern int no_completion (DONE_ARGS);
extern int read_msgline (int flag);
extern int read_quoted (int count, int verbose);
extern int screen_to_bname (char *buf, size_t bufn);
extern int screen_to_fname (char *buf, size_t bufn);
extern int screen_to_ident (char *buf, size_t bufn);
extern int start_kbm (int n, int macnum, ITBUFF *ptr);
extern int tgetc (int quoted);
extern int tgetc_avail (void);
extern int vl_ctype2tbuff (TBUFF **buf, CHARTYPE inclchartype, int whole_line);
extern int vl_regex2tbuff (TBUFF **buf, REGEXVAL *expr, int whole_line);
extern void dotcmdstop (void);
extern void get_kbd_macro (TBUFF **rp);
extern void incr_dot_kregnum (void);
extern void kbd_kill_response (TBUFF *buf, size_t *position, int c);
extern void kbd_mac_check (void);
extern void kbd_pushback (TBUFF *buf, int skip);
extern void set_end_string (int c);
extern void tungetc (int c);
extern void unkeystroke (int c);

#if COMPLETE_FILES
extern int shell_complete (DONE_ARGS);
#else
#define shell_complete no_completion
#endif

/* insert.c */
extern int indentlen (LINE *lp);
extern int ins (void);
extern int ins_mode (WINDOW *wp);
extern int inschar (int c, int *backsp_limit_p);
extern int is_cindent_char (BUFFER *bp, int ch);
extern int previndent (int *bracefp);

#if OPT_EVAL
extern const char *current_modename (void);
#endif

#if SMALLER	/* cancel 'neproto.h' */
extern int newline (int f, int n);
extern int wrapword (int f, int n);
#endif

/* isearch.c */
#if SMALLER	/* cancel 'neproto.h' */
extern int forwhunt (int f, int n);
extern int backhunt (int f, int n);
#endif

/* itbuff.c */
size_t	 itb_length (ITBUFF *p);
ITBUFF * itb_alloc (ITBUFF **p, size_t n);
ITBUFF * itb_append (ITBUFF **p, int c);
ITBUFF * itb_bappend (ITBUFF **, const char *s, size_t len);
ITBUFF * itb_copy (ITBUFF **d, ITBUFF *s);
ITBUFF * itb_init (ITBUFF **p, int c);
ITBUFF * itb_sappend (ITBUFF **, const char *s);
int	 itb_get (ITBUFF *p, size_t n);
int	 itb_last (ITBUFF *p);
int	 itb_more (ITBUFF *p);
int	 itb_next (ITBUFF *p);
int	 itb_peek (ITBUFF *p);
int *	 itb_values (ITBUFF *p);
void	 itb_first (ITBUFF *p);
void	 itb_free (ITBUFF **p);
void	 itb_stuff (ITBUFF *p, int c);

#if VILE_NEEDED
ITBUFF * itb_insert (ITBUFF **p, int c);
void	 itb_delete (ITBUFF *p, size_t cnt);
void	 itb_unnext (ITBUFF *p);
void	 itb_unput (ITBUFF *p);
#endif

/* lckfiles.c */
#if OPT_LCKFILES
extern int set_lock (const char *fname, char *who, int n);
extern void release_lock (const char *fname);
#endif

/* line.c */
extern LINE *lalloc (int used, BUFFER *bp);
extern int begin_kill (void);
extern int do_report (L_NUM value);
extern int index2reg (int c);
extern int index2ukb (int inx);
extern int kinsert (int c);
extern int kinsertlater (int c);
extern int ldel_bytes (B_COUNT n, int kflag);
extern int lreplc(LINE *lp, C_NUM off, int c);
extern int lins_bytes (int n, int c);
extern int lnewline (void);
extern int lstrinsert (TBUFF *tp, int len);
extern int reg2index (int c);
extern void end_kill (void);
extern void kdone (void);
extern void kregcirculate (int killing);
extern void ksetup (void);
extern void lfree (LINE *lp, BUFFER *bp);
extern void lremove (BUFFER *bp, LINE *lp);
extern void lremove2 (BUFFER *bp, LINE *lp);
extern void ltextfree (LINE *lp, BUFFER *bp);

#if OPT_EVAL
extern int lrepl_ctype (CHARTYPE type, const char *iline, int ilen);
extern int lrepl_regex (REGEXVAL *expr, const char *iline, int ilen);
#endif

#if OPT_MULTIBYTE
extern int ldel_chars (B_COUNT n, int kflag);
extern int lins_chars (int n, int c);
#else
#define ldel_chars(n, kflag) ldel_bytes(n, kflag)
#define lins_chars(n, c)     lins_bytes(n, c)
#endif

#if OPT_REGS_CMPL
extern KBD_OPTIONS regs_kbd_options(void);
extern int regs_completion(DONE_ARGS);
#endif

#if SMALLER	/* cancel neproto.h */
extern int insspace (int f, int n);
#endif

/* map.c */
extern int mapped_c (int remap, int raw);
extern int mapped_c_avail (void);
extern int mapped_ungotc_avail(void);
extern int sysmapped_c (void);
extern int sysmapped_c_avail (void);
extern void abbr_check (int *backsp_limit_p);
extern void addtosysmap (const char *seq, int seqlen, int code);
extern void delfromsysmap (const char *seq, int seqlen);
extern void map_drain (void);
extern void mapungetc (int c);

/* menu.c */
#if OPT_MENUS
extern ActionFunc vlmenu_action_func(char *action);
extern char * vlmenu_is_cmd (char *action);
extern int do_menu (void * menubar);
extern int vlmenu_is_bind (char *action);
extern void init_menus (void);
	/* driver-specific interface */
extern int gui_create_menus (void);
extern void * gui_add_menu_item (void * pm, const char *nom, char *accel, int the_class);
extern void * gui_make_menu (void * menubar, const char *nom, int the_class);
extern void gui_add_func_callback (void * w, void * closure);
extern void gui_add_list_callback (void *pm);
#endif

/* msgs.c */
#if OPT_POPUP_MSGS
int msg_putc (int c);
void popup_msgs (void);
void purge_msgs (void);
#endif

/* modes.c */
REGEXVAL * get_buf_fname_expr (BUFFER *bp);
extern REGEXVAL * free_regexval (REGEXVAL *rp);
extern REGEXVAL * new_regexval (const char *pattern, int magic);
extern FSM_BLIST * name_to_choices (const char *name);
extern const char * choice_to_name (FSM_BLIST *data, int code);
extern const char * string_mode_val (VALARGS *args);
extern int adjvalueset (const char *cp, int defining, int setting, int global, VALARGS *args);
extern int choice_to_code (FSM_BLIST *data, const char *name, size_t len);
extern int combine_choices (FSM_BLIST *data, const char *string);
extern int find_mode (BUFFER *bp, const char *mode, int global, VALARGS *args);
extern int find_mode_class (BUFFER *bp, const char *mode, int global, VALARGS * args, MODECLASS mode_class);
extern int find_submode (BUFFER *bp, const char *mode, int global, VALARGS * args);
extern int getfillcol (BUFFER *bp);
extern int lookup_valnames (const char *rp, const struct VALNAMES *table);
extern int mode_eol (EOL_ARGS);
extern int set_mode_value (BUFFER *bp, const char *cp, int defining, int setting, int global, VALARGS *args, const char *rp);
extern int string_to_number (const char *from, int *np);
extern int vl_find_mode (const char *name);
extern void copy_mvals (int maximum, struct VAL *dst, struct VAL *src);
extern void free_local_vals (const struct VALNAMES *names, struct VAL *gbl, struct VAL *val);
extern void free_val (const struct VALNAMES *names, struct VAL *values);
extern void set_buf_fname_expr (BUFFER *bp);
extern void set_bufflags (int glob_vals, unsigned flags);
extern void set_record_sep (BUFFER *bp, RECORD_SEP value);
extern void set_winflags (int glob_vals, unsigned flags);

#if OPT_COLOR_SCHEMES
extern void init_scheme (void);
#endif

#if OPT_ENUM_MODES
extern int fsm_complete (DONE_ARGS);
#endif

#if OPT_EVAL || OPT_COLOR
extern int set_colors (int ncolors);
#endif

#if OPT_EVAL || OPT_MAJORMODE
extern int is_varmode ( const char *name );
extern const char *const * list_of_modes (void);
#endif

#if OPT_EXTRA_COLOR
extern int * lookup_extra_color(XCOLOR_CODES code);
extern int vl_lookup_color(const char *name);
extern int vl_lookup_xcolor(const char *name);
#endif

#if OPT_MAJORMODE
extern const char * get_submode_name (BUFFER *bp, int n);
extern int alloc_mode (const char *name, int predef);
extern int major_complete (DONE_ARGS);
extern struct VAL * get_submode_vals (BUFFER *bp, int n);
extern struct VAL * get_submode_valx (BUFFER *bp, int n, int *m);
extern void infer_majormode (BUFFER *bp);
extern void set_majormode_rexp (const char *name, int n, const char *pat);
extern void set_submode_val (const char *name, int n, int value);
extern void set_submode_txt (const char *name, int n, const char * value);
extern void set_tagsmode (BUFFER *bp);
extern void set_vilemode (BUFFER *bp);
#else
#define infer_majormode(bp) fix_cmode(bp, (global_b_val(MDCMOD) && has_C_suffix(bp)))
#define set_tagsmode(bp) /*nothing*/
#define set_vilemode(bp) /*nothing*/
#endif

#if OPT_SHOW_COLORS
extern int is_color_code (int n);
extern const char *get_color_name (int n);
#endif

#if OPT_UPBUFF
extern void save_vals (int maximum, struct VAL *gbl, struct VAL *dst, struct VAL *src);
#endif

#if SYS_VMS
extern const char *vms_record_format (int code);
extern const char *vms_record_attrs (int code);
#endif

/* npopen.c and other files :-) */
#if SYS_UNIX || SYS_MSDOS || SYS_OS2 || SYS_WINNT
extern int  inout_popen (FILE **fr, FILE **fw, char *cmd);
extern FILE *npopen (char *cmd, const char *type);
extern void npclose (FILE *fp);
extern void npflush (void);
extern int  softfork (void);
#endif

#if SYS_UNIX || SYS_OS2 || SYS_WINNT
extern int system_SHELL (char *cmd);
#endif

#if SYS_MSDOS || SYS_WINNT || (SYS_OS2 && CC_CSETPP) || TEST_DOS_PIPES
extern void npflush (void);
#endif

/* ntconio.c */
#if DISP_NTCONS
extern void ntcons_reopen (void);
#endif

/* oneliner.c */
extern int llineregion (void);
extern int nlineregion (void);
extern int plineregion (void);
extern int pplineregion (void);
extern int subst_again_region (void);
extern int subst_all_region (void);
extern int substregion (void);

/* opers.c */
extern int vile_op (int f, int n, OpsFunc fn, const char *str);

/* path.c */
extern void append_libdir_to_path (void);
extern char * home_dir (void);
extern char * is_appendname (char *fn);
extern char * last_slash (char *fn);
extern char * lengthen_path (char *path);
extern char * pathcat (char *dst, const char *path, const char *leaf);
extern char * pathleaf (char *path);
extern char * shorten_path (char *path, int keep_cwd);
extern const char *parse_pathlist (const char *list, char *result);
extern int find_in_path_list (const char *path_list, char *path);
extern int is_abs_pathname(char *path);
extern int is_directory (const char *path);
extern int is_file (char *path);
extern int is_internalname (const char *fn);
extern int is_nonfile (char *path);
extern int is_pathname (char *path);
extern int is_scratchname (const char *fn);
extern int maybe_pathname (char *fn);
extern void append_to_path_list (char **path_list, const char *path);
extern void prepend_to_path_list (char **path_list, char *path);
extern char *path_trunc (char *path,
                        int  max_path_len,
                        char *trunc_buf,
                        int  trunc_buf_len);

#if OPT_MSDOS_PATH
extern char * is_msdos_drive (char *path);
extern char * sl_to_bsl (const char *p);
#endif

#ifndef bsl_to_sl_inplace
extern char * bsl_to_sl_inplace (char *p);
#endif

#if OPT_CASELESS && SYS_OS2
extern int is_case_preserving (const char *name);
#endif

#if OPT_VMS_PATH
extern char * strip_version (char *path);
extern char * unix_pathleaf (char *path);
extern char * version_of (char *fname);
extern char * vms_pathleaf (char *path);
extern int is_vms_pathname (const char *path, int option);
#endif

#if SYS_UNIX || !SMALLER
extern char * home_path (char *path);
#endif

/* random.c */
extern L_NUM line_no (BUFFER *the_buffer, LINE *the_line);
extern L_NUM vl_line_count (BUFFER *the_buffer);
extern TBUFF * tb_visbuf (const char *buffer, size_t len);
extern char * current_directory (int force);
extern char * vl_vischr (char *buffer, int ch);
extern int catnap (int milli, int watchinput);
extern int char_at_mark (MARK mark);
extern int fmatchindent (int c);
extern int get_char2 (LINE *lp, int offset);
extern int getccol (int bflg);
extern int getcol (MARK mark, int actual);
extern int getoff (C_NUM goal, C_NUM *rcolp);
extern int gocol (int n);
extern int is_user_fence (int ch, int *sdirp);
extern int line_report (L_NUM before);
extern int liststuff (const char *name, int appendit, void (*)(LIST_ARGS), int iarg, void *vargp);
extern int need_a_count (int f, int n, int need);
extern int need_at_least (int f, int n, int need);
extern int restore_dot (MARK saved_dot);
extern int set_directory (const char *dir);
extern long vl_atol (const char *str, int base, int *failed);
extern void autocolor (void);
extern void ch_fname (BUFFER *bp, const char *fname);
extern void set_char2 (LINE *lp, int offset, int ch);
extern void set_directory_from_file (BUFFER *bp);
extern void set_rdonly (BUFFER *bp, const char *name, int mode);

#ifdef HAVE_STRTOUL
extern ULONG vl_atoul (const char *str, int base, int *failed);
#else
#define vl_atoul(str, base, failed) (ULONG)vl_atol(str, base, failed)
#endif

#ifndef vl_stricmp
extern int vl_stricmp (const char *a, const char *b);
#endif

#if OPT_CASELESS
#ifndef vl_strnicmp
extern int vl_strnicmp (const char *a, const char *b, size_t n);
#endif
#endif

#if (OPT_AUTOCOLOR || OPT_ELAPSED) && defined(VL_ELAPSED)
extern double vl_elapsed(VL_ELAPSED * first, int begin);
#endif

#if OPT_EVAL
extern B_COUNT char_no (BUFFER *the_buffer, MARK the_mark);
extern B_COUNT vl_getcchar (void);
extern L_NUM getcline (void);
extern char * previous_directory (void);
#endif

#if OPT_HOOKS
extern int run_a_hook (HOOK *hook);
extern int run_readhook (void);
#define DisableHook(hook) ((hook)->latch)++
#define EnableHook(hook)  --((hook)->latch)
#else
#define run_a_hook(hook)  /*nothing*/
#define run_readhook()    /*nothing*/
#define DisableHook(hook) /*nothing*/
#define EnableHook(hook)  /*nothing*/
#endif

#if defined(__BEOS__)
extern int beos_can_output (int fd);
extern int beos_has_input (int fd);
extern void beos_napms (int millisec);
#endif

#if SYS_MSDOS || SYS_OS2 || SYS_WINNT
extern const char * curr_dir_on_drive (int drive);
extern int curdrive (void);
extern int setdrive (int d);
extern void update_dos_drv_dir (char * cwd);
# if CC_WATCOM
     extern int dos_crit_handler (UINT deverror, UINT errcode, UINT *devhdr);
# else
     extern void dos_crit_handler (void);
# endif
#endif

/* regexp.c */
#define lregexec vl_lregexec
extern int cregexec (regexp *prog, LINE *lp, int startoff, int endoff, int at_bol);
extern int lregexec (regexp *prog, LINE *lp, int startoff, int endoff);
extern int nregexec (regexp *prog, char *string, char *stringend, int startoff, int endoff);

/* region.c */
typedef int (*DORGNLINES)(int (*)(REGN_ARGS), void *, int);

extern DORGNLINES get_do_lines_rgn (void);
extern int        blank_region (void);
extern int        del_emptylines_region (void);
extern int        detab_region (void);
extern int        detabline (void *flagp, int l, int r);
extern int        entab_region (void);
extern int        entabline (void *flagp, int l, int r);
extern int        flipregion (void);
extern int        frc_emptylines_region (void);
extern int        get_fl_region (BUFFER *bp, REGION *rp);
extern int        getregion (BUFFER *bp, REGION *rp);
extern int        kill_line (void *flagp, int l, int r);
extern int        killregion (void);
extern int        killregionmaybesave (int save);
extern int        l_detab_region (void);
extern int        l_entab_region (void);
extern int        lowerregion (void);
extern int        openregion (void);
extern int        shiftlregion (void);
extern int        shiftrregion (void);
extern int        stringrect (void);
extern int        trim_region (void);
extern int        trimline (void *flagp, int l, int r);
extern int        upperregion (void);
extern int        yankregion (void);

#if OPT_SELECTIONS
extern TBUFF * encode_attributes (LINE *lp, BUFFER *bp, REGION * top_region);
#endif

/* search.c */
extern int findpat (int f, int n, regexp *exp, int direc);
extern int fsearch (int f, int n, int marking, int fromscreen);
extern int readpattern (const char *prompt, TBUFF **apat, regexp **srchexpp, int c, int fromscreen);
extern int scanner (regexp *exp, int direct, int wrapok, int at_bol, int *wrappedp);
extern void attrib_matches (void);
extern void scanboundry (int wrapok, MARK dot, int dir);

#if OPT_HILITEMATCH
void clobber_save_curbp (BUFFER *bp);
#endif

/* select.c */
#if OPT_SELECTIONS
extern	BUFFER *sel_buffer	(void);
extern	LINE *setup_region    (void);
extern	int	apply_attribute	(void);
extern	int	assign_attr_id	(void);
extern	int	attribute_cntl_a_seqs_in_region (REGION *rp, REGIONSHAPE shape);
extern	int	attributeregion (void);
extern	int	attributeregion_in_region (REGION *rp, REGIONSHAPE shape,
					    unsigned vattr, char *hc);
extern	int	decode_attribute (char *text, size_t length, size_t offset, int *countp);
extern	int	sel_begin	(void);
extern	int	sel_extend	(int wiping, int include_dot);
extern	int	sel_get_leftmark (MARK *result);
extern	int	sel_get_rightmark (MARK *result);
extern	int	sel_setshape	(REGIONSHAPE shape);
extern	void	do_sweep	(int flag);
extern	void	find_release_attr (BUFFER *bp, REGION *rp);
extern	void	free_attrib2	(BUFFER *bp, AREGION **rpp);
extern	void	free_attribs	(BUFFER *bp);
extern	void	sel_reassert_ownership (BUFFER *bp);
extern	void	sel_release	(void);

#if OPT_MOUSE
extern	int	on_mouse_click	(int button, int y, int x);
extern	int	paste_selection	(void);
extern	void	on_double_click	(void);
extern	void	on_triple_click	(void);
#endif

#if OPT_PERL || OPT_TCL || SYS_WINNT
extern	BUFFER *get_selection_buffer_and_region (AREGION *arp);
#endif /* OPT_PERL || OPT_TCL */

#if OPT_SEL_YANK
extern	int	sel_yank	(int reg);
extern	int	sel_attached	(void);
#endif

#if OPT_LINE_ATTRS
extern	int	lattr_shift	(BUFFER *bp, LINE *lp, int doto, int shift);
#endif

#else

#define	do_sweep(flag) /*nothing*/

#endif /* OPT_SELECTIONS */

/* spawn.c */
#if OPT_FINDPATH

typedef struct findcfg_struct
{
    int        disabled;   /* mode is disabled                             */
    int        recur_token;/* ascii char that triggers a recursive find;
                            * 0 (zero) indicates that this token is unset.
                            */
    int        nonrecur_token;
                           /* ascii char that triggers a nonrecursive find;
                            * 0 (zero) indicates that this token is unset.
                            */
    int        dirs_only;  /* Boolean, T -> find only looks for directory
                            * names.
                            */
    int        follow;     /* Boolean, T -> follow symbolic links. */
} FINDCFG;

extern char *last_findcmd(void);
extern int  parse_findcfg_mode(FINDCFG *pcfg, char *str);
#endif

#if OPT_SHELL
extern SIGT rtfrmshell (int ACTUAL_SIG_ARGS);
extern void pressreturn (void);
extern int filterregion (void);
extern int open_region_filter (void);
#else
#define pressreturn() (void)keystroke()
#endif

/* tags.c */
extern KBD_OPTIONS tags_kbd_options (void);
extern int tags_completion (DONE_ARGS);

/* tbuff.c */
TBUFF *	tb_alloc (TBUFF **p, size_t n);
TBUFF *	tb_append (TBUFF **p, int c);
TBUFF *	tb_bappend (TBUFF **p, const char *s, size_t len);
TBUFF *	tb_copy (TBUFF **d, TBUFF *s);
TBUFF *	tb_dequote (TBUFF **p);
TBUFF *	tb_enquote (TBUFF **p);
TBUFF * tb_error (TBUFF **p);
TBUFF *	tb_init (TBUFF **p, int c);
TBUFF *	tb_insert (TBUFF **p, size_t n, int c);
TBUFF *	tb_put (TBUFF **p, size_t n, int c);
TBUFF *	tb_sappend (TBUFF **p, const char *s);
TBUFF *	tb_sappend0 (TBUFF **p, const char *s);
TBUFF *	tb_scopy (TBUFF **p, const char *s);
TBUFF *	tb_string (const char *s);
char *	tb_values (TBUFF *p);
int	tb_get (TBUFF *p, size_t n);
int	tb_more (TBUFF *p);
int	tb_next (TBUFF *p);
int	tb_peek (TBUFF *p);
size_t	tb_length (TBUFF *p);
int	tb_length0 (TBUFF *p);
void	tb_first (TBUFF *p);
void	tb_free (TBUFF **p);
void	tb_prequote (TBUFF **tok);
void	tb_setlen (TBUFF **p, int n);
void	tb_stuff (TBUFF *p, int c);
void	tb_unnext (TBUFF *p);
void	tb_unput (TBUFF *p);

/* termio.c */
extern OUTC_DCL ttputc (OUTC_ARGS);
extern int  open_terminal (TERM *termp);
extern int  ttgetc (void);
extern int  tttypahead (void);
extern int  ttwatchfd (int fd, WATCHTYPE type, long *idp);
extern void ttclean (int f);
extern void ttclose (void);
extern void ttflush (void);
extern void ttopen (void);
extern void ttunclean (void);
extern void ttunwatchfd (int fd, long id);
extern OUTC_DCL vl_ttputc (int c);
extern void vl_save_tty (void);
extern void vl_restore_tty (void);

extern void dumb_set_encoding(ENC_CHOICES);
extern ENC_CHOICES dumb_get_encoding(void);

extern int  nullterm_setdescrip (const char *res);
extern int  nullterm_setpal (const char *p);
extern int  nullterm_watchfd (int fd, WATCHTYPE type, long *idp);
extern void nullterm_clean (int flag);
extern void nullterm_cursorvis (int flag);
extern void nullterm_icursor (int c);
extern void nullterm_kclose (void);
extern void nullterm_kopen (void);
extern void nullterm_mclose (void);
extern void nullterm_mevent (void);
extern void nullterm_mopen (void);
extern void nullterm_pflush (void);
extern void nullterm_openup (void);
extern void nullterm_scroll (int f, int t, int n);
extern void nullterm_setback (int b);
extern void nullterm_setccol (int c);
extern void nullterm_setfore (int f);
extern void nullterm_settitle (const char *t);
extern void nullterm_unclean (void);
extern void nullterm_unwatchfd (int fd, long id);

/* ucrypt.c */
#if	OPT_ENCRYPT
extern	int	vl_encrypt_char(int c);
extern	int	vl_resetkey (BUFFER * /* bp */, const char * /* fname */);
extern	void	vl_encrypt_blok (char * /* bptr */, UINT /* len */);
extern	void	vl_make_encrypt_key (char * /* dst */, const char * /* src */);
extern	void	vl_setup_encrypt (char * /* pw */, int /* seed */);

#if defined(MISSING_EXTERN_CRYPT) || !defined(HAVE_CRYPT)
extern	char *	crypt	(const char *key, const char *salt);
extern	void	encrypt	(char *nachr, int decr);
extern	void	setkey	(const char *schl);
#endif

#endif	/* OPT_ENCRYPT */

/* undo.c */
extern int  check_editable (BUFFER *bp);
extern int  copy_for_undo (LINE *lp);
extern int  redo_ok(void);
extern int  tag_for_undo (LINE *lp);
extern int  undo_ok(void);
extern void dumpuline (LINE *lp);
extern void freeundostacks (BUFFER *bp, int both);
extern void mayneedundo (void);
extern void nounmodifiable (BUFFER *bp);
extern void toss_to_undo (LINE *lp);

#define OkUndo(bp) \
    (!is_delinked_bp(bp) \
     &&  b_val(bp, MDUNDOABLE) \
     && !b_is_scratch(bp))

#define CopyForUndo(lp) if (OkUndo(curbp)) copy_for_undo (lp)
#define TagForUndo(lp)  if (OkUndo(curbp)) tag_for_undo (lp)
#define TossToUndo(lp)  if (OkUndo(curbp)) toss_to_undo (lp)

/* version.c */
extern const char * getversion (void);
extern const char * non_filename (void);
extern void print_usage (int code);

/* vms2unix.c */
#if OPT_VMS_PATH
extern	char *	is_vms_dirtype	(char *path);
extern	char *	is_vms_rootdir	(char *path);
extern	char *	unix2vms_path   (char *dst, const char *src);
extern	char *	vms2unix_path   (char *dst, const char *src);
extern	int	vms_ffexists	(char *filename);
extern	void	vms_dir2path	(char *path);
extern	char *	vms_path2dir    (const char *src);
#endif

#if SYS_VMS
extern	int	vms_creat	(char *path);
#endif

/* vmspipe.c */
#if SYS_VMS
extern FILE *vms_rpipe (const char *cmd, int fd, const char *input_file);
#endif

/* w32isms */
#if SYS_WINNT

#if 0
/*
 * PASS_HIGH is used in filtering cut/paste; characters that do not pass are
 * translated to hexadecimal escapes, e.g., "\x34".  Currently only ANSI
 * (CF_TEXT) is passed, though it would be nice to pass Unicode
 * (CF_UNICODETEXT), when the default encoding is UTF-8 (2008-04-10).
 */
#define  PASS_HIGH(c)        ((global_g_val(VAL_FILE_ENCODING) >= enc_UTF8) \
			      || ((int)(c) <= print_high && (int)(c) >= print_low))
#else
#define  PASS_HIGH(c)        ((int)(c) <= print_high && (int)(c) >= print_low)
#endif

#define  _SPC_               ' '
#define  _TAB_               '\t'
#define  _TILDE_             '~'

#define W32_SKIP_SHELL(cmd)  (strnicmp(cmd, \
                                       W32_START_STR, \
                                       W32_START_STR_LEN) == 0)
#define W32_START_STR        "start "
#define W32_START_STR_LEN    (sizeof(W32_START_STR) - 1)
#define W32_SYS_ERROR        NOERROR

typedef struct fontstr_options_struct
{
    ULONG         size;      /* Font's point size.                     */
    int           bold;      /* Boolean -> T, user wants bold weight.  */
    int           italic;    /* Boolean -> T, user wants italic style. */
    char          face[256]; /* Font face requested by user.  If no face
                              * specified, face[0] == '\0';
                              */
} FONTSTR_OPTIONS;

typedef struct oleauto_options_struct
{
    int  invisible;     /* Boolean, T -> server invisible at startup        */
    int  multiple;      /* Boolean, T -> multiple server instances possible */
    int  rows, cols;    /* Size of winvile at startup, 0 if unspecified     */
    char *fontstr;      /* Ptr to font specification (see parse_font_str()),
                         * fall back on default font if NULL.
                         */
} OLEAUTO_OPTIONS;

extern void build_recent_file_and_folder_menus(void);
extern int  cd_recent_folder(int mnu_index);
extern void disp_win32_error(ULONG errcode, void *hwnd);
extern int  edit_recent_file(int mnu_index);
extern char *fmt_win32_error(ULONG errcode, char **buf, ULONG buflen);
extern const char *get_favorites(void);
extern int  is_win95(void);
extern int  is_winnt(void);
extern char *mk_shell_cmd_str(const char *cmd, int *allocd_mem, int prepend_shc);
extern char *ntwinio_current_font(void);
extern int  ntwinio_font_frm_str(const char *fontstr, int use_mb);
extern void ntwinio_oleauto_reg(void);
extern void ntwinio_redirect_hwnd(int redirect);
extern void oleauto_exit(int code);
extern int  oleauto_init(OLEAUTO_OPTIONS *opts);
extern int  oleauto_redirected_key(ULONG keycode, ULONG keystate);
extern int  oleauto_register(OLEAUTO_OPTIONS *opts);
extern int  oleauto_unregister(void);
extern int  parse_font_str(const char *fontstr, FONTSTR_OPTIONS *results);
extern void restore_console_title(void);
extern void set_console_title(const char *title);
extern int  stdin_data_available(void);
extern void store_recent_file_or_folder(const char *path, int is_file_flag);
extern int  w32_add_write_acl(const char *filename, ULONG *old_access_mask);
extern int  w32_CreateProcess(char *cmd, int no_wait);
extern int  w32_del_selection(int copy_to_clipboard);
extern int  w32_glob_and_validate_dir(const char *inputdir, char *outputdir);
extern void w32_keybrd_reopen(int pressret);
extern int  w32_remove_write_acl(const char *filename, ULONG orig_access_mask);
extern int  w32_system(const char *cmd);
extern int  w32_system_winvile(const char *cmd, int *pressret);
extern char *w32_wdw_title(void);
extern int  wincd_dir(const char *dir);
extern int  winopen_dir(const char *dir);
extern int  winsave_dir(const char *dir);
extern void winvile_cleanup(void);
extern int  winvile_cursor(int visible, int queue_change);
extern int  winvile_cursor_state(int visible, int queue_change);
extern void winvile_start(void);

/*
 * DECLARE_HANDLE is defined in WinNT.h, where HANDLE is typedef'd.
 */
#ifdef DECLARE_HANDLE
extern void w32_close_handle(HANDLE handle);
#endif

/*
 * These depend on HKEY:
 *	Platform SDK WinDef.h uses _WINDEF_
 *	Platform SDK WTypes.h uses __wtypes_h__
 */
#if defined(__wtypes_h__) || defined(_WINDEF_) || (SYS_MINGW && defined(_WINDEF_H))
extern int  w32_get_reg_sz(HKEY hkey, const char *name, char *value, unsigned length);
extern int  w32_set_reg_sz(HKEY hkey, const char *name, const char *value);
#endif

#if DISP_NTCONS	
extern void w32_set_console_title(const char *title);
#endif

#if DISP_NTWIN
extern void *winvile_hwnd(void);       /* winvile's main window */
#define GetVileWindow() winvile_hwnd()
#else
#define GetVileWindow() GetForegroundWindow()
#endif

#ifdef UNICODE
typedef USHORT W32_CHAR;
extern W32_CHAR * w32_ansi_to_ucs2(const char *source, int sourcelen);
extern char * w32_ucs2_to_ansi(const W32_CHAR *source, int sourcelen);
#define w32_charstring(source)            w32_ansi_to_ucs2(source,-1)
#define w32_charstring2(source,sourcelen) w32_ansi_to_ucs2(source,sourcelen)
#define asc_charstring(source)            w32_ucs2_to_ansi(source,-1)
#define asc_charstring2(source,sourcelen) w32_ucs2_to_ansi(source,sourcelen)
#else
typedef char W32_CHAR;
extern void *binmalloc(void *, int);
#define w32_charstring(source)            strmalloc(source)
#define w32_charstring2(source,sourcelen) (W32_CHAR *)binmalloc(source,sourcelen)
#define asc_charstring(source)            strmalloc(source)
#define asc_charstring2(source,sourcelen) (char *)binmalloc(source,sourcelen)
#endif

extern W32_CHAR * w32_prognam(void);
extern int  w32_keybrd_write(W32_CHAR *data);

#ifdef WINVER
extern void w32_center_window(HWND child_hwnd, HWND parent_hwnd);
extern int  w32_message_box(HWND hwnd, const char *message, int code);
#endif

#endif /* SYS_WINNT */

/* watchfd.c */
extern int watchfd(int fd, WATCHTYPE type, char *callback);
extern void unwatchfd(int fd);
extern void dowatchcallback(int fd);

/* window.c */
extern WINDOW * wpopup (void);
extern W_VALUES * save_window_modes(BUFFER *bp);
extern int delwp (WINDOW *thewp);
extern int set_curwp (WINDOW *wp);
extern void clone_window (WINDOW *dst, WINDOW *src);
extern void copy_traits (W_TRAITS *dst, W_TRAITS *src);
extern void init_window (WINDOW *wp, BUFFER *bp);
extern void restore_window_modes(BUFFER *bp, W_VALUES *saved);
extern void shrinkwrap (void);
extern void winit (int screen);

#if OPT_EVAL
extern int getlinerow (void);
#endif

#if SMALLER	/* cancel neproto.h */
extern int reposition (int f, int n);
extern int resize (int f, int n);
#endif

#if OPT_SEL_YANK || OPT_PERL || OPT_COLOR || OPT_EVAL || OPT_DEBUGMACROS
extern WINDOW * push_fake_win(BUFFER *bp);
extern BUFFER * pop_fake_win(WINDOW *oldwp, BUFFER *oldbp);
#endif

#if OPT_PERL
extern WIN_ID win2id (WINDOW *wp);
extern WINDOW * id2win (WIN_ID id);
extern WINDOW * index2win (int idx);
#endif

#if OPT_PERL || DISP_NTWIN
extern int win2index (WINDOW *wp_to_find);
#endif

/* word.c */
extern int ffgetline (size_t *lenp);
extern int formatregion (void);
extern int isendviwordf (void);
extern int isendwordf (void);
extern int isnewviwordb (void);
extern int isnewviwordf (void);
extern int isnewwordb (void);
extern int isnewwordf (void);
extern int joinregion (void);
extern int joinregion_x (void);
extern void fmatch (int rch);
extern void setchartype (void);

/* x11.c */
#if DISP_X11
extern	char *	x_current_fontname	(void);
extern	char *	x_get_display_name	(void);
extern	char *	x_get_icon_name		(void);
extern	const char * x_get_window_name	(void);
extern	int	x_preparse_args		(int *pargc, char ***pargv);
extern	int	x_setfont		(const char *fname);
extern	int	x_milli_sleep		(int milli);
extern	void	x_move_events		(void);
extern	void	x_set_icon_name		(const char *name);
extern	void	x_set_window_name	(const char *name);

#if XTOOLKIT
extern	void	own_selection		(void);
#endif	/* !XTOOKIT */

#if OPT_MENUS
#ifdef NEED_X_INCLUDES
extern	Widget	x_menu_widget		(void);
#endif
extern	int	x_menu_height		(void);
#endif

#if OPT_MENUS_COLORED
extern	int	x_menu_background	(void);
extern	int	x_menu_foreground	(void);
#endif /* OPT_MENUS_COLORED */

#if OPT_WORKING
extern	void	x_working		(void);
#endif

extern	int	gui_isprint		(int ch);
#endif	/* DISP_X11 */

#if DISP_X11 || DISP_NTWIN
extern	void	gui_resize		(int cols, int rows);
#endif

#if DISP_NTWIN
extern	void	gui_version(char *program);
extern	void	gui_usage(char *program, const char *const *options, size_t length);
#endif

#if OPT_SCROLLBARS
extern	void	gui_update_scrollbar	(WINDOW *uwp);
#endif

#if NO_LEAKS
extern	void	bind_leaks (void);
extern	void	bp_leaks (void);
extern	void	eightbit_leaks (void);
extern	void	ev_leaks (void);
extern	void	fileio_leaks (void);
extern	void	filters_leaks (void);
extern	void	flt_leaks (void);
extern	void	free_all_leaks(void);
extern	void	itb_leaks (void);
extern	void	kbs_leaks (void);
extern	void	map_leaks (void);
extern	void	mode_leaks (void);
extern	void	onel_leaks (void);
extern	void	path_leaks (void);
extern	void	tags_leaks (void);
extern	void	tb_leaks (void);
extern	void	trace_leaks (void);
extern	void	vars_leaks (void);
extern	void	vl_ctype_leaks(void);
extern	void	vt_leaks (void);
extern	void	wp_leaks (void);
extern	void	x11_leaks (void);
#else
#define free_all_leaks() /* nothing */
#endif /* NO_LEAKS */

#if defined(HAVE_MKSTEMP) && defined(HAVE_MKDTEMP)
#define vl_mkdtemp(path) mkdtemp(path)
#endif

#ifdef MISSING_EXTERN_ACCESS
extern	int	access	(const char *path, int mode);
#endif
#ifdef MISSING_EXTERN_ALARM
extern	UINT	alarm	(UINT secs);
#endif
#ifdef MISSING_EXTERN_ATOI
extern int	atoi	(const char *s);
#endif
#ifdef MISSING_EXTERN_CHDIR
extern	int	chdir	(const char *path);
#endif
#ifdef MISSING_EXTERN_CLOSE
extern	int	close	(int fd);
#endif
#ifdef MISSING_EXTERN_DUP
extern	int	dup	(int fd);
#endif
#ifdef MISSING_EXTERN_EXECLP
extern	int	execlp	(const char *path, ...);
#endif
#ifdef MISSING_EXTERN_FCLOSE
extern	int	fclose	(FILE *fp);
#endif
#ifdef MISSING_EXTERN_FCLOSE
extern	int	fflush	(FILE *fp);
#endif
#if defined(MISSING_EXTERN_FILENO) && !defined(fileno)
extern	int	fileno	(FILE *fp);
#endif
#ifdef MISSING_EXTERN_FORK
extern	int	fork	(void);
#endif
#ifdef MISSING_EXTERN_FPRINTF
extern	int	fprintf	(FILE *fp, const char *fmt, ...);
#endif
#ifdef MISSING_EXTERN_FPUTS
extern	int	fputs	(const char *s, FILE *fp);
#endif
#ifdef MISSING_EXTERN_FREAD
extern	int	fread	(char *ptr, size_t size, size_t nmemb, FILE *fp);
#endif
#ifdef MISSING_EXTERN_FREE
extern void	free	(void *ptr);
#endif
#ifdef MISSING_EXTERN_FSEEK
extern	int	fseek	(FILE *fp, long offset, int whence);
#endif
#ifdef MISSING_EXTERN_FWRITE
extern	int	fwrite	(const char *ptr, size_t size, size_t nmemb, FILE *fp);
#endif
#if defined(MISSING_EXTERN_GETCWD) && defined(HAVE_GETCWD)
extern	char *	getcwd (char *buffer, int len);
#endif
#ifdef MISSING_EXTERN_GETENV
extern	char *	getenv	(const char *name);
#endif
#ifdef MISSING_EXTERN_GETPASS
extern	char *	getpass	(const char *prompt);
#endif
#if defined(MISSING_EXTERN_GETHOSTNAME) && defined(HAVE_GETHOSTNAME)
extern	int	gethostname (char *name, int len);
#endif
#ifdef MISSING_EXTERN_GETPGRP
extern	int	getpgrp	(int pid);
#endif
#ifdef MISSING_EXTERN_GETPID
extern	int	getpid	(void);
#endif
#ifdef MISSING_EXTERN_GETUID
extern	int	getuid	(void);
#endif
#if defined(MISSING_EXTERN_GETWD) && defined(HAVE_GETWD)
extern	char *	getwd	(char *buffer);
#endif
#ifdef MISSING_EXTERN_IOCTL
extern	int	ioctl	(int fd, ULONG mask, void * ptr);
#endif
#ifdef MISSING_EXTERN_ISATTY
extern	int	isatty	(int fd);
#endif
#ifdef MISSING_EXTERN_KILL
extern	int	kill	(int pid, int sig);
#endif
#if defined(MISSING_EXTERN_KILLPG) && defined(HAVE_KILLPG)
extern	int	killpg	(int pgrp, int sig);
#endif
#if defined(MISSING_EXTERN_LONGJMP) && !defined(longjmp)
extern	void	longjmp	(jmp_buf env, int val);
#endif
#ifdef MISSING_EXTERN_LSTAT
extern	int	lstat (const char *path, struct stat *sb);
#endif
#ifdef MISSING_EXTERN_MEMSET
#ifndef memset	/* may be defined by dbmalloc */
extern	void *	memset	(void *dst, int ch, size_t n);
#endif
#endif
#if defined(MISSING_EXTERN_MKDIR) && defined(HAVE_MKDIR)
extern	int	mkdir	(const char *path, int mode);
#endif
#if defined(MISSING_EXTERN_OPEN) && !defined(open)
extern	int	open	(char *path, int flags);
#endif
#ifdef MISSING_EXTERN_PCLOSE
extern	int	pclose	(FILE *s);
#endif
#ifdef MISSING_EXTERN_PERROR
extern	void	perror	(const char *s);
#endif
#ifdef MISSING_EXTERN_PIPE
extern	int	pipe	(int filedes[2]);
#endif
#ifdef MISSING_EXTERN_POPEN
extern	FILE *	popen	(const char *cmd, const char *mode);
#endif
#ifdef MISSING_EXTERN_PRINTF
extern	int	printf	(const char *fmt, ...);
#endif
#ifdef MISSING_EXTERN_PUTS
extern	int	puts	(const char *s);
#endif
#ifdef MISSING_EXTERN_QSORT
extern void qsort (void *base, size_t nmemb, size_t size, int (*compar)(const void *a, const void *b);
#endif
#ifdef MISSING_EXTERN_READ
extern	int	read	(int fd, char *buffer, size_t size);
#endif
#ifdef MISSING_EXTERN_READLINK
extern	int	readlink (const char *path, char *buffer, size_t size);
#endif
#if defined(MISSING_EXTERN_SELECT) && defined(HAVE_SELECT) && defined(HAVE_TYPE_FD_SET)
extern	int	select	(int numfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
#endif
#ifdef MISSING_EXTERN_SETBUF
extern	void	setbuf	(FILE *fp, char *buffer);
#endif
#ifdef MISSING_EXTERN_SETBUFFER
extern	void	setbuffer (FILE *fp, char *buffer, int size);
#endif
#if defined(MISSING_EXTERN_SETITIMER) && defined(HAVE_SETITIMER)
extern	int	setitimer (int which, const struct itimerval *value, struct itimerval *ovalue);
#endif
#if defined(MISSING_EXTERN_SETJMP) && !defined(setjmp)
extern	int	setjmp	(jmp_buf env);
#endif
#ifdef MISSING_EXTERN_SETPGRP
#ifdef SETPGRP_VOID
extern	pid_t	setpgrp	(void);
#else
extern	int	setpgrp	(int pid, int pgid);
#endif
#endif
#ifdef MISSING_EXTERN_SETSID
extern	pid_t	setsid	(void);
#endif
#ifdef MISSING_EXTERN_SETVBUF
#ifdef SETVBUF_REVERSED
extern	int	setvbuf (FILE *fp, int mode, char *buffer, size_t size);
#else
extern	int	setvbuf (FILE *fp, char *buffer, int mode, size_t size);
#endif
#endif
#ifdef MISSING_EXTERN_SLEEP
extern	int	sleep	(UINT secs);
#endif
#ifdef MISSING_EXTERN_SSCANF
extern	int	sscanf	(const char *src, const char *fmt, ...);
#endif
#ifdef MISSING_EXTERN_STRERROR
extern	char *	strerror (int code);
#endif
#ifdef MISSING_EXTERN_STRTOL
extern	long	strtol	(const char *nptr, char **endptr, int base);
#endif
#if defined(MISSING_EXTERN_STRTOUL) && defined(HAVE_STRTOUL)
extern	ULONG	strtoul	(const char *nptr, char **endptr, int base);
#endif
#ifdef MISSING_EXTERN_SYSTEM
extern	int	system	(const char *cmd);
#endif
#ifdef MISSING_EXTERN_TIME
extern	time_t	time	(time_t *t);
#endif
#ifdef MISSING_EXTERN_UNLINK
extern	int	unlink	(char *path);
#endif
#if defined(MISSING_EXTERN_UTIME) && defined(HAVE_UTIME)
extern	int	utime	(const char *path, const struct utimbuf *t);
#endif
#if defined(MISSING_EXTERN_UTIMES) && defined(HAVE_UTIMES)
extern	int	utimes	(const char *path, struct timeval *t);
#endif
#ifdef MISSING_EXTERN_WAIT
extern	int	wait	(int *sb);
#endif
#ifdef MISSING_EXTERN_WRITE
extern	int	write	(int fd, const char *buffer, int size);
#endif
#ifdef MISSING_EXTERN__NC_FREEALL
extern	void	_nc_freeall (void);
#endif

#ifdef __cplusplus
}
#endif

/* *INDENT-ON* */

#endif /* VILE_PROTO_H */
