Commit Graph

66 Commits

Author SHA1 Message Date
Steven G. Johnson
1cb28a66ca
v2.8.0 bump (#248)
* version 2.8.0 bump

* NEWS link
2022-10-30 17:24:01 -04:00
Harmen Stoppels
1f1e42d3b8
Add c flag when invoking ar (#241)
`llvm-ar` warns when the archive does not exist and `c` is not passed.
2022-10-24 22:47:20 -04:00
Steven G. Johnson
b093cf9dd4
update for unicode 14 (#233) 2021-12-16 21:08:37 -05:00
Mike Glorioso
610730f231
Fix Sign-Conversion warnings in library and test code (#214)
* JuliaStrings#169 turn on sign-conversion warnings

Signed-off-by: Mike Glorioso <mike.glorioso@gmail.com>

* JuliaStrings#169 fix sign-conversion warnings for utf8proc.c

fix sign-converstion warnings for utf8proc_iterate
uc requires at most 21 bits to identify a unicode codepoint, so there is no need for it to be unsigned
multiple locations use, modify, or store uc with a signed value
the only exception is line 137 where uc is compared with an unsigned value

fix sign-converstion warnings for utf8proc_tolower, utf8proc_toupper, utf8proc_totitle
all three methods have sign conversion warnings when calling seqindex_decode_index
seqindex_decode_index uses the passed value as an index to an array utf8proc_sequences
as utf8proc_sequences is hard-coded and smaller than 2^31 - 1 we can safely cast to unsigned

fix sign-converstion warnings for utf8proc_decompose_char
lines with this warning use the defined function utf8proc_decompose_lump
in the function, a hardcoded unsigned value (1<<12) is complemented then cast as a signed value
as the intent is to remove the 12th bit flag from options, a signed value, and explicit cast is safe

fix sign-conversion warnings for utf8proc_map_custom
result is declared as signed, but is only expected to contain values between 0 and 4
sizeof returns an unsigned value. result must be cast to unsigned

Signed-off-by: Mike Glorioso <mike.glorioso@gmail.com>

* JuliaStrings#169 fix sign-conversion warnings for test/*

fix sign-conversion warnings for test/tests.c encode
change type for d to match return value of utf8proc_encode_char

fix sign-conversion warnings for test/graphemetest.c checkline
si, i, and j are unsigned size types, utf8proc_map and utf8proc_iterate accept and return signed size types
utf8proc_map treats negative strlen values as 0. the strlen used by the test must be similarly limited
utf8proc_iterate treats negative strlen values as 4 which will be less than the unsigned size
fix unused-but-set-variable warning by checking the glen value

fix sign-conversion warnings for test/case.c main
the if block ensures that tested codepoint fits in wint_t, but needs to include u and l as well
c, u, and l can be safely cast to wint_t

fix sign-conversion warnings for test/iterate.c
all values used for len are below 8, so an explicit cast is safe
updated types for more portable test code

fix sign-conversion warnings for test/printproperty.c main
change type of c to signed to resolve all sign-converstion warnings.
replace sscanf(... &c) wiht sscanf(... &x) followed by explicit sign converstion

Signed-off-by: Mike Glorioso <mike.glorioso@gmail.com>
2021-01-14 12:59:49 -05:00
Steven G. Johnson
28416640ed 2.6.1 version bump 2020-12-15 15:29:32 -05:00
Steven G. Johnson
cea3cd158f bump to version 2.6 2020-11-23 14:18:43 -05:00
Steven G. Johnson
5622a0a51b
add islower/isupper functions (#196)
* add islower/isupper functions

* added test

* more tests + bugfix

* Makefile fix

* rm iscase test on make clean
2020-08-25 16:42:59 -04:00
Steven G. Johnson
c6858e955c
use unsigned char more consistently, silence -Wextra compiler warnings (#188) 2020-03-29 10:44:42 -04:00
Steven G. Johnson
2bb7d884b5 version bump to 2.5 2020-03-27 17:22:21 -04:00
Steven G. Johnson
5c632c5742 NEWS for 2.4, updated version numbers (which I forgot in 2.3, grrr) 2019-05-10 21:24:14 -04:00
Michael Osipov
e1f8c728bb Improve portability of Make (#154)
Several options passed to $(CC) are not portable, e.g., for HP aCC.
Move them to variables.
2019-05-07 20:00:21 -04:00
Steven G. Johnson
abf81603ba
add utf8proc_unicode_version (#151) 2019-03-30 16:31:02 -04:00
Graham Inggs
be3b244285 Pass users' flags (#141) 2018-11-01 17:10:48 -04:00
Michael Drake
5dcd38217a Generate and install a pkg-config file. (#142)
* Generate and install a pkg-config file.

* Use Makefile libdir and includedir for pkg-config.

This splits the prefix out from these variables, so that
the same variables can be used to construct the pkg-config
file.

* Update the manifest for installation of pkg-config file.

* Revert "Use Makefile libdir and includedir for pkg-config."

This reverts commit a4cd6dc64a357dd5b91781045b3ac1c4679af97f.

* Use Makefile libdir and includedir for pkg-config.

This splits the prefix out from these variables, so that
the same variables can be used to construct the pkg-config
file.
2018-11-01 17:09:16 -04:00
Steven G. Johnson
8639450134 NEWS for upcoming 2.2 release, version bump 2018-05-02 08:23:40 -04:00
past-due
48949bd3eb Static library support improvements (#123)
* `#define UTF8PROC_STATIC` to disable DLLEXPORT

`#define UTF8PROC_STATIC` to disable DLLEXPORT

* [CMake] Automatically define UTF8PROC_STATIC if BUILD_SHARED_LIBS is off

* [Makefile] Support additional UTF8PROC_DEFINES, which can be used to specify flags like `-DUTF8PROC_STATIC`
2018-04-29 21:37:12 -04:00
Steven G. Johnson
d688ac1226
version bump to 2.1.1 (#131) 2018-04-27 09:58:34 -04:00
Steven G. Johnson
3e6230d9bf fix make clean 2018-04-27 09:30:37 -04:00
Steven G. Johnson
53d7968055 added test for #128 2018-04-27 08:46:44 -04:00
Ryan Schmidt
6a20831a07 Use LDFLAGS when building libutf8proc.dylib (#125) 2018-04-18 07:50:15 -07:00
Jameson Nash
91b91fe033 don't set MAKE variable in Makefile (#99)
fix #95
2017-02-18 10:14:45 -05:00
Steven G. Johnson
b4621f43c3 new utf8proc_map_custom for hooking in user-defined custom mappings (#89)
* new utf8proc_map_custom for hooking in user-defined custom mappings

* whoops, add test program

* NEWS, version bump for 2.1

* change test functions to static so that gcc doesn't complain about missing prototypes
2016-11-30 10:40:26 -05:00
Tony Kelman
8e3174f334 NEWS and version numbers for 2.0.2 (#81)
* Add NEWS.md items for #79 and #80

* Prepare version numbers for 2.0.2

* Also update API version to 2.0.2
2016-07-27 07:58:49 -04:00
Tony Kelman
47cbf7d96d Move -Wmissing-prototypes from Makefile to .travis.yml (#79)
since MSVC doesn't understand this flag, and the current
mechanism for building Julia with MSVC goes through the makefile
2016-07-16 11:16:03 +01:00
Steven G. Johnson
f0bf106569 NEWS and version bump for 2.0.1 release, to come out shortly 2016-07-13 12:39:05 -04:00
Steven G. Johnson
cb2a3e464d the ABI version was already bumped in #62, does not need to be bumped again in #70 2016-07-13 11:00:17 -04:00
Keno Fischer
41c6b23aab Unicode 9 updates (#70)
* Updates for Unicode 9.0.0 TR29 Changes

- New rules GB10/(12/13) are used to combine emoji-zwj sequences/
  (force grapheme breaks every two RI codepoints). Unfortunately this
  breaks statelessness of grapheme-boundary determination. Deal with
  this by ignoring the problem in utf8proc_grapheme_break, and by
  hacking in a special case in decompose

- ZWJ moved to its own boundclass, update what is now GB9 accordingly.

- Add comments to indicate which rule a given case implements

- The Number of bound classes Now exceeds 4 bits, expand to 8 and
  reorganize fields

* Import Unicode 9 data

* Update Grapheme break API to expose state override

* Bump MAJOR version
2016-06-28 16:04:25 -04:00
Michaël Meyer
1f17487aa9 Fix overrun 2016-02-04 04:06:28 +01:00
Michaël Meyer
ee3c20e46b Bump version number. 2015-12-09 23:35:45 +01:00
Peter Colberg
44b1784de7 Increment patch version 2015-10-31 20:51:26 -04:00
Peter Colberg
a930086323 Test make install
Generate reproducible manifest of installed files.
2015-10-30 18:46:28 -04:00
Peter Colberg
548497a398 Move common test functions to separate module
This resolves warnings for missing function prototypes.
2015-10-30 15:13:48 -04:00
Peter Colberg
71230a08e4 Fix installation of shared library symlinks
Use relative symlinks that are independent of installation prefix.

Drop superfluous .so.MAJOR.MINOR symlink, which is and should never
be needed in practice. The purpose of shared library symlinks is to
provide libraries for compile-time linking (.so) and for run-time
linking using the SONAME (.so.MAJOR).
2015-10-30 14:57:16 -04:00
Peter Colberg
f314738f71 Enable compiler warnings in makefile 2015-10-29 01:17:20 -04:00
Milan Bouchet-Valat
80385462ad Always pass -fPIC and -std=c99 in CFLAGS
Fixes #42.
2015-06-08 09:34:11 +02:00
Tony Kelman
f7219d516e Fix make check
#35 and #40 added new tests that #38 did not take into account

this is one case where it would be good if Travis re-tested the PR
after new commits get pushed to master
2015-05-30 07:28:19 -07:00
Steven G. Johnson
1f21f3c096 Merge pull request #38 from jlec/jlec-master
Enhance build process
2015-05-30 09:21:32 -04:00
Steven G. Johnson
d75985cf09 bump API/ABI version to 1.3, add NEWS 2015-05-29 23:07:29 -04:00
Steven G. Johnson
a8fb4b1772 add toupper/tolower functions (for JuliaLang/julia#11471) 2015-05-29 22:00:30 -04:00
ScottPJones
6a229a6776 Add tests for valid codepoints and iterate function 2015-05-29 20:11:10 +02:00
Justin Lecher
3a6fc5b2a2 Enhance build process
* Allow optimization flgas in CFLAGS to be overwritten
* Use Uppercase CC and CFLAGS
* Create all soname symlinks

Signed-off-by: Justin Lecher <jlec@gentoo.org>
2015-05-29 16:34:24 +02:00
Steven G. Johnson
0528e9cda6 build bench/bench for make check, to lessen the chance that it bitrots again 2015-03-28 14:47:29 -04:00
Milan Bouchet-Valat
1b7ba89cdd Create additional symlinks to .so file on non-OSX 2015-03-27 18:19:29 +01:00
Milan Bouchet-Valat
786a6e3282 Add support for DESTDIR in make install
Useful to build distribution packages.
2015-03-27 18:19:25 +01:00
Steven G. Johnson
a4c84d2063 fix #2: add charwidth function 2015-03-12 12:10:19 -04:00
Tony Kelman
263421f9e8 Temporary fix for getting VERSION and SOVERSION into cmake
only use ${SO_MAJOR} for cmake SOVERSION

use 1.2.0 for version in cmake

use only abi version for VERSION property in cmake
2015-03-09 16:27:40 -07:00
Steven G. Johnson
50381b951a comment typos 2015-03-07 22:02:49 -05:00
Steven G. Johnson
a4d707b593 whoops, forgot -Wl before -soname 2015-03-07 22:00:51 -05:00
Steven G. Johnson
2d636a5686 version the shared library (fix #24) 2015-03-07 21:49:54 -05:00
Steven G. Johnson
90721f2d39 directory cleanup: move tests and data into subdirectories 2015-03-06 17:36:08 -05:00