Allow characters >127 that don't fit the current locale in the

specfile (e.g. latin1 in utf-8 locale).

Patch from OpenSuSE.
This commit is contained in:
Panu Matilainen 2007-06-08 16:07:05 +03:00
parent 2045bd1814
commit f32c97f621
1 changed files with 5 additions and 0 deletions

View File

@ -87,8 +87,13 @@ static int isSpecFile(const char * specfile)
/*@switchbreak@*/ break;
/*@-boundsread@*/
default:
#if 0
if (checking && !(isprint(*s) || isspace(*s))) return 0;
/*@switchbreak@*/ break;
#else
if (checking && !(isprint(*s) || isspace(*s)) && *(unsigned char *)s < 32) return 0;
/*@switchbreak@*/ break;
#endif
/*@=boundsread@*/
}
}