mirror of
https://github.com/rfivet/uemacs.git
synced 2025-02-20 06:57:11 -05: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:
parent
9744421f3c
commit
f28629471c
2
edef.h
2
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. */
|
||||
|
11
estruct.h
11
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 */
|
||||
|
@ -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
|
||||
|
||||
|
8
search.c
8
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];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user