Example #1
0
/* ARGSUSED */
int
forwisearch(int f, int n)
{
	if (macrodef || inmacro)
		/* We can't isearch in macro. Use search instead */
		return (forwsearch(f,n));
	else 
		return (isearch(SRCH_FORW));
}
Example #2
0
Dsearchagain(f, n)
{
	register int s;
	Dnoask_search = TRUE;
	if( Dcur_direction == ADVANCE )
		s = forwsearch(f, n);
	else	s = backsearch(f, n);
	Dnoask_search = FALSE;
	return( s );
}
Example #3
0
/*
 * Reverse search. Get a search string from the user, and search, starting at
 * "." and proceeding toward the front of the buffer. If found "." is left
 * pointing at the first character of the pattern [the last character that was
 * matched]. Bound to "C-R"
 */
int backsearch (int f, int n)
{
  int s;

  if (n == 0)			/* resolve null and negative arguments */
    n = 1;
  if (n < 1)
    return (forwsearch (f, -n));

  if ((s = readpattern("Reverse search")) != TRUE)/* get a pattern to search */
    return (s);

  return bsearch (f, n);	/* and go search for it */
}
Example #4
0
Dsearch(f, n)
{
	if( Dcur_direction == ADVANCE )
		return( forwsearch(f, n) );
	else	return( backsearch(f, n) );
}