]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/perf/ubrkperf/ubrkperfold.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / perf / ubrkperf / ubrkperfold.cpp
index ffb62551389a22c600ea4aeb06f66ee20704b0df..19c472172ed861924450b546ad811b813226f99b 100644 (file)
@@ -1,8 +1,13 @@
-/********************************************************************
+/***********************************************************************
+ * © 2016 and later: Unicode, Inc. and others.
+ * License & terms of use: http://www.unicode.org/copyright.html#License
+ *
+ ***********************************************************************
+ ***********************************************************************
  * COPYRIGHT:
- * Copyright (C) 2001 IBM, Inc.   All Rights Reserved.
+ * Copyright (C) 2001-2012 IBM, Inc.   All Rights Reserved.
  *
- ********************************************************************/
+ ***********************************************************************/
 /********************************************************************************
 *
 * File ubrkperf.cpp
@@ -69,7 +74,7 @@ const char gUsageString[] =
 #include <unicode/brkiter.h>
 
 
-#ifdef WIN32
+#if U_PLATFORM_HAS_WIN32_API
 #include <windows.h>
 #else
 //
@@ -165,7 +170,7 @@ int32_t textSize = 0;
 
 
 
-#ifdef U_DARWIN
+#if U_PLATFORM_IS_DARWIN_BASED
 #include <ApplicationServices/ApplicationServices.h>
 enum{
   kUCTextBreakAllMask = (kUCTextBreakClusterMask | kUCTextBreakWordMask | kUCTextBreakLineMask)
@@ -309,7 +314,7 @@ void doForwardTest() {
 
     elapsedTime = timeGetTime()-startTime;
   } else if(opt_mac) {
-#ifdef U_DARWIN
+#if U_PLATFORM_IS_DARWIN_BASED
     createMACBrkIt();
     UniChar* filePtr = text;
     OSStatus status = noErr;
@@ -611,7 +616,7 @@ UChar UCharFile::get() {
             // Convert the bytes from the temp array to a Unicode char.
             i = 0;
             uint32_t  cp;
-            UTF8_NEXT_CHAR_UNSAFE(bytes, i, cp);
+            U8_NEXT_UNSAFE(bytes, i, cp);
             c = (UChar)cp;
             
             if (cp >= 0x10000) {