mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-04 06:32:20 +00:00
Merge commit 'f26aca0aa1b9485634314d0d1710d2a0bb67776d'
This commit is contained in:
@@ -104,8 +104,9 @@ if __name__ == '__main__':
|
||||
* along with ucd-tools. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// NOTE: This file is automatically generated from the Scripts.txt file in
|
||||
// the Unicode Character database by the ucd-tools/tools/scripts.py script.
|
||||
/* NOTE: This file is automatically generated from the Scripts.txt file in
|
||||
* the Unicode Character database by the ucd-tools/tools/scripts.py script.
|
||||
*/
|
||||
|
||||
#include "ucd/ucd.h"
|
||||
|
||||
@@ -152,6 +153,7 @@ if __name__ == '__main__':
|
||||
#define Geok UCD_SCRIPT_Geok
|
||||
#define Geor UCD_SCRIPT_Geor
|
||||
#define Glag UCD_SCRIPT_Glag
|
||||
#define Gonm UCD_SCRIPT_Gonm
|
||||
#define Goth UCD_SCRIPT_Goth
|
||||
#define Gran UCD_SCRIPT_Gran
|
||||
#define Grek UCD_SCRIPT_Grek
|
||||
@@ -249,6 +251,7 @@ if __name__ == '__main__':
|
||||
#define Sind UCD_SCRIPT_Sind
|
||||
#define Sinh UCD_SCRIPT_Sinh
|
||||
#define Sora UCD_SCRIPT_Sora
|
||||
#define Soyo UCD_SCRIPT_Soyo
|
||||
#define Sund UCD_SCRIPT_Sund
|
||||
#define Sylo UCD_SCRIPT_Sylo
|
||||
#define Syrc UCD_SCRIPT_Syrc
|
||||
@@ -278,6 +281,7 @@ if __name__ == '__main__':
|
||||
#define Xpeo UCD_SCRIPT_Xpeo
|
||||
#define Xsux UCD_SCRIPT_Xsux
|
||||
#define Yiii UCD_SCRIPT_Yiii
|
||||
#define Zanb UCD_SCRIPT_Zanb
|
||||
#define Zinh UCD_SCRIPT_Zinh
|
||||
#define Zmth UCD_SCRIPT_Zmth
|
||||
#define Zsym UCD_SCRIPT_Zsym
|
||||
@@ -285,7 +289,7 @@ if __name__ == '__main__':
|
||||
#define Zyyy UCD_SCRIPT_Zyyy
|
||||
#define Zzzz UCD_SCRIPT_Zzzz
|
||||
|
||||
// Unicode Character Data %s
|
||||
/* Unicode Character Data %s */
|
||||
""" % ucd_version)
|
||||
|
||||
for script in special_scripts:
|
||||
@@ -323,7 +327,7 @@ if __name__ == '__main__':
|
||||
sys.stdout.write('{\n')
|
||||
for codepoint, table in sorted(script_tables[table_index].items()):
|
||||
if isinstance(table, str):
|
||||
sys.stdout.write('\tscripts_%s, // %s\n' % (table, codepoint))
|
||||
sys.stdout.write('\tscripts_%s, /* %s */\n' % (table, codepoint))
|
||||
else:
|
||||
sys.stdout.write('\tscripts_%s,\n' % codepoint)
|
||||
sys.stdout.write('};\n')
|
||||
@@ -333,12 +337,12 @@ if __name__ == '__main__':
|
||||
sys.stdout.write('{\n')
|
||||
for codepoints, script, comment in script_sets:
|
||||
if script:
|
||||
sys.stdout.write('\tif (c <= 0x%s) return %s; // %s : %s\n' % (codepoints.last, script, codepoints, comment))
|
||||
sys.stdout.write('\tif (c <= 0x%s) return %s; /* %s : %s */\n' % (codepoints.last, script, codepoints, comment))
|
||||
else:
|
||||
sys.stdout.write('\tif (c <= 0x%s) // %s\n' % (codepoints.last, codepoints))
|
||||
sys.stdout.write('\tif (c <= 0x%s) /* %s */\n' % (codepoints.last, codepoints))
|
||||
sys.stdout.write('\t{\n')
|
||||
sys.stdout.write('\t\tconst uint8_t *table = scripts_%s_%s[(c - 0x%s) / 256];\n' % (codepoints.first, codepoints.last, codepoints.first))
|
||||
sys.stdout.write('\t\treturn (ucd_script)table[c % 256];\n')
|
||||
sys.stdout.write('\t}\n')
|
||||
sys.stdout.write('\treturn Zzzz; // Invalid Unicode Codepoint\n')
|
||||
sys.stdout.write('\treturn Zzzz; /* Invalid Unicode Codepoint */\n')
|
||||
sys.stdout.write('}\n')
|
||||
|
||||
Reference in New Issue
Block a user