Browse Source

Merge commit 'df247b7cab6e28e691e1db5b4abe7f0649e3b339'

master
Reece H. Dunn 7 years ago
parent
commit
a766b22643

+ 4
- 0
src/ucd-tools/CHANGELOG.md View File

* `data/espeak-ng` data files for eSpeak NG extended data. * `data/espeak-ng` data files for eSpeak NG extended data.
* espeak-ng PropList property lookup as part of the `ucd_property` API. * espeak-ng PropList property lookup as part of the `ucd_property` API.


## (In Development)

* Make the ispunct ctype compatibility implementation conformant.

## 10.0.0 - 2017-06-25 ## 10.0.0 - 2017-06-25


* Add `iswblank` and `iswxdigit` compatibility. * Add `iswblank` and `iswxdigit` compatibility.

+ 2
- 2
src/ucd-tools/README.md View File



The project uses and supports the following sources of Unicode codepoint data: The project uses and supports the following sources of Unicode codepoint data:


* [Unicode Character Database](http://www.unicode.org/Public/9.0.0/ucd/) 9.0.0
* [Unicode Emoji](http://www.unicode.org/Public/emoji/4.0/) 4.0 (UTR #51)
* [Unicode Character Database](http://www.unicode.org/Public/10.0.0/ucd/) 10.0.0
* [Unicode Emoji](http://www.unicode.org/Public/emoji/5.0/) 5.0 (UTR #51)
* [ConScript Unicode Registry](http://www.evertype.com/standards/csur/) * [ConScript Unicode Registry](http://www.evertype.com/standards/csur/)


## Build Dependencies ## Build Dependencies

+ 2
- 14
src/ucd-tools/src/ctype.c View File

/* ctype-style APIs. /* ctype-style APIs.
* *
* Copyright (C) 2012-2017 Reece H. Dunn
* Copyright (C) 2012-2018 Reece H. Dunn
* *
* This file is part of ucd-tools. * This file is part of ucd-tools.
* *


int ucd_ispunct(codepoint_t c) int ucd_ispunct(codepoint_t c)
{ {
switch (ucd_lookup_category(c))
{
case UCD_CATEGORY_Pc:
case UCD_CATEGORY_Pd:
case UCD_CATEGORY_Pe:
case UCD_CATEGORY_Pf:
case UCD_CATEGORY_Pi:
case UCD_CATEGORY_Po:
case UCD_CATEGORY_Ps:
return 1;
default:
return 0;
}
return ucd_isgraph(c) && !ucd_isalnum(c);
} }


int ucd_isspace(codepoint_t c) int ucd_isspace(codepoint_t c)

+ 1
- 4
src/ucd-tools/tools/printdata.py View File

return 0 return 0


def ispunct(data): def ispunct(data):
if data.get('GeneralCategory', 'Cn')[0] in 'P':
return 1
else:
return 0
return 1 if isgraph(data) and not isalnum(data) else 0


def isprint(data): def isprint(data):
if data.get('GeneralCategory', 'Cn')[0] in 'LMNPSZ': # not in 'CI' if data.get('GeneralCategory', 'Cn')[0] in 'LMNPSZ': # not in 'CI'

Loading…
Cancel
Save