]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/unicode/utf16_case.c
Merge branch 'branch-netatalk-3-0' into develop
[netatalk.git] / libatalk / unicode / utf16_case.c
index bdf5e3a4731ea14650c36320cf06fb94adbb9f47..3fc7ed36586081469f0423671d86b7d0ccc6cfea 100644 (file)
@@ -2,13 +2,13 @@
 DO NOT EDIT BY HAND!!!
 
 This file is generated by
- contrib/misc/make-casetable.pl UnicodeData.txt utf16_casetable.h utf16_case.c
+ contrib/shell_utils/make-casetable.pl UnicodeData.txt utf16_casetable.h utf16_case.c
 
 UnicodeData.txt is got from
 http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
 */
 
-#include <netatalk/endian.h>
+#include <stdint.h>
 #include <atalk/unicode.h>
 #include "utf16_casetable.h"
 
@@ -17,8 +17,8 @@ http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
 *******************************************************************/
 ucs2_t toupper_w(ucs2_t val)
 {
-    if ( val >= 0x0040 && val <= 0x02BF)
-        return upper_table_1[val-0x0040];
+    if ( val <= 0x02BF)
+        return upper_table_1[val];
 
     if ( val >= 0x0340 && val <= 0x05BF)
         return upper_table_2[val-0x0340];
@@ -53,7 +53,7 @@ ucs2_t toupper_w(ucs2_t val)
 /*******************************************************************
  Convert a surrogate pair to upper case.
 *******************************************************************/
-u_int32_t toupper_sp(u_int32_t val)
+uint32_t toupper_sp(uint32_t val)
 {
     if ( val >= 0xD801DC00 && val <= 0xD801DC7F)
         return upper_table_sp_1[val-0xD801DC00];
@@ -66,8 +66,8 @@ u_int32_t toupper_sp(u_int32_t val)
 *******************************************************************/
 ucs2_t tolower_w(ucs2_t val)
 {
-    if ( val >= 0x0040 && val <= 0x007F)
-        return lower_table_1[val-0x0040];
+    if ( val <= 0x007F)
+        return lower_table_1[val];
 
     if ( val >= 0x00C0 && val <= 0x027F)
         return lower_table_2[val-0x00C0];
@@ -105,7 +105,7 @@ ucs2_t tolower_w(ucs2_t val)
 /*******************************************************************
  Convert a surrogate pair to lower case.
 *******************************************************************/
-u_int32_t tolower_sp(u_int32_t val)
+uint32_t tolower_sp(uint32_t val)
 {
     if ( val >= 0xD801DC00 && val <= 0xD801DC3F)
         return lower_table_sp_1[val-0xD801DC00];