mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
uemacs: get rid of BITMAP typedef.
Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
18342f6246
commit
4966cb355e
@ -692,17 +692,14 @@ typedef struct WHBLOCK {
|
||||
#define HICHAR 256
|
||||
#define HIBYTE HICHAR >> 3
|
||||
|
||||
/* Typedefs that define the bitmap type for searching (BITMAP),
|
||||
* the meta-character structure for MAGIC mode searching (MC),
|
||||
* and the meta-character structure for MAGIC mode replacment (RMC).
|
||||
/* Typedefs that define the meta-character structure for MAGIC mode searching
|
||||
* (MC), and the meta-character structure for MAGIC mode replacment (RMC).
|
||||
*/
|
||||
typedef char *BITMAP;
|
||||
|
||||
typedef struct {
|
||||
short int mc_type;
|
||||
union {
|
||||
int lchar;
|
||||
BITMAP cclmap;
|
||||
char *cclmap;
|
||||
} u;
|
||||
} MC;
|
||||
|
||||
|
27
search.c
27
search.c
@ -70,9 +70,9 @@ static int mcstr(void);
|
||||
static int rmcstr(void);
|
||||
static int mceq(int bc, MC *mt);
|
||||
static int cclmake(char **ppatptr, MC *mcptr);
|
||||
static int biteq(int bc, BITMAP cclmap);
|
||||
static BITMAP clearbits(void);
|
||||
static void setbit(int bc, BITMAP cclmap);
|
||||
static int biteq(int bc, char *cclmap);
|
||||
static char *clearbits(void);
|
||||
static void setbit(int bc, char *cclmap);
|
||||
|
||||
/*
|
||||
* forwsearch -- Search forward. Get a search string from the user, and
|
||||
@ -1368,7 +1368,7 @@ static int mceq(int bc, MC *mt)
|
||||
return result;
|
||||
}
|
||||
|
||||
extern BITMAP clearbits(void);
|
||||
extern char *clearbits(void);
|
||||
|
||||
/*
|
||||
* cclmake -- create the bitmap for the character class.
|
||||
@ -1377,7 +1377,7 @@ extern BITMAP clearbits(void);
|
||||
*/
|
||||
static int cclmake(char **ppatptr, MC *mcptr)
|
||||
{
|
||||
BITMAP bmap;
|
||||
char *bmap;
|
||||
char *patptr;
|
||||
int pchr, ochr;
|
||||
|
||||
@ -1453,7 +1453,7 @@ static int cclmake(char **ppatptr, MC *mcptr)
|
||||
/*
|
||||
* biteq -- is the character in the bitmap?
|
||||
*/
|
||||
static int biteq(int bc, BITMAP cclmap)
|
||||
static int biteq(int bc, char *cclmap)
|
||||
{
|
||||
#if PKCODE
|
||||
bc = bc & 0xFF;
|
||||
@ -1467,22 +1467,23 @@ static int biteq(int bc, BITMAP cclmap)
|
||||
/*
|
||||
* clearbits -- Allocate and zero out a CCL bitmap.
|
||||
*/
|
||||
static BITMAP clearbits(void)
|
||||
static char *clearbits(void)
|
||||
{
|
||||
BITMAP cclstart, cclmap;
|
||||
int j;
|
||||
char *cclstart;
|
||||
char *cclmap;
|
||||
int i;
|
||||
|
||||
if ((cclmap = cclstart = (BITMAP) malloc(HIBYTE)) != NULL)
|
||||
for (j = 0; j < HIBYTE; j++)
|
||||
if ((cclmap = cclstart = (char *)malloc(HIBYTE)) != NULL) {
|
||||
for (i = 0; i < HIBYTE; i++)
|
||||
*cclmap++ = 0;
|
||||
|
||||
}
|
||||
return cclstart;
|
||||
}
|
||||
|
||||
/*
|
||||
* setbit -- Set a bit (ON only) in the bitmap.
|
||||
*/
|
||||
static void setbit(int bc, BITMAP cclmap)
|
||||
static void setbit(int bc, char *cclmap)
|
||||
{
|
||||
#if PKCODE
|
||||
bc = bc & 0xFF;
|
||||
|
Loading…
Reference in New Issue
Block a user