Module Name: src Committed By: tnozaki Date: Sat May 22 17:43:29 UTC 2010
Modified Files: src/usr.bin/mklocale: ldef.h yacc.y Log Message: yacc.y: s/_CTYPE_NUM_CHARS/_CTYPE_CACHED_SIZE/ ldef.h: remove redundant include, ctype_local.h is already included by runetype_local.h. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/mklocale/ldef.h cvs rdiff -u -r1.28 -r1.29 src/usr.bin/mklocale/yacc.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/mklocale/ldef.h diff -u src/usr.bin/mklocale/ldef.h:1.6 src/usr.bin/mklocale/ldef.h:1.7 --- src/usr.bin/mklocale/ldef.h:1.6 Sat May 22 07:18:44 2010 +++ src/usr.bin/mklocale/ldef.h Sat May 22 17:43:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ldef.h,v 1.6 2010/05/22 07:18:44 tnozaki Exp $ */ +/* $NetBSD: ldef.h,v 1.7 2010/05/22 17:43:29 tnozaki Exp $ */ /*- * Copyright (c) 1993 @@ -34,8 +34,6 @@ * @(#)ldef.h 8.1 (Berkeley) 6/6/93 */ -#include "ctype_local.h" - /* * This should look a LOT like a _RuneEntry */ @@ -48,6 +46,6 @@ } rune_list; typedef struct rune_map { - u_int32_t map[_CTYPE_NUM_CHARS]; + u_int32_t map[1<<8]; rune_list *root; } rune_map; Index: src/usr.bin/mklocale/yacc.y diff -u src/usr.bin/mklocale/yacc.y:1.28 src/usr.bin/mklocale/yacc.y:1.29 --- src/usr.bin/mklocale/yacc.y:1.28 Sat May 22 06:38:15 2010 +++ src/usr.bin/mklocale/yacc.y Sat May 22 17:43:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: yacc.y,v 1.28 2010/05/22 06:38:15 tnozaki Exp $ */ +/* $NetBSD: yacc.y,v 1.29 2010/05/22 17:43:29 tnozaki Exp $ */ %{ /*- @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)yacc.y 8.1 (Berkeley) 6/6/93"; static char rcsid[] = "$FreeBSD$"; #else -__RCSID("$NetBSD: yacc.y,v 1.28 2010/05/22 06:38:15 tnozaki Exp $"); +__RCSID("$NetBSD: yacc.y,v 1.29 2010/05/22 17:43:29 tnozaki Exp $"); #endif #endif /* not lint */ @@ -303,7 +303,7 @@ return 0; } - for (x = 0; x < _CTYPE_NUM_CHARS; ++x) { + for (x = 0; x < _CTYPE_CACHE_SIZE; ++x) { mapupper.map[x] = x; maplower.map[x] = x; } @@ -421,7 +421,7 @@ rune_list *r; __nbrune_t run; - while (list->min < _CTYPE_NUM_CHARS && list->min <= list->max) { + while (list->min < _CTYPE_CACHE_SIZE && list->min <= list->max) { if (flag) map->map[list->min++] |= flag; else @@ -655,7 +655,7 @@ * (Machines like Crays cannot share with little machines due to * word size. Sigh. We tried.) */ - for (x = 0; x < _CTYPE_NUM_CHARS; ++x) { + for (x = 0; x < _CTYPE_CACHE_SIZE; ++x) { file_new_locale.frl_runetype[x] = htonl(types.map[x]); file_new_locale.frl_maplower[x] = htonl(maplower.map[x]); file_new_locale.frl_mapupper[x] = htonl(mapupper.map[x]); @@ -778,7 +778,7 @@ fprintf(stderr, "\nMAPLOWER:\n\n"); - for (x = 0; x < _CTYPE_NUM_CHARS; ++x) { + for (x = 0; x < _CTYPE_CACHE_SIZE; ++x) { if (isprint(maplower.map[x])) fprintf(stderr, " '%c'", (int)maplower.map[x]); else if (maplower.map[x]) @@ -797,7 +797,7 @@ fprintf(stderr, "\nMAPUPPER:\n\n"); - for (x = 0; x < _CTYPE_NUM_CHARS; ++x) { + for (x = 0; x < _CTYPE_CACHE_SIZE; ++x) { if (isprint(mapupper.map[x])) fprintf(stderr, " '%c'", (int)mapupper.map[x]); else if (mapupper.map[x]) @@ -817,7 +817,7 @@ fprintf(stderr, "\nTYPES:\n\n"); - for (x = 0; x < _CTYPE_NUM_CHARS; ++x) { + for (x = 0; x < _CTYPE_CACHE_SIZE; ++x) { u_int32_t r = types.map[x]; if (r) {