Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mklocale yacc.y: s/_CTYPE_NUM_CHARS/_CTYPE_CACHED_SIZE/



details:   https://anonhg.NetBSD.org/src/rev/f62881b0a274
branches:  trunk
changeset: 755097:f62881b0a274
user:      tnozaki <tnozaki%NetBSD.org@localhost>
date:      Sat May 22 17:43:29 2010 +0000

description:
yacc.y: s/_CTYPE_NUM_CHARS/_CTYPE_CACHED_SIZE/
ldef.h: remove redundant include, ctype_local.h is already included by
        runetype_local.h.

diffstat:

 usr.bin/mklocale/ldef.h |   6 ++----
 usr.bin/mklocale/yacc.y |  16 ++++++++--------
 2 files changed, 10 insertions(+), 12 deletions(-)

diffs (98 lines):

diff -r 92e0f67ced8c -r f62881b0a274 usr.bin/mklocale/ldef.h
--- a/usr.bin/mklocale/ldef.h   Sat May 22 16:35:00 2010 +0000
+++ b/usr.bin/mklocale/ldef.h   Sat May 22 17:43:29 2010 +0000
@@ -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;
diff -r 92e0f67ced8c -r f62881b0a274 usr.bin/mklocale/yacc.y
--- a/usr.bin/mklocale/yacc.y   Sat May 22 16:35:00 2010 +0000
+++ b/usr.bin/mklocale/yacc.y   Sat May 22 17:43:29 2010 +0000
@@ -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) {



Home | Main Index | Thread Index | Old Index