diff --git a/icu4c/source/samples/break/break.dsp b/icu4c/source/samples/break/break.dsp new file mode 100644 index 00000000000..c660974e74a --- /dev/null +++ b/icu4c/source/samples/break/break.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="break" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=break - 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 "break.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 "break.mak" CFG="break - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "break - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "break - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "break - 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 "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# 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 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 icuuc.lib icuin.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "break - 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 "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# 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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 icuucd.lib icuind.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "break - Win32 Release" +# Name "break - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\break.cpp +# End Source File +# Begin Source File + +SOURCE=.\ubreak.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# 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/samples/break/break.dsw b/icu4c/source/samples/break/break.dsw new file mode 100644 index 00000000000..e2f6cf5c1a6 --- /dev/null +++ b/icu4c/source/samples/break/break.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "break"=.\break.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/icu4c/source/samples/break/break.sln b/icu4c/source/samples/break/break.sln new file mode 100644 index 00000000000..5c6b4364a31 --- /dev/null +++ b/icu4c/source/samples/break/break.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "break", "break.vcproj", "{DEEADF02-9C14-4854-A395-E505D2904D65}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {DEEADF02-9C14-4854-A395-E505D2904D65}.Debug.ActiveCfg = Debug|Win32 + {DEEADF02-9C14-4854-A395-E505D2904D65}.Debug.Build.0 = Debug|Win32 + {DEEADF02-9C14-4854-A395-E505D2904D65}.Release.ActiveCfg = Release|Win32 + {DEEADF02-9C14-4854-A395-E505D2904D65}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/break/break.vcproj b/icu4c/source/samples/break/break.vcproj new file mode 100644 index 00000000000..cb3a6b66875 --- /dev/null +++ b/icu4c/source/samples/break/break.vcproj @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/cal/cal.sln b/icu4c/source/samples/cal/cal.sln new file mode 100644 index 00000000000..fc5dae34841 --- /dev/null +++ b/icu4c/source/samples/cal/cal.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cal", "cal.vcproj", "{F7659D77-09CF-4FE9-ACEE-927287AA9509}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug.ActiveCfg = Debug|Win32 + {F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug.Build.0 = Debug|Win32 + {F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release.ActiveCfg = Release|Win32 + {F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/cal/cal.vcproj b/icu4c/source/samples/cal/cal.vcproj new file mode 100644 index 00000000000..c29abe1aa51 --- /dev/null +++ b/icu4c/source/samples/cal/cal.vcproj @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/case/case.dsp b/icu4c/source/samples/case/case.dsp new file mode 100644 index 00000000000..b26014ea7fa --- /dev/null +++ b/icu4c/source/samples/case/case.dsp @@ -0,0 +1,106 @@ +# Microsoft Developer Studio Project File - Name="case" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=case - 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 "case.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 "case.mak" CFG="case - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "case - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "case - 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)" == "case - 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 "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\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 icuio.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib" + +!ELSEIF "$(CFG)" == "case - 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 "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /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 icuiod.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib" + +!ENDIF + +# Begin Target + +# Name "case - Win32 Release" +# Name "case - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\case.cpp +# End Source File +# Begin Source File + +SOURCE=.\ucase.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# 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/samples/case/case.dsw b/icu4c/source/samples/case/case.dsw new file mode 100644 index 00000000000..db415edf27a --- /dev/null +++ b/icu4c/source/samples/case/case.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "case"=.\case.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/icu4c/source/samples/case/case.sln b/icu4c/source/samples/case/case.sln new file mode 100644 index 00000000000..9a6f5080a38 --- /dev/null +++ b/icu4c/source/samples/case/case.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "case", "case.vcproj", "{2316BE8C-189D-4C8B-B506-9D9EE25AC46D}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {2316BE8C-189D-4C8B-B506-9D9EE25AC46D}.Debug.ActiveCfg = Debug|Win32 + {2316BE8C-189D-4C8B-B506-9D9EE25AC46D}.Debug.Build.0 = Debug|Win32 + {2316BE8C-189D-4C8B-B506-9D9EE25AC46D}.Release.ActiveCfg = Release|Win32 + {2316BE8C-189D-4C8B-B506-9D9EE25AC46D}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/case/case.vcproj b/icu4c/source/samples/case/case.vcproj new file mode 100644 index 00000000000..6de81eeb95d --- /dev/null +++ b/icu4c/source/samples/case/case.vcproj @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/case/ucase.c b/icu4c/source/samples/case/ucase.c index afb52986e13..eab0c442dfa 100644 --- a/icu4c/source/samples/case/ucase.c +++ b/icu4c/source/samples/case/ucase.c @@ -20,7 +20,6 @@ int c_main(UFILE *out) { - printf("** C Case Mapping Sample\n"); UChar ch; UErrorCode errorCode = U_ZERO_ERROR; static const UChar upper[] = {0x61, 0x42, 0x49, 0}; /* upper = "aBI" */ @@ -33,6 +32,8 @@ int c_main(UFILE *out) int length; + printf("** C Case Mapping Sample\n"); + /* uchar.h APIs, single character case mapping */ ch = u_toupper(char_k); /* ch = 'K' */ u_fprintf(out, "toupper(%K) = %K\n", char_k, ch); diff --git a/icu4c/source/samples/coll/coll.cpp b/icu4c/source/samples/coll/coll.cpp index cc55340192c..ecec1b8a7a8 100644 --- a/icu4c/source/samples/coll/coll.cpp +++ b/icu4c/source/samples/coll/coll.cpp @@ -49,8 +49,8 @@ UBool opt_lower = FALSE; UBool opt_upper = FALSE; UBool opt_case = FALSE; int opt_level = 0; -char * opt_source = 0; -char * opt_target = 0; +char * opt_source = "abc"; +char * opt_target = "abd"; UCollator * collator = 0; /** diff --git a/icu4c/source/samples/coll/coll.sln b/icu4c/source/samples/coll/coll.sln new file mode 100644 index 00000000000..36a9302fad1 --- /dev/null +++ b/icu4c/source/samples/coll/coll.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coll", "coll.vcproj", "{7664D0D2-0263-4BFB-AE19-9A1CAD231440}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {7664D0D2-0263-4BFB-AE19-9A1CAD231440}.Debug.ActiveCfg = Debug|Win32 + {7664D0D2-0263-4BFB-AE19-9A1CAD231440}.Debug.Build.0 = Debug|Win32 + {7664D0D2-0263-4BFB-AE19-9A1CAD231440}.Release.ActiveCfg = Release|Win32 + {7664D0D2-0263-4BFB-AE19-9A1CAD231440}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/coll/coll.vcproj b/icu4c/source/samples/coll/coll.vcproj new file mode 100644 index 00000000000..3d11787320b --- /dev/null +++ b/icu4c/source/samples/coll/coll.vcproj @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/date/date.sln b/icu4c/source/samples/date/date.sln new file mode 100644 index 00000000000..a1bd0d29a50 --- /dev/null +++ b/icu4c/source/samples/date/date.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "date", "date.vcproj", "{38B5751A-C6F9-4409-950C-F4F9DA17275F}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug.ActiveCfg = Debug|Win32 + {38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug.Build.0 = Debug|Win32 + {38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release.ActiveCfg = Release|Win32 + {38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/date/date.vcproj b/icu4c/source/samples/date/date.vcproj new file mode 100644 index 00000000000..d0eb5c45c47 --- /dev/null +++ b/icu4c/source/samples/date/date.vcproj @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/datefmt/answers/main_0.cpp b/icu4c/source/samples/datefmt/answers/main_0.cpp new file mode 100644 index 00000000000..6dd5fcb505f --- /dev/null +++ b/icu4c/source/samples/datefmt/answers/main_0.cpp @@ -0,0 +1,66 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1999-2002, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ + +#include "unicode/unistr.h" +#include "unicode/calendar.h" +#include "unicode/datefmt.h" +#include "unicode/uclean.h" +#include +#include +#include "util.h" + +/** + * If the ID supplied to TimeZone is not a valid system ID, + * TimeZone::createTimeZone() will return a GMT zone object. In order + * to detect this error, we check the ID of the returned zone against + * the ID we requested. If they don't match, we fail with an error. + */ +TimeZone* createZone(const UnicodeString& id) { + UnicodeString str; + TimeZone* zone = TimeZone::createTimeZone(id); + if (zone->getID(str) != id) { + delete zone; + printf("Error: TimeZone::createTimeZone("); + uprintf(id); + printf(") returned zone with ID "); + uprintf(str); + printf("\n"); + exit(1); + } + return zone; +} + +int main(int argc, char **argv) { + + UErrorCode status = U_ZERO_ERROR; + UnicodeString str; + + // The languages in which we will display the date + static char* LANGUAGE[] = { + "en", "de", "fr" + }; + static const int32_t N_LANGUAGE = sizeof(LANGUAGE)/sizeof(LANGUAGE[0]); + + // The time zones in which we will display the time + static char* TIMEZONE[] = { + "America/Los_Angeles", + "America/New_York", + "Europe/Paris", + "Europe/Berlin" + }; + static const int32_t N_TIMEZONE = sizeof(TIMEZONE)/sizeof(TIMEZONE[0]); + + for (int32_t i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/datefmt/main.cpp b/icu4c/source/samples/datefmt/main.cpp index 6dd5fcb505f..e7776836277 100644 --- a/icu4c/source/samples/datefmt/main.cpp +++ b/icu4c/source/samples/datefmt/main.cpp @@ -7,7 +7,6 @@ #include "unicode/unistr.h" #include "unicode/calendar.h" #include "unicode/datefmt.h" -#include "unicode/uclean.h" #include #include #include "util.h" @@ -35,8 +34,12 @@ TimeZone* createZone(const UnicodeString& id) { int main(int argc, char **argv) { + Calendar *cal; + TimeZone *zone; + DateFormat *fmt; UErrorCode status = U_ZERO_ERROR; UnicodeString str; + UDate date; // The languages in which we will display the date static char* LANGUAGE[] = { @@ -53,14 +56,41 @@ int main(int argc, char **argv) { }; static const int32_t N_TIMEZONE = sizeof(TIMEZONE)/sizeof(TIMEZONE[0]); + // Create a calendar + cal = Calendar::createInstance(status); + check(status, "Calendar::createInstance"); + zone = createZone("GMT"); // Create a GMT zone + cal->adoptTimeZone(zone); + cal->clear(); + cal->set(1999, Calendar::JUNE, 4); + date = cal->getTime(status); + check(status, "Calendar::getTime"); + for (int32_t i=0; iadoptTimeZone(createZone(TIMEZONE[j])); + fmt->setCalendar(*cal); + + // Format the date + str.remove(); + fmt->format(date, str, status); + + // Display the formatted date string + printf("Date (%s, %s): ", LANGUAGE[i], TIMEZONE[j]); + uprintf(escape(str)); + printf("\n\n"); + } + + delete fmt; } printf("Exiting successfully\n"); - u_cleanup(); return 0; } diff --git a/icu4c/source/samples/layout/FontMap.GDI b/icu4c/source/samples/layout/FontMap.GDI index d3c3f1639ac..1295d5c4d57 100644 --- a/icu4c/source/samples/layout/FontMap.GDI +++ b/icu4c/source/samples/layout/FontMap.GDI @@ -3,6 +3,24 @@ # Fonts are specified by font name, as shown # in the "Fonts" folder. +# LATIN: Times New Roman +#DEVANAGARI: Devanagari MT for IBM +#DEVANAGARI: Devanagari MT DEVANAGARI: Raghindi +# ARABIC: Times New Roman +# ARABIC: Arabic Typesetting +# ARABIC: Traditional Arabic +# ARABIC: MS Farsi +# ARABIC: Noori Nastaliq MT +# ARABIC: Nafees Naskh + ARABIC: Noori DLCursivePre MT THAI: Thonburi + TAMIL: Latha + TELUGU: Gautami + GURMUKHI: Raavi + GUJARATI: Shruti + KANNADA: Tunga + MALAYALAM: MalOtf DEFAULT: Code2000 +# DEFAULT: Arial Unicode MS + diff --git a/icu4c/source/samples/layout/LayoutSample.rc b/icu4c/source/samples/layout/LayoutSample.rc index 4dcec902842..48aa123afc6 100644 --- a/icu4c/source/samples/layout/LayoutSample.rc +++ b/icu4c/source/samples/layout/LayoutSample.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Menu // -LayoutSample MENU DISCARDABLE +LAYOUTSAMPLE MENU DISCARDABLE BEGIN POPUP "&File" BEGIN @@ -48,7 +48,7 @@ END // Accelerator // -LayoutSample ACCELERATORS DISCARDABLE +LAYOUTSAMPLE ACCELERATORS DISCARDABLE BEGIN "N", IDM_FILE_NEWSAMPLE, VIRTKEY, CONTROL, NOINVERT "O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT diff --git a/icu4c/source/samples/layout/resource.h b/icu4c/source/samples/layout/resource.h index ddf95514c26..e3f007da7ea 100644 --- a/icu4c/source/samples/layout/resource.h +++ b/icu4c/source/samples/layout/resource.h @@ -12,7 +12,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 103 +#define _APS_NEXT_RESOURCE_VALUE 104 #define _APS_NEXT_COMMAND_VALUE 40006 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/icu4c/source/samples/msgfmt/answers/main_0.cpp b/icu4c/source/samples/msgfmt/answers/main_0.cpp new file mode 100644 index 00000000000..00dbd748398 --- /dev/null +++ b/icu4c/source/samples/msgfmt/answers/main_0.cpp @@ -0,0 +1,26 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1999-2002, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ + +#include "unicode/unistr.h" +#include "unicode/msgfmt.h" +#include "unicode/uclean.h" +#include +#include +#include "util.h" + +int main(int argc, char **argv) { + + UErrorCode status = U_ZERO_ERROR; + UnicodeString str; + + printf("Message: "); + uprintf(str); + printf("\n"); + + u_cleanup(); + printf("Exiting successfully\n"); + return 0; +} diff --git a/icu4c/source/samples/msgfmt/msgfmt.sln b/icu4c/source/samples/msgfmt/msgfmt.sln new file mode 100644 index 00000000000..2a9fb78f0c3 --- /dev/null +++ b/icu4c/source/samples/msgfmt/msgfmt.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msgfmt", "msgfmt.vcproj", "{5FF1D1A2-1630-446C-B6EA-93EFD4F975C3}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {5FF1D1A2-1630-446C-B6EA-93EFD4F975C3}.Debug.ActiveCfg = Debug|Win32 + {5FF1D1A2-1630-446C-B6EA-93EFD4F975C3}.Debug.Build.0 = Debug|Win32 + {5FF1D1A2-1630-446C-B6EA-93EFD4F975C3}.Release.ActiveCfg = Release|Win32 + {5FF1D1A2-1630-446C-B6EA-93EFD4F975C3}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/msgfmt/msgfmt.vcproj b/icu4c/source/samples/msgfmt/msgfmt.vcproj new file mode 100644 index 00000000000..21c0d51ce91 --- /dev/null +++ b/icu4c/source/samples/msgfmt/msgfmt.vcproj @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/numfmt/numfmt.dsw b/icu4c/source/samples/numfmt/numfmt.dsw index c2ef508e2f5..2a65f2cde56 100644 --- a/icu4c/source/samples/numfmt/numfmt.dsw +++ b/icu4c/source/samples/numfmt/numfmt.dsw @@ -3,30 +3,6 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "common"=..\..\common\common.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "i18n"=..\..\i18n\i18n.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "numfmt"=.\numfmt.dsp - Package Owner=<4> Package=<5> diff --git a/icu4c/source/samples/props/props.sln b/icu4c/source/samples/props/props.sln new file mode 100644 index 00000000000..475687a32ce --- /dev/null +++ b/icu4c/source/samples/props/props.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "props", "props.vcproj", "{ABE4CD17-8ED8-4DE6-ABDE-CDEFC220CF60}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {ABE4CD17-8ED8-4DE6-ABDE-CDEFC220CF60}.Debug.ActiveCfg = Debug|Win32 + {ABE4CD17-8ED8-4DE6-ABDE-CDEFC220CF60}.Debug.Build.0 = Debug|Win32 + {ABE4CD17-8ED8-4DE6-ABDE-CDEFC220CF60}.Release.ActiveCfg = Release|Win32 + {ABE4CD17-8ED8-4DE6-ABDE-CDEFC220CF60}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/props/props.vcproj b/icu4c/source/samples/props/props.vcproj new file mode 100644 index 00000000000..59296fb7e55 --- /dev/null +++ b/icu4c/source/samples/props/props.vcproj @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/strsrch/strsrch.cpp b/icu4c/source/samples/strsrch/strsrch.cpp index af51ccd56c3..8e27790837b 100644 --- a/icu4c/source/samples/strsrch/strsrch.cpp +++ b/icu4c/source/samples/strsrch/strsrch.cpp @@ -54,8 +54,8 @@ UBool opt_case = FALSE; UBool opt_overlap = FALSE; UBool opt_canonical = FALSE; int opt_level = 0; -char * opt_source = 0; -char * opt_pattern = 0; +char * opt_source = "International Components for Unicode"; +char * opt_pattern = "Unicode"; UCollator * collator = 0; UStringSearch * search = 0; UChar rules[100]; diff --git a/icu4c/source/samples/strsrch/strsrch.sln b/icu4c/source/samples/strsrch/strsrch.sln new file mode 100644 index 00000000000..046611e2328 --- /dev/null +++ b/icu4c/source/samples/strsrch/strsrch.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strsrch", "strsrch.vcproj", "{E97790D1-7ABE-4C8E-9627-251ABEAA3EEC}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {E97790D1-7ABE-4C8E-9627-251ABEAA3EEC}.Debug.ActiveCfg = Debug|Win32 + {E97790D1-7ABE-4C8E-9627-251ABEAA3EEC}.Debug.Build.0 = Debug|Win32 + {E97790D1-7ABE-4C8E-9627-251ABEAA3EEC}.Release.ActiveCfg = Release|Win32 + {E97790D1-7ABE-4C8E-9627-251ABEAA3EEC}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/strsrch/strsrch.vcproj b/icu4c/source/samples/strsrch/strsrch.vcproj new file mode 100644 index 00000000000..5e07b560712 --- /dev/null +++ b/icu4c/source/samples/strsrch/strsrch.vcproj @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/translit/main.cpp b/icu4c/source/samples/translit/main.cpp index 60b51fad624..5d713a00dad 100644 --- a/icu4c/source/samples/translit/main.cpp +++ b/icu4c/source/samples/translit/main.cpp @@ -5,19 +5,35 @@ ********************************************************************/ #include "unicode/translit.h" -#include "unicode/rbt.h" +//#include "unicode/rbt.h" #include "unicode/unistr.h" #include "unicode/calendar.h" #include "unicode/datefmt.h" #include #include #include "util.h" +#include "unaccent.h" + +// RuleBasedTransliterator rules to remove accents from characters +// so they can be displayed as ASCIIx +UnicodeString UNACCENT_RULES( + "[\\u00C0-\\u00C5] > A;" + "[\\u00C8-\\u00CB] > E;" + "[\\u00CC-\\u00CF] > I;" + "[\\u00E0-\\u00E5] > a;" + "[\\u00E8-\\u00EB] > e;" + "[\\u00EC-\\u00EF] > i;" + ); int main(int argc, char **argv) { Calendar *cal; DateFormat *fmt; DateFormat *defFmt; + Transliterator *greek_latin; + Transliterator *rbtUnaccent; + Transliterator *unaccent; + UParseError pError; UErrorCode status = U_ZERO_ERROR; Locale greece("el", "GR"); UnicodeString str, str2; @@ -34,6 +50,24 @@ int main(int argc, char **argv) { defFmt = DateFormat::createDateInstance(DateFormat::kFull); defFmt->setCalendar(*cal); + // Create a Greek-Latin Transliterator + greek_latin = Transliterator::createInstance("Greek-Latin", UTRANS_FORWARD, status); + if (greek_latin == 0) { + printf("ERROR: Transliterator::createInstance() failed\n"); + exit(1); + } + + // Create a custom Transliterator + rbtUnaccent = Transliterator::createFromRules("RBTUnaccent", + UNACCENT_RULES, + UTRANS_FORWARD, + pError, + status); + check(status, "Transliterator::createFromRules"); + + // Create a custom Transliterator + unaccent = new UnaccentTransliterator(); + // Loop over various months for (int32_t month = Calendar::JANUARY; month <= Calendar::DECEMBER; @@ -45,7 +79,7 @@ int main(int argc, char **argv) { // Format the date in default locale str.remove(); - defFmt->format((Formattable)cal->getTime(status), str, status); + defFmt->format(cal->getTime(status), str, status); check(status, "DateFormat::format"); printf("Date: "); uprintf(escape(str)); @@ -53,16 +87,37 @@ int main(int argc, char **argv) { // Format the date for Greece str.remove(); - fmt->format((Formattable)cal->getTime(status), str, status); + fmt->format(cal->getTime(status), str, status); check(status, "DateFormat::format"); printf("Greek formatted date: "); uprintf(escape(str)); + printf("\n"); + + // Transliterate result + greek_latin->transliterate(str); + printf("Transliterated via Greek-Latin: "); + uprintf(escape(str)); + printf("\n"); + + // Transliterate result + str2 = str; + rbtUnaccent->transliterate(str); + printf("Transliterated via RBT unaccent: "); + uprintf(escape(str)); + printf("\n"); + + unaccent->transliterate(str2); + printf("Transliterated via normalizer unaccent: "); + uprintf(escape(str2)); printf("\n\n"); } // Clean up delete fmt; delete cal; + delete greek_latin; + delete unaccent; + delete rbtUnaccent; printf("Exiting successfully\n"); return 0; diff --git a/icu4c/source/samples/translit/translit.dsp b/icu4c/source/samples/translit/translit.dsp index e33d75b2e13..b69f992ca45 100644 --- a/icu4c/source/samples/translit/translit.dsp +++ b/icu4c/source/samples/translit/translit.dsp @@ -91,12 +91,20 @@ SOURCE=.\main.cpp # End Source File # Begin Source File +SOURCE=.\unaccent.cpp +# End Source File +# Begin Source File + SOURCE=.\util.cpp # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\unaccent.h +# End Source File # End Group # Begin Group "Resource Files" diff --git a/icu4c/source/samples/translit/translit.sln b/icu4c/source/samples/translit/translit.sln new file mode 100644 index 00000000000..b509f1d0e56 --- /dev/null +++ b/icu4c/source/samples/translit/translit.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translit", "translit.vcproj", "{D1BEC124-303A-4F44-BA70-55769B8FE96A}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {D1BEC124-303A-4F44-BA70-55769B8FE96A}.Debug.ActiveCfg = Debug|Win32 + {D1BEC124-303A-4F44-BA70-55769B8FE96A}.Debug.Build.0 = Debug|Win32 + {D1BEC124-303A-4F44-BA70-55769B8FE96A}.Release.ActiveCfg = Release|Win32 + {D1BEC124-303A-4F44-BA70-55769B8FE96A}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/translit/translit.vcproj b/icu4c/source/samples/translit/translit.vcproj new file mode 100644 index 00000000000..66039be7f43 --- /dev/null +++ b/icu4c/source/samples/translit/translit.vcproj @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/translit/unaccent.cpp b/icu4c/source/samples/translit/unaccent.cpp new file mode 100644 index 00000000000..0191a5adf51 --- /dev/null +++ b/icu4c/source/samples/translit/unaccent.cpp @@ -0,0 +1,56 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1999-2002, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ + +#include "unaccent.h" + +const char UnaccentTransliterator::fgClassID = 0; + +/** + * Constructor + */ +UnaccentTransliterator::UnaccentTransliterator() : + normalizer("", UNORM_NFD), + Transliterator("Unaccent", 0) { +} + +/** + * Destructor + */ +UnaccentTransliterator::~UnaccentTransliterator() { +} + +/** + * Remove accents from a character using Normalizer. + */ +UChar UnaccentTransliterator::unaccent(UChar c) const { + UnicodeString str(c); + UErrorCode status = U_ZERO_ERROR; + UnaccentTransliterator* t = (UnaccentTransliterator*)this; + + t->normalizer.setText(str, status); + if (U_FAILURE(status)) { + return c; + } + return (UChar) t->normalizer.next(); +} + +/** + * Implement Transliterator API + */ +void UnaccentTransliterator::handleTransliterate(Replaceable& text, + UTransPosition& index, + UBool incremental) const { + UnicodeString str("a"); + while (index.start < index.limit) { + UChar c = text.charAt(index.start); + UChar d = unaccent(c); + if (c != d) { + str.setCharAt(0, d); + text.handleReplaceBetween(index.start, index.start+1, str); + } + index.start++; + } +} diff --git a/icu4c/source/samples/translit/unaccent.h b/icu4c/source/samples/translit/unaccent.h new file mode 100644 index 00000000000..aba8d9c1851 --- /dev/null +++ b/icu4c/source/samples/translit/unaccent.h @@ -0,0 +1,89 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (c) 1999-2002, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ + +#include "unicode/translit.h" +#include "unicode/normlzr.h" + +class UnaccentTransliterator : public Transliterator { + + public: + + /** + * Constructor + */ + UnaccentTransliterator(); + + /** + * Destructor + */ + virtual ~UnaccentTransliterator(); + + protected: + + /** + * Implement Transliterator API + */ + virtual void handleTransliterate(Replaceable& text, + UTransPosition& index, + UBool incremental) const; + + private: + + /** + * Unaccent a single character using normalizer. + */ + UChar unaccent(UChar c) const; + + Normalizer normalizer; + +public: + + /** + * Return the class ID for this class. This is useful only for + * comparing to a return value from getDynamicClassID(). For example: + *
+     * .      Base* polymorphic_pointer = createPolymorphicObject();
+     * .      if (polymorphic_pointer->getDynamicClassID() ==
+     * .          Derived::getStaticClassID()) ...
+     * 
+ * @return The class ID for all objects of this class. + * @stable ICU 2.0 + */ + static inline UClassID getStaticClassID(void) { return (UClassID)&fgClassID; }; + + /** + * Returns a unique class ID polymorphically. This method + * is to implement a simple version of RTTI, since not all C++ + * compilers support genuine RTTI. Polymorphic operator==() and + * clone() methods call this method. + * + *

Concrete subclasses of Transliterator that wish clients to + * be able to identify them should implement getDynamicClassID() + * and also a static method and data member: + * + *

+     * static UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+     * static char fgClassID;
+     * 
+ * + * Subclasses that do not implement this method will have a + * dynamic class ID of Transliterator::getStatisClassID(). + * + * @return The class ID for this object. All objects of a given + * class have the same class ID. Objects of other classes have + * different class IDs. + * @stable ICU 2.0 + */ + virtual UClassID getDynamicClassID(void) const { return getStaticClassID(); }; + +private: + + /** + * Class identifier for subclasses of Transliterator that do not + * define their class (anonymous subclasses). + */ + static const char fgClassID; +}; diff --git a/icu4c/source/samples/uciter8/uciter8.dsw b/icu4c/source/samples/uciter8/uciter8.dsw index 12032eeac40..4c3fee18071 100644 --- a/icu4c/source/samples/uciter8/uciter8.dsw +++ b/icu4c/source/samples/uciter8/uciter8.dsw @@ -3,18 +3,6 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "common"=..\..\common\common.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "uciter8"=.\uciter8.dsp - Package Owner=<4> Package=<5> @@ -23,9 +11,6 @@ Package=<5> Package=<4> {{{ - Begin Project Dependency - Project_Dep_Name common - End Project Dependency }}} ############################################################################### diff --git a/icu4c/source/samples/uciter8/uciter8.sln b/icu4c/source/samples/uciter8/uciter8.sln new file mode 100644 index 00000000000..0cbfa9c0367 --- /dev/null +++ b/icu4c/source/samples/uciter8/uciter8.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uciter8", "uciter8.vcproj", "{94379DD9-E6CC-47AC-8E62-0A4ABD8EB121}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {94379DD9-E6CC-47AC-8E62-0A4ABD8EB121}.Debug.ActiveCfg = Debug|Win32 + {94379DD9-E6CC-47AC-8E62-0A4ABD8EB121}.Debug.Build.0 = Debug|Win32 + {94379DD9-E6CC-47AC-8E62-0A4ABD8EB121}.Release.ActiveCfg = Release|Win32 + {94379DD9-E6CC-47AC-8E62-0A4ABD8EB121}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/uciter8/uciter8.vcproj b/icu4c/source/samples/uciter8/uciter8.vcproj new file mode 100644 index 00000000000..09899160425 --- /dev/null +++ b/icu4c/source/samples/uciter8/uciter8.vcproj @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/ucnv/convsamp.cpp b/icu4c/source/samples/ucnv/convsamp.cpp index c93888e1b18..1a3dbd02095 100644 --- a/icu4c/source/samples/ucnv/convsamp.cpp +++ b/icu4c/source/samples/ucnv/convsamp.cpp @@ -145,7 +145,7 @@ void printBytes(const char *name = "?", printf("%5s:", "ch"); for( i = 0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/udata/reader.vcproj b/icu4c/source/samples/udata/reader.vcproj new file mode 100644 index 00000000000..aff2ec4bc52 --- /dev/null +++ b/icu4c/source/samples/udata/reader.vcproj @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/udata/udata.sln b/icu4c/source/samples/udata/udata.sln new file mode 100644 index 00000000000..6cbfc44e1e7 --- /dev/null +++ b/icu4c/source/samples/udata/udata.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reader", "reader.vcproj", "{BFEFC070-C5A9-42E3-BAAE-A51FB2C4BA28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "writer", "writer.vcproj", "{40A90302-F173-4629-A003-F571D2D93D16}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {BFEFC070-C5A9-42E3-BAAE-A51FB2C4BA28}.Debug.ActiveCfg = Debug|Win32 + {BFEFC070-C5A9-42E3-BAAE-A51FB2C4BA28}.Debug.Build.0 = Debug|Win32 + {BFEFC070-C5A9-42E3-BAAE-A51FB2C4BA28}.Release.ActiveCfg = Release|Win32 + {BFEFC070-C5A9-42E3-BAAE-A51FB2C4BA28}.Release.Build.0 = Release|Win32 + {40A90302-F173-4629-A003-F571D2D93D16}.Debug.ActiveCfg = Debug|Win32 + {40A90302-F173-4629-A003-F571D2D93D16}.Debug.Build.0 = Debug|Win32 + {40A90302-F173-4629-A003-F571D2D93D16}.Release.ActiveCfg = Release|Win32 + {40A90302-F173-4629-A003-F571D2D93D16}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/udata/writer.vcproj b/icu4c/source/samples/udata/writer.vcproj new file mode 100644 index 00000000000..1c4102852d6 --- /dev/null +++ b/icu4c/source/samples/udata/writer.vcproj @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/ufortune/ufortune.sln b/icu4c/source/samples/ufortune/ufortune.sln new file mode 100644 index 00000000000..b39348c9882 --- /dev/null +++ b/icu4c/source/samples/ufortune/ufortune.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ufortune", "ufortune.vcproj", "{25F534DF-93C9-4853-A88E-DB7D8CF74042}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {25F534DF-93C9-4853-A88E-DB7D8CF74042}.Debug.ActiveCfg = Debug|Win32 + {25F534DF-93C9-4853-A88E-DB7D8CF74042}.Debug.Build.0 = Debug|Win32 + {25F534DF-93C9-4853-A88E-DB7D8CF74042}.Release.ActiveCfg = Release|Win32 + {25F534DF-93C9-4853-A88E-DB7D8CF74042}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/ufortune/ufortune.vcproj b/icu4c/source/samples/ufortune/ufortune.vcproj new file mode 100644 index 00000000000..315a1445eb8 --- /dev/null +++ b/icu4c/source/samples/ufortune/ufortune.vcproj @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/ugrep/ugrep.sln b/icu4c/source/samples/ugrep/ugrep.sln new file mode 100644 index 00000000000..11e6af6b0a0 --- /dev/null +++ b/icu4c/source/samples/ugrep/ugrep.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ugrep", "ugrep.vcproj", "{E5742DB5-B6E7-4895-825A-CA03FC0A59D0}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {E5742DB5-B6E7-4895-825A-CA03FC0A59D0}.Debug.ActiveCfg = Debug|Win32 + {E5742DB5-B6E7-4895-825A-CA03FC0A59D0}.Debug.Build.0 = Debug|Win32 + {E5742DB5-B6E7-4895-825A-CA03FC0A59D0}.Release.ActiveCfg = Release|Win32 + {E5742DB5-B6E7-4895-825A-CA03FC0A59D0}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/ugrep/ugrep.vcproj b/icu4c/source/samples/ugrep/ugrep.vcproj new file mode 100644 index 00000000000..7d84b281ad2 --- /dev/null +++ b/icu4c/source/samples/ugrep/ugrep.vcproj @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/uresb/uresb.sln b/icu4c/source/samples/uresb/uresb.sln new file mode 100644 index 00000000000..f33571d5257 --- /dev/null +++ b/icu4c/source/samples/uresb/uresb.sln @@ -0,0 +1,28 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resources", "resources.vcproj", "{69437707-2FEF-4E2C-8C3F-6E6B3D241366}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uresb", "uresb.vcproj", "{92580BF4-F4DA-4024-B3F8-444F982BC72F}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + {92580BF4-F4DA-4024-B3F8-444F982BC72F}.0 = {69437707-2FEF-4E2C-8C3F-6E6B3D241366} + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {69437707-2FEF-4E2C-8C3F-6E6B3D241366}.Debug.ActiveCfg = Debug|Win32 + {69437707-2FEF-4E2C-8C3F-6E6B3D241366}.Debug.Build.0 = Debug|Win32 + {69437707-2FEF-4E2C-8C3F-6E6B3D241366}.Release.ActiveCfg = Release|Win32 + {69437707-2FEF-4E2C-8C3F-6E6B3D241366}.Release.Build.0 = Release|Win32 + {92580BF4-F4DA-4024-B3F8-444F982BC72F}.Debug.ActiveCfg = Debug|Win32 + {92580BF4-F4DA-4024-B3F8-444F982BC72F}.Debug.Build.0 = Debug|Win32 + {92580BF4-F4DA-4024-B3F8-444F982BC72F}.Release.ActiveCfg = Release|Win32 + {92580BF4-F4DA-4024-B3F8-444F982BC72F}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/uresb/uresb.vcproj b/icu4c/source/samples/uresb/uresb.vcproj new file mode 100644 index 00000000000..809d8be0723 --- /dev/null +++ b/icu4c/source/samples/uresb/uresb.vcproj @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4c/source/samples/ustring/ustring.sln b/icu4c/source/samples/ustring/ustring.sln new file mode 100644 index 00000000000..42dad66fc4f --- /dev/null +++ b/icu4c/source/samples/ustring/ustring.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ustring", "ustring.vcproj", "{FF92E6C1-BACA-41AD-BB6D-ECA19C05573E}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {FF92E6C1-BACA-41AD-BB6D-ECA19C05573E}.Debug.ActiveCfg = Debug|Win32 + {FF92E6C1-BACA-41AD-BB6D-ECA19C05573E}.Debug.Build.0 = Debug|Win32 + {FF92E6C1-BACA-41AD-BB6D-ECA19C05573E}.Release.ActiveCfg = Release|Win32 + {FF92E6C1-BACA-41AD-BB6D-ECA19C05573E}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/icu4c/source/samples/ustring/ustring.vcproj b/icu4c/source/samples/ustring/ustring.vcproj new file mode 100644 index 00000000000..c16e7ee783f --- /dev/null +++ b/icu4c/source/samples/ustring/ustring.vcproj @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +