diff --git a/edef.h b/edef.h index 01813c5..1705f39 100644 --- a/edef.h +++ b/edef.h @@ -120,7 +120,7 @@ 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 RMC rmcpat[NPAT]; /* The replacement magic array. */ +extern struct magic_replacement rmcpat[NPAT]; /* The replacement magic array. */ #endif extern char *dname[]; /* Directive name table. */ diff --git a/estruct.h b/estruct.h index 86361ed..5c5576f 100644 --- a/estruct.h +++ b/estruct.h @@ -625,7 +625,7 @@ struct while_block { #endif -#if MAGIC +#if defined(MAGIC) /* * Defines for the metacharacters in the regular expression * search routines. @@ -662,7 +662,8 @@ struct while_block { #define HIBYTE HICHAR >> 3 /* Typedefs that define the meta-character structure for MAGIC mode searching - * (struct magic), and the meta-character structure for MAGIC mode replacment (RMC). + * (struct magic), and the meta-character structure for MAGIC mode replacement + * (struct magic_replacement). */ struct magic { short int mc_type; @@ -672,9 +673,9 @@ struct magic { } u; }; -typedef struct { +struct magic_replacement { short int mc_type; char *rstr; -} RMC; -#endif +}; +#endif /* MAGIC */ diff --git a/globals.c b/globals.c index 8b64e70..4488d60 100644 --- a/globals.c +++ b/globals.c @@ -130,7 +130,7 @@ short int magical = FALSE; short int rmagical = FALSE; struct magic mcpat[NPAT]; /* the magic pattern */ struct magic tapcm[NPAT]; /* the reversed magic pattern */ -RMC rmcpat[NPAT]; /* the replacement magic array */ +struct magic_replacement rmcpat[NPAT]; /* the replacement magic array */ #endif diff --git a/search.c b/search.c index 2df1150..7f080d8 100644 --- a/search.c +++ b/search.c @@ -930,7 +930,7 @@ int delins(int dlength, char *instr, int use_meta) { int status; #if MAGIC - RMC *rmcptr; + struct magic_replacement *rmcptr; #endif /* Zap what we gotta, @@ -1200,7 +1200,7 @@ static int mcstr(void) */ static int rmcstr(void) { - RMC *rmcptr; + struct magic_replacement *rmcptr; char *patptr; int status = TRUE; int mj; @@ -1304,11 +1304,11 @@ void mcclear(void) } /* - * rmcclear -- Free up any strings, and MCNIL the RMC array. + * rmcclear -- Free up any strings, and MCNIL the struct magic_replacement array. */ void rmcclear(void) { - RMC *rmcptr; + struct magic_replacement *rmcptr; rmcptr = &rmcpat[0];