Source-Changes-HG archive

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

[src/trunk]: src 1. split runetype_local.h -> runetype_file.h



details:   https://anonhg.NetBSD.org/src/rev/db48ec697928
branches:  trunk
changeset: 755636:db48ec697928
user:      tnozaki <tnozaki%NetBSD.org@localhost>
date:      Sun Jun 13 04:14:56 2010 +0000

description:
1. split runetype_local.h -> runetype_file.h
   and remove renameing _Rune* -> _NBRune* namespace protection.

   FreeBSD traditionaly exposes struct _Rune* in runetype.h
   which included by ctype.h. it may cause conflicting type error
   in our cross build process, former we use renaming namespace
   to avoid this problem, now i reworked more resonable way.

2. merge rune_local.h to runetype_local.h, and remove it.
3. split bsdctype.h -> bsdctype_{file,local}.h

diffstat:

 lib/libc/citrus/citrus_lc_ctype.c    |    6 +-
 lib/libc/citrus/citrus_lc_messages.c |    6 +-
 lib/libc/citrus/citrus_lc_monetary.c |    6 +-
 lib/libc/citrus/citrus_lc_numeric.c  |    6 +-
 lib/libc/citrus/citrus_lc_time.c     |    6 +-
 lib/libc/locale/_wctrans.c           |    6 +-
 lib/libc/locale/_wctype.c            |    6 +-
 lib/libc/locale/bsdctype.c           |    6 +-
 lib/libc/locale/bsdctype.h           |   56 --------------
 lib/libc/locale/bsdctype_file.h      |   46 +++++++++++
 lib/libc/locale/bsdctype_local.h     |   47 ++++++++++++
 lib/libc/locale/ctype_local.h        |    5 +-
 lib/libc/locale/global_locale.c      |    8 +-
 lib/libc/locale/iswctype_mb.c        |    7 +-
 lib/libc/locale/localeio_lc_ctype.c  |   10 +-
 lib/libc/locale/multibyte_amd1.c     |    6 +-
 lib/libc/locale/multibyte_c90.c      |    6 +-
 lib/libc/locale/rune.c               |   12 +-
 lib/libc/locale/rune_local.h         |   96 ------------------------
 lib/libc/locale/runeglue.c           |    6 +-
 lib/libc/locale/runetable.c          |    9 +-
 lib/libc/locale/runetype_file.h      |  137 +++++++++++++++++++++++++++++++++++
 lib/libc/locale/runetype_local.h     |  128 ++++++-------------------------
 usr.bin/mklocale/lex.l               |    6 +-
 usr.bin/mklocale/yacc.y              |   10 +-
 usr.sbin/chrtbl/ctypeio.c            |    6 +-
 26 files changed, 325 insertions(+), 324 deletions(-)

diffs (truncated from 1174 to 300 lines):

diff -r f022f7d97a81 -r db48ec697928 lib/libc/citrus/citrus_lc_ctype.c
--- a/lib/libc/citrus/citrus_lc_ctype.c Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/citrus/citrus_lc_ctype.c Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_ctype.c,v 1.7 2010/06/07 13:52:29 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_ctype.c,v 1.8 2010/06/13 04:14:56 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_lc_ctype.c,v 1.7 2010/06/07 13:52:29 tnozaki Exp $");
+__RCSID("$NetBSD: citrus_lc_ctype.c,v 1.8 2010/06/13 04:14:56 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "reentrant.h"
@@ -57,7 +57,7 @@
 #include "citrus_module.h"
 #include "citrus_ctype.h"
 
-#include "rune_local.h"
+#include "runetype_local.h"
 #include "multibyte.h"
 
 /*
diff -r f022f7d97a81 -r db48ec697928 lib/libc/citrus/citrus_lc_messages.c
--- a/lib/libc/citrus/citrus_lc_messages.c      Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/citrus/citrus_lc_messages.c      Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_messages.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_messages.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_lc_messages.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $");
+__RCSID("$NetBSD: citrus_lc_messages.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -61,7 +61,7 @@
 #include "citrus_db.h"
 #include "citrus_db_hash.h"
 #include "citrus_memstream.h"
-#include "rune_local.h"
+#include "runetype_local.h"
 
 /*
  * macro required by all template headers
diff -r f022f7d97a81 -r db48ec697928 lib/libc/citrus/citrus_lc_monetary.c
--- a/lib/libc/citrus/citrus_lc_monetary.c      Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/citrus/citrus_lc_monetary.c      Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_monetary.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_monetary.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_lc_monetary.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $");
+__RCSID("$NetBSD: citrus_lc_monetary.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -61,7 +61,7 @@
 #include "citrus_db.h"
 #include "citrus_db_hash.h"
 #include "citrus_memstream.h"
-#include "rune_local.h"
+#include "runetype_local.h"
 
 #include "fix_grouping.h"
 #include "citrus_fix_grouping.h"
diff -r f022f7d97a81 -r db48ec697928 lib/libc/citrus/citrus_lc_numeric.c
--- a/lib/libc/citrus/citrus_lc_numeric.c       Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/citrus/citrus_lc_numeric.c       Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_numeric.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_numeric.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_lc_numeric.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $");
+__RCSID("$NetBSD: citrus_lc_numeric.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -61,7 +61,7 @@
 #include "citrus_db.h"
 #include "citrus_db_hash.h"
 #include "citrus_memstream.h"
-#include "rune_local.h"
+#include "runetype_local.h"
 
 #include "fix_grouping.h"
 #include "citrus_fix_grouping.h"
diff -r f022f7d97a81 -r db48ec697928 lib/libc/citrus/citrus_lc_time.c
--- a/lib/libc/citrus/citrus_lc_time.c  Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/citrus/citrus_lc_time.c  Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_time.c,v 1.4 2010/05/22 08:13:18 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_time.c,v 1.5 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_lc_time.c,v 1.4 2010/05/22 08:13:18 tnozaki Exp $");
+__RCSID("$NetBSD: citrus_lc_time.c,v 1.5 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -61,7 +61,7 @@
 #include "citrus_db.h"
 #include "citrus_db_hash.h"
 #include "citrus_memstream.h"
-#include "rune_local.h"
+#include "runetype_local.h"
 
 /*
  * macro required by all template headers
diff -r f022f7d97a81 -r db48ec697928 lib/libc/locale/_wctrans.c
--- a/lib/libc/locale/_wctrans.c        Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/locale/_wctrans.c        Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _wctrans.c,v 1.16 2010/06/02 15:47:25 tnozaki Exp $    */
+/*     $NetBSD: _wctrans.c,v 1.17 2010/06/13 04:14:57 tnozaki Exp $    */
 
 /*-
  * Copyright (c)2003 Citrus Project,
@@ -60,7 +60,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _wctrans.c,v 1.16 2010/06/02 15:47:25 tnozaki Exp $");
+__RCSID("$NetBSD: _wctrans.c,v 1.17 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -69,7 +69,7 @@
 #include <assert.h>
 #include <wctype.h>
 
-#include "rune_local.h"
+#include "runetype_local.h"
 #include "_wctrans_local.h"
 
 /*
diff -r f022f7d97a81 -r db48ec697928 lib/libc/locale/_wctype.c
--- a/lib/libc/locale/_wctype.c Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/locale/_wctype.c Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: _wctype.c,v 1.8 2010/06/02 15:47:25 tnozaki Exp $ */
+/* $NetBSD: _wctype.c,v 1.9 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -60,14 +60,14 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _wctype.c,v 1.8 2010/06/02 15:47:25 tnozaki Exp $");
+__RCSID("$NetBSD: _wctype.c,v 1.9 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <assert.h>
 #include <wctype.h>
 
-#include "rune_local.h"
+#include "runetype_local.h"
 #include "_wctrans_local.h"
 #include "_wctype_local.h"
 
diff -r f022f7d97a81 -r db48ec697928 lib/libc/locale/bsdctype.c
--- a/lib/libc/locale/bsdctype.c        Sun Jun 13 04:13:31 2010 +0000
+++ b/lib/libc/locale/bsdctype.c        Sun Jun 13 04:14:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bsdctype.c,v 1.6 2010/06/02 16:04:52 tnozaki Exp $ */
+/* $NetBSD: bsdctype.c,v 1.7 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: bsdctype.c,v 1.6 2010/06/02 16:04:52 tnozaki Exp $");
+__RCSID("$NetBSD: bsdctype.c,v 1.7 2010/06/13 04:14:57 tnozaki Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/stat.h>
@@ -41,7 +41,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "bsdctype.h"
+#include "bsdctype_local.h"
 
 const _BSDCTypeLocale _DefaultBSDCTypeLocale = {
     _C_ctype_,
diff -r f022f7d97a81 -r db48ec697928 lib/libc/locale/bsdctype.h
--- a/lib/libc/locale/bsdctype.h        Sun Jun 13 04:13:31 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/* $NetBSD: bsdctype.h,v 1.5 2010/06/12 18:03:09 tnozaki Exp $ */
-
-/*-
- * Copyright (c)2008 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _BSDCTYPE_H_
-#define _BSDCTYPE_H_
-
-#include "ctype_local.h"
-
-typedef struct {
-       char                    fbl_id[8];
-       uint32_t                fbl_rev;
-       uint32_t                fbl_num_chars;
-       uint8_t                 fbl_ctype_tab  [_CTYPE_CACHE_SIZE];
-       int16_t                 fbl_tolower_tab[_CTYPE_CACHE_SIZE];
-       int16_t                 fbl_toupper_tab[_CTYPE_CACHE_SIZE];
-} __packed _FileBSDCTypeLocale;
-
-typedef struct {
-       const unsigned char     *bl_ctype_tab;
-       const short             *bl_tolower_tab;
-       const short             *bl_toupper_tab;
-} _BSDCTypeLocale;
-
-extern const _BSDCTypeLocale _DefaultBSDCTypeLocale;
-extern const _BSDCTypeLocale *_CurrentBSDCTypeLocale;
-
-__BEGIN_DECLS
-int _bsdctype_load(const char * __restrict, _BSDCTypeLocale ** __restrict);
-__END_DECLS
-
-#endif /*_BSDCTYPE_H_*/
diff -r f022f7d97a81 -r db48ec697928 lib/libc/locale/bsdctype_file.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/locale/bsdctype_file.h   Sun Jun 13 04:14:56 2010 +0000
@@ -0,0 +1,46 @@
+/* $NetBSD: bsdctype_file.h,v 1.1 2010/06/13 04:14:57 tnozaki Exp $ */
+
+/*-
+ * Copyright (c)2008 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS



Home | Main Index | Thread Index | Old Index