svn commit: r289586 - projects/collation/usr.bin/localedef

Baptiste Daroussin bapt at FreeBSD.org
Mon Oct 19 14:30:30 UTC 2015


Author: bapt
Date: Mon Oct 19 14:30:28 2015
New Revision: 289586
URL: https://svnweb.freebsd.org/changeset/base/289586

Log:
  With regard to ctype, digits (e.g. 0 to 9) and xdigits (the 0 to 9 portion
  of hexidecimal numbers) are all considered "numbers".  (Note that while
  all digits are numbers, not all numbers are digits).
  
  Enhance localedef to automatically set the "number" characteristic when
  it encounters a digit or xdigit definition. This fixes malfunctionning
  isalnum(3)
  
  Obtained from:	DragonflyBSD

Modified:
  projects/collation/usr.bin/localedef/ctype.c

Modified: projects/collation/usr.bin/localedef/ctype.c
==============================================================================
--- projects/collation/usr.bin/localedef/ctype.c	Mon Oct 19 14:26:40 2015	(r289585)
+++ projects/collation/usr.bin/localedef/ctype.c	Mon Oct 19 14:30:28 2015	(r289586)
@@ -117,7 +117,7 @@ add_ctype_impl(ctype_node_t *ctn)
 		ctn->ctype |= (_ISALPHA | _ISGRAPH | _ISPRINT);
 		break;
 	case T_ISDIGIT:
-		ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT);
+		ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT | _E4);
 		break;
 	case T_ISSPACE:
 		ctn->ctype |= _ISSPACE;
@@ -135,7 +135,7 @@ add_ctype_impl(ctype_node_t *ctn)
 		ctn->ctype |= (_ISPUNCT | _ISGRAPH | _ISPRINT);
 		break;
 	case T_ISXDIGIT:
-		ctn->ctype |= (_ISXDIGIT | _ISPRINT);
+		ctn->ctype |= (_ISXDIGIT | _ISPRINT | _E4);
 		break;
 	case T_ISBLANK:
 		ctn->ctype |= (_ISBLANK | _ISSPACE);


More information about the svn-src-projects mailing list