summaryrefslogtreecommitdiff
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
parent2483f30f48c4795ab7375e08db28534b7b235804 (diff)
downloadefl-a016ab751c4875d66e7c7c8dd5c5272a6f03f084.tar.gz
Static deps unibreak: Update to latest git version.
This version reduces the number of dirty pages used by libunibreak. Reference git hash: ad5a524b0128eec644a8cae52fb75ed1f597c0ee @feature
-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 4383fa632d..e3b1ca13f3 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] = {
struct LineBreakPropertiesIndex
{
utf32_t end; /**< End coding point */
- struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */
+ const struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */
};
/**
@@ -311,9 +311,9 @@ void init_linebreak(void)
* @return pointer to the language-specific line breaking
* properties array if found; \c NULL otherwise
*/
-static struct LineBreakProperties *get_lb_prop_lang(const char *lang)
+static const struct LineBreakProperties *get_lb_prop_lang(const char *lang)
{
- struct LineBreakPropertiesLang *lbplIter;
+ const struct LineBreakPropertiesLang *lbplIter;
if (lang != NULL)
{
for (lbplIter = lb_prop_lang_map; lbplIter->lang != NULL; ++lbplIter)
@@ -337,7 +337,7 @@ static struct LineBreakProperties *get_lb_prop_lang(const char *lang)
*/
static enum LineBreakClass get_char_lb_class(
utf32_t ch,
- struct LineBreakProperties *lbp)
+ const struct LineBreakProperties *lbp)
{
while (lbp->prop != LBP_Undefined && ch >= lbp->start)
{
@@ -379,7 +379,7 @@ static enum LineBreakClass get_char_lb_class_default(
*/
static enum LineBreakClass get_char_lb_class_lang(
utf32_t ch,
- struct LineBreakProperties *lbpLang)
+ const struct LineBreakProperties *lbpLang)
{
enum LineBreakClass lbcResult;
diff --git a/src/static_libs/libunibreak/linebreakdata.c b/src/static_libs/libunibreak/linebreakdata.c
index 22b47fc51e..dcf39dc11c 100644
--- a/src/static_libs/libunibreak/linebreakdata.c
+++ b/src/static_libs/libunibreak/linebreakdata.c
@@ -6,7 +6,7 @@
#include "linebreakdef.h"
/** Default line breaking properties as from the Unicode Web site. */
-struct LineBreakProperties lb_prop_default[] = {
+const struct LineBreakProperties lb_prop_default[] = {
{ 0x0000, 0x0008, LBP_CM },
{ 0x0009, 0x0009, LBP_BA },
{ 0x000A, 0x000A, LBP_LF },
diff --git a/src/static_libs/libunibreak/linebreakdef.c b/src/static_libs/libunibreak/linebreakdef.c
index 72ea420be2..daa7cb5e42 100644
--- a/src/static_libs/libunibreak/linebreakdef.c
+++ b/src/static_libs/libunibreak/linebreakdef.c
@@ -53,7 +53,7 @@
/**
* English-specifc data over the default Unicode rules.
*/
-static struct LineBreakProperties lb_prop_English[] = {
+static const struct LineBreakProperties lb_prop_English[] = {
{ 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
{ 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */
{ 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */
@@ -63,7 +63,7 @@ static struct LineBreakProperties lb_prop_English[] = {
/**
* German-specifc data over the default Unicode rules.
*/
-static struct LineBreakProperties lb_prop_German[] = {
+static const struct LineBreakProperties lb_prop_German[] = {
{ 0x00AB, 0x00AB, LBP_CL }, /* Left double angle quotation mark: closing */
{ 0x00BB, 0x00BB, LBP_OP }, /* Right double angle quotation mark: opening */
{ 0x2018, 0x2018, LBP_CL }, /* Left single quotation mark: closing */
@@ -76,7 +76,7 @@ static struct LineBreakProperties lb_prop_German[] = {
/**
* Spanish-specifc data over the default Unicode rules.
*/
-static struct LineBreakProperties lb_prop_Spanish[] = {
+static const struct LineBreakProperties lb_prop_Spanish[] = {
{ 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */
{ 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */
{ 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
@@ -90,7 +90,7 @@ static struct LineBreakProperties lb_prop_Spanish[] = {
/**
* French-specifc data over the default Unicode rules.
*/
-static struct LineBreakProperties lb_prop_French[] = {
+static const struct LineBreakProperties lb_prop_French[] = {
{ 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */
{ 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */
{ 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
@@ -104,7 +104,7 @@ static struct LineBreakProperties lb_prop_French[] = {
/**
* Russian-specifc data over the default Unicode rules.
*/
-static struct LineBreakProperties lb_prop_Russian[] = {
+static const struct LineBreakProperties lb_prop_Russian[] = {
{ 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */
{ 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */
{ 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */
@@ -114,7 +114,7 @@ static struct LineBreakProperties lb_prop_Russian[] = {
/**
* Chinese-specifc data over the default Unicode rules.
*/
-static struct LineBreakProperties lb_prop_Chinese[] = {
+static const struct LineBreakProperties lb_prop_Chinese[] = {
{ 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */
{ 0x2019, 0x2019, LBP_CL }, /* Right single quotation mark: closing */
{ 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */
@@ -128,7 +128,7 @@ static struct LineBreakProperties lb_prop_Chinese[] = {
* file. If you want more flexibility, or do not need the data here,
* you may want to redefine \e lb_prop_lang_map in your C source file.
*/
-struct LineBreakPropertiesLang lb_prop_lang_map[] = {
+const struct LineBreakPropertiesLang lb_prop_lang_map[] = {
{ "en", 2, lb_prop_English },
{ "de", 2, lb_prop_German },
{ "es", 2, lb_prop_Spanish },
diff --git a/src/static_libs/libunibreak/linebreakdef.h b/src/static_libs/libunibreak/linebreakdef.h
index 6b5bca66f2..5c32aefaef 100644
--- a/src/static_libs/libunibreak/linebreakdef.h
+++ b/src/static_libs/libunibreak/linebreakdef.h
@@ -125,7 +125,7 @@ struct LineBreakPropertiesLang
{
const char *lang; /**< Language name */
size_t namelen; /**< Length of name to match */
- struct LineBreakProperties *lbp; /**< Pointer to associated data */
+ const struct LineBreakProperties *lbp; /**< Pointer to associated data */
};
/**
@@ -135,7 +135,7 @@ struct LineBreakPropertiesLang
struct LineBreakContext
{
const char *lang; /**< Language name */
- struct LineBreakProperties *lbpLang;/**< Pointer to LineBreakProperties */
+ const struct LineBreakProperties *lbpLang;/**< Pointer to LineBreakProperties */
enum LineBreakClass lbcCur; /**< Breaking class of current codepoint */
enum LineBreakClass lbcNew; /**< Breaking class of next codepoint */
enum LineBreakClass lbcLast; /**< Breaking class of last codepoint */
@@ -143,8 +143,8 @@ struct LineBreakContext
};
/* Declarations */
-extern struct LineBreakProperties lb_prop_default[];
-extern struct LineBreakPropertiesLang lb_prop_lang_map[];
+extern const struct LineBreakProperties lb_prop_default[];
+extern const struct LineBreakPropertiesLang lb_prop_lang_map[];
/* Function Prototype */
void lb_init_break_context(
diff --git a/src/static_libs/libunibreak/wordbreak.c b/src/static_libs/libunibreak/wordbreak.c
index f6c013f38c..a0d1c43ed6 100644
--- a/src/static_libs/libunibreak/wordbreak.c
+++ b/src/static_libs/libunibreak/wordbreak.c
@@ -75,7 +75,7 @@ void init_wordbreak(void)
*/
static enum WordBreakClass get_char_wb_class(
utf32_t ch,
- struct WordBreakProperties *wbp,
+ const struct WordBreakProperties *wbp,
size_t len)
{
int min = 0;
diff --git a/src/static_libs/libunibreak/wordbreakdata.c b/src/static_libs/libunibreak/wordbreakdata.c
index a31664691c..9049f59dc7 100644
--- a/src/static_libs/libunibreak/wordbreakdata.c
+++ b/src/static_libs/libunibreak/wordbreakdata.c
@@ -5,7 +5,7 @@
#include "wordbreakdef.h"
-static struct WordBreakProperties wb_prop_default[] = {
+static const struct WordBreakProperties wb_prop_default[] = {
{0x000A, 0x000A, WBP_LF},
{0x000B, 0x000C, WBP_Newline},
{0x000D, 0x000D, WBP_CR},