_PR VALUE cmd_find_next_regexp(VALUE re, VALUE pos, VALUE tx, VALUE nocase_p);
DEFUN("find-next-regexp", cmd_find_next_regexp, subr_find_next_regexp, (VALUE re, VALUE pos, VALUE tx, VALUE nocase_p), V_Subr4, DOC_find_next_regexp) /*
_PR VALUE cmd_find_prev_regexp(VALUE re, VALUE pos, VALUE tx, VALUE nocase_p);
DEFUN("find-prev-regexp", cmd_find_prev_regexp, subr_find_prev_regexp, (VALUE re, VALUE pos, VALUE tx, VALUE nocase_p), V_Subr4, DOC_find_prev_regexp) /*
_PR VALUE cmd_find_next_string(VALUE str, VALUE pos, VALUE tx);
DEFUN("find-next-string", cmd_find_next_string, subr_find_next_string, (VALUE str, VALUE pos, VALUE tx), V_Subr3, DOC_find_next_string) /*
::doc:find_next_string::
find-next-string STRING [POS] [BUFFER]
Scans forwards from POS (or the cursor), in BUFFER, looking for a match
with STRING. Returns the position of the next match or nil.
::end:: */
{
POS res;
DECLARE1(str, STRINGP);
if(POSP(pos))
res = VPOS(pos);
else
res = curr_vw->vw_CursorPos;
if(!BUFFERP(tx))
tx = VAL(curr_vw->vw_Tx);
check_pos(VTX(tx), &res);
if(findstrnext(VTX(tx), VSTR(str), &res))
return(make_lpos(&res));
return(sym_nil);
}
_PR VALUE cmd_find_prev_string(VALUE str, VALUE pos, VALUE tx);
DEFUN("find-prev-string", cmd_find_prev_string, subr_find_prev_string, (VALUE str, VALUE pos, VALUE tx), V_Subr3, DOC_find_prev_string) /*
::doc:find_prev_string::
find-prev-string STRING [POS] [BUFFER]
Scans backwards from POS (or the cursor), in BUFFER, looking for a match
with STRING. Returns the position of the next match or nil.
::end:: */
{
POS res;
DECLARE1(str, STRINGP);
if(POSP(pos))
res = VPOS(pos);
else
res = curr_vw->vw_CursorPos;
if(!BUFFERP(tx))
tx = VAL(curr_vw->vw_Tx);
check_pos(VTX(tx), &res);
if(findstrprev(VTX(tx), VSTR(str), &res))
return(make_lpos(&res));
return(sym_nil);
}
_PR VALUE cmd_find_next_char(VALUE ch, VALUE pos, VALUE tx);
DEFUN("find-next-char", cmd_find_next_char, subr_find_next_char, (VALUE ch, VALUE pos, VALUE tx), V_Subr3, DOC_find_next_char) /*
::doc:find_next_char::
find-next-char CHAR [POS] [BUFFER]
Scans forwards from POS (or the cursor), in BUFFER, looking for a match
with CHAR. Returns the position of the next match or nil.
::end:: */
{
POS res;
DECLARE1(ch, CHARP);
if(POSP(pos))
res = VPOS(pos);
else
res = curr_vw->vw_CursorPos;
if(!BUFFERP(tx))
tx = VAL(curr_vw->vw_Tx);
check_pos(VTX(tx), &res);
if(findcharnext(VTX(tx), VCHAR(ch), &res))
return(make_lpos(&res));
return(sym_nil);
}
_PR VALUE cmd_find_prev_char(VALUE ch, VALUE pos, VALUE tx);
DEFUN("find-prev-char", cmd_find_prev_char, subr_find_prev_char, (VALUE ch, VALUE pos, VALUE tx), V_Subr3, DOC_find_prev_char) /*
::doc:find_prev_char::
find-prev-char CHAR [POS] [BUFFER]
Scans backwards from POS (or the cursor), in BUFFER, looking for a match
with CHAR. Returns the position of the next match or nil.
::end:: */
{
POS res;
DECLARE1(ch, CHARP);
if(POSP(pos))
res = VPOS(pos);
else
res = curr_vw->vw_CursorPos;
if(!BUFFERP(tx))
tx = VAL(curr_vw->vw_Tx);
check_pos(VTX(tx), &res);
if(findcharprev(VTX(tx), VCHAR(ch), &res))
return(make_lpos(&res));
return(sym_nil);
}
_PR VALUE cmd_replace_regexp(VALUE re, VALUE tplt, VALUE pos, VALUE tx, VALUE nocase_p);
DEFUN("replace-regexp", cmd_replace_regexp, subr_replace_regexp, (VALUE re, VALUE tplt, VALUE pos, VALUE tx, VALUE nocase_p), V_Subr5, DOC_replace_regexp) /*