Global int	addvheader (struct dent * ent);
Global void	askmode (void);
Global void	backup (void);
#ifndef NO_CAPITALIZATION_SUPPORT
Global Logical	cap_ok (ichar_t * word, struct success * hit, int len);
#endif /* NO_CAPITALIZATION_SUPPORT */
Global void	chupcase (char * s);
Global void	checkfile (void);
Global void	checkline (FILE * ofile);
Global void	chk_aff (ichar_t * word, ichar_t * ucword, int len,
		  int ignoreflagbits, int allhits, int pfxopts, int sfxopts);
Global int	combinecaps (struct dent * hdr, struct dent * newent);
Global int	compoundgood (ichar_t * word, int pfxopts);
Global void	copyout (char ** cc, int cnt);
Global void	correct (char * ctok, int ctokl, ichar_t * itok, int itokl,
							      char ** curchar);
Global char *	do_regex_lookup (char * expr, int whence);
Global SIGNAL_TYPE done (int);
Global void	dumpmode (void);
Global void	erase (void);
Global int	expand_pre (char * croot, ichar_t * rootword,
				      MASKTYPE mask[], int option, char *extra);
Global int	expand_suf (char * croot, ichar_t * rootword,
		      MASKTYPE mask[], int crossonly, int option, char * extra);
Global int	findfiletype (char * name, int searchnames,
						  int * deformatter);
Global void	flagpr (ichar_t * word, int preflag, int prestrip,
				      int preadd, int sufflag, int sufadd);
Global void	givehelp (int interactive);
Global int	good (ichar_t * word, int ignoreflagbits, int allhits,
					      int pfxopts, int sfxopts);
Global int	hash (ichar_t * word, int hashtablesize);
#ifndef ICHAR_IS_CHAR
Global int	icharcmp (ichar_t * s1, ichar_t * s2);
Global ichar_t * icharcpy (ichar_t * out, ichar_t * in);
Global int	icharlen (ichar_t * str);
Global int	icharncmp (ichar_t * s1, ichar_t * s2, int n);
#endif /* ICHAR_IS_CHAR */
Global int	ichartostr (char * out, ichar_t * in, int outlen,
		  int canonical);
Global char *	ichartosstr (ichar_t * in, int canonical);
Global void	inverse (void);
Global struct dent * lookup (ichar_t * word, int dotree);
Global void	lowcase (ichar_t * string);
Global int	makedent (char * lbuf, int lbuflen, struct dent * d);
Global void	makepossibilities (ichar_t * word);
Global void	move (int row, int col);
Global void	normal (void);
Global char *	printichar (int in);
#ifdef USESH
Global int	shellescape (char * buf);
Global void	shescape (char * buf);
#else /* USESH */
#ifndef REGEX_LOOKUP
Global int	shellescape (char * buf);
#endif /* REGEX_LOOKUP */
#endif /* USESH */
Global char *	skipoverword (char * bufp);
Global void	stop (void);
Global int	stringcharlen (char * bufp, int canonical);
Global int	strtoichar (ichar_t * out, char * in, int outlen,
							  int canonical);
Global ichar_t * strtosichar (char * in, int canonical);
Global void	terminit (void);
Global void	toutent (FILE * outfile, struct dent * hent, int onlykeep);
Global void	treeinit (char * persdict, char * LibDict);
Global void	treeinsert (char * word, int wordlen, int keep);
Global struct dent * treelookup (ichar_t * word);
Global void	treeoutput (void);
Global void	upcase (ichar_t * string);
#ifndef NO_CAPITALIZATION_SUPPORT
Global long	whatcap (ichar_t * word);
#endif
Global char *	xgets (char * string, int size, FILE * stream);
Global void	yyinit (void);
Global Logical	yyopen (char * file);
Global int	yyparse (void);

#ifdef WIN32
#include <string.h>
#else
#include <strings.h>
#endif

#ifdef REGEX_LOOKUP
#	ifdef USG
Global char *	regcmp (const char * expr, const char * terminator, ...);
Global char *	regex (const char * pat, const char * subject, ...);
#	else
Global char *	re_comp (const char * expr);
Global int *	re_exec (const char * pat);
#	endif
#endif
/* WM
Global int	tgetent (char * buf, const char * termname);
Global int	tgetnum (const char * id);
Global char *	tgetstr (const char * id, char ** area);
Global char *	tgoto (const char * cm, int col, int row);
Global char *	tputs (const char * str, int pad, int (*func) (int ch);
*/

Global char * mypath_rindex(char const *str, char c);
Global void   save_root_cap (ichar_t * word, ichar_t * pattern,
			  int prestrip, int preadd, int sufstrip, int sufadd,
			      struct dent * firstdent, struct flagent * pfxent,
				      struct flagent * sufent,
		      ichar_t savearea[MAX_CAPS][INPUTWORDLEN + MAXAFFIXLEN],
								  int * nsaved);
Global int	casecmp (char * a, char * b, int canonical);
Global int	ins_root_cap (ichar_t * word, ichar_t * pattern,
		      int prestrip, int preadd, int sufstrip, int sufadd,
			      struct dent * firstdent, struct flagent * pfxent,
						      struct flagent * sufent);
Global int insert(register ichar_t *	word);
Global char * linit (char *);
Global char * last_slash (char *file);
