Static deps unibreak: Update to latest git version.

This version reduces the number of dirty pages used by libunibreak.
Reference git hash: ad5a524b0128eec644a8cae52fb75ed1f597c0ee

@feature
This commit is contained in:
Tom Hacohen 2016-08-24 11:14:57 +01:00
parent 2483f30f48
commit a016ab751c
6 changed files with 19 additions and 19 deletions

View File

@ -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;

View File

@ -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 },

View File

@ -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 },

View File

@ -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(

View File

@ -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;

View File

@ -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},