Merge tag 'de5e36b4ad69c4acfdd728b2ca3e0e472d91afd1'

ucd-tools 11.0.0.1
This commit is contained in:
Reece H. Dunn
2021-05-04 18:56:51 +01:00
4 changed files with 42 additions and 20 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/python
# Copyright (C) 2012-2018 Reece H. Dunn
# Copyright (C) 2012-2018, 2021 Reece H. Dunn
#
# This file is part of ucd-tools.
#
@@ -33,7 +33,7 @@ for data in ucd.parse_ucd_data(ucd_rootdir, 'UnicodeData'):
if __name__ == '__main__':
sys.stdout.write("""/* Unicode Case Conversion
*
* Copyright (C) 2012-2018 Reece H. Dunn
* Copyright (C) 2012-2018, 2021 Reece H. Dunn
*
* This file is part of ucd-tools.
*
@@ -52,7 +52,7 @@ if __name__ == '__main__':
*/
/* NOTE: This file is automatically generated from the UnicodeData.txt file in
* the Unicode Character database by the ucd-tools/tools/categories.py script.
* the Unicode Character database by the ucd-tools/tools/case.py script.
*/
#include "ucd/ucd.h"
@@ -83,7 +83,7 @@ struct case_conversion_entry
sys.stdout.write('codepoint_t ucd_to%s(codepoint_t c)\n' % case)
sys.stdout.write('{\n')
sys.stdout.write('\tint begin = 0;\n')
sys.stdout.write('\tint end = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);\n')
sys.stdout.write('\tint end = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]) - 1;\n')
sys.stdout.write('\twhile (begin <= end)\n')
sys.stdout.write('\t{\n')
sys.stdout.write('\t\tint pos = (begin + end) / 2;\n')