mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-24 10:06:30 -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 HICHAR 256
|
||||||
#define HIBYTE HICHAR >> 3
|
#define HIBYTE HICHAR >> 3
|
||||||
|
|
||||||
/* Typedefs that define the bitmap type for searching (BITMAP),
|
/* Typedefs that define the meta-character structure for MAGIC mode searching
|
||||||
* the meta-character structure for MAGIC mode searching (MC),
|
* (MC), and the meta-character structure for MAGIC mode replacment (RMC).
|
||||||
* and the meta-character structure for MAGIC mode replacment (RMC).
|
|
||||||
*/
|
*/
|
||||||
typedef char *BITMAP;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
short int mc_type;
|
short int mc_type;
|
||||||
union {
|
union {
|
||||||
int lchar;
|
int lchar;
|
||||||
BITMAP cclmap;
|
char *cclmap;
|
||||||
} u;
|
} u;
|
||||||
} MC;
|
} MC;
|
||||||
|
|
||||||
|
27
search.c
27
search.c
@ -70,9 +70,9 @@ static int mcstr(void);
|
|||||||
static int rmcstr(void);
|
static int rmcstr(void);
|
||||||
static int mceq(int bc, MC *mt);
|
static int mceq(int bc, MC *mt);
|
||||||
static int cclmake(char **ppatptr, MC *mcptr);
|
static int cclmake(char **ppatptr, MC *mcptr);
|
||||||
static int biteq(int bc, BITMAP cclmap);
|
static int biteq(int bc, char *cclmap);
|
||||||
static BITMAP clearbits(void);
|
static char *clearbits(void);
|
||||||
static void setbit(int bc, BITMAP cclmap);
|
static void setbit(int bc, char *cclmap);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* forwsearch -- Search forward. Get a search string from the user, and
|
* forwsearch -- Search forward. Get a search string from the user, and
|
||||||
@ -1368,7 +1368,7 @@ static int mceq(int bc, MC *mt)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern BITMAP clearbits(void);
|
extern char *clearbits(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cclmake -- create the bitmap for the character class.
|
* cclmake -- create the bitmap for the character class.
|
||||||
@ -1377,7 +1377,7 @@ extern BITMAP clearbits(void);
|
|||||||
*/
|
*/
|
||||||
static int cclmake(char **ppatptr, MC *mcptr)
|
static int cclmake(char **ppatptr, MC *mcptr)
|
||||||
{
|
{
|
||||||
BITMAP bmap;
|
char *bmap;
|
||||||
char *patptr;
|
char *patptr;
|
||||||
int pchr, ochr;
|
int pchr, ochr;
|
||||||
|
|
||||||
@ -1453,7 +1453,7 @@ static int cclmake(char **ppatptr, MC *mcptr)
|
|||||||
/*
|
/*
|
||||||
* biteq -- is the character in the bitmap?
|
* biteq -- is the character in the bitmap?
|
||||||
*/
|
*/
|
||||||
static int biteq(int bc, BITMAP cclmap)
|
static int biteq(int bc, char *cclmap)
|
||||||
{
|
{
|
||||||
#if PKCODE
|
#if PKCODE
|
||||||
bc = bc & 0xFF;
|
bc = bc & 0xFF;
|
||||||
@ -1467,22 +1467,23 @@ static int biteq(int bc, BITMAP cclmap)
|
|||||||
/*
|
/*
|
||||||
* clearbits -- Allocate and zero out a CCL bitmap.
|
* clearbits -- Allocate and zero out a CCL bitmap.
|
||||||
*/
|
*/
|
||||||
static BITMAP clearbits(void)
|
static char *clearbits(void)
|
||||||
{
|
{
|
||||||
BITMAP cclstart, cclmap;
|
char *cclstart;
|
||||||
int j;
|
char *cclmap;
|
||||||
|
int i;
|
||||||
|
|
||||||
if ((cclmap = cclstart = (BITMAP) malloc(HIBYTE)) != NULL)
|
if ((cclmap = cclstart = (char *)malloc(HIBYTE)) != NULL) {
|
||||||
for (j = 0; j < HIBYTE; j++)
|
for (i = 0; i < HIBYTE; i++)
|
||||||
*cclmap++ = 0;
|
*cclmap++ = 0;
|
||||||
|
}
|
||||||
return cclstart;
|
return cclstart;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* setbit -- Set a bit (ON only) in the bitmap.
|
* 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
|
#if PKCODE
|
||||||
bc = bc & 0xFF;
|
bc = bc & 0xFF;
|
||||||
|
Loading…
Reference in New Issue
Block a user