]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/unvis.c.patch
Libc-825.24.tar.gz
[apple/libc.git] / gen / FreeBSD / unvis.c.patch
diff --git a/gen/FreeBSD/unvis.c.patch b/gen/FreeBSD/unvis.c.patch
deleted file mode 100644 (file)
index 5f139ef..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---- unvis.c.orig       2009-11-07 14:51:38.000000000 -0800
-+++ unvis.c    2009-11-07 14:51:40.000000000 -0800
-@@ -33,6 +33,8 @@ static char sccsid[] = "@(#)unvis.c  8.1 
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: src/lib/libc/gen/unvis.c,v 1.10 2007/01/09 00:27:56 imp Exp $");
-+#include "xlocale_private.h"
-+
- #include <sys/types.h>
- #include <ctype.h>
- #include <vis.h>
-@@ -60,6 +62,7 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/unv
- int
- unvis(char *cp, int c, int *astate, int flag)
- {
-+      locale_t loc = __current_locale();
-       if (flag & UNVIS_END) {
-               if (*astate == S_OCTAL2 || *astate == S_OCTAL3) {
-@@ -86,8 +89,8 @@ unvis(char *cp, int c, int *astate, int 
-       case S_START:
-               if (*astate & S_HTTP) {
--                  if (ishex(tolower(c))) {
--                      *cp = isdigit(c) ? (c - '0') : (tolower(c) - 'a');
-+                  if (ishex(tolower_l(c, loc))) {
-+                      *cp = isdigit_l(c, loc) ? (c - '0') : (tolower_l(c, loc) - 'a');
-                       *astate = S_HEX2;
-                       return (0);
-                   }
-@@ -212,8 +215,8 @@ unvis(char *cp, int c, int *astate, int 
-               return (UNVIS_VALIDPUSH);
-       case S_HEX2:    /* second mandatory hex digit */
--              if (ishex(tolower(c))) {
--                      *cp = (isdigit(c) ? (*cp << 4) + (c - '0') : (*cp << 4) + (tolower(c) - 'a' + 10));
-+              if (ishex(tolower_l(c, loc))) {
-+                      *cp = (isdigit_l(c, loc) ? (*cp << 4) + (c - '0') : (*cp << 4) + (tolower_l(c, loc) - 'a' + 10));
-               }
-               *astate = S_GROUND;
-               return (UNVIS_VALID);