1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-21 16:46:24 -05:00

uemacs: Make some magic variables private to search.c module.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Thiago Farina 2010-12-05 18:35:55 -02:00 committed by Linus Torvalds
parent d6e76cca7b
commit bf3c3ac2bd
3 changed files with 14 additions and 25 deletions

8
edef.h
View File

@ -115,14 +115,6 @@ extern char *patmatch;
extern struct line *matchline;
extern int matchoff;
#if MAGIC
extern short int magical;
extern short int rmagical;
extern struct magic mcpat[NPAT]; /* The magic pattern. */
extern struct magic tapcm[NPAT]; /* The reversed magic patterni. */
extern struct magic_replacement rmcpat[NPAT]; /* The replacement magic array. */
#endif
extern char *dname[]; /* Directive name table. */
#if DEBUGM

View File

@ -119,21 +119,6 @@ char *patmatch = NULL;
struct line *matchline = NULL;
int matchoff = 0;
#if MAGIC
/*
* The variables magical and rmagical determine if there
* were actual metacharacters in the search and replace strings -
* if not, then we don't have to use the slower MAGIC mode
* search functions.
*/
short int magical = FALSE;
short int rmagical = FALSE;
struct magic mcpat[NPAT]; /* the magic pattern */
struct magic tapcm[NPAT]; /* the reversed magic pattern */
struct magic_replacement rmcpat[NPAT]; /* the replacement magic array */
#endif
/* directive name table:
This holds the names of all the directives.... */
@ -148,5 +133,3 @@ char *dname[] = {
/* vars needed for macro debugging output */
char outline[NSTRING]; /* global string to hold debug line text */
#endif

View File

@ -64,6 +64,20 @@
#include "efunc.h"
#include "line.h"
#if defined(MAGIC)
/*
* The variables magical and rmagical determine if there
* were actual metacharacters in the search and replace strings -
* if not, then we don't have to use the slower MAGIC mode
* search functions.
*/
static short int magical;
static short int rmagical;
static struct magic mcpat[NPAT]; /* The magic pattern. */
static struct magic tapcm[NPAT]; /* The reversed magic patterni. */
static struct magic_replacement rmcpat[NPAT]; /* The replacement magic array. */
#endif
static int amatch(struct magic *mcptr, int direct, struct line **pcwline, int *pcwoff);
static int readpattern(char *prompt, char *apat, int srch);
static int replaces(int kind, int f, int n);