Wed Oct 27 15:48:58 PDT 1999
(Mandrake) Now that we've gone through with -ansi -pedantic and there are no more warnings, maybe Tru64 support will work in epp? SVN revision: 1002
This commit is contained in:
parent
a6fe224828
commit
40bcd3daec
|
@ -56,3 +56,11 @@ Wed Oct 27 09:55:14 PDT 1999
|
|||
(Mandrake)
|
||||
|
||||
Trying to get this to build under Tru64
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Wed Oct 27 15:48:58 PDT 1999
|
||||
(Mandrake)
|
||||
|
||||
Now that we've gone through with -ansi -pedantic and there are no more
|
||||
warnings, maybe Tru64 support will work in epp?
|
||||
|
|
10
epp/cppexp.c
10
epp/cppexp.c
|
@ -43,7 +43,7 @@
|
|||
struct arglist
|
||||
{
|
||||
struct arglist *next;
|
||||
unsigned char *name;
|
||||
unsigned char *name;
|
||||
int length;
|
||||
int argno;
|
||||
};
|
||||
|
@ -279,7 +279,7 @@ cpp_lex(pfile)
|
|||
register struct token *toktab;
|
||||
enum cpp_token token;
|
||||
struct operation op;
|
||||
unsigned char *tok_start, *tok_end;
|
||||
unsigned char *tok_start, *tok_end;
|
||||
int old_written;
|
||||
|
||||
retry:
|
||||
|
@ -317,7 +317,7 @@ cpp_lex(pfile)
|
|||
case CPP_COMMENT:
|
||||
goto retry;
|
||||
case CPP_NUMBER:
|
||||
return parse_number(pfile, tok_start, tok_end - tok_start);
|
||||
return parse_number(pfile, (char *)tok_start, tok_end - tok_start);
|
||||
case CPP_STRING:
|
||||
cpp_error(pfile, "string constants not allowed in #if expressions");
|
||||
op.op = ERROR;
|
||||
|
@ -332,7 +332,7 @@ cpp_lex(pfile)
|
|||
unsigned width = MAX_CHAR_TYPE_SIZE;
|
||||
int wide_flag = 0;
|
||||
int max_chars;
|
||||
unsigned char *ptr = tok_start;
|
||||
unsigned char *ptr = tok_start;
|
||||
|
||||
#ifdef MULTIBYTE_CHARS
|
||||
char token_buffer[MAX_LONG_TYPE_SIZE / MAX_CHAR_TYPE_SIZE + MB_CUR_MAX];
|
||||
|
@ -1065,7 +1065,7 @@ cpp_parse_expr(pfile)
|
|||
else
|
||||
{
|
||||
new_stack = (struct operation *)xmalloc(new_size);
|
||||
bcopy((char *)stack, (char *)new_stack, old_size);
|
||||
memcpy((char *)stack, (char *)new_stack, old_size);
|
||||
}
|
||||
stack = new_stack;
|
||||
top = (struct operation *)((char *)new_stack + old_size);
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
#include "cpphash.h"
|
||||
|
||||
static HASHNODE *hashtab[HASHSIZE];
|
||||
HASHNODE *cpp_lookup(struct parse_file *pfile, const unsigned char * name, int len,
|
||||
HASHNODE *cpp_lookup(struct parse_file *pfile, const unsigned char *name, int len,
|
||||
int hash);
|
||||
void delete_macro(HASHNODE * hp);
|
||||
HASHNODE *install(unsigned char * name, int len, enum node_type type, int ivalue,
|
||||
HASHNODE *install(unsigned char *name, int len, enum node_type type, int ivalue,
|
||||
char *value, int hash);
|
||||
|
||||
/* Define a generic NULL if one hasn't already been defined. */
|
||||
|
@ -77,7 +77,7 @@ hashf(name, len, hashsize)
|
|||
HASHNODE *
|
||||
cpp_lookup(pfile, name, len, hash)
|
||||
struct parse_file *pfile;
|
||||
const unsigned char *name;
|
||||
const unsigned char *name;
|
||||
int len;
|
||||
int hash;
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ cpp_lookup(pfile, name, len, hash)
|
|||
bucket = hashtab[hash];
|
||||
while (bucket)
|
||||
{
|
||||
if (bucket->length == len && strncmp(bucket->name, name, len) == 0)
|
||||
if (bucket->length == len && strncmp((char *)bucket->name, (char *)name, len) == 0)
|
||||
return bucket;
|
||||
bucket = bucket->next;
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ delete_macro(hp)
|
|||
*/
|
||||
HASHNODE *
|
||||
install(name, len, type, ivalue, value, hash)
|
||||
unsigned char *name;
|
||||
unsigned char *name;
|
||||
int len;
|
||||
enum node_type type;
|
||||
int ivalue;
|
||||
|
@ -173,7 +173,7 @@ install(name, len, type, ivalue, value, hash)
|
|||
{
|
||||
register HASHNODE *hp;
|
||||
register int i, bucket;
|
||||
register unsigned char *p, *q;
|
||||
register unsigned char *p, *q;
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
|
@ -200,7 +200,7 @@ install(name, len, type, ivalue, value, hash)
|
|||
hp->value.ival = ivalue;
|
||||
else
|
||||
hp->value.cpval = value;
|
||||
hp->name = ((unsigned char *) hp) + sizeof(HASHNODE);
|
||||
hp->name = ((unsigned char *)hp) + sizeof(HASHNODE);
|
||||
p = hp->name;
|
||||
q = name;
|
||||
for (i = 0; i < len; i++)
|
||||
|
|
|
@ -1,36 +1,38 @@
|
|||
enum node_type;
|
||||
|
||||
/* different kinds of things that can appear in the value field
|
||||
of a hash node. Actually, this may be useless now. */
|
||||
union hashval {
|
||||
int ival;
|
||||
char *cpval;
|
||||
DEFINITION *defn;
|
||||
};
|
||||
* of a hash node. Actually, this may be useless now. */
|
||||
union hashval
|
||||
{
|
||||
int ival;
|
||||
char *cpval;
|
||||
DEFINITION *defn;
|
||||
};
|
||||
|
||||
struct hashnode {
|
||||
struct hashnode *next; /* double links for easy deletion */
|
||||
struct hashnode *prev;
|
||||
struct hashnode **bucket_hdr; /* also, a back pointer to this node's hash
|
||||
chain is kept, in case the node is the head
|
||||
of the chain and gets deleted. */
|
||||
enum node_type type; /* type of special token */
|
||||
int length; /* length of token, for quick comparison */
|
||||
unsigned char *name; /* the actual name */
|
||||
union hashval value; /* pointer to expansion, or whatever */
|
||||
};
|
||||
struct hashnode
|
||||
{
|
||||
struct hashnode *next; /* double links for easy deletion */
|
||||
struct hashnode *prev;
|
||||
struct hashnode **bucket_hdr; /* also, a back pointer to this node's hash
|
||||
* chain is kept, in case the node is the head
|
||||
* of the chain and gets deleted. */
|
||||
enum node_type type; /* type of special token */
|
||||
int length; /* length of token, for quick comparison */
|
||||
unsigned char *name; /* the actual name */
|
||||
union hashval value; /* pointer to expansion, or whatever */
|
||||
};
|
||||
|
||||
typedef struct hashnode HASHNODE;
|
||||
|
||||
/* Some definitions for the hash table. The hash function MUST be
|
||||
computed as shown in hashf () below. That is because the rescan
|
||||
loop computes the hash value `on the fly' for most tokens,
|
||||
in order to avoid the overhead of a lot of procedure calls to
|
||||
the hashf () function. Hashf () only exists for the sake of
|
||||
politeness, for use when speed isn't so important. */
|
||||
* computed as shown in hashf () below. That is because the rescan
|
||||
* loop computes the hash value `on the fly' for most tokens,
|
||||
* in order to avoid the overhead of a lot of procedure calls to
|
||||
* the hashf () function. Hashf () only exists for the sake of
|
||||
* politeness, for use when speed isn't so important. */
|
||||
|
||||
#define HASHSIZE 1403
|
||||
#define HASHSTEP(old, c) ((old << 2) + c)
|
||||
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
|
||||
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
|
||||
|
||||
extern HASHNODE* install PARAMS ((unsigned char*,int,enum node_type, int,char*,int));
|
||||
extern HASHNODE *install PARAMS((unsigned char *, int, enum node_type, int, char *, int));
|
||||
|
|
436
epp/cpplib.c
436
epp/cpplib.c
File diff suppressed because it is too large
Load Diff
861
epp/cpplib.h
861
epp/cpplib.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue