Skip to content

Commit 371b307

Browse files
committed
Fixed broken mapping for convert encoding functions #89
1 parent 42913d7 commit 371b307

File tree

9 files changed

+137
-37
lines changed

9 files changed

+137
-37
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
3.0.0
1+
3.0.1
22
===========
33
February 17, 2017
44

@@ -13,6 +13,12 @@ February 17, 2017
1313
* Added function ```myhtml_node_tree``` for get current Tree from a node
1414
* Сonsumes less memory when initializing, 3MB => 1MB with no negative impact on performance. In the future, the memory will be consumed even less.
1515
* Now ```MyHTML_INSTALL_HEADER``` in cmake options set ```ON``` by default
16+
* Fixed broken mapping for convert encoding functions after release 3.0.0
17+
18+
~~3.0.0~~
19+
~~===========~~
20+
~~February 17, 2017~~
21+
~~...~~
1622

1723
2.0.1
1824
===========

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is one of module of the [Modest] project.
1313

1414
## Now
1515

16-
The current version is 3.0.0. [Last stable version](https://github.com/lexborisov/myhtml/releases/latest) is 3.0.0
16+
The current version is 3.0.1. [Last stable version](https://github.com/lexborisov/myhtml/releases/latest) is 3.0.1
1717

1818
See [Releases](https://github.com/lexborisov/myhtml/releases)
1919

include/myhtml/api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#define MyHTML_VERSION_MAJOR 3
3838
#define MyHTML_VERSION_MINOR 0
39-
#define MyHTML_VERSION_PATCH 0
39+
#define MyHTML_VERSION_PATCH 1
4040

4141
#include <stdbool.h>
4242
#include <stddef.h>

include/myhtml/encoding_resource.h

Lines changed: 62 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9302,21 +9302,68 @@ static const unsigned long myhtml_encoding_map_x_mac_cyrillic[] = {
93029302
1096, 1097, 1098, 1099, 1100, 1101, 1102, 8364,
93039303
};
93049304

9305-
static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
9306-
myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
9307-
myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
9308-
myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
9309-
myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
9310-
myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
9311-
myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
9312-
myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
9313-
myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
9314-
myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
9315-
myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
9316-
myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
9317-
myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
9318-
myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
9319-
myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
9305+
//static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
9306+
// myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
9307+
// myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
9308+
// myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
9309+
// myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
9310+
// myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
9311+
// myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
9312+
// myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
9313+
// myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
9314+
// myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
9315+
// myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
9316+
// myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
9317+
// myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
9318+
// myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
9319+
// myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
9320+
//};
9321+
9322+
static const myhtml_encoding_custom_f myhtml_encoding_function_index[] =
9323+
{
9324+
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_DEFAULT
9325+
NULL,
9326+
NULL,
9327+
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_UTF_8
9328+
myhtml_encoding_decode_utf_16le, // MyHTML_ENCODING_UTF_16LE
9329+
myhtml_encoding_decode_utf_16be, // MyHTML_ENCODING_UTF_16BE
9330+
myhtml_encoding_decode_x_user_defined, // MyHTML_ENCODING_X_USER_DEFINED
9331+
myhtml_encoding_decode_big5, // MyHTML_ENCODING_BIG5
9332+
myhtml_encoding_decode_euc_jp, // MyHTML_ENCODING_EUC_JP
9333+
myhtml_encoding_decode_euc_kr, // MyHTML_ENCODING_EUC_KR
9334+
myhtml_encoding_decode_gb18030, // MyHTML_ENCODING_GB18030
9335+
myhtml_encoding_decode_gbk, // MyHTML_ENCODING_GBK
9336+
myhtml_encoding_decode_ibm866, // MyHTML_ENCODING_IBM866
9337+
myhtml_encoding_decode_iso_2022_jp, // MyHTML_ENCODING_ISO_2022_JP
9338+
myhtml_encoding_decode_iso_8859_10, // MyHTML_ENCODING_ISO_8859_10
9339+
myhtml_encoding_decode_iso_8859_13, // MyHTML_ENCODING_ISO_8859_13
9340+
myhtml_encoding_decode_iso_8859_14, // MyHTML_ENCODING_ISO_8859_14
9341+
myhtml_encoding_decode_iso_8859_15, // MyHTML_ENCODING_ISO_8859_15
9342+
myhtml_encoding_decode_iso_8859_16, // MyHTML_ENCODING_ISO_8859_16
9343+
myhtml_encoding_decode_iso_8859_2, // MyHTML_ENCODING_ISO_8859_2
9344+
myhtml_encoding_decode_iso_8859_3, // MyHTML_ENCODING_ISO_8859_3
9345+
myhtml_encoding_decode_iso_8859_4, // MyHTML_ENCODING_ISO_8859_4
9346+
myhtml_encoding_decode_iso_8859_5, // MyHTML_ENCODING_ISO_8859_5
9347+
myhtml_encoding_decode_iso_8859_6, // MyHTML_ENCODING_ISO_8859_6
9348+
myhtml_encoding_decode_iso_8859_7, // MyHTML_ENCODING_ISO_8859_7
9349+
myhtml_encoding_decode_iso_8859_8, // MyHTML_ENCODING_ISO_8859_8
9350+
myhtml_encoding_decode_iso_8859_8_i, // MyHTML_ENCODING_ISO_8859_8_I
9351+
myhtml_encoding_decode_koi8_r, // MyHTML_ENCODING_KOI8_R
9352+
myhtml_encoding_decode_koi8_u, // MyHTML_ENCODING_KOI8_U
9353+
myhtml_encoding_decode_macintosh, // MyHTML_ENCODING_MACINTOSH
9354+
myhtml_encoding_decode_shift_jis, // MyHTML_ENCODING_SHIFT_JIS
9355+
myhtml_encoding_decode_windows_1250, // MyHTML_ENCODING_WINDOWS_1250
9356+
myhtml_encoding_decode_windows_1251, // MyHTML_ENCODING_WINDOWS_1251
9357+
myhtml_encoding_decode_windows_1252, // MyHTML_ENCODING_WINDOWS_1252
9358+
myhtml_encoding_decode_windows_1253, // MyHTML_ENCODING_WINDOWS_1253
9359+
myhtml_encoding_decode_windows_1254, // MyHTML_ENCODING_WINDOWS_1254
9360+
myhtml_encoding_decode_windows_1255, // MyHTML_ENCODING_WINDOWS_1255
9361+
myhtml_encoding_decode_windows_1256, // MyHTML_ENCODING_WINDOWS_1256
9362+
myhtml_encoding_decode_windows_1257, // MyHTML_ENCODING_WINDOWS_1257
9363+
myhtml_encoding_decode_windows_1258, // MyHTML_ENCODING_WINDOWS_1258
9364+
myhtml_encoding_decode_windows_874, // MyHTML_ENCODING_WINDOWS_874
9365+
myhtml_encoding_decode_x_mac_cyrillic, // MyHTML_ENCODING_X_MAC_CYRILLIC
9366+
NULL,
93209367
};
93219368

93229369
#ifdef __cplusplus

include/myhtml/myosi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#define MyHTML_VERSION_MAJOR 3
3333
#define MyHTML_VERSION_MINOR 0
34-
#define MyHTML_VERSION_PATCH 0
34+
#define MyHTML_VERSION_PATCH 1
3535

3636
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WINPTHREADS_VERSION)
3737
#define IS_OS_WINDOWS

projects/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(MyHTML_PROJECT_SOURCE "${MyHTML_PROJECT_DIR_ROOT}/source")
1111

1212
set(MyHTML_VERSION_MAJOR 3)
1313
set(MyHTML_VERSION_MINOR 0)
14-
set(MyHTML_VERSION_PATCH 0)
14+
set(MyHTML_VERSION_PATCH 1)
1515
set(MyHTML_VERSION_STRING "${MyHTML_VERSION_MAJOR}.${MyHTML_VERSION_MINOR}.${MyHTML_VERSION_PATCH}")
1616

1717
project(${MyHTML_PROJECT_NAME})

source/myhtml/api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#define MyHTML_VERSION_MAJOR 3
3838
#define MyHTML_VERSION_MINOR 0
39-
#define MyHTML_VERSION_PATCH 0
39+
#define MyHTML_VERSION_PATCH 1
4040

4141
#include <stdbool.h>
4242
#include <stddef.h>

source/myhtml/encoding_resource.h

Lines changed: 62 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9302,21 +9302,68 @@ static const unsigned long myhtml_encoding_map_x_mac_cyrillic[] = {
93029302
1096, 1097, 1098, 1099, 1100, 1101, 1102, 8364,
93039303
};
93049304

9305-
static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
9306-
myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
9307-
myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
9308-
myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
9309-
myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
9310-
myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
9311-
myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
9312-
myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
9313-
myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
9314-
myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
9315-
myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
9316-
myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
9317-
myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
9318-
myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
9319-
myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
9305+
//static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
9306+
// myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
9307+
// myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
9308+
// myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
9309+
// myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
9310+
// myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
9311+
// myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
9312+
// myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
9313+
// myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
9314+
// myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
9315+
// myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
9316+
// myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
9317+
// myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
9318+
// myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
9319+
// myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
9320+
//};
9321+
9322+
static const myhtml_encoding_custom_f myhtml_encoding_function_index[] =
9323+
{
9324+
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_DEFAULT
9325+
NULL,
9326+
NULL,
9327+
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_UTF_8
9328+
myhtml_encoding_decode_utf_16le, // MyHTML_ENCODING_UTF_16LE
9329+
myhtml_encoding_decode_utf_16be, // MyHTML_ENCODING_UTF_16BE
9330+
myhtml_encoding_decode_x_user_defined, // MyHTML_ENCODING_X_USER_DEFINED
9331+
myhtml_encoding_decode_big5, // MyHTML_ENCODING_BIG5
9332+
myhtml_encoding_decode_euc_jp, // MyHTML_ENCODING_EUC_JP
9333+
myhtml_encoding_decode_euc_kr, // MyHTML_ENCODING_EUC_KR
9334+
myhtml_encoding_decode_gb18030, // MyHTML_ENCODING_GB18030
9335+
myhtml_encoding_decode_gbk, // MyHTML_ENCODING_GBK
9336+
myhtml_encoding_decode_ibm866, // MyHTML_ENCODING_IBM866
9337+
myhtml_encoding_decode_iso_2022_jp, // MyHTML_ENCODING_ISO_2022_JP
9338+
myhtml_encoding_decode_iso_8859_10, // MyHTML_ENCODING_ISO_8859_10
9339+
myhtml_encoding_decode_iso_8859_13, // MyHTML_ENCODING_ISO_8859_13
9340+
myhtml_encoding_decode_iso_8859_14, // MyHTML_ENCODING_ISO_8859_14
9341+
myhtml_encoding_decode_iso_8859_15, // MyHTML_ENCODING_ISO_8859_15
9342+
myhtml_encoding_decode_iso_8859_16, // MyHTML_ENCODING_ISO_8859_16
9343+
myhtml_encoding_decode_iso_8859_2, // MyHTML_ENCODING_ISO_8859_2
9344+
myhtml_encoding_decode_iso_8859_3, // MyHTML_ENCODING_ISO_8859_3
9345+
myhtml_encoding_decode_iso_8859_4, // MyHTML_ENCODING_ISO_8859_4
9346+
myhtml_encoding_decode_iso_8859_5, // MyHTML_ENCODING_ISO_8859_5
9347+
myhtml_encoding_decode_iso_8859_6, // MyHTML_ENCODING_ISO_8859_6
9348+
myhtml_encoding_decode_iso_8859_7, // MyHTML_ENCODING_ISO_8859_7
9349+
myhtml_encoding_decode_iso_8859_8, // MyHTML_ENCODING_ISO_8859_8
9350+
myhtml_encoding_decode_iso_8859_8_i, // MyHTML_ENCODING_ISO_8859_8_I
9351+
myhtml_encoding_decode_koi8_r, // MyHTML_ENCODING_KOI8_R
9352+
myhtml_encoding_decode_koi8_u, // MyHTML_ENCODING_KOI8_U
9353+
myhtml_encoding_decode_macintosh, // MyHTML_ENCODING_MACINTOSH
9354+
myhtml_encoding_decode_shift_jis, // MyHTML_ENCODING_SHIFT_JIS
9355+
myhtml_encoding_decode_windows_1250, // MyHTML_ENCODING_WINDOWS_1250
9356+
myhtml_encoding_decode_windows_1251, // MyHTML_ENCODING_WINDOWS_1251
9357+
myhtml_encoding_decode_windows_1252, // MyHTML_ENCODING_WINDOWS_1252
9358+
myhtml_encoding_decode_windows_1253, // MyHTML_ENCODING_WINDOWS_1253
9359+
myhtml_encoding_decode_windows_1254, // MyHTML_ENCODING_WINDOWS_1254
9360+
myhtml_encoding_decode_windows_1255, // MyHTML_ENCODING_WINDOWS_1255
9361+
myhtml_encoding_decode_windows_1256, // MyHTML_ENCODING_WINDOWS_1256
9362+
myhtml_encoding_decode_windows_1257, // MyHTML_ENCODING_WINDOWS_1257
9363+
myhtml_encoding_decode_windows_1258, // MyHTML_ENCODING_WINDOWS_1258
9364+
myhtml_encoding_decode_windows_874, // MyHTML_ENCODING_WINDOWS_874
9365+
myhtml_encoding_decode_x_mac_cyrillic, // MyHTML_ENCODING_X_MAC_CYRILLIC
9366+
NULL,
93209367
};
93219368

93229369
#ifdef __cplusplus

source/myhtml/myosi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#define MyHTML_VERSION_MAJOR 3
3333
#define MyHTML_VERSION_MINOR 0
34-
#define MyHTML_VERSION_PATCH 0
34+
#define MyHTML_VERSION_PATCH 1
3535

3636
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WINPTHREADS_VERSION)
3737
#define IS_OS_WINDOWS

0 commit comments

Comments
 (0)