2013-05-20 01:16:08 -04:00
|
|
|
#ifndef _SEARCH_H_
|
|
|
|
#define _SEARCH_H_
|
|
|
|
|
2013-09-23 08:28:31 -04:00
|
|
|
#define MAGIC 1 /* include regular expression matching? */
|
2013-09-23 07:31:29 -04:00
|
|
|
|
|
|
|
#include "line.h"
|
2013-05-20 01:16:08 -04:00
|
|
|
|
2013-09-26 07:16:28 -04:00
|
|
|
/*
|
|
|
|
* PTBEG, PTEND, FORWARD, and REVERSE are all toggle-able values for
|
|
|
|
* the scan routines.
|
|
|
|
*/
|
|
|
|
#define PTBEG 0 /* Leave the point at the beginning on search */
|
|
|
|
#define PTEND 1 /* Leave the point at the end on search */
|
|
|
|
#define FORWARD 0 /* forward direction */
|
|
|
|
#define REVERSE 1 /* backwards direction */
|
|
|
|
|
|
|
|
int scanner( const char *patrn, int direct, int beg_or_end) ;
|
|
|
|
|
2013-05-20 01:16:08 -04:00
|
|
|
int forwsearch( int f, int n) ;
|
|
|
|
int forwhunt( int f, int n) ;
|
|
|
|
int backsearch( int f, int n) ;
|
|
|
|
int backhunt( int f, int n) ;
|
|
|
|
int eq( unsigned char bc, unsigned char pc) ;
|
|
|
|
void savematch( void) ;
|
|
|
|
void rvstrcpy( char *rvstr, char *str) ;
|
|
|
|
int sreplace( int f, int n) ;
|
|
|
|
int qreplace( int f, int n) ;
|
|
|
|
int delins( int dlength, char *instr, int use_meta) ;
|
|
|
|
int expandp( char *srcstr, char *deststr, int maxlength) ;
|
|
|
|
int boundry( struct line *curline, int curoff, int dir) ;
|
2013-09-23 07:31:29 -04:00
|
|
|
|
|
|
|
#if MAGIC
|
2013-05-20 01:16:08 -04:00
|
|
|
void mcclear( void) ;
|
|
|
|
void rmcclear( void) ;
|
2013-09-23 07:31:29 -04:00
|
|
|
#endif
|
2013-05-20 01:16:08 -04:00
|
|
|
|
|
|
|
#endif
|