forked from Imagelibrary/rtems
contrib: Apply RTEMS changes to utf8proc
No modifications to this it is what we have been carrying.
This commit is contained in:
committed by
Kinsey Moore
parent
d37b554bc5
commit
b2499de3de
@@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "utf8proc.h"
|
#include <utf8proc/utf8proc.h>
|
||||||
#include "utf8proc_data.c"
|
#include "utf8proc_data.c"
|
||||||
|
|
||||||
|
|
||||||
@@ -145,8 +145,13 @@ ssize_t utf8proc_iterate(
|
|||||||
(uc >= 0xFDD0 && uc < 0xFDF0)) uc = -1;
|
(uc >= 0xFDD0 && uc < 0xFDF0)) uc = -1;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
#if defined(__rtems__)
|
||||||
|
uc = (((int32_t)str[0] & 0x07) << 18) + (((int32_t)str[1] & 0x3F) << 12)
|
||||||
|
+ (((int32_t)str[2] & 0x3F) << 6) + (str[3] & 0x3F);
|
||||||
|
#else
|
||||||
uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12)
|
uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12)
|
||||||
+ ((str[2] & 0x3F) << 6) + (str[3] & 0x3F);
|
+ ((str[2] & 0x3F) << 6) + (str[3] & 0x3F);
|
||||||
|
#endif
|
||||||
if (uc < 0x10000 || uc >= 0x110000) uc = -1;
|
if (uc < 0x10000 || uc >= 0x110000) uc = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user