Skip to content

Commit 8bab8f9

Browse files
authored
Merge pull request #3 from cppp-project/dev
[Pull Request] Prepare for release version 2.1.0.
2 parents cab3084 + ffca294 commit 8bab8f9

File tree

247 files changed

+4009
-2847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+4009
-2847
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ tests/test-shiftseq.exe
4141
tests/uniq-u
4242
tests/uniq-u.exe
4343
tests/tmp-*.TXT
44+
a.out
4445

4546
# Patterns for all subdirectories: all kinds of automatic backup files.
4647
*.orig
@@ -51,6 +52,7 @@ tests/tmp-*.TXT
5152
.#*
5253
\#*#
5354
.vscode
55+
.cache
5456

5557
# Autopull modules
5658
build-aux/
@@ -59,6 +61,7 @@ build-aux/
5961
tests/data/UTF-8.TXT
6062
tests/data/GB18030-2005.TXT
6163
tests/data/GB18030-2022.TXT
64+
*.tmp
6265

6366
# Dist directory and temps
6467
cppp-reiconv-v*

CMakeLists.txt

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# The cppp-reiconv library is free software; you can redistribute it
55
# and/or modify it under the terms of the GNU Lesser General Public
6-
# License as published by the Free Software Foundation; either version 2.1
6+
# License as published by the Free Software Foundation; either version 3
77
# of the License, or (at your option) any later version.
88
#
99
# The cppp-reiconv library is distributed in the hope that it will be
@@ -16,28 +16,31 @@
1616
# If not, see <https://www.gnu.org/licenses/>.
1717

1818
cmake_minimum_required(VERSION 3.12)
19-
project(cppp-reiconv VERSION 2.0.0)
19+
project(cppp-reiconv VERSION 2.1.0)
2020

2121
# Define options
2222
option(ENABLE_EXTRA "Enable extra encodings and features." OFF)
2323

2424
# Set C++ standard
2525
set(CMAKE_CXX_STANDARD 11)
2626

27+
# ----------------------------------------------------------------------------------
28+
# Import build-aux subdirectory.
2729
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build-aux")
2830
set(BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR}/build-aux")
31+
add_subdirectory("${BUILD_AUX}")
32+
message(STATUS "Using '${BUILD_AUX}' for C++ Plus build-aux directory.")
2933
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../build-aux")
3034
set(BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR}/../build-aux")
3135
else()
3236
message(FATAL_ERROR "CMake build-aux directory is not exists, try to execute 'setup.cmd' or './setup.sh' to get it.")
3337
endif()
34-
set(AUX_DIR "${BUILD_AUX}/cmake")
38+
get_filename_component(BUILD_AUX "${BUILD_AUX}" ABSOLUTE)
39+
include("${BUILD_AUX}/cmake/cppp.cmake")
3540

36-
message(STATUS "Using '${BUILD_AUX}' for C++ Plus build-aux directory.")
37-
add_subdirectory("${BUILD_AUX}")
38-
39-
include("${AUX_DIR}/cppp.cmake")
41+
cppp_init_nls_util()
4042

43+
# ----------------------------------------------------------------------------------
4144
check_have_visibility()
4245

4346
if(MSVC)
@@ -52,20 +55,21 @@ elseif(HAVE_VISIBILITY)
5255
else()
5356
set(DLL_VARIABLE "")
5457
endif()
55-
configure_file("${srcdir}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp")
56-
configure_file("${srcdir}/windows/libcppp-reiconv.rc.in" "${outdir}/windows/libcppp-reiconv.rc")
58+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp")
59+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/windows/libcppp-reiconv.rc.in" "${CMAKE_BINARY_DIR}/windows/libcppp-reiconv.rc")
5760

5861
# Generate header file for install
5962
if(WIN32)
6063
set(DLL_VARIABLE "__declspec(dllimport)")
6164
else()
6265
set(DLL_VARIABLE "")
6366
endif()
64-
configure_file("${srcdir}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp.inst")
67+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp.inst")
68+
cppp_nls_autotranslate("${output_includedir}/cppp/reiconv.hpp.inst" "${CMAKE_CURRENT_SOURCE_DIR}/lang")
6569

6670
# Add includes
67-
include_directories("${srcdir}/lib")
68-
include_directories("${srcdir}/lib/generated")
71+
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib")
72+
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib/generated")
6973
include_directories("${output_includedir}")
7074

7175
# Add definitions
@@ -75,7 +79,7 @@ if(ENABLE_EXTRA)
7579
endif()
7680

7781
# Add library
78-
cppp_build_library(${PROJECT_NAME} "${srcdir}/lib/iconv.cpp" TRUE TRUE "${outdir}/windows/libcppp-reiconv.rc")
82+
cppp_build_library(${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/lib/iconv.cpp" TRUE TRUE "${CMAKE_BINARY_DIR}/windows/libcppp-reiconv.rc")
7983

8084
# Include test suite.
8185
include("tests/tests.cmake")

CPPPPKG

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
{
22
"name" : "cppp-reiconv",
3-
"version" : "2.0.0",
3+
"version" : "2.1.0",
44
"list_file_path": "FILELIST",
55
"description": "C++ Plus character set conversion library",
66
"authors": [
77
"The C++ Plus Project",
88
"Bruno Haible",
9-
"ChenPi11",
10-
"Sam Steingold",
11-
"Ben Noordhuis",
12-
"Mike Fulton",
13-
"Daiki Ueno",
14-
"KO Myung-Hun"
9+
"ChenPi11"
1510
],
1611
"webpage": "https://github.com/cppp-project/cppp-reiconv",
1712
"subpackages": {

ChangeLog

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
2023-09-02 ChenPi11 <[email protected]>
2+
3+
Optimize 'iconv_open(int, int)'.
4+
Change version to '2.1.0'.
5+
Update NEWS.md.
6+
Remove some authors because they are only contributors.
7+
Prepare for release version 2.1.0.
8+
9+
2023-08-29 ChenPi11 <[email protected]>
10+
11+
Fix type-conflict warning when in clang.
12+
Fully remove wchar support.
13+
Add function 'extern iconv_t iconv_open (int tocode_cp, int fromcode_cp, bool strict=true)'.
14+
Update language map.
15+
16+
2023-08-27 ChenPi11 <[email protected]>
17+
18+
Add codepage definitions.
19+
20+
2023-08-24 ChenPi11 <[email protected]>
21+
22+
Fix subdirectory import bug.
23+
Optimize the way to import build-aux.
24+
25+
2023-08-23 ChenPi11 <[email protected]>
26+
27+
Add CTest on Windows support.
28+
29+
2023-07-28 ChenPi11 <[email protected]>
30+
31+
Finish NLS Translate language maps (en_US, zh_CN).
32+
Add Doxygen notes for 'cppp/reiconv.hpp'.
33+
Fix 'reiconv_version' bug (changed it to 2.0).
34+
Remove 'iconv_allocation_t';
35+
136
2023-07-19 ChenPi11 <[email protected]>
237

338
Fix encode()'s EILSEQ bug.

FILELIST

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
lang/en_US.langmap
2+
lang/zh_CN.langmap
13
lib/utf32.h
24
lib/iso8859_16.h
35
lib/iso8859_6.h
@@ -285,16 +287,14 @@ lib/encodings.def
285287
lib/tds565.h
286288
lib/cp932ext.h
287289
lib/gb12345ext.h
288-
lib/loop_wchar.h
289-
tests/table-from.cpp
290-
tests/cmp.cpp
291-
tests/check-stateless
290+
tests/check-stateless.cpp
291+
tests/table-from.hpp
292292
tests/tests.cmake
293-
tests/uniq-u.cpp
294-
tests/reiconv-test.cpp
295-
tests/table-to.cpp
296-
tests/check-stateful
297-
tests/genutf8.cpp
293+
tests/uniq-u.hpp
294+
tests/reiconv-test.hpp
295+
tests/table-to.hpp
296+
tests/check-stateful.cpp
297+
tests/data-generator.cpp
298298
tests/data/IBM-284.TXT
299299
tests/data/IBM-1112.TXT
300300
tests/data/IBM-1146.TXT
@@ -541,7 +541,10 @@ tests/data/IBM-1158.TXT
541541
tests/data/BIG5-2003.IRREVERSIBLE.TXT
542542
tests/test-shiftseq.cpp
543543
tests/test-to-wchar.cpp
544-
tests/gengb18030z.cpp
544+
tests/throw_error.hpp
545+
tests/file_utils.hpp
546+
tests/sort.cpp
547+
tests/sort.hpp
545548
COPYING
546549
Makefile.devel
547550
include/cppp/reiconv.hpp.in

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
New in 2.1.0:
2+
* Add a new function `iconv_t iconv_open(int tocode_cp, int fromcode_cp, bool strict = true);` and codepage definitions.
3+
* Add CTest on Windows support.
4+
* Remove 'iconv_allocation_t';
5+
* Fully remove wchar support.
6+
* Fix some bugs.
7+
* Add header comments NLS support.
8+
* Add Doxygen comments for 'cppp/reiconv.hpp'.
9+
110
New in 2.0.0:
211
* Redist 'GNU LIBICONV' to 'cppp-reiconv'.
312
* Remove iconv program, iconv gettext po, iconv manual.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ cmake --install .
131131

132132
# Install
133133
This library installs:
134-
- a shared library 'libcppp-reiconv.so' or '~.dll' or '~.dylib' ...
135-
- a static library 'libcppp-reiconv.a' or '~.lib' ...
134+
- a shared library 'libcppp-reiconv'.
135+
- a static library 'libcppp-reiconv.static'.
136136
- a header file '<cppp/reiconv.hpp>'.
137137

138138
To use it, simply #include <cppp/reiconv.hpp> and import the lib to use the functions.

0 commit comments

Comments
 (0)