mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
Move magic related definitions from estruct.h to search.c. Review search.h accordingly.
This commit is contained in:
56
estruct.h
56
estruct.h
@@ -157,8 +157,8 @@
|
||||
#define APROP 1 /* Add code for Apropos command */
|
||||
#if 0
|
||||
#define CRYPT 1 /* file encryption enabled? */
|
||||
#endif
|
||||
#define MAGIC 1 /* include regular expression matching? */
|
||||
#endif
|
||||
#define AEDIT 1 /* advanced editing options: en/detabbing */
|
||||
#define PROC 1 /* named procedures */
|
||||
#define CLEAN 0 /* de-alloc memory on exit */
|
||||
@@ -503,59 +503,5 @@ struct while_block {
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(MAGIC)
|
||||
/*
|
||||
* Defines for the metacharacters in the regular expression
|
||||
* search routines.
|
||||
*/
|
||||
#define MCNIL 0 /* Like the '\0' for strings. */
|
||||
#define LITCHAR 1 /* Literal character, or string. */
|
||||
#define ANY 2
|
||||
#define CCL 3
|
||||
#define NCCL 4
|
||||
#define BOL 5
|
||||
#define EOL 6
|
||||
#define DITTO 7
|
||||
#define CLOSURE 256 /* An or-able value. */
|
||||
#define MASKCL (CLOSURE - 1)
|
||||
|
||||
#define MC_ANY '.' /* 'Any' character (except newline). */
|
||||
#define MC_CCL '[' /* Character class. */
|
||||
#define MC_NCCL '^' /* Negate character class. */
|
||||
#define MC_RCCL '-' /* Range in character class. */
|
||||
#define MC_ECCL ']' /* End of character class. */
|
||||
#define MC_BOL '^' /* Beginning of line. */
|
||||
#define MC_EOL '$' /* End of line. */
|
||||
#define MC_CLOSURE '*' /* Closure - does not extend past newline. */
|
||||
#define MC_DITTO '&' /* Use matched string in replacement. */
|
||||
#define MC_ESC '\\' /* Escape - suppress meta-meaning. */
|
||||
|
||||
#define BIT(n) (1 << (n)) /* An integer with one bit set. */
|
||||
#define CHCASE(c) ((c) ^ DIFCASE) /* Toggle the case of a letter. */
|
||||
|
||||
/* HICHAR - 1 is the largest character we will deal with.
|
||||
* HIBYTE represents the number of bytes in the bitmap.
|
||||
*/
|
||||
#define HICHAR 256
|
||||
#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 replacement
|
||||
* (struct magic_replacement).
|
||||
*/
|
||||
struct magic {
|
||||
short int mc_type;
|
||||
union {
|
||||
int lchar;
|
||||
char *cclmap;
|
||||
} u;
|
||||
};
|
||||
|
||||
struct magic_replacement {
|
||||
short int mc_type;
|
||||
char *rstr;
|
||||
};
|
||||
|
||||
#endif /* MAGIC */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user