mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-06 23:16:21 +00:00
Use C-style comments to support using a C89 compiler.
This commit is contained in:
+8
-7
@@ -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"
|
||||
|
||||
@@ -285,7 +286,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 +324,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 +334,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