From 48a2eb0433525d60d4f0e84f8a0986c4b4758d20 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Thu, 3 Mar 2005 08:54:57 +0000 Subject: [PATCH] ICU-4420 Fix compile time problems that appeared during MSVC 6 -> MSVC 7.1 migration for the performance tests. X-SVN-Rev: 17276 --- icu4c/source/allinone/allinone.sln | 9 +- icu4c/source/test/perf/all/all.dsp | 63 ------ icu4c/source/test/perf/charperf/charperf.dsp | 109 ----------- icu4c/source/test/perf/charperf/charperf.h | 5 +- .../source/test/perf/charperf/charperf.vcproj | 181 +++++++++++++++++ icu4c/source/test/perf/convperf/convperf.cpp | 3 +- icu4c/source/test/perf/convperf/convperf.dsp | 112 ----------- icu4c/source/test/perf/convperf/convperf.h | 18 +- .../source/test/perf/convperf/convperf.vcproj | 185 ++++++++++++++++++ icu4c/source/test/perf/normperf/normperf.cpp | 4 +- icu4c/source/test/perf/normperf/normperf.dsp | 108 ---------- icu4c/source/test/perf/normperf/normperf.h | 4 +- .../source/test/perf/normperf/normperf.vcproj | 182 +++++++++++++++++ icu4c/source/test/perf/perf.dsw | 98 ---------- icu4c/source/test/perf/perf.sln | 53 +++++ icu4c/source/test/perf/ubrkperf/ubrkperf.cpp | 5 +- icu4c/source/test/perf/ubrkperf/ubrkperf.h | 2 +- .../source/test/perf/ubrkperf/ubrkperf.vcproj | 182 +++++++++++++++++ icu4c/source/test/perf/ustrperf/stringperf.h | 5 +- .../test/perf/ustrperf/stringperf.vcproj | 8 +- icu4c/source/tools/Makefile.in | 2 +- icu4c/source/tools/ctestfw/Makefile.in | 6 +- icu4c/source/tools/ctestfw/ctestfw.vcproj | 26 ++- .../{toolutil => ctestfw/unicode}/uperf.h | 11 +- .../{toolutil => ctestfw/unicode}/utimer.h | 8 +- .../tools/{toolutil => ctestfw}/uperf.cpp | 5 +- icu4c/source/tools/toolutil/toolutil.vcproj | 9 - 27 files changed, 862 insertions(+), 541 deletions(-) delete mode 100644 icu4c/source/test/perf/all/all.dsp delete mode 100644 icu4c/source/test/perf/charperf/charperf.dsp create mode 100644 icu4c/source/test/perf/charperf/charperf.vcproj delete mode 100644 icu4c/source/test/perf/convperf/convperf.dsp create mode 100644 icu4c/source/test/perf/convperf/convperf.vcproj delete mode 100644 icu4c/source/test/perf/normperf/normperf.dsp create mode 100644 icu4c/source/test/perf/normperf/normperf.vcproj delete mode 100644 icu4c/source/test/perf/perf.dsw create mode 100644 icu4c/source/test/perf/perf.sln create mode 100644 icu4c/source/test/perf/ubrkperf/ubrkperf.vcproj rename icu4c/source/tools/{toolutil => ctestfw/unicode}/uperf.h (95%) rename icu4c/source/tools/{toolutil => ctestfw/unicode}/utimer.h (98%) rename icu4c/source/tools/{toolutil => ctestfw}/uperf.cpp (99%) diff --git a/icu4c/source/allinone/allinone.sln b/icu4c/source/allinone/allinone.sln index 5e35cb6460f..a8306b4b236 100644 --- a/icu4c/source/allinone/allinone.sln +++ b/icu4c/source/allinone/allinone.sln @@ -14,6 +14,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\common\common. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctestfw", "..\tools\ctestfw\ctestfw.vcproj", "{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}" ProjectSection(ProjectDependencies) = postProject + {6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0} {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} EndProjectSection EndProject @@ -341,14 +342,14 @@ Global {E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug.Build.0 = Debug|Win32 {E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release.ActiveCfg = Release|Win32 {E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release.Build.0 = Release|Win32 - {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Debug.ActiveCfg = Debug|Win32 - {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Debug.Build.0 = Debug|Win32 - {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Release.ActiveCfg = Release|Win32 - {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Release.Build.0 = Release|Win32 {DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Debug.ActiveCfg = Debug|Win32 {DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Debug.Build.0 = Debug|Win32 {DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Release.ActiveCfg = Release|Win32 {DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Release.Build.0 = Release|Win32 + {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Debug.ActiveCfg = Debug|Win32 + {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Debug.Build.0 = Debug|Win32 + {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Release.ActiveCfg = Release|Win32 + {DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/icu4c/source/test/perf/all/all.dsp b/icu4c/source/test/perf/all/all.dsp deleted file mode 100644 index 83d50f67a33..00000000000 --- a/icu4c/source/test/perf/all/all.dsp +++ /dev/null @@ -1,63 +0,0 @@ -# Microsoft Developer Studio Project File - Name="all" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=all - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "all.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "all.mak" CFG="all - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "all - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "all - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -MTL=midl.exe - -!IF "$(CFG)" == "all - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" - -!ELSEIF "$(CFG)" == "all - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" - -!ENDIF - -# Begin Target - -# Name "all - Win32 Release" -# Name "all - Win32 Debug" -# End Target -# End Project diff --git a/icu4c/source/test/perf/charperf/charperf.dsp b/icu4c/source/test/perf/charperf/charperf.dsp deleted file mode 100644 index 262eeee4d0f..00000000000 --- a/icu4c/source/test/perf/charperf/charperf.dsp +++ /dev/null @@ -1,109 +0,0 @@ -# Microsoft Developer Studio Project File - Name="charperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=charperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "charperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "charperf.mak" CFG="charperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "charperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "charperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "charperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 icuuc.lib icutu.lib winmm.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib" - -!ELSEIF "$(CFG)" == "charperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 icuucd.lib icutud.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\" - -!ENDIF - -# Begin Target - -# Name "charperf - Win32 Release" -# Name "charperf - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\charperf.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\charperf.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/icu4c/source/test/perf/charperf/charperf.h b/icu4c/source/test/perf/charperf/charperf.h index e144d12b531..8d892cb0a3a 100644 --- a/icu4c/source/test/perf/charperf/charperf.h +++ b/icu4c/source/test/perf/charperf/charperf.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2003, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -8,8 +8,9 @@ #ifndef _CHARPERF_H #define _CHARPERF_H -#include "uperf.h" #include "unicode/uchar.h" + +#include "unicode/uperf.h" #include #include #include diff --git a/icu4c/source/test/perf/charperf/charperf.vcproj b/icu4c/source/test/perf/charperf/charperf.vcproj new file mode 100644 index 00000000000..63b7b78a317 --- /dev/null +++ b/icu4c/source/test/perf/charperf/charperf.vcproj @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/test/perf/convperf/convperf.cpp b/icu4c/source/test/perf/convperf/convperf.cpp index a663857b528..dabbef7f6ef 100644 --- a/icu4c/source/test/perf/convperf/convperf.cpp +++ b/icu4c/source/test/perf/convperf/convperf.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2004, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -13,6 +13,7 @@ */ #include "convperf.h" #include "data.h" +#include int main(int argc, const char* argv[]){ UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/perf/convperf/convperf.dsp b/icu4c/source/test/perf/convperf/convperf.dsp deleted file mode 100644 index 1c02213affd..00000000000 --- a/icu4c/source/test/perf/convperf/convperf.dsp +++ /dev/null @@ -1,112 +0,0 @@ -# Microsoft Developer Studio Project File - Name="convperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=convperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "convperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "convperf.mak" CFG="convperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "convperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "convperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "convperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\include" /I "..\..\..\common" /I "..\..\..\i18n" /I "..\..\..\tools\toolutil" /I "C:\Program Files\Microsoft SDK\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 icuuc.lib icuin.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\\" - -!ELSEIF "$(CFG)" == "convperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\ctestfw" /I "..\..\..\common" /I "..\..\..\i18n" /I "..\..\..\tools\toolutil" /I "C:\Program Files\Microsoft SDK\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 icuucd.lib icuind.lib icutud.lib kernel32.lib user32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\" - -!ENDIF - -# Begin Target - -# Name "convperf - Win32 Release" -# Name "convperf - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\convperf.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\convperf.h -# End Source File -# Begin Source File - -SOURCE=.\data.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/icu4c/source/test/perf/convperf/convperf.h b/icu4c/source/test/perf/convperf/convperf.h index c8ad8170939..a8c47b94e99 100644 --- a/icu4c/source/test/perf/convperf/convperf.h +++ b/icu4c/source/test/perf/convperf/convperf.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2004, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -8,12 +8,14 @@ #ifndef _CONVPERF_H #define _CONVPERF_H -#include "uperf.h" +#include +#include +#include #include "unicode/ucnv.h" #include "unicode/uclean.h" #include "unicode/ustring.h" -#include -#include + +#include "unicode/uperf.h" #define CONVERSION_FLAGS (0) /*WC_DEFAULTCHAR WC_COMPOSITECHECK & WC_SEPCHARS*/ #define MAX_BUF_SIZE 3048 @@ -42,7 +44,7 @@ public: source, srcLen, &status); if(status==U_BUFFER_OVERFLOW_ERROR) { status=U_ZERO_ERROR; - target=(UChar*)uprv_malloc((reqdLen) * U_SIZEOF_UCHAR*2); + target=(UChar*)malloc((reqdLen) * U_SIZEOF_UCHAR*2); targetLimit = target + reqdLen; if(target == NULL){ status = U_MEMORY_ALLOCATION_ERROR; @@ -60,7 +62,7 @@ public: return srcLen; } ~ICUToUnicodePerfFunction(){ - uprv_free(target); + free(target); ucnv_close(conv); } }; @@ -88,7 +90,7 @@ public: source, srcLen, &status); if(status==U_BUFFER_OVERFLOW_ERROR) { status=U_ZERO_ERROR; - target=(char*)uprv_malloc((reqdLen*2)); + target=(char*)malloc((reqdLen*2)); targetLimit = target + reqdLen; if(target == NULL){ status = U_MEMORY_ALLOCATION_ERROR; @@ -106,7 +108,7 @@ public: return srcLen; } ~ICUFromUnicodePerfFunction(){ - uprv_free(target); + free(target); ucnv_close(conv); } }; diff --git a/icu4c/source/test/perf/convperf/convperf.vcproj b/icu4c/source/test/perf/convperf/convperf.vcproj new file mode 100644 index 00000000000..c8090e101fe --- /dev/null +++ b/icu4c/source/test/perf/convperf/convperf.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/test/perf/normperf/normperf.cpp b/icu4c/source/test/perf/normperf/normperf.cpp index 3edfe4a0d43..011bbcbd3ec 100644 --- a/icu4c/source/test/perf/normperf/normperf.cpp +++ b/icu4c/source/test/perf/normperf/normperf.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2003, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -12,6 +12,8 @@ * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 -p 15 -f TestNames_Asian.txt -u -e UTF-8 -l */ #include "normperf.h" +#include "uoptions.h" +#include #define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) diff --git a/icu4c/source/test/perf/normperf/normperf.dsp b/icu4c/source/test/perf/normperf/normperf.dsp deleted file mode 100644 index 09f55d5de7b..00000000000 --- a/icu4c/source/test/perf/normperf/normperf.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="normperf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=normperf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "normperf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "normperf.mak" CFG="normperf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "normperf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "normperf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "normperf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 icuuc.lib icuin.lib icutu.lib winmm.lib kernel32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\\" - -!ELSEIF "$(CFG)" == "normperf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\ctestfw" /I "..\..\..\common" /I "..\..\..\i18n" /I "..\..\..\tools\toolutil" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\" - -!ENDIF - -# Begin Target - -# Name "normperf - Win32 Release" -# Name "normperf - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\normperf.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\normperf.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/icu4c/source/test/perf/normperf/normperf.h b/icu4c/source/test/perf/normperf/normperf.h index 6f3427a4923..0bc4e2b123c 100644 --- a/icu4c/source/test/perf/normperf/normperf.h +++ b/icu4c/source/test/perf/normperf/normperf.h @@ -8,10 +8,12 @@ #ifndef _NORMPERF_H #define _NORMPERF_H -#include "uperf.h" #include "unicode/unorm.h" #include "unicode/ustring.h" +#include "unicode/uperf.h" +#include + // Stubs for Windows API functions when building on UNIXes. // #if defined(U_WINDOWS) diff --git a/icu4c/source/test/perf/normperf/normperf.vcproj b/icu4c/source/test/perf/normperf/normperf.vcproj new file mode 100644 index 00000000000..e11391d62b3 --- /dev/null +++ b/icu4c/source/test/perf/normperf/normperf.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/test/perf/perf.dsw b/icu4c/source/test/perf/perf.dsw deleted file mode 100644 index 43f83c963f3..00000000000 --- a/icu4c/source/test/perf/perf.dsw +++ /dev/null @@ -1,98 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "all"=.\all\all.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name charperf - End Project Dependency - Begin Project Dependency - Project_Dep_Name normperf - End Project Dependency -}}} - -############################################################################### - -Project: "charperf"=.\charperf\charperf.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name common - End Project Dependency - Begin Project Dependency - Project_Dep_Name toolutil - End Project Dependency -}}} - -############################################################################### - -Project: "common"=..\..\common\common.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "normperf"=.\normperf\normperf.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name common - End Project Dependency - Begin Project Dependency - Project_Dep_Name toolutil - End Project Dependency -}}} - -############################################################################### - -Project: "toolutil"=..\..\tools\toolutil\toolutil.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name common - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/icu4c/source/test/perf/perf.sln b/icu4c/source/test/perf/perf.sln new file mode 100644 index 00000000000..d046cde52ad --- /dev/null +++ b/icu4c/source/test/perf/perf.sln @@ -0,0 +1,53 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "charperf", "charperf\charperf.vcproj", "{D850A4B6-7D94-476E-9392-E9272DA4EAAF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "normperf", "normperf\normperf.vcproj", "{56CCC661-8D33-4F0A-B62F-C619CE843C68}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convperf", "convperf\convperf.vcproj", "{B4C03939-D417-41F0-85B4-848ECF105E3A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stringperf", "ustrperf\stringperf.vcproj", "{523710EA-349D-45BF-8B39-289CC86E7D91}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubrkperf", "ubrkperf\ubrkperf.vcproj", "{7E280294-49BD-43D1-9903-CF29648D88CA}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Debug.ActiveCfg = Debug|Win32 + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Debug.Build.0 = Debug|Win32 + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Release.ActiveCfg = Release|Win32 + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Release.Build.0 = Release|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Debug.ActiveCfg = Debug|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Debug.Build.0 = Debug|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Release.ActiveCfg = Release|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Release.Build.0 = Release|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Debug.ActiveCfg = Debug|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Debug.Build.0 = Debug|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Release.ActiveCfg = Release|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Release.Build.0 = Release|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Debug.ActiveCfg = Debug|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Debug.Build.0 = Debug|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Release.ActiveCfg = Release|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Release.Build.0 = Release|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug.ActiveCfg = Debug|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug.Build.0 = Debug|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Release.ActiveCfg = Release|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp b/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp index 7461affb886..18ed4038028 100644 --- a/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp +++ b/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp @@ -1,6 +1,7 @@ /******************************************************************** * COPYRIGHT: - * Copyright (C) 2001 IBM, Inc. All Rights Reserved. + * Copyright (C) 2001-2005 International Business Machines Corporation + * and others. All Rights Reserved. * ********************************************************************/ /******************************************************************************** @@ -15,6 +16,8 @@ */ #include "ubrkperf.h" +#include "uoptions.h" +#include #if 0 diff --git a/icu4c/source/test/perf/ubrkperf/ubrkperf.h b/icu4c/source/test/perf/ubrkperf/ubrkperf.h index 1733c17dd1a..e9e5c5fb118 100644 --- a/icu4c/source/test/perf/ubrkperf/ubrkperf.h +++ b/icu4c/source/test/perf/ubrkperf/ubrkperf.h @@ -8,7 +8,7 @@ #ifndef _UBRKPERF_H #define _UBRKPERF_H -#include "uperf.h" +#include "unicode/uperf.h" #include diff --git a/icu4c/source/test/perf/ubrkperf/ubrkperf.vcproj b/icu4c/source/test/perf/ubrkperf/ubrkperf.vcproj new file mode 100644 index 00000000000..fa2a6dd8247 --- /dev/null +++ b/icu4c/source/test/perf/ubrkperf/ubrkperf.vcproj @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/test/perf/ustrperf/stringperf.h b/icu4c/source/test/perf/ustrperf/stringperf.h index f3b83ad0621..5b6b47ba99a 100644 --- a/icu4c/source/test/perf/ustrperf/stringperf.h +++ b/icu4c/source/test/perf/ustrperf/stringperf.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2004, International Business Machines +* Copyright (c) 2002-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** ********************************************************************** @@ -10,10 +10,11 @@ #include -#include "uperf.h" #include "unicode/utypes.h" #include "unicode/unistr.h" +#include "unicode/uperf.h" + typedef std::wstring stlstring; /* Define all constants for test case operations */ diff --git a/icu4c/source/test/perf/ustrperf/stringperf.vcproj b/icu4c/source/test/perf/ustrperf/stringperf.vcproj index cd81e869498..2e11d087da8 100644 --- a/icu4c/source/test/perf/ustrperf/stringperf.vcproj +++ b/icu4c/source/test/perf/ustrperf/stringperf.vcproj @@ -23,7 +23,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\..\include,..\..\..\tools\toolutil,..\..\..\common" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" StringPooling="TRUE" RuntimeLibrary="2" @@ -40,7 +40,7 @@ Name="VCCustomBuildTool"/> @@ -22,7 +23,7 @@ Name="VCCLCompilerTool" InlineFunctionExpansion="2" ImproveFloatingPointConsistency="TRUE" - AdditionalIncludeDirectories="..\..\..\include,..\..\common" + AdditionalIncludeDirectories="..\..\..\include;..\..\common;..\toolutil" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CTESTFW_EXPORTS;T_CTEST_IMPLEMENTATION" StringPooling="TRUE" RuntimeLibrary="2" @@ -86,7 +87,7 @@ Optimization="0" ImproveFloatingPointConsistency="TRUE" OptimizeForProcessor="2" - AdditionalIncludeDirectories="..\..\..\include,..\..\common" + AdditionalIncludeDirectories="..\..\..\include;..\..\common;..\toolutil" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CTESTFW_EXPORTS;T_CTEST_IMPLEMENTATION" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -158,6 +159,21 @@ + + + + + + + + + + + + #include diff --git a/icu4c/source/tools/toolutil/toolutil.vcproj b/icu4c/source/tools/toolutil/toolutil.vcproj index 05c2dd0ebd3..2c095b5a3d5 100644 --- a/icu4c/source/tools/toolutil/toolutil.vcproj +++ b/icu4c/source/tools/toolutil/toolutil.vcproj @@ -170,9 +170,6 @@ - - - - - -