[haiku-commits] r36968 - haiku/trunk/headers/private/interface

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 28 May 2010 20:37:37 +0200 (CEST)

Author: axeld
Date: 2010-05-28 20:37:36 +0200 (Fri, 28 May 2010)
New Revision: 36968
Changeset: http://dev.haiku-os.org/changeset/36968/haiku

Modified:
   haiku/trunk/headers/private/interface/utf8_functions.h
Log:
* UTF8CountChars() was not 64-bit safe (and that in a hard to detect way).
* Automatic white space cleanup.


Modified: haiku/trunk/headers/private/interface/utf8_functions.h
===================================================================
--- haiku/trunk/headers/private/interface/utf8_functions.h      2010-05-28 
16:46:45 UTC (rev 36967)
+++ haiku/trunk/headers/private/interface/utf8_functions.h      2010-05-28 
18:37:36 UTC (rev 36968)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2008, Haiku, Inc.
+ * Copyright 2004-2010, Haiku, Inc.
  * Distributed under the terms of the MIT License.
  */
 #ifndef _UTF8_FUNCTIONS_H
@@ -24,7 +24,7 @@
        do {
                ptr++;
        } while (IsInsideGlyph(*ptr));
-                               
+
        return ptr - text;
 }
 
@@ -43,7 +43,7 @@
 UTF8PreviousCharLen(const char *text, const char *limit)
 {
        const char *ptr = text;
-       
+
        if (ptr == NULL || limit == NULL)
                return 0;
 
@@ -52,7 +52,7 @@
                        break;
                ptr--;
        } while (IsInsideGlyph(*ptr));
-                               
+
        return text - ptr;
 }
 
@@ -96,7 +96,7 @@
        uint32 length = 0;
        const char *last;
        if (numBytes < 0)
-               last = (const char *)UINT_MAX;
+               last = (const char *)SIZE_MAX;
        else
                last = bytes + numBytes - 1;
 


Other related posts:

  • » [haiku-commits] r36968 - haiku/trunk/headers/private/interface - axeld