continue;
} else {
p = linebuf;
- while(*p&&isspace(*p))
+ while(*p&&isspace((int)*p))
p++;
if(!*p || *p=='#') continue;
libName = p;
- while(*p&&!isspace(*p)) {
+ while(*p&&!isspace((int)*p)) {
p++;
}
if(!*p || *p=='#') continue; /* no tab after libname */
*p=0; /* end of libname */
p++;
- while(*p&&isspace(*p)) {
+ while(*p&&isspace((int)*p)) {
p++;
}
if(!*p||*p=='#') continue; /* no symname after libname +tab */
symName = p;
- while(*p&&!isspace(*p)) {
+ while(*p&&!isspace((int)*p)) {
p++;
}
if(*p) { /* has config */
*p=0;
++p;
- while(*p&&isspace(*p)) {
+ while(*p&&isspace((int)*p)) {
p++;
}
if(*p) {
/* chop whitespace at the end of the config */
if(config!=NULL&&*config!=0) {
p = config+strlen(config);
- while(p>config&&isspace(*(--p))) {
+ while(p>config&&isspace((int)*(--p))) {
*p=0;
}
}
/*
**********************************************************************
-* Copyright (C) 1999-2010, International Business Machines
+* Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
}
inline int32_t UVector32::elementAti(int32_t index) const {
- return (0 <= index && index < count) ? elements[index] : 0;
+ return (index >= 0 && count > 0 && count - index > 0) ? elements[index] : 0;
}
fprintf(stderr," Error: couldn't open XML output file %s\n", XML_FILE_NAME);
return 1;
}
- while(*rootName&&!isalnum(*rootName)) {
+ while(*rootName&&!isalnum((int)*rootName)) {
rootName++;
}
strcpy(XML_PREFIX,rootName);
{
char *p = XML_PREFIX+strlen(XML_PREFIX);
- for(p--;*p&&p>XML_PREFIX&&!isalnum(*p);p--) {
+ for(p--;*p&&p>XML_PREFIX&&!isalnum((int)*p);p--) {
*p=0;
}
}
/*
*******************************************************************************
*
-* Copyright (C) 1999-2009, International Business Machines
+* Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
/* Read non-empty lines that don't start with a space character. */
while (T_FileStream_readLine(in, lastLine, MAX_LINE_SIZE) != NULL) {
lastLineSize = chomp(lastLine);
- if (lineSize == 0 || (lastLineSize > 0 && isspace(*lastLine))) {
+ if (lineSize == 0 || (lastLineSize > 0 && isspace((int)*lastLine))) {
uprv_strcpy(line + lineSize, lastLine);
lineSize += lastLineSize;
} else if (lineSize > 0) {
}
if (validParse || lineSize > 0) {
- if (isspace(*line)) {
+ if (isspace((int)*line)) {
fprintf(stderr, "%s:%d: error: cannot start an alias with a space\n", path, lineNum-1);
exit(U_PARSE_ERROR);
} else if (line[0] == '{') {
*s = 0;
break;
}
- if (!isspace(*s)) {
+ if (!isspace((int)*s)) {
lastNonSpace = s;
}
++s;
/* get the converter name */
start=pos;
- while(line[pos]!=0 && !isspace(line[pos])) {
+ while(line[pos]!=0 && !isspace((int)line[pos])) {
++pos;
}
limit=pos;
for(;;) {
/* skip white space */
- while(line[pos]!=0 && isspace(line[pos])) {
+ while(line[pos]!=0 && isspace((int)line[pos])) {
++pos;
}
/* get an alias name */
start=pos;
- while(line[pos]!=0 && line[pos]!='{' && !isspace(line[pos])) {
+ while(line[pos]!=0 && line[pos]!='{' && !isspace((int)line[pos])) {
++pos;
}
limit=pos;
/* addAlias(alias, 0, cnv, FALSE);*/
/* skip whitespace */
- while (line[pos] && isspace(line[pos])) {
+ while (line[pos] && isspace((int)line[pos])) {
++pos;
}
++pos;
do {
start = pos;
- while (line[pos] && line[pos] != '}' && !isspace( line[pos])) {
+ while (line[pos] && line[pos] != '}' && !isspace((int)line[pos])) {
++pos;
}
limit = pos;
addAlias(alias, tag, cnv, (UBool)(line[limit-1] == '*'));
}
- while (line[pos] && isspace(line[pos])) {
+ while (line[pos] && isspace((int)line[pos])) {
++pos;
}
} while (line[pos] && line[pos] != '}');
goto normal_command_mode;
#endif
} else {
+#if !(defined(USING_CYGWIN) || U_PLATFORM == U_PF_MINGW || U_PLATFORM == U_PF_OS400)
normal_command_mode:
+#endif
cmd = (char *)command;
}
goto normal_symlink_mode;
#endif
} else {
+#if U_PLATFORM != U_PF_CYGWIN
normal_symlink_mode:
+#endif
sprintf(name1, "%s.%s", libFileNames[LIB_FILE], pkgDataFlags[SO_EXT]);
sprintf(name2, "%s", libFileNames[LIB_FILE_VERSION]);
}
/*
*******************************************************************************
*
-* Copyright (C) 1999-2010, International Business Machines
+* Copyright (C) 1999-2011, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0]));
Item *oldItems = items;
if(newItems == NULL) {
- fprintf(stderr, "icupkg: Out of memory trying to allocate %ld bytes for %d items\n", max*sizeof(items[0]), max);
+ fprintf(stderr, "icupkg: Out of memory trying to allocate %u bytes for %d items\n", max*sizeof(items[0]), max);
exit(U_MEMORY_ALLOCATION_ERROR);
}
if(items && itemCount>0) {
fileMax += CHUNK_FILE_COUNT;
files = uprv_realloc(files, fileMax*sizeof(files[0])); /* note: never freed. */
if(files==NULL) {
- fprintf(stderr, "pkgdata/gencmn: Could not allocate %ld bytes for %d files\n", (fileMax*sizeof(files[0])), fileCount);
+ fprintf(stderr, "pkgdata/gencmn: Could not allocate %u bytes for %d files\n", (fileMax*sizeof(files[0])), fileCount);
exit(U_MEMORY_ALLOCATION_ERROR);
}
}