summaryrefslogtreecommitdiff
path: root/src/static_libs/libunibreak/linebreak.h
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-05-07 10:53:11 +0100
committerTom Hacohen <tom@stosb.com>2015-05-07 10:54:26 +0100
commit7a49d23f90f41c478db9b7beb9763aa0cd74ae46 (patch)
tree8ff009d70d91523d2c5f718ed395c8e23df43c4f /src/static_libs/libunibreak/linebreak.h
parentba77a837a37af0d154d7ceafbb5ab7d4f75090f6 (diff)
Static deps unibreak: update to what will soon be version 3.
Version 3 is not yet released, but this is on track to become it. This is based on commit: a815e11f7ebf35b59278f783227a829ee4692760. @feature.
Diffstat (limited to 'src/static_libs/libunibreak/linebreak.h')
-rw-r--r--src/static_libs/libunibreak/linebreak.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/static_libs/libunibreak/linebreak.h b/src/static_libs/libunibreak/linebreak.h
index 94fbca0f9f..68c8e4127c 100644
--- a/src/static_libs/libunibreak/linebreak.h
+++ b/src/static_libs/libunibreak/linebreak.h
@@ -4,7 +4,7 @@
4 * Line breaking in a Unicode sequence. Designed to be used in a 4 * Line breaking in a Unicode sequence. Designed to be used in a
5 * generic text renderer. 5 * generic text renderer.
6 * 6 *
7 * Copyright (C) 2008-2012 Wu Yongwei <wuyongwei at gmail dot com> 7 * Copyright (C) 2008-2015 Wu Yongwei <wuyongwei at gmail dot com>
8 * 8 *
9 * This software is provided 'as-is', without any express or implied 9 * This software is provided 'as-is', without any express or implied
10 * warranty. In no event will the author be held liable for any damages 10 * warranty. In no event will the author be held liable for any damages
@@ -30,9 +30,9 @@
30 * Unicode 5.0.0: 30 * Unicode 5.0.0:
31 * <URL:http://www.unicode.org/reports/tr14/tr14-19.html> 31 * <URL:http://www.unicode.org/reports/tr14/tr14-19.html>
32 * 32 *
33 * This library has been updated according to Revision 30, for 33 * This library has been updated according to Revision 33, for
34 * Unicode 6.2.0: 34 * Unicode 7.0.0:
35 * <URL:http://www.unicode.org/reports/tr14/tr14-30.html> 35 * <URL:http://www.unicode.org/reports/tr14/tr14-33.html>
36 * 36 *
37 * The Unicode Terms of Use are available at 37 * The Unicode Terms of Use are available at
38 * <URL:http://www.unicode.org/copyright.html> 38 * <URL:http://www.unicode.org/copyright.html>
@@ -43,7 +43,7 @@
43 * 43 *
44 * Header file for the line breaking algorithm. 44 * Header file for the line breaking algorithm.
45 * 45 *
46 * @version 2.2, 2012/10/06 46 * @version 2.4, 2015/04/18
47 * @author Wu Yongwei 47 * @author Wu Yongwei
48 */ 48 */
49 49
@@ -51,21 +51,12 @@
51#define LINEBREAK_H 51#define LINEBREAK_H
52 52
53#include <stddef.h> 53#include <stddef.h>
54#include "unibreakbase.h"
54 55
55#ifdef __cplusplus 56#ifdef __cplusplus
56extern "C" { 57extern "C" {
57#endif 58#endif
58 59
59#define LINEBREAK_VERSION 0x0202 /**< Version of the library linebreak */
60extern const int linebreak_version;
61
62#ifndef LINEBREAK_UTF_TYPES_DEFINED
63#define LINEBREAK_UTF_TYPES_DEFINED
64typedef unsigned char utf8_t; /**< Type for UTF-8 data points */
65typedef unsigned short utf16_t; /**< Type for UTF-16 data points */
66typedef unsigned int utf32_t; /**< Type for UTF-32 data points */
67#endif
68
69#define LINEBREAK_MUSTBREAK 0 /**< Break is mandatory */ 60#define LINEBREAK_MUSTBREAK 0 /**< Break is mandatory */
70#define LINEBREAK_ALLOWBREAK 1 /**< Break is allowed */ 61#define LINEBREAK_ALLOWBREAK 1 /**< Break is allowed */
71#define LINEBREAK_NOBREAK 2 /**< No break is possible */ 62#define LINEBREAK_NOBREAK 2 /**< No break is possible */
@@ -73,12 +64,12 @@ typedef unsigned int utf32_t; /**< Type for UTF-32 data points */
73 64
74void init_linebreak(void); 65void init_linebreak(void);
75void set_linebreaks_utf8( 66void set_linebreaks_utf8(
76 const utf8_t *s, size_t len, const char* lang, char *brks); 67 const utf8_t *s, size_t len, const char *lang, char *brks);
77void set_linebreaks_utf16( 68void set_linebreaks_utf16(
78 const utf16_t *s, size_t len, const char* lang, char *brks); 69 const utf16_t *s, size_t len, const char *lang, char *brks);
79void set_linebreaks_utf32( 70void set_linebreaks_utf32(
80 const utf32_t *s, size_t len, const char* lang, char *brks); 71 const utf32_t *s, size_t len, const char *lang, char *brks);
81int is_line_breakable(utf32_t char1, utf32_t char2, const char* lang); 72int is_line_breakable(utf32_t char1, utf32_t char2, const char *lang);
82 73
83#ifdef __cplusplus 74#ifdef __cplusplus
84} 75}