Skip to content

Commit

Permalink
Fixed broken mapping for convert encoding functions #89
Browse files Browse the repository at this point in the history
  • Loading branch information
lexborisov committed Feb 17, 2017
1 parent 42913d7 commit 371b307
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 37 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
3.0.0
3.0.1
===========
February 17, 2017

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

~~3.0.0~~
~~===========~~
~~February 17, 2017~~
~~...~~

2.0.1
===========
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is one of module of the [Modest] project.

## Now

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

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

Expand Down
2 changes: 1 addition & 1 deletion include/myhtml/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#define MyHTML_VERSION_MAJOR 3
#define MyHTML_VERSION_MINOR 0
#define MyHTML_VERSION_PATCH 0
#define MyHTML_VERSION_PATCH 1

#include <stdbool.h>
#include <stddef.h>
Expand Down
77 changes: 62 additions & 15 deletions include/myhtml/encoding_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -9302,21 +9302,68 @@ static const unsigned long myhtml_encoding_map_x_mac_cyrillic[] = {
1096, 1097, 1098, 1099, 1100, 1101, 1102, 8364,
};

static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
//static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
// myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
// myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
// myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
// myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
// myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
// myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
// myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
// myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
// myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
// myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
// myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
// myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
// myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
// myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
//};

static const myhtml_encoding_custom_f myhtml_encoding_function_index[] =
{
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_DEFAULT
NULL,
NULL,
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_UTF_8
myhtml_encoding_decode_utf_16le, // MyHTML_ENCODING_UTF_16LE
myhtml_encoding_decode_utf_16be, // MyHTML_ENCODING_UTF_16BE
myhtml_encoding_decode_x_user_defined, // MyHTML_ENCODING_X_USER_DEFINED
myhtml_encoding_decode_big5, // MyHTML_ENCODING_BIG5
myhtml_encoding_decode_euc_jp, // MyHTML_ENCODING_EUC_JP
myhtml_encoding_decode_euc_kr, // MyHTML_ENCODING_EUC_KR
myhtml_encoding_decode_gb18030, // MyHTML_ENCODING_GB18030
myhtml_encoding_decode_gbk, // MyHTML_ENCODING_GBK
myhtml_encoding_decode_ibm866, // MyHTML_ENCODING_IBM866
myhtml_encoding_decode_iso_2022_jp, // MyHTML_ENCODING_ISO_2022_JP
myhtml_encoding_decode_iso_8859_10, // MyHTML_ENCODING_ISO_8859_10
myhtml_encoding_decode_iso_8859_13, // MyHTML_ENCODING_ISO_8859_13
myhtml_encoding_decode_iso_8859_14, // MyHTML_ENCODING_ISO_8859_14
myhtml_encoding_decode_iso_8859_15, // MyHTML_ENCODING_ISO_8859_15
myhtml_encoding_decode_iso_8859_16, // MyHTML_ENCODING_ISO_8859_16
myhtml_encoding_decode_iso_8859_2, // MyHTML_ENCODING_ISO_8859_2
myhtml_encoding_decode_iso_8859_3, // MyHTML_ENCODING_ISO_8859_3
myhtml_encoding_decode_iso_8859_4, // MyHTML_ENCODING_ISO_8859_4
myhtml_encoding_decode_iso_8859_5, // MyHTML_ENCODING_ISO_8859_5
myhtml_encoding_decode_iso_8859_6, // MyHTML_ENCODING_ISO_8859_6
myhtml_encoding_decode_iso_8859_7, // MyHTML_ENCODING_ISO_8859_7
myhtml_encoding_decode_iso_8859_8, // MyHTML_ENCODING_ISO_8859_8
myhtml_encoding_decode_iso_8859_8_i, // MyHTML_ENCODING_ISO_8859_8_I
myhtml_encoding_decode_koi8_r, // MyHTML_ENCODING_KOI8_R
myhtml_encoding_decode_koi8_u, // MyHTML_ENCODING_KOI8_U
myhtml_encoding_decode_macintosh, // MyHTML_ENCODING_MACINTOSH
myhtml_encoding_decode_shift_jis, // MyHTML_ENCODING_SHIFT_JIS
myhtml_encoding_decode_windows_1250, // MyHTML_ENCODING_WINDOWS_1250
myhtml_encoding_decode_windows_1251, // MyHTML_ENCODING_WINDOWS_1251
myhtml_encoding_decode_windows_1252, // MyHTML_ENCODING_WINDOWS_1252
myhtml_encoding_decode_windows_1253, // MyHTML_ENCODING_WINDOWS_1253
myhtml_encoding_decode_windows_1254, // MyHTML_ENCODING_WINDOWS_1254
myhtml_encoding_decode_windows_1255, // MyHTML_ENCODING_WINDOWS_1255
myhtml_encoding_decode_windows_1256, // MyHTML_ENCODING_WINDOWS_1256
myhtml_encoding_decode_windows_1257, // MyHTML_ENCODING_WINDOWS_1257
myhtml_encoding_decode_windows_1258, // MyHTML_ENCODING_WINDOWS_1258
myhtml_encoding_decode_windows_874, // MyHTML_ENCODING_WINDOWS_874
myhtml_encoding_decode_x_mac_cyrillic, // MyHTML_ENCODING_X_MAC_CYRILLIC
NULL,
};

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion include/myhtml/myosi.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#define MyHTML_VERSION_MAJOR 3
#define MyHTML_VERSION_MINOR 0
#define MyHTML_VERSION_PATCH 0
#define MyHTML_VERSION_PATCH 1

#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WINPTHREADS_VERSION)
#define IS_OS_WINDOWS
Expand Down
2 changes: 1 addition & 1 deletion projects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(MyHTML_PROJECT_SOURCE "${MyHTML_PROJECT_DIR_ROOT}/source")

set(MyHTML_VERSION_MAJOR 3)
set(MyHTML_VERSION_MINOR 0)
set(MyHTML_VERSION_PATCH 0)
set(MyHTML_VERSION_PATCH 1)
set(MyHTML_VERSION_STRING "${MyHTML_VERSION_MAJOR}.${MyHTML_VERSION_MINOR}.${MyHTML_VERSION_PATCH}")

project(${MyHTML_PROJECT_NAME})
Expand Down
2 changes: 1 addition & 1 deletion source/myhtml/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#define MyHTML_VERSION_MAJOR 3
#define MyHTML_VERSION_MINOR 0
#define MyHTML_VERSION_PATCH 0
#define MyHTML_VERSION_PATCH 1

#include <stdbool.h>
#include <stddef.h>
Expand Down
77 changes: 62 additions & 15 deletions source/myhtml/encoding_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -9302,21 +9302,68 @@ static const unsigned long myhtml_encoding_map_x_mac_cyrillic[] = {
1096, 1097, 1098, 1099, 1100, 1101, 1102, 8364,
};

static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
//static const myhtml_encoding_custom_f myhtml_encoding_function_index[] = {
// myhtml_encoding_decode_utf_8, NULL, NULL, myhtml_encoding_decode_utf_8, myhtml_encoding_decode_utf_16le,
// myhtml_encoding_decode_utf_16be, myhtml_encoding_decode_x_user_defined,
// myhtml_encoding_decode_big5, myhtml_encoding_decode_euc_kr, myhtml_encoding_decode_gb18030,
// myhtml_encoding_decode_ibm866, myhtml_encoding_decode_iso_8859_10, myhtml_encoding_decode_iso_8859_13,
// myhtml_encoding_decode_iso_8859_14, myhtml_encoding_decode_iso_8859_15, myhtml_encoding_decode_iso_8859_16,
// myhtml_encoding_decode_iso_8859_2, myhtml_encoding_decode_iso_8859_3, myhtml_encoding_decode_iso_8859_4,
// myhtml_encoding_decode_iso_8859_5, myhtml_encoding_decode_iso_8859_6, myhtml_encoding_decode_iso_8859_7,
// myhtml_encoding_decode_iso_8859_8, myhtml_encoding_decode_koi8_r, myhtml_encoding_decode_koi8_u,
// myhtml_encoding_decode_macintosh, myhtml_encoding_decode_windows_1250, myhtml_encoding_decode_windows_1251,
// myhtml_encoding_decode_windows_1252, myhtml_encoding_decode_windows_1253, myhtml_encoding_decode_windows_1254,
// myhtml_encoding_decode_windows_1255, myhtml_encoding_decode_windows_1256, myhtml_encoding_decode_windows_1257,
// myhtml_encoding_decode_windows_1258, myhtml_encoding_decode_windows_874, myhtml_encoding_decode_x_mac_cyrillic,
// myhtml_encoding_decode_iso_2022_jp, myhtml_encoding_decode_gbk, myhtml_encoding_decode_shift_jis,
// myhtml_encoding_decode_euc_jp, myhtml_encoding_decode_iso_8859_8_i
//};

static const myhtml_encoding_custom_f myhtml_encoding_function_index[] =
{
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_DEFAULT
NULL,
NULL,
myhtml_encoding_decode_utf_8, // MyHTML_ENCODING_UTF_8
myhtml_encoding_decode_utf_16le, // MyHTML_ENCODING_UTF_16LE
myhtml_encoding_decode_utf_16be, // MyHTML_ENCODING_UTF_16BE
myhtml_encoding_decode_x_user_defined, // MyHTML_ENCODING_X_USER_DEFINED
myhtml_encoding_decode_big5, // MyHTML_ENCODING_BIG5
myhtml_encoding_decode_euc_jp, // MyHTML_ENCODING_EUC_JP
myhtml_encoding_decode_euc_kr, // MyHTML_ENCODING_EUC_KR
myhtml_encoding_decode_gb18030, // MyHTML_ENCODING_GB18030
myhtml_encoding_decode_gbk, // MyHTML_ENCODING_GBK
myhtml_encoding_decode_ibm866, // MyHTML_ENCODING_IBM866
myhtml_encoding_decode_iso_2022_jp, // MyHTML_ENCODING_ISO_2022_JP
myhtml_encoding_decode_iso_8859_10, // MyHTML_ENCODING_ISO_8859_10
myhtml_encoding_decode_iso_8859_13, // MyHTML_ENCODING_ISO_8859_13
myhtml_encoding_decode_iso_8859_14, // MyHTML_ENCODING_ISO_8859_14
myhtml_encoding_decode_iso_8859_15, // MyHTML_ENCODING_ISO_8859_15
myhtml_encoding_decode_iso_8859_16, // MyHTML_ENCODING_ISO_8859_16
myhtml_encoding_decode_iso_8859_2, // MyHTML_ENCODING_ISO_8859_2
myhtml_encoding_decode_iso_8859_3, // MyHTML_ENCODING_ISO_8859_3
myhtml_encoding_decode_iso_8859_4, // MyHTML_ENCODING_ISO_8859_4
myhtml_encoding_decode_iso_8859_5, // MyHTML_ENCODING_ISO_8859_5
myhtml_encoding_decode_iso_8859_6, // MyHTML_ENCODING_ISO_8859_6
myhtml_encoding_decode_iso_8859_7, // MyHTML_ENCODING_ISO_8859_7
myhtml_encoding_decode_iso_8859_8, // MyHTML_ENCODING_ISO_8859_8
myhtml_encoding_decode_iso_8859_8_i, // MyHTML_ENCODING_ISO_8859_8_I
myhtml_encoding_decode_koi8_r, // MyHTML_ENCODING_KOI8_R
myhtml_encoding_decode_koi8_u, // MyHTML_ENCODING_KOI8_U
myhtml_encoding_decode_macintosh, // MyHTML_ENCODING_MACINTOSH
myhtml_encoding_decode_shift_jis, // MyHTML_ENCODING_SHIFT_JIS
myhtml_encoding_decode_windows_1250, // MyHTML_ENCODING_WINDOWS_1250
myhtml_encoding_decode_windows_1251, // MyHTML_ENCODING_WINDOWS_1251
myhtml_encoding_decode_windows_1252, // MyHTML_ENCODING_WINDOWS_1252
myhtml_encoding_decode_windows_1253, // MyHTML_ENCODING_WINDOWS_1253
myhtml_encoding_decode_windows_1254, // MyHTML_ENCODING_WINDOWS_1254
myhtml_encoding_decode_windows_1255, // MyHTML_ENCODING_WINDOWS_1255
myhtml_encoding_decode_windows_1256, // MyHTML_ENCODING_WINDOWS_1256
myhtml_encoding_decode_windows_1257, // MyHTML_ENCODING_WINDOWS_1257
myhtml_encoding_decode_windows_1258, // MyHTML_ENCODING_WINDOWS_1258
myhtml_encoding_decode_windows_874, // MyHTML_ENCODING_WINDOWS_874
myhtml_encoding_decode_x_mac_cyrillic, // MyHTML_ENCODING_X_MAC_CYRILLIC
NULL,
};

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion source/myhtml/myosi.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#define MyHTML_VERSION_MAJOR 3
#define MyHTML_VERSION_MINOR 0
#define MyHTML_VERSION_PATCH 0
#define MyHTML_VERSION_PATCH 1

#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WINPTHREADS_VERSION)
#define IS_OS_WINDOWS
Expand Down

0 comments on commit 371b307

Please sign in to comment.