aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Farina <tfransosi@gmail.com>2010-11-28 23:56:30 -0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-11-30 14:39:37 -0800
commitf28629471c737da5af23db627b750a4b4666c89d (patch)
tree1703214a27b49ebd87d751d1a490e8ce9be1dc9e
parent9744421f3ca0a6f812182b52745dcfabdcb987f8 (diff)
downloaduemacs-f28629471c737da5af23db627b750a4b4666c89d.tar.gz
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>
-rw-r--r--edef.h2
-rw-r--r--estruct.h11
-rw-r--r--globals.c2
-rw-r--r--search.c8
4 files changed, 12 insertions, 11 deletions
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];