Move global search pattern variables to public search scope.

This commit is contained in:
Renaud 2013-09-27 14:53:04 +08:00
parent e2035f0d92
commit 62e887547b
4 changed files with 17 additions and 17 deletions

5
edef.h
View File

@ -112,11 +112,6 @@ extern struct buffer *blistp; /* Buffer for C-X C-B */
extern char sres[NBUFN]; /* Current screen resolution. */
extern unsigned int matchlen;
extern unsigned int mlenold;
extern char *patmatch;
extern struct line *matchline;
extern int matchoff;
#if DEBUGM
/* Vars needed for macro debugging output. */

View File

@ -113,18 +113,6 @@ char pat[NPAT]; /* Search pattern */
char tap[NPAT]; /* Reversed pattern array. */
char rpat[NPAT]; /* replacement pattern */
/* The variable matchlen holds the length of the matched
* string - used by the replace functions.
* The variable patmatch holds the string that satisfies
* the search command.
* The variables matchline and matchoff hold the line and
* offset position of the *start* of match.
*/
unsigned int matchlen = 0;
unsigned int mlenold = 0;
char *patmatch = NULL;
struct line *matchline = NULL;
int matchoff = 0;
#if DEBUGM
/* vars needed for macro debugging output */

View File

@ -72,6 +72,20 @@
#include "terminal.h"
#include "window.h"
/* The variable matchlen holds the length of the matched
* string - used by the replace functions.
* The variable patmatch holds the string that satisfies
* the search command.
* The variables matchline and matchoff hold the line and
* offset position of the *start* of match.
*/
unsigned int matchlen = 0 ;
static unsigned int mlenold = 0 ;
char *patmatch = NULL ;
static struct line *matchline = NULL;
static int matchoff = 0;
#if defined(MAGIC)
/*
* Defines for the metacharacters in the regular expression

View File

@ -5,6 +5,9 @@
#include "line.h"
extern unsigned int matchlen ;
extern char *patmatch ;
/*
* PTBEG, PTEND, FORWARD, and REVERSE are all toggle-able values for
* the scan routines.