summaryrefslogtreecommitdiff
path: root/Source/Kernel/Library/WChar.class.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-09-15 18:59:24 +0200
committerAlexis211 <alexis211@gmail.com>2009-09-15 18:59:24 +0200
commite2e0f21d932224434cb6121165dc00f0c1bb3bdd (patch)
treed54e5d2c6cfb3aa734d974728ee1fe5ac97482a2 /Source/Kernel/Library/WChar.class.cpp
parent0211692f62cdd934ea9c802bc5b09d63eb4399af (diff)
downloadMelon-e2e0f21d932224434cb6121165dc00f0c1bb3bdd.tar.gz
Melon-e2e0f21d932224434cb6121165dc00f0c1bb3bdd.zip
cat command now uses the File class.
Diffstat (limited to 'Source/Kernel/Library/WChar.class.cpp')
-rw-r--r--Source/Kernel/Library/WChar.class.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Kernel/Library/WChar.class.cpp b/Source/Kernel/Library/WChar.class.cpp
index bb1269d..d7f01de 100644
--- a/Source/Kernel/Library/WChar.class.cpp
+++ b/Source/Kernel/Library/WChar.class.cpp
@@ -19,11 +19,11 @@ WChar::WChar(char c) {
affectAscii(c);
}
-WChar::WChar(const char* c) {
+WChar::WChar(const char* c, u8int encoding) { //TODO : take encoding into account
affectUtf8(c);
}
-u32int WChar::utf8len(const char* c) {
+u32int WChar::utfLen(const char* c, u8int encoding) {
int i = 0, l = CMem::strlen(c), co = 0;
while (i < l) {
if ((c[i] & 0x80) == 0) i += 1;
@@ -42,10 +42,6 @@ void WChar::affectAscii(char c) {
}
u32int WChar::affectUtf8(const char* c) { //Returns the number of bytes for the character
- /*if ((c[0] & 0xB0) == 0x80) { //11000000b == 10000000b, means we are IN a sequence
- value = 0;
- return 1;
- }*/
if ((c[0] & 0x80) == 0) {
value = c[0]; //0x80 = 10000000b
return 1;