1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-13 22:50:42 +00:00

uemacs: convert typedef struct RMC to struct magic_replacement.

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-11-28 23:56:30 -02:00 committed by Linus Torvalds
parent 9744421f3c
commit f28629471c
4 changed files with 12 additions and 11 deletions

2
edef.h
View File

@ -120,7 +120,7 @@ extern short int magical;
extern short int rmagical; extern short int rmagical;
extern struct magic mcpat[NPAT]; /* The magic pattern. */ extern struct magic mcpat[NPAT]; /* The magic pattern. */
extern struct magic tapcm[NPAT]; /* The reversed magic patterni. */ 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 #endif
extern char *dname[]; /* Directive name table. */ extern char *dname[]; /* Directive name table. */

View File

@ -625,7 +625,7 @@ struct while_block {
#endif #endif
#if MAGIC #if defined(MAGIC)
/* /*
* Defines for the metacharacters in the regular expression * Defines for the metacharacters in the regular expression
* search routines. * search routines.
@ -662,7 +662,8 @@ struct while_block {
#define HIBYTE HICHAR >> 3 #define HIBYTE HICHAR >> 3
/* Typedefs that define the meta-character structure for MAGIC mode searching /* 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 { struct magic {
short int mc_type; short int mc_type;
@ -672,9 +673,9 @@ struct magic {
} u; } u;
}; };
typedef struct { struct magic_replacement {
short int mc_type; short int mc_type;
char *rstr; char *rstr;
} RMC; };
#endif
#endif /* MAGIC */

View File

@ -130,7 +130,7 @@ short int magical = FALSE;
short int rmagical = FALSE; short int rmagical = FALSE;
struct magic mcpat[NPAT]; /* the magic pattern */ struct magic mcpat[NPAT]; /* the magic pattern */
struct magic tapcm[NPAT]; /* the reversed 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 #endif

View File

@ -930,7 +930,7 @@ int delins(int dlength, char *instr, int use_meta)
{ {
int status; int status;
#if MAGIC #if MAGIC
RMC *rmcptr; struct magic_replacement *rmcptr;
#endif #endif
/* Zap what we gotta, /* Zap what we gotta,
@ -1200,7 +1200,7 @@ static int mcstr(void)
*/ */
static int rmcstr(void) static int rmcstr(void)
{ {
RMC *rmcptr; struct magic_replacement *rmcptr;
char *patptr; char *patptr;
int status = TRUE; int status = TRUE;
int mj; 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) void rmcclear(void)
{ {
RMC *rmcptr; struct magic_replacement *rmcptr;
rmcptr = &rmcpat[0]; rmcptr = &rmcpat[0];