+Thu Oct 15 18:51:12 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Prototype mkstemps() when IN_GCC.
+
+ * cplus-dem.c (consume_count): Cast argument of ctype macro to
+ `unsigned char'.
+ (cplus_demangle_opname): Cast the result of `strlen' to (int) when
+ comparing against one.
+ (cplus_mangle_opname): Likewise.
+ (demangle_integral_value): Cast argument of ctype macro to
+ `unsigned char'.
+ (demangle_template_value_parm): Likewise.
+ (demangle_template): Initialize variable `bindex'. Cast the
+ result of `strlen' to (int) when comparing against one. Remove
+ unused variable `start_of_value_parm'.
+ (demangle_class_name): Cast the result of `strlen' to (int) when
+ comparing against one.
+ (demangle_prefix): Cast argument of ctype macro to `unsigned char'.
+ (gnu_special): Likewise. Cast the result of `strlen' to (int)
+ when comparing against one.
+ (demangle_qualified): Cast argument of ctype macro to `unsigned char'.
+ (get_count): Likewise.
+ (do_type): Likewise. Cast the result of `strlen' to (int) when
+ comparing against one.
+ (demangle_fund_type): Cast argument of ctype macro to `unsigned char'.
+ (demangle_function_name): Cast the result of `strlen' to (int)
+ when comparing against one.
+
+ * mkstemp.c (mkstemps): Cast variable `len' to (int) when
+ comparing against one.
+
Tue Oct 13 23:51:51 1998 Jeffrey A Law (law@cygnus.com)
* mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
{
int count = 0;
- while (isdigit (**type))
+ while (isdigit ((unsigned char)**type))
{
count *= 10;
count += **type - '0';
if (**mangled == '_')
{
(*mangled)++;
- if (!isdigit (**mangled))
+ if (!isdigit ((unsigned char)**mangled))
return -1;
idx = consume_count (mangled);
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
len1 = len - 10;
- if (strlen (optable[i].in) == len1
+ if ((int) strlen (optable[i].in) == len1
&& memcmp (optable[i].in, opname + 10, len1) == 0)
{
strcat (result, "operator");
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
len1 = len - 3;
- if (strlen (optable[i].in) == len1
+ if ((int) strlen (optable[i].in) == len1
&& memcmp (optable[i].in, opname + 3, len1) == 0)
{
strcat (result, "operator");
len = strlen (opname);
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
- if (strlen (optable[i].out) == len
+ if ((int) strlen (optable[i].out) == len
&& (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI)
&& memcmp (optable[i].out, opname, len) == 0)
return optable[i].in;
string_appendn (s, "-", 1);
(*mangled)++;
}
- while (isdigit (**mangled))
+ while (isdigit ((unsigned char)**mangled))
{
string_appendn (s, *mangled, 1);
(*mangled)++;
string_appendn (s, "-", 1);
(*mangled)++;
}
- while (isdigit (**mangled))
+ while (isdigit ((unsigned char)**mangled))
{
string_appendn (s, *mangled, 1);
(*mangled)++;
{
string_appendn (s, ".", 1);
(*mangled)++;
- while (isdigit (**mangled))
+ while (isdigit ((unsigned char)**mangled))
{
string_appendn (s, *mangled, 1);
(*mangled)++;
{
string_appendn (s, "e", 1);
(*mangled)++;
- while (isdigit (**mangled))
+ while (isdigit ((unsigned char)**mangled))
{
string_appendn (s, *mangled, 1);
(*mangled)++;
int success = 0;
const char *start;
string temp;
- int bindex;
+ int bindex = 0;
(*mangled)++;
if (is_type)
}
else
{
- if ((r = consume_count (mangled)) == 0 || strlen (*mangled) < r)
+ if ((r = consume_count (mangled)) == 0
+ || (int) strlen (*mangled) < r)
{
return (0);
}
success = demangle_template_template_parm (work, mangled, tname);
if (success
- && (r2 = consume_count (mangled)) > 0 && strlen (*mangled) >= r2)
+ && (r2 = consume_count (mangled)) > 0
+ && (int) strlen (*mangled) >= r2)
{
string_append (tname, " ");
string_appendn (tname, *mangled, r2);
{
string param;
string* s;
- const char* start_of_value_parm = *mangled;
/* otherwise, value parameter */
int success = 0;
n = consume_count (mangled);
- if (strlen (*mangled) >= n)
+ if ((int) strlen (*mangled) >= n)
{
demangle_arm_pt (work, mangled, n, declp);
success = 1;
}
else if (work -> static_type)
{
- if (!isdigit (scan[0]) && (scan[0] != 't'))
+ if (!isdigit ((unsigned char)scan[0]) && (scan[0] != 't'))
{
success = 0;
}
}
else if ((scan == *mangled)
- && (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't')
- || (scan[2] == 'K') || (scan[2] == 'H')))
+ && (isdigit ((unsigned char)scan[2]) || (scan[2] == 'Q')
+ || (scan[2] == 't') || (scan[2] == 'K') || (scan[2] == 'H')))
{
/* The ARM says nothing about the mangling of local variables.
But cfront mangles local variables by prepending __<nesting_level>
to them. As an extension to ARM demangling we handle this case. */
- if ((LUCID_DEMANGLING || ARM_DEMANGLING) && isdigit (scan[2]))
+ if ((LUCID_DEMANGLING || ARM_DEMANGLING)
+ && isdigit ((unsigned char)scan[2]))
{
*mangled = scan + 2;
consume_count (mangled);
*mangled = scan + 2;
}
}
- else if ((scan == *mangled) && !isdigit (scan[2]) && (scan[2] != 't'))
+ else if ((scan == *mangled) && !isdigit ((unsigned char)scan[2])
+ && (scan[2] != 't'))
{
/* Mangled name starts with "__". Skip over any leading '_' characters,
then find the next "__" that separates the prefix from the signature.
1);
break;
default:
- if (isdigit(*mangled[0]))
+ if (isdigit((unsigned char)*mangled[0]))
{
n = consume_count(mangled);
/* We may be seeing a too-large size, or else a
".<digits>" indicating a static local symbol. In
any case, declare victory and move on; *don't* try
to use n to allocate. */
- if (n > strlen (*mangled))
+ if (n > (int) strlen (*mangled))
{
success = 1;
break;
by an underscore. */
p = *mangled + 2;
qualifiers = atoi (p);
- if (!isdigit (*p) || *p == '0')
+ if (!isdigit ((unsigned char)*p) || *p == '0')
success = 0;
/* Skip the digits. */
- while (isdigit (*p))
+ while (isdigit ((unsigned char)*p))
++p;
if (*p != '_')
const char *p;
int n;
- if (!isdigit (**type))
+ if (!isdigit ((unsigned char)**type))
{
return (0);
}
{
*count = **type - '0';
(*type)++;
- if (isdigit (**type))
+ if (isdigit ((unsigned char)**type))
{
p = *type;
n = *count;
n += *p - '0';
p++;
}
- while (isdigit (*p));
+ while (isdigit ((unsigned char)*p));
if (*p == '_')
{
*type = p + 1;
member = **mangled == 'M';
(*mangled)++;
- if (!isdigit (**mangled) && **mangled != 't')
+ if (!isdigit ((unsigned char)**mangled) && **mangled != 't')
{
success = 0;
break;
string_append (&decl, ")");
string_prepend (&decl, SCOPE_STRING (work));
- if (isdigit (**mangled))
+ if (isdigit ((unsigned char)**mangled))
{
n = consume_count (mangled);
- if (strlen (*mangled) < n)
+ if ((int) strlen (*mangled) < n)
{
success = 0;
break;
break;
case 'G':
(*mangled)++;
- if (!isdigit (**mangled))
+ if (!isdigit ((unsigned char)**mangled))
{
success = 0;
break;
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
int len = declp->p - declp->b - 10;
- if (strlen (optable[i].in) == len
+ if ((int) strlen (optable[i].in) == len
&& memcmp (optable[i].in, declp->b + 10, len) == 0)
{
string_clear (declp);
for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
{
int len = declp->p - declp->b - 3;
- if (strlen (optable[i].in) == len
+ if ((int) strlen (optable[i].in) == len
&& memcmp (optable[i].in, declp->b + 3, len) == 0)
{
string_clear (declp);