-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICU changes (closes #81) - replace all instances of `std::wstring` with `UString` (= `std::basic_string<UChar>`) - create `InputFile` wrapper to handle UTF-8 streams with nulls efficiency, readability, and code style changes - eliminate `Ltstr` and `string_to_wostream` - simplify Makefile - make transducer symbols `int32_t` rather than `int` - make common symbols static attributes of `Transducer` - extract some other string constants - prefer `std::vector` to `std::list` - prefer `.clear()` and `.empty()` to `= ""` and `== ""` - prefer range-for loops - remove old lsx code - have `regex_compiler` iterate over the input string rather than modifying it - lift a static computation out of a loop in `Transducer::determinize()` - move constant initializers to class header helper function and dependency changes - move `StringUtils` here from apertium - depend on external utfcpp rather than bundling it - make `XMLParseUtil` functions more specific to their typical usecases - add `xml_walk_util.h` for cleanly iterating over children of `xmlNode*`
- Loading branch information
1 parent
f2414b9
commit 81de698
Showing
69 changed files
with
3,087 additions
and
4,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,8 @@ Requirements: | |
* g++ >= 2.95 | ||
* GNU make | ||
* libxml2 >= 2.6.17 | ||
* ICU | ||
* utfcpp | ||
|
||
Building & installing: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
AC_PREREQ(2.52) | ||
|
||
m4_define([PKG_VERSION_MAJOR], [3]) | ||
m4_define([PKG_VERSION_MINOR], [5]) | ||
m4_define([PKG_VERSION_PATCH], [3]) | ||
m4_define([PKG_VERSION_MINOR], [6]) | ||
m4_define([PKG_VERSION_PATCH], [0]) | ||
|
||
AC_INIT([lttoolbox], [PKG_VERSION_MAJOR.PKG_VERSION_MINOR.PKG_VERSION_PATCH], [[email protected]], [lttoolbox], [https://wiki.apertium.org/wiki/Lttoolbox]) | ||
|
||
|
@@ -38,36 +38,16 @@ AC_ARG_ENABLE(profile, | |
[CXXFLAGS="-pg -g -Wall"; CFLAGS="-pg -g -Wall"; LDFLAGS="-pg"]) | ||
|
||
|
||
PKG_CHECK_MODULES(LTTOOLBOX, [libxml-2.0 >= 2.6.17]) | ||
|
||
# Check for wide strings | ||
AC_DEFUN([AC_CXX_WSTRING],[ | ||
AC_CACHE_CHECK(whether the compiler supports wide strings, | ||
ac_cv_cxx_wstring, | ||
[AC_LANG_SAVE | ||
AC_LANG_CPLUSPLUS | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string>]],[[ | ||
std::wstring test = L"test"; | ||
]])], | ||
[ac_cv_cxx_wstring=yes], [ac_cv_cxx_wstring=no]) | ||
AC_LANG_RESTORE | ||
]) | ||
]) | ||
|
||
AC_CXX_WSTRING | ||
|
||
if test "$ac_cv_cxx_wstring" = no | ||
then | ||
AC_MSG_ERROR([Missing wide string support]) | ||
fi | ||
|
||
PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.17]) | ||
PKG_CHECK_MODULES(ICU, [icu-i18n, icu-io, icu-uc]) | ||
|
||
# Checks for libraries. | ||
AC_CHECK_LIB(xml2, xmlReaderForFile) | ||
|
||
# Checks for header files. | ||
AC_HEADER_STDC | ||
AC_CHECK_HEADERS([stdlib.h string.h unistd.h stddef.h]) | ||
AC_CHECK_HEADER([utf8.h], [], [AC_MSG_ERROR([You don't have utfcpp installed.])]) | ||
|
||
# Checks for typedefs, structures, and compiler characteristics. | ||
AC_HEADER_STDBOOL | ||
|
@@ -78,7 +58,7 @@ AC_TYPE_SIZE_T | |
AC_FUNC_ERROR_AT_LINE | ||
|
||
AC_CHECK_DECLS([fread_unlocked, fwrite_unlocked, fgetc_unlocked, \ | ||
fputc_unlocked, fputs_unlocked, fgetwc_unlocked, fputwc_unlocked, fputws_unlocked, ungetwc_unlocked]) | ||
fputc_unlocked, fputs_unlocked]) | ||
|
||
AC_CHECK_FUNCS([setlocale strdup getopt_long]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.