[svn:parrot] r47110 - in branches/gsoc_nfg/src/string: . encoding

darbelo at svn.parrot.org darbelo at svn.parrot.org
Sat May 29 16:39:08 UTC 2010


Author: darbelo
Date: Sat May 29 16:39:07 2010
New Revision: 47110
URL: https://trac.parrot.org/parrot/changeset/47110

Log:
Separate the grapheme-related definitions from other Unicode data.

Added:
   branches/gsoc_nfg/src/string/grapheme.h
Modified:
   branches/gsoc_nfg/src/string/encoding/nfg.c
   branches/gsoc_nfg/src/string/unicode.h

Modified: branches/gsoc_nfg/src/string/encoding/nfg.c
==============================================================================
--- branches/gsoc_nfg/src/string/encoding/nfg.c	Sat May 29 11:56:49 2010	(r47109)
+++ branches/gsoc_nfg/src/string/encoding/nfg.c	Sat May 29 16:39:07 2010	(r47110)
@@ -20,6 +20,7 @@
 
 #include "parrot/parrot.h"
 #include "../unicode.h"
+#include "../grapheme.h"
 
 #if !PARROT_HAS_ICU
 PARROT_DOES_NOT_RETURN

Added: branches/gsoc_nfg/src/string/grapheme.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gsoc_nfg/src/string/grapheme.h	Sat May 29 16:39:07 2010	(r47110)
@@ -0,0 +1,28 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+*/
+
+#ifndef PARROT_GRAPHEME_H_GUARD
+#define PARROT_GRAPHEME_H_GUARD
+
+#if PARROT_HAS_ICU
+#  include <unicode/uchar.h>
+
+struct grapheme_t {
+    UINTVAL  len;        /* Grapheme length in codepoints. */
+    UChar32 *codepoints; /* UCS-4 codepoints that make up the grapheme */
+    UINTVAL  hash;
+};
+
+typedef struct grapheme_t grapheme;
+
+#endif /* PARROT_HAS_ICU */
+#endif /* PARROT_GRAPHEME_H_GUARD */
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Modified: branches/gsoc_nfg/src/string/unicode.h
==============================================================================
--- branches/gsoc_nfg/src/string/unicode.h	Sat May 29 11:56:49 2010	(r47109)
+++ branches/gsoc_nfg/src/string/unicode.h	Sat May 29 16:39:07 2010	(r47110)
@@ -17,19 +17,6 @@
 typedef unsigned short utf16_t;
 typedef unsigned long utf32_t;
 
-#if PARROT_HAS_ICU
-#  include <unicode/uchar.h>
-
-struct grapheme_t {
-    UINTVAL  len;        /* Grapheme length in codepoints. */
-    UChar32 *codepoints; /* UCS-4 codepoints that make up the grapheme */
-    UINTVAL  hash;
-};
-
-typedef struct grapheme_t grapheme;
-
-#endif /* PARROT_HAS_ICU */
-
 #define UNICODE_SURROGATE_FIRST         0xD800u
 #define UNICODE_SURROGATE_LAST          0xDFFFu
 #define UNICODE_HIGH_SURROGATE_FIRST    0xD800u


More information about the parrot-commits mailing list