mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-23 09:36:31 -05:00
Reduce isearch exposed API.
This commit is contained in:
parent
b321dce49e
commit
72f91dd131
27
isearch.c
27
isearch.c
@ -34,6 +34,17 @@
|
|||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
|
|
||||||
|
|
||||||
|
static int isearch( int f, int n) ;
|
||||||
|
static int checknext( char chr, char *patrn, int dir) ;
|
||||||
|
static int scanmore( char *patrn, int dir) ;
|
||||||
|
static int match_pat( char *patrn) ;
|
||||||
|
static int promptpattern( char *prompt) ;
|
||||||
|
static int get_char( void) ;
|
||||||
|
static int uneat( void) ;
|
||||||
|
static void reeat( int c) ;
|
||||||
|
|
||||||
|
|
||||||
#if ISRCH
|
#if ISRCH
|
||||||
|
|
||||||
static int echo_char(int c, int col);
|
static int echo_char(int c, int col);
|
||||||
@ -143,7 +154,7 @@ int fisearch(int f, int n)
|
|||||||
* exists (or until the search is aborted).
|
* exists (or until the search is aborted).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int isearch(int f, int n)
|
static int isearch(int f, int n)
|
||||||
{
|
{
|
||||||
int status; /* Search status */
|
int status; /* Search status */
|
||||||
int col; /* prompt column */
|
int col; /* prompt column */
|
||||||
@ -283,7 +294,7 @@ int isearch(int f, int n)
|
|||||||
* char *patrn; The entire search string (incl chr)
|
* char *patrn; The entire search string (incl chr)
|
||||||
* int dir; Search direction
|
* int dir; Search direction
|
||||||
*/
|
*/
|
||||||
int checknext(char chr, char *patrn, int dir) /* Check next character in search string */
|
static int checknext(char chr, char *patrn, int dir) /* Check next character in search string */
|
||||||
{
|
{
|
||||||
struct line *curline; /* current line during scan */
|
struct line *curline; /* current line during scan */
|
||||||
int curoff; /* position within current line */
|
int curoff; /* position within current line */
|
||||||
@ -327,7 +338,7 @@ int checknext(char chr, char *patrn, int dir) /* Check next character in search
|
|||||||
* char *patrn; string to scan for
|
* char *patrn; string to scan for
|
||||||
* int dir; direction to search
|
* int dir; direction to search
|
||||||
*/
|
*/
|
||||||
int scanmore(char *patrn, int dir) /* search forward or back for a pattern */
|
static int scanmore(char *patrn, int dir) /* search forward or back for a pattern */
|
||||||
{
|
{
|
||||||
int sts; /* search status */
|
int sts; /* search status */
|
||||||
|
|
||||||
@ -356,7 +367,7 @@ int scanmore(char *patrn, int dir) /* search forward or back for a pattern
|
|||||||
*
|
*
|
||||||
* char *patrn; String to match to buffer
|
* char *patrn; String to match to buffer
|
||||||
*/
|
*/
|
||||||
int match_pat(char *patrn) /* See if the pattern string matches string at "." */
|
static int match_pat(char *patrn) /* See if the pattern string matches string at "." */
|
||||||
{
|
{
|
||||||
int i; /* Generic loop index/offset */
|
int i; /* Generic loop index/offset */
|
||||||
int buffchar; /* character at current position */
|
int buffchar; /* character at current position */
|
||||||
@ -388,7 +399,7 @@ int match_pat(char *patrn) /* See if the pattern string matches string at "."
|
|||||||
/*
|
/*
|
||||||
* Routine to prompt for I-Search string.
|
* Routine to prompt for I-Search string.
|
||||||
*/
|
*/
|
||||||
int promptpattern(char *prompt)
|
static int promptpattern(char *prompt)
|
||||||
{
|
{
|
||||||
char tpat[NPAT + 20];
|
char tpat[NPAT + 20];
|
||||||
|
|
||||||
@ -455,7 +466,7 @@ static int echo_char(int c, int col)
|
|||||||
* Otherwise, we must be re-executing the command string, so just return the
|
* Otherwise, we must be re-executing the command string, so just return the
|
||||||
* next character.
|
* next character.
|
||||||
*/
|
*/
|
||||||
int get_char(void)
|
static int get_char(void)
|
||||||
{
|
{
|
||||||
int c; /* A place to get a character */
|
int c; /* A place to get a character */
|
||||||
|
|
||||||
@ -486,7 +497,7 @@ int get_char(void)
|
|||||||
|
|
||||||
/* Come here on the next term.t_getchar call: */
|
/* Come here on the next term.t_getchar call: */
|
||||||
|
|
||||||
int uneat(void)
|
static int uneat(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
@ -496,7 +507,7 @@ int uneat(void)
|
|||||||
return c; /* and return the last char */
|
return c; /* and return the last char */
|
||||||
}
|
}
|
||||||
|
|
||||||
void reeat(int c)
|
static void reeat(int c)
|
||||||
{
|
{
|
||||||
if (eaten_char != -1) /* If we've already been here */
|
if (eaten_char != -1) /* If we've already been here */
|
||||||
return /*(NULL) */ ; /* Don't do it again */
|
return /*(NULL) */ ; /* Don't do it again */
|
||||||
|
@ -1,11 +1,2 @@
|
|||||||
int risearch( int f, int n) ;
|
int risearch( int f, int n) ;
|
||||||
int fisearch( int f, int n) ;
|
int fisearch( int f, int n) ;
|
||||||
int isearch( int f, int n) ;
|
|
||||||
int checknext( char chr, char *patrn, int dir) ;
|
|
||||||
int scanmore( char *patrn, int dir) ;
|
|
||||||
int match_pat( char *patrn) ;
|
|
||||||
int promptpattern( char *prompt) ;
|
|
||||||
int get_char( void) ;
|
|
||||||
int uneat( void) ;
|
|
||||||
void reeat( int c) ;
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user