summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-24 11:14:57 +0100
committerTom Hacohen <tom@stosb.com>2016-08-24 11:15:59 +0100
commita016ab751c4875d66e7c7c8dd5c5272a6f03f084 (patch)
tree2cd99a3282106cf4e2bf3c943706f4409dee7ece /src/static_libs
parent2483f30f48c4795ab7375e08db28534b7b235804 (diff)
Static deps unibreak: Update to latest git version.
This version reduces the number of dirty pages used by libunibreak. Reference git hash: ad5a524b0128eec644a8cae52fb75ed1f597c0ee @feature
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/libunibreak/linebreak.c10
-rw-r--r--src/static_libs/libunibreak/linebreakdata.c2
-rw-r--r--src/static_libs/libunibreak/linebreakdef.c14
-rw-r--r--src/static_libs/libunibreak/linebreakdef.h8
-rw-r--r--src/static_libs/libunibreak/wordbreak.c2
-rw-r--r--src/static_libs/libunibreak/wordbreakdata.c2
6 files changed, 19 insertions, 19 deletions
diff --git a/src/static_libs/libunibreak/linebreak.c b/src/static_libs/libunibreak/linebreak.c
index 4383fa6..e3b1ca1 100644
--- a/src/static_libs/libunibreak/linebreak.c
+++ b/src/static_libs/libunibreak/linebreak.c
@@ -266,7 +266,7 @@ static enum BreakAction baTable[LBP_RI][LBP_RI] = {
266struct LineBreakPropertiesIndex 266struct LineBreakPropertiesIndex
267{ 267{
268 utf32_t end; /**< End coding point */ 268 utf32_t end; /**< End coding point */
269 struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */ 269 const struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */
270}; 270};
271 271
272/** 272/**
@@ -311,9 +311,9 @@ void init_linebreak(void)
311 * @return pointer to the language-specific line breaking 311 * @return pointer to the language-specific line breaking
312 * properties array if found; \c NULL otherwise 312 * properties array if found; \c NULL otherwise
313 */ 313 */
314static struct LineBreakProperties *get_lb_prop_lang(const char *lang) 314static const struct LineBreakProperties *get_lb_prop_lang(const char *lang)
315{ 315{
316 struct LineBreakPropertiesLang *lbplIter; 316 const struct LineBreakPropertiesLang *lbplIter;
317 if (lang != NULL) 317 if (lang != NULL)
318 { 318 {
319 for (lbplIter = lb_prop_lang_map; lbplIter->lang != NULL; ++lbplIter) 319 for (lbplIter = lb_prop_lang_map; lbplIter->lang != NULL; ++lbplIter)
@@ -337,7 +337,7 @@ static struct LineBreakProperties *get_lb_prop_lang(const char *lang)
337 */ 337 */
338static enum LineBreakClass get_char_lb_class( 338static enum LineBreakClass get_char_lb_class(
339 utf32_t ch, 339 utf32_t ch,
340 struct LineBreakProperties *lbp) 340 const struct LineBreakProperties *lbp)
341{ 341{
342 while (lbp->prop != LBP_Undefined && ch >= lbp->start) 342 while (lbp->prop != LBP_Undefined && ch >= lbp->start)
343 { 343 {
@@ -379,7 +379,7 @@ static enum LineBreakClass get_char_lb_class_default(
379 */ 379 */
380static enum LineBreakClass get_char_lb_class_lang( 380static enum LineBreakClass get_char_lb_class_lang(
381 utf32_t ch, 381 utf32_t ch,
382 struct LineBreakProperties *lbpLang) 382 const struct LineBreakProperties *lbpLang)
383{ 383{
384 enum LineBreakClass lbcResult; 384 enum LineBreakClass lbcResult;
385 385
diff --git a/src/static_libs/libunibreak/linebreakdata.c b/src/static_libs/libunibreak/linebreakdata.c
index 22b47fc..dcf39dc 100644
--- a/src/static_libs/libunibreak/linebreakdata.c
+++ b/src/static_libs/libunibreak/linebreakdata.c
@@ -6,7 +6,7 @@
6#include "linebreakdef.h" 6#include "linebreakdef.h"
7 7
8/** Default line breaking properties as from the Unicode Web site. */ 8/** Default line breaking properties as from the Unicode Web site. */
9struct LineBreakProperties lb_prop_default[] = { 9const struct LineBreakProperties lb_prop_default[] = {
10 { 0x0000, 0x0008, LBP_CM }, 10 { 0x0000, 0x0008, LBP_CM },
11 { 0x0009, 0x0009, LBP_BA }, 11 { 0x0009, 0x0009, LBP_BA },
12 { 0x000A, 0x000A, LBP_LF }, 12 { 0x000A, 0x000A, LBP_LF },
diff --git a/src/static_libs/libunibreak/linebreakdef.c b/src/static_libs/libunibreak/linebreakdef.c
index 72ea420..daa7cb5 100644
--- a/src/static_libs/libunibreak/linebreakdef.c
+++ b/src/static_libs/libunibreak/linebreakdef.c
@@ -53,7 +53,7 @@
53/** 53/**
54 * English-specifc data over the default Unicode rules. 54 * English-specifc data over the default Unicode rules.
55 */ 55 */
56static struct LineBreakProperties lb_prop_English[] = { 56static const struct LineBreakProperties lb_prop_English[] = {
57 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ 57 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
58 { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ 58 { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */
59 { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ 59 { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */
@@ -63,7 +63,7 @@ static struct LineBreakProperties lb_prop_English[] = {
63/** 63/**
64 * German-specifc data over the default Unicode rules. 64 * German-specifc data over the default Unicode rules.
65 */ 65 */
66static struct LineBreakProperties lb_prop_German[] = { 66static const struct LineBreakProperties lb_prop_German[] = {
67 { 0x00AB, 0x00AB, LBP_CL }, /* Left double angle quotation mark: closing */ 67 { 0x00AB, 0x00AB, LBP_CL }, /* Left double angle quotation mark: closing */
68 { 0x00BB, 0x00BB, LBP_OP }, /* Right double angle quotation mark: opening */ 68 { 0x00BB, 0x00BB, LBP_OP }, /* Right double angle quotation mark: opening */
69 { 0x2018, 0x2018, LBP_CL }, /* Left single quotation mark: closing */ 69 { 0x2018, 0x2018, LBP_CL }, /* Left single quotation mark: closing */
@@ -76,7 +76,7 @@ static struct LineBreakProperties lb_prop_German[] = {
76/** 76/**
77 * Spanish-specifc data over the default Unicode rules. 77 * Spanish-specifc data over the default Unicode rules.
78 */ 78 */
79static struct LineBreakProperties lb_prop_Spanish[] = { 79static const struct LineBreakProperties lb_prop_Spanish[] = {
80 { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ 80 { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */
81 { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ 81 { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */
82 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ 82 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
@@ -90,7 +90,7 @@ static struct LineBreakProperties lb_prop_Spanish[] = {
90/** 90/**
91 * French-specifc data over the default Unicode rules. 91 * French-specifc data over the default Unicode rules.
92 */ 92 */
93static struct LineBreakProperties lb_prop_French[] = { 93static const struct LineBreakProperties lb_prop_French[] = {
94 { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ 94 { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */
95 { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ 95 { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */
96 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ 96 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
@@ -104,7 +104,7 @@ static struct LineBreakProperties lb_prop_French[] = {
104/** 104/**
105 * Russian-specifc data over the default Unicode rules. 105 * Russian-specifc data over the default Unicode rules.
106 */ 106 */
107static struct LineBreakProperties lb_prop_Russian[] = { 107static const struct LineBreakProperties lb_prop_Russian[] = {
108 { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ 108 { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */
109 { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ 109 { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */
110 { 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */ 110 { 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */
@@ -114,7 +114,7 @@ static struct LineBreakProperties lb_prop_Russian[] = {
114/** 114/**
115 * Chinese-specifc data over the default Unicode rules. 115 * Chinese-specifc data over the default Unicode rules.
116 */ 116 */
117static struct LineBreakProperties lb_prop_Chinese[] = { 117static const struct LineBreakProperties lb_prop_Chinese[] = {
118 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ 118 { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
119 { 0x2019, 0x2019, LBP_CL }, /* Right single quotation mark: closing */ 119 { 0x2019, 0x2019, LBP_CL }, /* Right single quotation mark: closing */
120 { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ 120 { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */
@@ -128,7 +128,7 @@ static struct LineBreakProperties lb_prop_Chinese[] = {
128 * file. If you want more flexibility, or do not need the data here, 128 * file. If you want more flexibility, or do not need the data here,
129 * you may want to redefine \e lb_prop_lang_map in your C source file. 129 * you may want to redefine \e lb_prop_lang_map in your C source file.
130 */ 130 */
131struct LineBreakPropertiesLang lb_prop_lang_map[] = { 131const struct LineBreakPropertiesLang lb_prop_lang_map[] = {
132 { "en", 2, lb_prop_English }, 132 { "en", 2, lb_prop_English },
133 { "de", 2, lb_prop_German }, 133 { "de", 2, lb_prop_German },
134 { "es", 2, lb_prop_Spanish }, 134 { "es", 2, lb_prop_Spanish },
diff --git a/src/static_libs/libunibreak/linebreakdef.h b/src/static_libs/libunibreak/linebreakdef.h
index 6b5bca6..5c32aef 100644
--- a/src/static_libs/libunibreak/linebreakdef.h
+++ b/src/static_libs/libunibreak/linebreakdef.h
@@ -125,7 +125,7 @@ struct LineBreakPropertiesLang
125{ 125{
126 const char *lang; /**< Language name */ 126 const char *lang; /**< Language name */
127 size_t namelen; /**< Length of name to match */ 127 size_t namelen; /**< Length of name to match */
128 struct LineBreakProperties *lbp; /**< Pointer to associated data */ 128 const struct LineBreakProperties *lbp; /**< Pointer to associated data */
129}; 129};
130 130
131/** 131/**
@@ -135,7 +135,7 @@ struct LineBreakPropertiesLang
135struct LineBreakContext 135struct LineBreakContext
136{ 136{
137 const char *lang; /**< Language name */ 137 const char *lang; /**< Language name */
138 struct LineBreakProperties *lbpLang;/**< Pointer to LineBreakProperties */ 138 const struct LineBreakProperties *lbpLang;/**< Pointer to LineBreakProperties */
139 enum LineBreakClass lbcCur; /**< Breaking class of current codepoint */ 139 enum LineBreakClass lbcCur; /**< Breaking class of current codepoint */
140 enum LineBreakClass lbcNew; /**< Breaking class of next codepoint */ 140 enum LineBreakClass lbcNew; /**< Breaking class of next codepoint */
141 enum LineBreakClass lbcLast; /**< Breaking class of last codepoint */ 141 enum LineBreakClass lbcLast; /**< Breaking class of last codepoint */
@@ -143,8 +143,8 @@ struct LineBreakContext
143}; 143};
144 144
145/* Declarations */ 145/* Declarations */
146extern struct LineBreakProperties lb_prop_default[]; 146extern const struct LineBreakProperties lb_prop_default[];
147extern struct LineBreakPropertiesLang lb_prop_lang_map[]; 147extern const struct LineBreakPropertiesLang lb_prop_lang_map[];
148 148
149/* Function Prototype */ 149/* Function Prototype */
150void lb_init_break_context( 150void lb_init_break_context(
diff --git a/src/static_libs/libunibreak/wordbreak.c b/src/static_libs/libunibreak/wordbreak.c
index f6c013f..a0d1c43 100644
--- a/src/static_libs/libunibreak/wordbreak.c
+++ b/src/static_libs/libunibreak/wordbreak.c
@@ -75,7 +75,7 @@ void init_wordbreak(void)
75 */ 75 */
76static enum WordBreakClass get_char_wb_class( 76static enum WordBreakClass get_char_wb_class(
77 utf32_t ch, 77 utf32_t ch,
78 struct WordBreakProperties *wbp, 78 const struct WordBreakProperties *wbp,
79 size_t len) 79 size_t len)
80{ 80{
81 int min = 0; 81 int min = 0;
diff --git a/src/static_libs/libunibreak/wordbreakdata.c b/src/static_libs/libunibreak/wordbreakdata.c
index a316646..9049f59 100644
--- a/src/static_libs/libunibreak/wordbreakdata.c
+++ b/src/static_libs/libunibreak/wordbreakdata.c
@@ -5,7 +5,7 @@
5 5
6#include "wordbreakdef.h" 6#include "wordbreakdef.h"
7 7
8static struct WordBreakProperties wb_prop_default[] = { 8static const struct WordBreakProperties wb_prop_default[] = {
9 {0x000A, 0x000A, WBP_LF}, 9 {0x000A, 0x000A, WBP_LF},
10 {0x000B, 0x000C, WBP_Newline}, 10 {0x000B, 0x000C, WBP_Newline},
11 {0x000D, 0x000D, WBP_CR}, 11 {0x000D, 0x000D, WBP_CR},