Commit 562a5c27 by Neil Booth Committed by Neil Booth

cppexp.c (struct op, [...]): Replace U_CHAR with uchar.

	* cppexp.c (struct op, parse_number): Replace U_CHAR with uchar.
	* cppfiles.c (read_include_file): Similarly.
	* cpphash.h (DSC, U_CHAR, ustrcmp, ustrncmp, ustrlen,
	uxstrdup ustrchr, ufputs): Similarly.
	* cppinit.c (TRIGRAPH_MAP, cpp_destroy): Similarly.
	* cpplex.c (parse_slow, unescaped_terminator_p, save_comment,
	cpp_ideq, parse_identifier, parse_number): Similarly.
	* cpplib.c (struct directive, dequote_string, D, run_directive,
	cpp_push_buffer): Similarly.
	* cppmacro.c (new_string_token, builtin_macro, cpp_quote_string,
	_cpp_create_definition, check_trad_stringification,
	cpp_macro_definition): Similarly.

From-SVN: r52587
parent 9ac3b1be
2002-04-21 Neil Booth <neil@daikokuya.demon.co.uk> 2002-04-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cppexp.c (struct op, parse_number): Replace U_CHAR with uchar.
* cppfiles.c (read_include_file): Similarly.
* cpphash.h (DSC, U_CHAR, ustrcmp, ustrncmp, ustrlen,
uxstrdup ustrchr, ufputs): Similarly.
* cppinit.c (TRIGRAPH_MAP, cpp_destroy): Similarly.
* cpplex.c (parse_slow, unescaped_terminator_p, save_comment,
cpp_ideq, parse_identifier, parse_number): Similarly.
* cpplib.c (struct directive, dequote_string, D, run_directive,
cpp_push_buffer): Similarly.
* cppmacro.c (new_string_token, builtin_macro, cpp_quote_string,
_cpp_create_definition, check_trad_stringification,
cpp_macro_definition): Similarly.
2002-04-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cppmacro.c (funlike_invocation_p): Don't step back * cppmacro.c (funlike_invocation_p): Don't step back
over CPP_EOF. over CPP_EOF.
......
...@@ -42,9 +42,9 @@ static const unsigned char *op_as_text PARAMS ((cpp_reader *, enum cpp_ttype)); ...@@ -42,9 +42,9 @@ static const unsigned char *op_as_text PARAMS ((cpp_reader *, enum cpp_ttype));
struct op struct op
{ {
enum cpp_ttype op; enum cpp_ttype op;
U_CHAR prio; /* Priority of op. */ uchar prio; /* Priority of op. */
U_CHAR flags; uchar flags;
U_CHAR unsignedp; /* True if value should be treated as unsigned. */ uchar unsignedp; /* True if value should be treated as unsigned. */
HOST_WIDEST_INT value; /* The value logically "right" of op. */ HOST_WIDEST_INT value; /* The value logically "right" of op. */
}; };
...@@ -91,9 +91,9 @@ parse_number (pfile, tok) ...@@ -91,9 +91,9 @@ parse_number (pfile, tok)
const cpp_token *tok; const cpp_token *tok;
{ {
struct op op; struct op op;
const U_CHAR *start = tok->val.str.text; const uchar *start = tok->val.str.text;
const U_CHAR *end = start + tok->val.str.len; const uchar *end = start + tok->val.str.len;
const U_CHAR *p = start; const uchar *p = start;
int c = 0, i, nsuff; int c = 0, i, nsuff;
unsigned HOST_WIDEST_INT n = 0, nd, MAX_over_base; unsigned HOST_WIDEST_INT n = 0, nd, MAX_over_base;
int base = 10; int base = 10;
......
...@@ -375,7 +375,7 @@ read_include_file (pfile, inc) ...@@ -375,7 +375,7 @@ read_include_file (pfile, inc)
struct include_file *inc; struct include_file *inc;
{ {
ssize_t size, offset, count; ssize_t size, offset, count;
U_CHAR *buf; uchar *buf;
#if MMAP_THRESHOLD #if MMAP_THRESHOLD
static int pagesize = -1; static int pagesize = -1;
#endif #endif
...@@ -404,15 +404,15 @@ read_include_file (pfile, inc) ...@@ -404,15 +404,15 @@ read_include_file (pfile, inc)
if (SHOULD_MMAP (size, pagesize)) if (SHOULD_MMAP (size, pagesize))
{ {
buf = (U_CHAR *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd, 0); buf = (uchar *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd, 0);
if (buf == (U_CHAR *)-1) if (buf == (uchar *)-1)
goto perror_fail; goto perror_fail;
inc->mapped = 1; inc->mapped = 1;
} }
else else
#endif #endif
{ {
buf = (U_CHAR *) xmalloc (size + 1); buf = (uchar *) xmalloc (size + 1);
offset = 0; offset = 0;
while (offset < size) while (offset < size)
{ {
...@@ -447,7 +447,7 @@ read_include_file (pfile, inc) ...@@ -447,7 +447,7 @@ read_include_file (pfile, inc)
bigger than the majority of C source files. */ bigger than the majority of C source files. */
size = 8 * 1024; size = 8 * 1024;
buf = (U_CHAR *) xmalloc (size + 1); buf = (uchar *) xmalloc (size + 1);
offset = 0; offset = 0;
while ((count = read (inc->fd, buf + offset, size - offset)) > 0) while ((count = read (inc->fd, buf + offset, size - offset)) > 0)
{ {
......
...@@ -411,7 +411,7 @@ extern void _cpp_do_file_change PARAMS ((cpp_reader *, enum lc_reason, ...@@ -411,7 +411,7 @@ extern void _cpp_do_file_change PARAMS ((cpp_reader *, enum lc_reason,
extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); extern void _cpp_pop_buffer PARAMS ((cpp_reader *));
/* Utility routines and macros. */ /* Utility routines and macros. */
#define DSC(str) (const U_CHAR *)str, sizeof str - 1 #define DSC(str) (const uchar *)str, sizeof str - 1
#define xnew(T) (T *) xmalloc (sizeof(T)) #define xnew(T) (T *) xmalloc (sizeof(T))
#define xcnew(T) (T *) xcalloc (1, sizeof(T)) #define xcnew(T) (T *) xcalloc (1, sizeof(T))
#define xnewvec(T, N) (T *) xmalloc (sizeof(T) * (N)) #define xnewvec(T, N) (T *) xmalloc (sizeof(T) * (N))
...@@ -420,27 +420,27 @@ extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); ...@@ -420,27 +420,27 @@ extern void _cpp_pop_buffer PARAMS ((cpp_reader *));
/* These are inline functions instead of macros so we can get type /* These are inline functions instead of macros so we can get type
checking. */ checking. */
typedef unsigned char U_CHAR; typedef unsigned char uchar;
#define U (const U_CHAR *) /* Intended use: U"string" */ #define U (const uchar *) /* Intended use: U"string" */
static inline int ustrcmp PARAMS ((const U_CHAR *, const U_CHAR *)); static inline int ustrcmp PARAMS ((const uchar *, const uchar *));
static inline int ustrncmp PARAMS ((const U_CHAR *, const U_CHAR *, static inline int ustrncmp PARAMS ((const uchar *, const uchar *,
size_t)); size_t));
static inline size_t ustrlen PARAMS ((const U_CHAR *)); static inline size_t ustrlen PARAMS ((const uchar *));
static inline U_CHAR *uxstrdup PARAMS ((const U_CHAR *)); static inline uchar *uxstrdup PARAMS ((const uchar *));
static inline U_CHAR *ustrchr PARAMS ((const U_CHAR *, int)); static inline uchar *ustrchr PARAMS ((const uchar *, int));
static inline int ufputs PARAMS ((const U_CHAR *, FILE *)); static inline int ufputs PARAMS ((const uchar *, FILE *));
static inline int static inline int
ustrcmp (s1, s2) ustrcmp (s1, s2)
const U_CHAR *s1, *s2; const uchar *s1, *s2;
{ {
return strcmp ((const char *)s1, (const char *)s2); return strcmp ((const char *)s1, (const char *)s2);
} }
static inline int static inline int
ustrncmp (s1, s2, n) ustrncmp (s1, s2, n)
const U_CHAR *s1, *s2; const uchar *s1, *s2;
size_t n; size_t n;
{ {
return strncmp ((const char *)s1, (const char *)s2, n); return strncmp ((const char *)s1, (const char *)s2, n);
...@@ -448,29 +448,29 @@ ustrncmp (s1, s2, n) ...@@ -448,29 +448,29 @@ ustrncmp (s1, s2, n)
static inline size_t static inline size_t
ustrlen (s1) ustrlen (s1)
const U_CHAR *s1; const uchar *s1;
{ {
return strlen ((const char *)s1); return strlen ((const char *)s1);
} }
static inline U_CHAR * static inline uchar *
uxstrdup (s1) uxstrdup (s1)
const U_CHAR *s1; const uchar *s1;
{ {
return (U_CHAR *) xstrdup ((const char *)s1); return (uchar *) xstrdup ((const char *)s1);
} }
static inline U_CHAR * static inline uchar *
ustrchr (s1, c) ustrchr (s1, c)
const U_CHAR *s1; const uchar *s1;
int c; int c;
{ {
return (U_CHAR *) strchr ((const char *)s1, c); return (uchar *) strchr ((const char *)s1, c);
} }
static inline int static inline int
ufputs (s, f) ufputs (s, f)
const U_CHAR *s; const uchar *s;
FILE *f; FILE *f;
{ {
return fputs ((const char *)s, f); return fputs ((const char *)s, f);
......
...@@ -130,14 +130,14 @@ enum { BRACKET = 0, SYSTEM, AFTER }; ...@@ -130,14 +130,14 @@ enum { BRACKET = 0, SYSTEM, AFTER };
#define init_trigraph_map() /* Nothing. */ #define init_trigraph_map() /* Nothing. */
#define TRIGRAPH_MAP \ #define TRIGRAPH_MAP \
__extension__ const U_CHAR _cpp_trigraph_map[UCHAR_MAX + 1] = { __extension__ const uchar _cpp_trigraph_map[UCHAR_MAX + 1] = {
#define END }; #define END };
#define s(p, v) [p] = v, #define s(p, v) [p] = v,
#else #else
#define TRIGRAPH_MAP U_CHAR _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \ #define TRIGRAPH_MAP uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \
static void init_trigraph_map PARAMS ((void)) { \ static void init_trigraph_map PARAMS ((void)) { \
unsigned char *x = _cpp_trigraph_map; unsigned char *x = _cpp_trigraph_map;
...@@ -619,7 +619,7 @@ cpp_destroy (pfile) ...@@ -619,7 +619,7 @@ cpp_destroy (pfile)
Also, macros with CPLUS set in the flags field are entered only for C++. */ Also, macros with CPLUS set in the flags field are entered only for C++. */
struct builtin struct builtin
{ {
const U_CHAR *name; const uchar *name;
const char *value; const char *value;
unsigned char builtin; unsigned char builtin;
unsigned char operator; unsigned char operator;
......
...@@ -77,13 +77,13 @@ static int skip_line_comment PARAMS ((cpp_reader *)); ...@@ -77,13 +77,13 @@ static int skip_line_comment PARAMS ((cpp_reader *));
static void adjust_column PARAMS ((cpp_reader *)); static void adjust_column PARAMS ((cpp_reader *));
static int skip_whitespace PARAMS ((cpp_reader *, cppchar_t)); static int skip_whitespace PARAMS ((cpp_reader *, cppchar_t));
static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *)); static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *));
static U_CHAR *parse_slow PARAMS ((cpp_reader *, const U_CHAR *, int, static uchar *parse_slow PARAMS ((cpp_reader *, const uchar *, int,
unsigned int *)); unsigned int *));
static void parse_number PARAMS ((cpp_reader *, cpp_string *, int)); static void parse_number PARAMS ((cpp_reader *, cpp_string *, int));
static int unescaped_terminator_p PARAMS ((cpp_reader *, const U_CHAR *)); static int unescaped_terminator_p PARAMS ((cpp_reader *, const uchar *));
static void parse_string PARAMS ((cpp_reader *, cpp_token *, cppchar_t)); static void parse_string PARAMS ((cpp_reader *, cpp_token *, cppchar_t));
static bool trigraph_p PARAMS ((cpp_reader *)); static bool trigraph_p PARAMS ((cpp_reader *));
static void save_comment PARAMS ((cpp_reader *, cpp_token *, const U_CHAR *, static void save_comment PARAMS ((cpp_reader *, cpp_token *, const uchar *,
cppchar_t)); cppchar_t));
static int name_p PARAMS ((cpp_reader *, const cpp_string *)); static int name_p PARAMS ((cpp_reader *, const cpp_string *));
static int maybe_read_ucs PARAMS ((cpp_reader *, const unsigned char **, static int maybe_read_ucs PARAMS ((cpp_reader *, const unsigned char **,
...@@ -105,7 +105,7 @@ cpp_ideq (token, string) ...@@ -105,7 +105,7 @@ cpp_ideq (token, string)
if (token->type != CPP_NAME) if (token->type != CPP_NAME)
return 0; return 0;
return !ustrcmp (NODE_NAME (token->val.node), (const U_CHAR *) string); return !ustrcmp (NODE_NAME (token->val.node), (const uchar *) string);
} }
/* Call when meeting a newline, assumed to be in buffer->cur[-1]. /* Call when meeting a newline, assumed to be in buffer->cur[-1].
...@@ -421,7 +421,7 @@ parse_identifier (pfile) ...@@ -421,7 +421,7 @@ parse_identifier (pfile)
cpp_reader *pfile; cpp_reader *pfile;
{ {
cpp_hashnode *result; cpp_hashnode *result;
const U_CHAR *cur, *base; const uchar *cur, *base;
/* Fast-path loop. Skim over a normal identifier. /* Fast-path loop. Skim over a normal identifier.
N.B. ISIDNUM does not include $. */ N.B. ISIDNUM does not include $. */
...@@ -473,15 +473,15 @@ parse_identifier (pfile) ...@@ -473,15 +473,15 @@ parse_identifier (pfile)
1 if it's a number, and 2 if it has a leading period. Returns a 1 if it's a number, and 2 if it has a leading period. Returns a
pointer to the token's NUL-terminated spelling in permanent pointer to the token's NUL-terminated spelling in permanent
storage, and sets PLEN to its length. */ storage, and sets PLEN to its length. */
static U_CHAR * static uchar *
parse_slow (pfile, cur, number_p, plen) parse_slow (pfile, cur, number_p, plen)
cpp_reader *pfile; cpp_reader *pfile;
const U_CHAR *cur; const uchar *cur;
int number_p; int number_p;
unsigned int *plen; unsigned int *plen;
{ {
cpp_buffer *buffer = pfile->buffer; cpp_buffer *buffer = pfile->buffer;
const U_CHAR *base = buffer->cur - 1; const uchar *base = buffer->cur - 1;
struct obstack *stack = &pfile->hash_table->stack; struct obstack *stack = &pfile->hash_table->stack;
unsigned int c, prevc, saw_dollar = 0; unsigned int c, prevc, saw_dollar = 0;
...@@ -550,7 +550,7 @@ parse_number (pfile, number, leading_period) ...@@ -550,7 +550,7 @@ parse_number (pfile, number, leading_period)
cpp_string *number; cpp_string *number;
int leading_period; int leading_period;
{ {
const U_CHAR *cur; const uchar *cur;
/* Fast-path loop. Skim over a normal number. /* Fast-path loop. Skim over a normal number.
N.B. ISIDNUM does not include $. */ N.B. ISIDNUM does not include $. */
...@@ -563,8 +563,8 @@ parse_number (pfile, number, leading_period) ...@@ -563,8 +563,8 @@ parse_number (pfile, number, leading_period)
number->text = parse_slow (pfile, cur, 1 + leading_period, &number->len); number->text = parse_slow (pfile, cur, 1 + leading_period, &number->len);
else else
{ {
const U_CHAR *base = pfile->buffer->cur - 1; const uchar *base = pfile->buffer->cur - 1;
U_CHAR *dest; uchar *dest;
number->len = cur - base + leading_period; number->len = cur - base + leading_period;
dest = _cpp_unaligned_alloc (pfile, number->len + 1); dest = _cpp_unaligned_alloc (pfile, number->len + 1);
......
...@@ -82,7 +82,7 @@ typedef struct directive directive; ...@@ -82,7 +82,7 @@ typedef struct directive directive;
struct directive struct directive
{ {
directive_handler handler; /* Function to handle directive. */ directive_handler handler; /* Function to handle directive. */
const U_CHAR *name; /* Name of directive. */ const uchar *name; /* Name of directive. */
unsigned short length; /* Length of name. */ unsigned short length; /* Length of name. */
unsigned char origin; /* Origin of directive. */ unsigned char origin; /* Origin of directive. */
unsigned char flags; /* Flags describing this directive. */ unsigned char flags; /* Flags describing this directive. */
...@@ -103,9 +103,9 @@ static const cpp_token *parse_include PARAMS ((cpp_reader *)); ...@@ -103,9 +103,9 @@ static const cpp_token *parse_include PARAMS ((cpp_reader *));
static void push_conditional PARAMS ((cpp_reader *, int, int, static void push_conditional PARAMS ((cpp_reader *, int, int,
const cpp_hashnode *)); const cpp_hashnode *));
static unsigned int read_flag PARAMS ((cpp_reader *, unsigned int)); static unsigned int read_flag PARAMS ((cpp_reader *, unsigned int));
static U_CHAR *dequote_string PARAMS ((cpp_reader *, const U_CHAR *, static uchar *dequote_string PARAMS ((cpp_reader *, const uchar *,
unsigned int)); unsigned int));
static int strtoul_for_line PARAMS ((const U_CHAR *, unsigned int, static int strtoul_for_line PARAMS ((const uchar *, unsigned int,
unsigned long *)); unsigned long *));
static void do_diagnostic PARAMS ((cpp_reader *, int, int)); static void do_diagnostic PARAMS ((cpp_reader *, int, int));
static cpp_hashnode *lex_macro_node PARAMS ((cpp_reader *)); static cpp_hashnode *lex_macro_node PARAMS ((cpp_reader *));
...@@ -185,7 +185,7 @@ enum ...@@ -185,7 +185,7 @@ enum
/* Don't invoke CONCAT2 with any whitespace or K&R cc will fail. */ /* Don't invoke CONCAT2 with any whitespace or K&R cc will fail. */
#define D(name, t, origin, flags) \ #define D(name, t, origin, flags) \
{ CONCAT2(do_,name), (const U_CHAR *) STRINGX(name), \ { CONCAT2(do_,name), (const uchar *) STRINGX(name), \
sizeof STRINGX(name) - 1, origin, flags }, sizeof STRINGX(name) - 1, origin, flags },
static const directive dtable[] = static const directive dtable[] =
{ {
...@@ -429,7 +429,7 @@ run_directive (pfile, dir_no, buf, count) ...@@ -429,7 +429,7 @@ run_directive (pfile, dir_no, buf, count)
const char *buf; const char *buf;
size_t count; size_t count;
{ {
cpp_push_buffer (pfile, (const U_CHAR *) buf, count, cpp_push_buffer (pfile, (const uchar *) buf, count,
/* from_stage3 */ true, 1); /* from_stage3 */ true, 1);
start_directive (pfile); start_directive (pfile);
/* We don't want a leading # to be interpreted as a directive. */ /* We don't want a leading # to be interpreted as a directive. */
...@@ -717,15 +717,15 @@ read_flag (pfile, last) ...@@ -717,15 +717,15 @@ read_flag (pfile, last)
/* Subroutine of do_line and do_linemarker. Returns a version of STR /* Subroutine of do_line and do_linemarker. Returns a version of STR
which has a NUL terminator and all escape sequences converted to which has a NUL terminator and all escape sequences converted to
their equivalents. Temporary, hopefully. */ their equivalents. Temporary, hopefully. */
static U_CHAR * static uchar *
dequote_string (pfile, str, len) dequote_string (pfile, str, len)
cpp_reader *pfile; cpp_reader *pfile;
const U_CHAR *str; const uchar *str;
unsigned int len; unsigned int len;
{ {
U_CHAR *result = _cpp_unaligned_alloc (pfile, len + 1); uchar *result = _cpp_unaligned_alloc (pfile, len + 1);
U_CHAR *dst = result; uchar *dst = result;
const U_CHAR *limit = str + len; const uchar *limit = str + len;
unsigned int c; unsigned int c;
unsigned HOST_WIDE_INT mask; unsigned HOST_WIDE_INT mask;
...@@ -742,7 +742,7 @@ dequote_string (pfile, str, len) ...@@ -742,7 +742,7 @@ dequote_string (pfile, str, len)
if (c != '\\') if (c != '\\')
*dst++ = c; *dst++ = c;
else else
*dst++ = cpp_parse_escape (pfile, (const U_CHAR **)&str, limit, mask); *dst++ = cpp_parse_escape (pfile, (const uchar **)&str, limit, mask);
} }
*dst++ = '\0'; *dst++ = '\0';
return result; return result;
...@@ -753,12 +753,12 @@ dequote_string (pfile, str, len) ...@@ -753,12 +753,12 @@ dequote_string (pfile, str, len)
number was well-formed, 1 if not. Temporary, hopefully. */ number was well-formed, 1 if not. Temporary, hopefully. */
static int static int
strtoul_for_line (str, len, nump) strtoul_for_line (str, len, nump)
const U_CHAR *str; const uchar *str;
unsigned int len; unsigned int len;
unsigned long *nump; unsigned long *nump;
{ {
unsigned long reg = 0; unsigned long reg = 0;
U_CHAR c; uchar c;
while (len--) while (len--)
{ {
c = *str++; c = *str++;
...@@ -1878,7 +1878,7 @@ cpp_set_callbacks (pfile, cb) ...@@ -1878,7 +1878,7 @@ cpp_set_callbacks (pfile, cb)
cpp_buffer * cpp_buffer *
cpp_push_buffer (pfile, buffer, len, from_stage3, return_at_eof) cpp_push_buffer (pfile, buffer, len, from_stage3, return_at_eof)
cpp_reader *pfile; cpp_reader *pfile;
const U_CHAR *buffer; const uchar *buffer;
size_t len; size_t len;
int from_stage3; int from_stage3;
int return_at_eof; int return_at_eof;
......
...@@ -64,7 +64,7 @@ static cpp_context *next_context PARAMS ((cpp_reader *)); ...@@ -64,7 +64,7 @@ static cpp_context *next_context PARAMS ((cpp_reader *));
static const cpp_token *padding_token static const cpp_token *padding_token
PARAMS ((cpp_reader *, const cpp_token *)); PARAMS ((cpp_reader *, const cpp_token *));
static void expand_arg PARAMS ((cpp_reader *, macro_arg *)); static void expand_arg PARAMS ((cpp_reader *, macro_arg *));
static const cpp_token *new_string_token PARAMS ((cpp_reader *, U_CHAR *, static const cpp_token *new_string_token PARAMS ((cpp_reader *, uchar *,
unsigned int)); unsigned int));
static const cpp_token *new_number_token PARAMS ((cpp_reader *, unsigned int)); static const cpp_token *new_number_token PARAMS ((cpp_reader *, unsigned int));
static const cpp_token *stringify_arg PARAMS ((cpp_reader *, macro_arg *)); static const cpp_token *stringify_arg PARAMS ((cpp_reader *, macro_arg *));
...@@ -152,7 +152,7 @@ builtin_macro (pfile, node) ...@@ -152,7 +152,7 @@ builtin_macro (pfile, node)
{ {
unsigned int len; unsigned int len;
const char *name; const char *name;
U_CHAR *buf; uchar *buf;
const struct line_map *map = pfile->map; const struct line_map *map = pfile->map;
if (node->value.builtin == BT_BASE_FILE) if (node->value.builtin == BT_BASE_FILE)
...@@ -244,15 +244,15 @@ builtin_macro (pfile, node) ...@@ -244,15 +244,15 @@ builtin_macro (pfile, node)
backslashes and double quotes. Non-printable characters are backslashes and double quotes. Non-printable characters are
converted to octal. DEST must be of sufficient size. Returns converted to octal. DEST must be of sufficient size. Returns
a pointer to the end of the string. */ a pointer to the end of the string. */
U_CHAR * uchar *
cpp_quote_string (dest, src, len) cpp_quote_string (dest, src, len)
U_CHAR *dest; uchar *dest;
const U_CHAR *src; const uchar *src;
unsigned int len; unsigned int len;
{ {
while (len--) while (len--)
{ {
U_CHAR c = *src++; uchar c = *src++;
if (c == '\\' || c == '"') if (c == '\\' || c == '"')
{ {
...@@ -1340,7 +1340,7 @@ _cpp_create_definition (pfile, node) ...@@ -1340,7 +1340,7 @@ _cpp_create_definition (pfile, node)
goto cleanup2; goto cleanup2;
/* Success. Commit the parameter array. */ /* Success. Commit the parameter array. */
BUFF_FRONT (pfile->a_buff) = (U_CHAR *) &macro->params[macro->paramc]; BUFF_FRONT (pfile->a_buff) = (uchar *) &macro->params[macro->paramc];
macro->fun_like = 1; macro->fun_like = 1;
} }
else if (ctoken->type != CPP_EOF && !(ctoken->flags & PREV_WHITE)) else if (ctoken->type != CPP_EOF && !(ctoken->flags & PREV_WHITE))
...@@ -1416,7 +1416,7 @@ _cpp_create_definition (pfile, node) ...@@ -1416,7 +1416,7 @@ _cpp_create_definition (pfile, node)
macro->expansion[0].flags &= ~PREV_WHITE; macro->expansion[0].flags &= ~PREV_WHITE;
/* Commit the memory. */ /* Commit the memory. */
BUFF_FRONT (pfile->a_buff) = (U_CHAR *) &macro->expansion[macro->count]; BUFF_FRONT (pfile->a_buff) = (uchar *) &macro->expansion[macro->count];
/* Implement the macro-defined-to-itself optimisation. */ /* Implement the macro-defined-to-itself optimisation. */
if (macro->count == 1 && !macro->fun_like if (macro->count == 1 && !macro->fun_like
...@@ -1474,7 +1474,7 @@ check_trad_stringification (pfile, macro, string) ...@@ -1474,7 +1474,7 @@ check_trad_stringification (pfile, macro, string)
const cpp_string *string; const cpp_string *string;
{ {
unsigned int i, len; unsigned int i, len;
const U_CHAR *p, *q, *limit = string->text + string->len; const uchar *p, *q, *limit = string->text + string->len;
/* Loop over the string. */ /* Loop over the string. */
for (p = string->text; p < limit; p = q) for (p = string->text; p < limit; p = q)
...@@ -1555,7 +1555,7 @@ cpp_macro_definition (pfile, node) ...@@ -1555,7 +1555,7 @@ cpp_macro_definition (pfile, node)
if (len > pfile->macro_buffer_len) if (len > pfile->macro_buffer_len)
{ {
pfile->macro_buffer = (U_CHAR *) xrealloc (pfile->macro_buffer, len); pfile->macro_buffer = (uchar *) xrealloc (pfile->macro_buffer, len);
pfile->macro_buffer_len = len; pfile->macro_buffer_len = len;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment