diff options
author | Thiago Farina <tfransosi@gmail.com> | 2010-12-05 18:35:55 -0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 11:28:55 -0800 |
commit | bf3c3ac2bd36ee89c1b18999ac779e86deb7750f (patch) | |
tree | e402c494b7e03514e2c1f9154cfe8c910cada8f1 | |
parent | d6e76cca7b54f9e692481f878c663f97748e8ad9 (diff) | |
download | uemacs-bf3c3ac2bd36ee89c1b18999ac779e86deb7750f.tar.gz |
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>
-rw-r--r-- | edef.h | 8 | ||||
-rw-r--r-- | globals.c | 17 | ||||
-rw-r--r-- | search.c | 14 |
3 files changed, 14 insertions, 25 deletions
@@ -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 @@ -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 - - @@ -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); |