]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - utf8.c
Fix another Blub bug .. learn to use comments properly :P
[xonotic/gmqcc.git] / utf8.c
diff --git a/utf8.c b/utf8.c
index 68bd038ea400d8cbf11af7b70f0e8fe9f2f80aca..14510bc09818399944dee9b327aa8146469e7391 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -31,12 +31,12 @@ static unsigned char utf8_lengths[256] = {
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0xBF are within multibyte sequences
-       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  * they could be interpreted as 2-byte starts but
-       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  * the codepoint would be < 127
-       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  *
-       0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  * C0 and C1 would also result in overlong encodings
-       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  */
+       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0xBF are within multibyte sequences        */
+       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* they could be interpreted as 2-byte starts but    */
+       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* the codepoint would be < 127                      */
+       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*                                                   */
+       0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* C0 and C1 would also result in overlong encodings */
+       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /*                                                   */
        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
        4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        /* with F5 the codepoint is above 0x10FFFF,
@@ -47,11 +47,11 @@ static unsigned char utf8_lengths[256] = {
 };
 
 static uchar_t utf8_range[5] = {
-       1,       /* invalid - let's not allow the creation of 0-bytes :P
-       1,        * ascii minimum
-       0x80,     * 2-byte minimum
-       0x800,    * 3-byte minimum
-       0x10000,  * 4-byte minimum */
+       1,       /* invalid - let's not allow the creation of 0-bytes :P */
+       1,       /* ascii minimum                                        */
+       0x80,    /* 2-byte minimum                                       */
+       0x800,   /* 3-byte minimum                                       */
+       0x10000, /* 4-byte minimum                                       */
 };
 
 /** Analyze the next character and return various information if requested.