l10nflist.c (_nl_normalize_codeset): Cast argument of ctype function to `unsigned char'.

* l10nflist.c (_nl_normalize_codeset): Cast argument of ctype
	function to `unsigned char'.
	* loadmsgcat.c (_nl_load_domain): Likewise.
	* localealias.c (read_alias_file, alias_compare): Likewise.
	* localcharset.c: Include "gettextP.h".
	* plural.y (__attribute__): Define.
	(yyerror): Mark parameter with __attribute__ ((__unused__)).
	* plural.c: Regenerate.

From-SVN: r46743
This commit is contained in:
Kaveh R. Ghazi 2001-11-03 21:51:46 +00:00 committed by Kaveh Ghazi
parent 2e80c17d6d
commit e6313aee75
7 changed files with 33 additions and 14 deletions

View File

@ -1,3 +1,14 @@
2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* l10nflist.c (_nl_normalize_codeset): Cast argument of ctype
function to `unsigned char'.
* loadmsgcat.c (_nl_load_domain): Likewise.
* localealias.c (read_alias_file, alias_compare): Likewise.
* localcharset.c: Include "gettextP.h".
* plural.y (__attribute__): Define.
(yyerror): Mark parameter with __attribute__ ((__unused__)).
* plural.c: Regenerate.
2001-10-24 Zack Weinberg <zack@codesourcery.com> 2001-10-24 Zack Weinberg <zack@codesourcery.com>
* loadmsgcat.c (INTTYPE_SIGNED, INTTYPE_MINIMUM, * loadmsgcat.c (INTTYPE_SIGNED, INTTYPE_MINIMUM,

View File

@ -356,11 +356,11 @@ _nl_normalize_codeset (codeset, name_len)
size_t cnt; size_t cnt;
for (cnt = 0; cnt < name_len; ++cnt) for (cnt = 0; cnt < name_len; ++cnt)
if (isalnum (codeset[cnt])) if (isalnum ((unsigned char)codeset[cnt]))
{ {
++len; ++len;
if (isalpha (codeset[cnt])) if (isalpha ((unsigned char)codeset[cnt]))
only_digit = 0; only_digit = 0;
} }
@ -374,9 +374,9 @@ _nl_normalize_codeset (codeset, name_len)
wp = retval; wp = retval;
for (cnt = 0; cnt < name_len; ++cnt) for (cnt = 0; cnt < name_len; ++cnt)
if (isalpha (codeset[cnt])) if (isalpha ((unsigned char)codeset[cnt]))
*wp++ = tolower (codeset[cnt]); *wp++ = tolower ((unsigned char)codeset[cnt]);
else if (isdigit (codeset[cnt])) else if (isdigit ((unsigned char)codeset[cnt]))
*wp++ = codeset[cnt]; *wp++ = codeset[cnt];
*wp = '\0'; *wp = '\0';

View File

@ -521,7 +521,7 @@ _nl_load_domain (domain_file, domainbinding)
struct parse_args args; struct parse_args args;
nplurals += 9; nplurals += 9;
while (*nplurals != '\0' && isspace (*nplurals)) while (*nplurals != '\0' && isspace ((unsigned char)*nplurals))
++nplurals; ++nplurals;
#if defined HAVE_STRTOUL || defined _LIBC #if defined HAVE_STRTOUL || defined _LIBC
n = strtoul (nplurals, &endp, 10); n = strtoul (nplurals, &endp, 10);

View File

@ -55,6 +55,8 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include "gettextP.h"
#ifndef DIRECTORY_SEPARATOR #ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/' # define DIRECTORY_SEPARATOR '/'
#endif #endif

View File

@ -244,21 +244,21 @@ read_alias_file (fname, fname_len)
cp = buf; cp = buf;
/* Ignore leading white space. */ /* Ignore leading white space. */
while (isspace (cp[0])) while (isspace ((unsigned char)cp[0]))
++cp; ++cp;
/* A leading '#' signals a comment line. */ /* A leading '#' signals a comment line. */
if (cp[0] != '\0' && cp[0] != '#') if (cp[0] != '\0' && cp[0] != '#')
{ {
alias = cp++; alias = cp++;
while (cp[0] != '\0' && !isspace (cp[0])) while (cp[0] != '\0' && !isspace ((unsigned char)cp[0]))
++cp; ++cp;
/* Terminate alias name. */ /* Terminate alias name. */
if (cp[0] != '\0') if (cp[0] != '\0')
*cp++ = '\0'; *cp++ = '\0';
/* Now look for the beginning of the value. */ /* Now look for the beginning of the value. */
while (isspace (cp[0])) while (isspace ((unsigned char)cp[0]))
++cp; ++cp;
if (cp[0] != '\0') if (cp[0] != '\0')
@ -267,7 +267,7 @@ read_alias_file (fname, fname_len)
size_t value_len; size_t value_len;
value = cp++; value = cp++;
while (cp[0] != '\0' && !isspace (cp[0])) while (cp[0] != '\0' && !isspace ((unsigned char)cp[0]))
++cp; ++cp;
/* Terminate value. */ /* Terminate value. */
if (cp[0] == '\n') if (cp[0] == '\n')
@ -390,8 +390,8 @@ alias_compare (map1, map2)
{ {
/* I know this seems to be odd but the tolower() function in /* I know this seems to be odd but the tolower() function in
some systems libc cannot handle nonalpha characters. */ some systems libc cannot handle nonalpha characters. */
c1 = isupper (*p1) ? tolower (*p1) : *p1; c1 = isupper ((unsigned char)*p1) ? tolower ((unsigned char)*p1) : *p1;
c2 = isupper (*p2) ? tolower (*p2) : *p2; c2 = isupper ((unsigned char)*p2) ? tolower ((unsigned char)*p2) : *p2;
if (c1 == '\0') if (c1 == '\0')
break; break;
++p1; ++p1;

View File

@ -1317,10 +1317,13 @@ yylex (lval, pexp)
return result; return result;
} }
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
#define __attribute__(x)
#endif
static void static void
yyerror (str) yyerror (str)
const char *str; const char *str __attribute__ ((__unused__));
{ {
/* Do nothing. We don't print error messages here. */ /* Do nothing. We don't print error messages here. */
} }

View File

@ -404,10 +404,13 @@ yylex (lval, pexp)
return result; return result;
} }
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
#define __attribute__(x)
#endif
static void static void
yyerror (str) yyerror (str)
const char *str; const char *str __attribute__ ((__unused__));
{ {
/* Do nothing. We don't print error messages here. */ /* Do nothing. We don't print error messages here. */
} }