diff options
| author | Sam Varshavchik | 2021-02-13 23:30:50 -0500 |
|---|---|---|
| committer | Sam Varshavchik | 2021-02-13 23:30:50 -0500 |
| commit | 688f31b2d1a5e0735661a829d7f743f9a0b68050 (patch) | |
| tree | c2a23e4d760d8d1b72f07e0c8b108f2d46315ce2 | |
| parent | 2db8a28d72bee3746ce6d06bf5c0896e46269492 (diff) | |
| download | courier-libs-688f31b2d1a5e0735661a829d7f743f9a0b68050.tar.bz2 | |
2021-02-13 Sam Varshavchik <mrsam@courier-mta.com>
* courier-unicode-version.m4: split version checking macro into its
own m4 file.
* unicode::bidi_calc - an empty string with an explicit embedding
level should return the requested embedding level.
| -rw-r--r-- | unicode/.gitignore | 1 | ||||
| -rw-r--r-- | unicode/ChangeLog | 8 | ||||
| -rw-r--r-- | unicode/Makefile.am | 2 | ||||
| -rw-r--r-- | unicode/biditest2.C | 10 | ||||
| -rw-r--r-- | unicode/book.xml | 34 | ||||
| -rw-r--r-- | unicode/configure.ac | 12 | ||||
| -rw-r--r-- | unicode/courier-unicode-version.m4.in | 42 | ||||
| -rw-r--r-- | unicode/courier-unicode.h.in | 2 | ||||
| -rw-r--r-- | unicode/m4/courier-unicode.m4 | 41 | ||||
| -rw-r--r-- | unicode/unicodecpp.C | 3 |
10 files changed, 106 insertions, 49 deletions
diff --git a/unicode/.gitignore b/unicode/.gitignore index 8905e05..e749d69 100644 --- a/unicode/.gitignore +++ b/unicode/.gitignore @@ -26,6 +26,7 @@ /config.sub /courier-unicode.h /courier-unicode.spec +/courier-unicode-version.m4 /depcomp /docs.stamp /enttest diff --git a/unicode/ChangeLog b/unicode/ChangeLog index 378fede..64f3f32 100644 --- a/unicode/ChangeLog +++ b/unicode/ChangeLog @@ -1,3 +1,11 @@ +2021-02-13 Sam Varshavchik <mrsam@courier-mta.com> + + * courier-unicode-version.m4: split version checking macro into its + own m4 file. + + * unicode::bidi_calc - an empty string with an explicit embedding + level should return the requested embedding level. + 2.2 2020-11-05 Sam Varshavchik <mrsam@courier-mta.com> diff --git a/unicode/Makefile.am b/unicode/Makefile.am index 7ba36f1..d254857 100644 --- a/unicode/Makefile.am +++ b/unicode/Makefile.am @@ -24,7 +24,7 @@ noinst_PROGRAMS=unicodetest graphemetest linebreaktest wordbreaktest \ enttest scripttest biditest biditest2 aclocaldir=$(datadir)/aclocal -aclocal_DATA=m4/courier-unicode.m4 +aclocal_DATA=m4/courier-unicode.m4 courier-unicode-version.m4 update-www: @$(MAKE) update-www-unicode diff --git a/unicode/biditest2.C b/unicode/biditest2.C index 8e9d7da..d81a493 100644 --- a/unicode/biditest2.C +++ b/unicode/biditest2.C @@ -548,6 +548,16 @@ void null_character_test() }, UNICODE_BIDI_CLEANUP_EXTRA, 0, 3); + + s=U""; + res=unicode::bidi_calc(s, UNICODE_BIDI_RL); + + if (std::get<1>(res) != UNICODE_BIDI_RL) + { + std::cerr << "Paragraph embedding level not honored" + << std::endl; + exit(1); + } } void direction_test() diff --git a/unicode/book.xml b/unicode/book.xml index c3ebc33..89e93f0 100644 --- a/unicode/book.xml +++ b/unicode/book.xml @@ -99,11 +99,39 @@ See COPYING for distribution information. <para> Download the current version of the library from <ulink url="/download.html#unicode">https://www.courier-mta.org/download.html#unicode</ulink>. - After unpacking the tarball, run the configure script, which takes - the usual options, followed by <command>make</command>, then - <command>make install</command>. + Use the downloaded tarball to create an appropriate installation + package for your operating system distribution. + The typical sequence of commands is: </para> + <blockquote> + <informalexample> + <programlisting> +./configure # Takes the default configure script options +make +make install DESTDIR=/tmp/courier-unicode-instimage # For example.</programlisting> + </informalexample> + </blockquote> + + <para> + The library uses a stock configure script, <command>make</command> + and <command>make install</command> command that respects the + <varname>DESTDIR</varname> setting to create an installation image + in the directory specified by <varname>DESTDIR</varname>. + </para> + + <note> + <para> + <command>make install</command> will not take any explicit action + to uninstall any older version of the library, or remove any files + from an older version that do not exist any more in the new version. + The library's installation image should be used to prepare an + installable package in a native package format for your operating + system distribution. Use your native system distribution's package + manager to properly install and uninstall the library's package. + </para> + </note> + <para> To use the library, <quote>#include <courier-unicode.h></quote> and link with <literal>-lcourier-unicode</literal>. diff --git a/unicode/configure.ac b/unicode/configure.ac index 5c366de..2d74bb6 100644 --- a/unicode/configure.ac +++ b/unicode/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([courier-unicode], [2.2], [courier-users@lists.sourceforge.net]) +AC_INIT([courier-unicode], [2.2.1], [courier-users@lists.sourceforge.net]) >confdefs.h # Kill PACKAGE_ macros @@ -117,5 +117,13 @@ fi CFLAGS="-I.. -I$srcdir/.. $CFLAGS" CXXFLAGS="-I.. -I$srcdir/.. $CXXFLAGS" +HVERSION="`echo $VERSION | tr -d '.'`" +AC_SUBST(HVERSION) + AM_CONDITIONAL(HAVE_DOCS,[test -f $srcdir/docbook/icon.gif]) -AC_OUTPUT(Makefile packaging/freebsd10/Makefile courier-unicode.spec courier-unicode.h) +AC_OUTPUT(Makefile + packaging/freebsd10/Makefile + courier-unicode.spec + courier-unicode.h + courier-unicode-version.m4 +) diff --git a/unicode/courier-unicode-version.m4.in b/unicode/courier-unicode-version.m4.in new file mode 100644 index 0000000..d40b5b7 --- /dev/null +++ b/unicode/courier-unicode-version.m4.in @@ -0,0 +1,42 @@ +dnl Checks for the correct version of the courier-unicode library. + +AC_DEFUN([AX_COURIER_UNICODE_VERSION],[ + +AC_MSG_CHECKING(courier-unicode library and version) + +vers="$1" + +if test "$vers" = "" +then + vers=@VERSION@ +fi + +set -- `echo "$vers" | tr '.' ' '` + +v=$[]1 +r=$[]2 +p=$[]3 + +if test "$p" = "" + then p="0" +fi + +AC_TRY_COMPILE([ +#include <courier-unicode.h> +#ifndef COURIER_UNICODE_VERSION +#define COURIER_UNICODE_VERSION 0 +#endif + +#if COURIER_UNICODE_VERSION < ]$v$r$p[ +#error "courier-unicode ]$vers[ library is required" +#endif + +],[],[], +AC_MSG_ERROR([ +ERROR: The Courier Unicode Library ]$vers[ header files appear not to be installed. +You may need to upgrade the library or install a separate development +subpackage in addition to the main package.]) +) + +AC_MSG_RESULT([ok]) +]) diff --git a/unicode/courier-unicode.h.in b/unicode/courier-unicode.h.in index 57603da..38d9c37 100644 --- a/unicode/courier-unicode.h.in +++ b/unicode/courier-unicode.h.in @@ -41,7 +41,7 @@ typedef uint32_t char32_t; #endif #endif -#define COURIER_UNICODE_VERSION 220 +#define COURIER_UNICODE_VERSION @HVERSION@ /* ** The system default character set, from the locale. diff --git a/unicode/m4/courier-unicode.m4 b/unicode/m4/courier-unicode.m4 index dadf321..673bc65 100644 --- a/unicode/m4/courier-unicode.m4 +++ b/unicode/m4/courier-unicode.m4 @@ -50,44 +50,3 @@ AC_MSG_ERROR([*** A compiler with C++11 Unicode support was not found]) CXXFLAGS="$save_FLAGS" AC_LANG_POP([C++]) ]) - -AC_DEFUN([AX_COURIER_UNICODE_VERSION],[ - -AC_MSG_CHECKING(courier-unicode library and version) - -v="$1" - -if test "$v" = "" -then - v=2.2 -fi - -set -- `echo "$v" | tr '.' ' '` - -v=$[]1 -r=$[]2 -p=$[]3 - -if test "$p" = "" - then p="0" -fi - -AC_TRY_COMPILE([ -#include <courier-unicode.h> -#ifndef COURIER_UNICODE_VERSION -#define COURIER_UNICODE_VERSION 0 -#endif - -#if COURIER_UNICODE_VERSION < ]$v$r$p[ -#error "courier-unicode ]$1[ library is required" -#endif - -],[],[], -AC_MSG_ERROR([ -ERROR: The Courier Unicode Library ]$1[ header files appear not to be installed. -You may need to upgrade the library or install a separate development -subpackage in addition to the main package.]) -) - -AC_MSG_RESULT([ok]) -]) diff --git a/unicode/unicodecpp.C b/unicode/unicodecpp.C index babb6bb..7038129 100644 --- a/unicode/unicodecpp.C +++ b/unicode/unicodecpp.C @@ -606,7 +606,8 @@ unicode::bidi_calc(const bidi_calc_types &st, ret; std::get<0>(ret).resize(st.s.size()); - std::get<1>(ret)=UNICODE_BIDI_LR; + std::get<1>(ret)=initial_embedding_level ? + paragraph_embedding_level : UNICODE_BIDI_LR; if (st.s.size()) { |
