Allow characters >127 that don't fit the current locale in the
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 8 Jun 2007 13:07:05 +0000 (16:07 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 8 Jun 2007 13:07:05 +0000 (16:07 +0300)
specfile (e.g. latin1 in utf-8 locale).

Patch from OpenSuSE.

build.c

diff --git a/build.c b/build.c
index 3c96a19..a8ad538 100644 (file)
--- a/build.c
+++ b/build.c
@@ -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@*/
        }
     }