[libc-commits] [PATCH] D74021: Created uChar implementation for libc
Marcus Johnson via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Feb 6 05:50:18 PST 2020
MarcusJohnson91 updated this revision to Diff 242878.
MarcusJohnson91 added a comment.
Fixed typo's.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74021/new/
https://reviews.llvm.org/D74021
Files:
libc/src/uchar/c16rtomb.cpp
Index: libc/src/uchar/c16rtomb.cpp
===================================================================
--- libc/src/uchar/c16rtomb.cpp
+++ libc/src/uchar/c16rtomb.cpp
@@ -20,21 +20,21 @@
c16 = 0xFFFD; // Invalid Replacement Character
}
- if (C16 <= 0x7F) {
+ if (c16 <= 0x7F) {
StringSize = 1;
s = new char(StringSize);
- s[0] = C16 & 0x7F;
- } else if (C16 <= 0x7FF) {
+ s[0] = c16 & 0x7F;
+ } else if (c16 <= 0x7FF) {
StringSize = 2;
s = new char(StringSize);
- s[0] = 0xC0 | (C16 & ((0x1F << 6) >> 6));
- s[1] = 0x80 | (C16 & 0x3F);
- } else if (C16 <= 0xFFFF) {
+ s[0] = 0xC0 | (c16 & ((0x1F << 6) >> 6));
+ s[1] = 0x80 | (c16 & 0x3F);
+ } else if (c16 <= 0xFFFF) {
StringSize = 3;
s = new char(StringSize);
- s[0] = 0xE0 | (C16 & ((0x0F << 12) >> 12));
- s[1] = 0x80 | (C16 & ((0x3F << 6) >> 6));
- s[2] = 0x80 | (C16 & 0x3F);
+ s[0] = 0xE0 | (c16 & ((0x0F << 12) >> 12));
+ s[1] = 0x80 | (c16 & ((0x3F << 6) >> 6));
+ s[2] = 0x80 | (c16 & 0x3F);
}
return StringSize;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74021.242878.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200206/2e839556/attachment-0001.bin>
More information about the libc-commits
mailing list