Add missing is*rune() functions and tolowerrune() and toupperrune()

This basically means that we now have an autogenerating typecheck
and case-conversion tool.
Don't freak out when you see the added LOC. Given we now have
an additional mapping to the uppercase-characters, some ranges got
"lost" and have to be written literally by the generating awk-script.

The runetypebody.h was generated by myself using my modified version
of mkrunetype.awk and I'll push the changed version as soon as this
has been discussed on the ml.
If you worry about speed, consider, that bsearch is just the right
tool for this job and can even handle a long array like this.
This commit is contained in:
FRIGN 2015-02-11 12:57:36 +01:00
parent 26bc079ecc
commit 02ec321419
2 changed files with 4181 additions and 220 deletions

File diff suppressed because it is too large Load Diff

10
utf.h
View File

@ -45,9 +45,19 @@ char *utfutf(const char *, const char *);
int isalpharune(Rune);
int islowerrune(Rune);
int isspacerune(Rune);
int iscntrlrune(Rune);
int istitlerune(Rune);
int isupperrune(Rune);
int isdigitrune(Rune);
int isalnumrune(Rune);
int isblankrune(Rune);
int isprintrune(Rune);
int isgraphrune(Rune);
int ispunctrune(Rune);
int isxdigitrune(Rune);
Rune tolowerrune(Rune);
Rune toupperrune(Rune);
int readrune(const char *, FILE *, Rune *);
void writerune(const char *, FILE *, Rune *);