Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Aug 2014 20:26:48 GMT
From:      ghostmansd@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r271756 - in soc2014/ghostmansd/head: include lib/libc/locale lib/libc/string lib/libc/unicode
Message-ID:  <201408022026.s72KQmOI094500@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ghostmansd
Date: Sat Aug  2 20:26:48 2014
New Revision: 271756
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271756

Log:
  small reorganization according to Pedro's suggestion
  

Deleted:
  soc2014/ghostmansd/head/include/unicode.h
Modified:
  soc2014/ghostmansd/head/lib/libc/locale/xlocale_private.h
  soc2014/ghostmansd/head/lib/libc/string/wcscoll.c
  soc2014/ghostmansd/head/lib/libc/unicode/ccclass.h
  soc2014/ghostmansd/head/lib/libc/unicode/ducet.h
  soc2014/ghostmansd/head/lib/libc/unicode/norm.h
  soc2014/ghostmansd/head/lib/libc/unicode/uccclass.c
  soc2014/ghostmansd/head/lib/libc/unicode/uchash.c
  soc2014/ghostmansd/head/lib/libc/unicode/ucscanon.c
  soc2014/ghostmansd/head/lib/libc/unicode/ucscoll.c
  soc2014/ghostmansd/head/lib/libc/unicode/ucsnorm.c
  soc2014/ghostmansd/head/lib/libc/unicode/ucsxfrm.c

Modified: soc2014/ghostmansd/head/lib/libc/locale/xlocale_private.h
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/locale/xlocale_private.h	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/locale/xlocale_private.h	Sat Aug  2 20:26:48 2014	(r271756)
@@ -39,10 +39,39 @@
 #include <sys/types.h>
 #include <machine/atomic.h>
 #include "setlocale.h"
+
+
 #ifdef _UNICODE_SOURCE
-#include <unicode.h>
+#include <unistd.h>
+
+/* Unicode canonicalization. */
+int	__uccclass(uint32_t);
+int	__ucscanon(uint32_t*);
+
+/* Unicode normalization. */
+#define	__UC_NFD	1
+#define	__UC_NFKD	2
+#define	__UC_NFC	3
+#define	__UC_NFKC	4
+size_t	__ucsnorm(uint32_t*, const uint32_t*, size_t, int);
+
+/* Unicode collation. */
+struct __collation {
+	uint32_t hash;
+	size_t count;
+	const uint8_t *alternate;
+	const uint32_t *elements;
+};
+size_t	__ucsxfrm(uint32_t*, const uint32_t*, size_t,
+		  const struct __collation*, size_t);
+int	__ucscoll(const uint32_t*, const uint32_t*,
+		  const struct __collation*, size_t);
+
+/* Various helper functions. */
+uint32_t	__uchash(const uint32_t*, size_t);
 #endif
 
+
 enum {
 	XLC_COLLATE = 0,
 	XLC_CTYPE,

Modified: soc2014/ghostmansd/head/lib/libc/string/wcscoll.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/string/wcscoll.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/string/wcscoll.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -40,9 +40,6 @@
 #include <string.h>
 #include <wchar.h>
 #include "collate.h"
-#ifdef _UNICODE_SOURCE
-#include <unicode.h>
-#endif
 
 #ifndef _UNICODE_SOURCE
 static char *

Modified: soc2014/ghostmansd/head/lib/libc/unicode/ccclass.h
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/ccclass.h	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/ccclass.h	Sat Aug  2 20:26:48 2014	(r271756)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#include <unicode.h>
+#include "xlocale_private.h"
 
 
 #define	COMBINING_CLASS_MIN	0x000300

Modified: soc2014/ghostmansd/head/lib/libc/unicode/ducet.h
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/ducet.h	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/ducet.h	Sat Aug  2 20:26:48 2014	(r271756)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#include <unicode.h>
+#include "xlocale_private.h"
 
 
 #define	DUCET_MAX	0xFFF99024

Modified: soc2014/ghostmansd/head/lib/libc/unicode/norm.h
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/norm.h	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/norm.h	Sat Aug  2 20:26:48 2014	(r271756)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#include <unicode.h>
+#include "xlocale_private.h"
 
 
 #define	UNICODE_MAX	0x10FFFF

Modified: soc2014/ghostmansd/head/lib/libc/unicode/uccclass.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/uccclass.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/uccclass.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#include <unicode.h>
+#include "xlocale_private.h"
 #include "ccclass.h"
 
 

Modified: soc2014/ghostmansd/head/lib/libc/unicode/uchash.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/uchash.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/uchash.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#include <unicode.h>
+#include "xlocale_private.h"
 
 
 uint32_t __ucshash(uint32_t const *key, size_t size)

Modified: soc2014/ghostmansd/head/lib/libc/unicode/ucscanon.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/ucscanon.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/ucscanon.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -25,7 +25,7 @@
  */
 
 #include <errno.h>
-#include <unicode.h>
+#include "xlocale_private.h"
 
 
 int

Modified: soc2014/ghostmansd/head/lib/libc/unicode/ucscoll.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/ucscoll.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/ucscoll.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -26,7 +26,7 @@
 
 #include <errno.h>
 #include <wchar.h>
-#include <unicode.h>
+#include "xlocale_private.h"
 
 
 int

Modified: soc2014/ghostmansd/head/lib/libc/unicode/ucsnorm.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/ucsnorm.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/ucsnorm.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -27,7 +27,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unicode.h>
+#include "xlocale_private.h"
 #include "norm.h"
 
 

Modified: soc2014/ghostmansd/head/lib/libc/unicode/ucsxfrm.c
==============================================================================
--- soc2014/ghostmansd/head/lib/libc/unicode/ucsxfrm.c	Sat Aug  2 19:59:19 2014	(r271755)
+++ soc2014/ghostmansd/head/lib/libc/unicode/ucsxfrm.c	Sat Aug  2 20:26:48 2014	(r271756)
@@ -26,7 +26,7 @@
 
 #include <errno.h>
 #include <string.h>
-#include <unicode.h>
+#include "xlocale_private.h"
 #include "ducet.h"
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408022026.s72KQmOI094500>