<div dir="ltr"><div><div>To help ensure that non-ASCII characters don't appear in distribution filenames,<br></div>changes to zic.c so that the "-v" option warns about them. Both attached and<br>tab-mangled below.<br>
<br></div> --ado<br><br>*** /tmp/,azic.c 2014-06-25 19:32:44.803874900 -0400<br>--- /tmp/,bzic.c 2014-06-25 19:32:44.906880800 -0400<br>***************<br>*** 134,139 ****<br>--- 134,140 ----<br> static int itsdir(const char * name);<br>
static int lowerit(int c);<br> static int mkdirs(char * filename);<br>+ static void namecheck(const char * name);<br> static void newabbr(const char * abbr);<br> static zic_t oadd(zic_t t1, zic_t t2);<br>
static void outzone(const struct zone * zp, int ntzones);<br>***************<br>*** 621,632 ****<br>--- 622,652 ----<br> return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE;<br> }<br> <br>+ #define BENIGN "+-_/"<br>
+ <br>+ static void<br>+ namecheck(const char * const name)<br>+ {<br>+ register const char * cp;<br>+ <br>+ if (!noise)<br>+ return;<br>+ for (cp = name; *cp != '\0'; ++cp)<br>+ if (!isascii(*cp) ||<br>
+ (!isalnum(*cp) && strchr(BENIGN, *cp) == NULL)) {<br>+ warning(_("file name %s has non-ASCII-alphanumeric character other than %s"),<br>+ name, BENIGN);<br>+ return;<br>
+ }<br>+ }<br>+ <br> static void<br> dolink(const char *const fromfield, const char *const tofield)<br> {<br> register char * fromname;<br> register char * toname;<br> <br>+ namecheck(tofield);<br>
if (fromfield[0] == '/')<br> fromname = ecpyalloc(fromfield);<br> else {<br>***************<br>*** 1495,1500 ****<br>--- 1515,1521 ----<br> void *typesptr = ats + timecnt;<br> unsigned char *types = typesptr;<br>
<br>+ namecheck(name);<br> /*<br> ** Sort.<br> */<br><br><br></div>