

#define searchinclude /*so other includes can tell if we've been loaded*/




/*global search/sort settings*/

typedef struct tysearchparameters {
	
	boolean flfirsttime: 1;
	
	boolean flunicase: 1;
	
	boolean flwraparound: 1;
	
	boolean flwholewords: 1;
	
	boolean flonelevel: 1;
	
	boolean flonetype: 1;
	
	boolean floneobject: 1;
	
	boolean flclosebehind: 1;
	
	boolean flfindall: 1;
	
	boolean flreplaceall: 1;
	
	boolean flregexp: 1;
	
	boolean flzoomfound: 1;
	
	boolean flwindowzoomed: 1;
	
	bigstring bsorigfind; /*as entered by the user*/
	
	bigstring bsorigreplace; /*as entered by the user*/
	
	bigstring bsfind; /*corrected for case-sensitivity etc.*/
	
	bigstring bsreplace; /*depends on current match for regexps*/
	
	short ctfound;
	
	short ctreplaced;
	
	long searchrefcon;

#ifdef flregexpverbs
	
	Handle hcompiledpattern;
	
	Handle hovector;

#endif
	} tysearchparameters;


extern tysearchparameters searchparams; /*set this global to influence searching process*/



/*prototypes*/

extern boolean isword (byte *, long, long, long); /*search.c*/

extern boolean textsearch (byte *, long, long *, long *);

extern boolean handlesearch (Handle, long *, long *);

extern boolean stringsearch (bigstring, short *, short *);

// extern void getsearchstring (bigstring);

extern void startnewsearch (boolean, boolean);

extern boolean startingtosearch (long);

extern boolean searchshouldwrap (long);

extern boolean searchshouldcontinue (long);

extern void endcurrentsearch (void);

extern boolean initsearch (void);


extern boolean getsearchparams (void); /*shellverbs.c*/

extern boolean setsearchparams (void);




