home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
wp
/
be310a.zip
/
S_AGAIN.CHS
< prev
next >
Wrap
Text File
|
1993-08-01
|
999b
|
32 lines
/* CHESS FUNCTION(S): forward_again, back_again
/* DATE: 3/1/93
/* AUTHOR: C. Schanck
/*
/* DESCRIPTION: These two function search for the last target string,
/* but in a specific direction. Alter the search modifiers to taste.
/* The modifiers could be expanded to actually check what the current system
/* defaults are, and simply toggle the 'b' flag on and off, but I leave that
/* as an exercise for the reader... ;-)
forward_again
{
if(Cursor_right()) /* move over one character, so as not to match
/* the same text again
return(Search("~~ ~ia~ ~~")); /* search.....
else
return(0);
}
back_again
{
int i;
if(ask("file_column")==1)
{ /* move back one character
if(Cursor_up()==0)
return(0);
else
End_line();
}
else
if(Cursor_right()==0)
return(0);
return(Search("~~ ~bia~")); /* search
}