ICU-7627 move dbgutil from ctestfw to toolutil ( merge from r28050 r28051 r28052 r28054 )
X-SVN-Rev: 28055
This commit is contained in:
parent
4405e8e99c
commit
d3172c2d68
@ -1,5 +1,5 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cal", "..\samples\cal\cal.vcproj", "{F7659D77-09CF-4FE9-ACEE-927287AA9509}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
|
||||
@ -226,12 +226,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icuinfo", "..\tools\icuinfo
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplug", "..\tools\icuinfo\testplug.vcproj", "{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
@ -498,8 +498,4 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -55,6 +55,7 @@ typedef enum ECleanupLibraryType {
|
||||
UCLN_UPLUG, /* ICU plugins */
|
||||
UCLN_CUSTOM, /* Custom is for anyone else. */
|
||||
UCLN_CTESTFW,
|
||||
UCLN_TOOLUTIL,
|
||||
UCLN_LAYOUTEX,
|
||||
UCLN_LAYOUT,
|
||||
UCLN_IO,
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/ulocdata.h"
|
||||
#include "unicode/parseerr.h" /* may not be included with some uconfig switches */
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
static void TestNullDefault(void);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "hebrwcal.h"
|
||||
#include "unicode/smpdtfmt.h"
|
||||
#include "unicode/simpletz.h"
|
||||
#include "unicode/dbgutil.h"
|
||||
#include "dbgutil.h"
|
||||
#include "unicode/udat.h"
|
||||
#include "unicode/ustring.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "unicode/schriter.h"
|
||||
#include "unicode/regex.h"
|
||||
#include "unicode/smpdtfmt.h"
|
||||
#include "unicode/dbgutil.h"
|
||||
#include "dbgutil.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "unicode/schriter.h"
|
||||
#include "unicode/regex.h"
|
||||
#include "unicode/smpdtfmt.h"
|
||||
#include "unicode/dbgutil.h"
|
||||
#include "dbgutil.h"
|
||||
#include "fldset.h"
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
************************************************************************
|
||||
* Copyright (c) 2007-2008, International Business Machines
|
||||
* Copyright (c) 2007-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
************************************************************************
|
||||
*/
|
||||
@ -13,8 +13,8 @@
|
||||
#include "unicode/calendar.h"
|
||||
#include "unicode/ucal.h"
|
||||
#include "unicode/udat.h"
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "unicode/dbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include "dbgutil.h"
|
||||
#include "unicode/unistr.h"
|
||||
|
||||
#define U_FIELDS_SET_MAX 64
|
||||
|
@ -51,7 +51,7 @@ DEFS += -DT_CTEST_IMPLEMENTATION
|
||||
LDFLAGS += $(LDFLAGSCTESTFW)
|
||||
LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS)
|
||||
|
||||
OBJECTS = ctest.o tstdtmod.o testdata.o datamap.o uperf.o dbgutil.o udbgutil.o ucln_ct.o
|
||||
OBJECTS = ctest.o tstdtmod.o testdata.o datamap.o uperf.o ucln_ct.o
|
||||
|
||||
STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
|
||||
|
||||
|
@ -413,10 +413,6 @@
|
||||
RelativePath=".\datamap.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dbgutil.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\testdata.cpp"
|
||||
>
|
||||
@ -461,10 +457,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\udbgutil.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\uperf.cpp"
|
||||
>
|
||||
@ -514,10 +506,6 @@
|
||||
RelativePath=".\unicode\datamap.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\unicode\dbgutil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\unicode\testdata.h"
|
||||
>
|
||||
@ -534,10 +522,6 @@
|
||||
RelativePath=".\unicode\tstdtmod.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\unicode\udbgutil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\unicode\uperf.h"
|
||||
>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/uclean.h"
|
||||
#include "unicode/udata.h"
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include "unewdata.h"
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
|
@ -25,7 +25,7 @@ CPPFLAGS += -I$(top_builddir)/common
|
||||
endif
|
||||
CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil -I$(top_srcdir)/tools/ctestfw
|
||||
CPPFLAGS+= -I$(top_srcdir)/i18n
|
||||
LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
|
||||
LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
|
||||
|
||||
OBJECTS = icuinfo.o
|
||||
PLUGIN_OBJECTS = testplug.o
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/uclean.h"
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include "unewdata.h"
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "unicode/icuplug.h"
|
||||
#include <stdio.h> /* for fprintf */
|
||||
#include <stdlib.h> /* for malloc */
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include "unicode/uclean.h"
|
||||
#include "cmemory.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#******************************************************************************
|
||||
#
|
||||
# Copyright (C) 1999-2009, International Business Machines
|
||||
# Copyright (C) 1999-2010, International Business Machines
|
||||
# Corporation and others. All Rights Reserved.
|
||||
#
|
||||
#******************************************************************************
|
||||
@ -54,7 +54,8 @@ LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS)
|
||||
OBJECTS = filestrm.o package.o pkgitems.o swapimpl.o toolutil.o unewdata.o \
|
||||
ucm.o ucmstate.o uoptions.o uparse.o \
|
||||
ucbuf.o xmlparser.o writesrc.o \
|
||||
pkg_icu.o pkg_genc.o pkg_gencmn.o flagparser.o filetools.o
|
||||
pkg_icu.o pkg_genc.o pkg_gencmn.o flagparser.o filetools.o \
|
||||
udbgutil.o dbgutil.o ucln_tu.o
|
||||
|
||||
STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 2007-2009, International Business Machines Corporation and
|
||||
* Copyright (c) 2007-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "unicode/dbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include "dbgutil.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
@ -40,14 +40,14 @@ static void udbg_cleanup(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static UBool ctestfw_cleanup(void)
|
||||
static UBool tu_cleanup(void)
|
||||
{
|
||||
udbg_cleanup();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void udbg_register_cleanup(void) {
|
||||
ucln_registerCleanup(UCLN_CTESTFW, ctestfw_cleanup);
|
||||
ucln_registerCleanup(UCLN_TOOLUTIL, tu_cleanup);
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
@ -72,7 +72,7 @@ static void udbg_setup(void) {
|
||||
|
||||
|
||||
|
||||
T_CTEST_API const UnicodeString& T_CTEST_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field) {
|
||||
U_CAPI const UnicodeString& U_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field) {
|
||||
if(strs == NULL ) {
|
||||
udbg_setup();
|
||||
}
|
||||
@ -91,7 +91,7 @@ T_CTEST_API const UnicodeString& T_CTEST_EXPORT2 udbg_enumString(UDebugEnumType
|
||||
}
|
||||
}
|
||||
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumByString(UDebugEnumType type, const UnicodeString& string) {
|
||||
U_CAPI int32_t U_EXPORT2 udbg_enumByString(UDebugEnumType type, const UnicodeString& string) {
|
||||
if(type<0||type>=UDBG_ENUM_COUNT) {
|
||||
return -1;
|
||||
}
|
||||
@ -109,7 +109,7 @@ T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumByString(UDebugEnumType type, cons
|
||||
}
|
||||
|
||||
// from DataMap::utoi
|
||||
T_CTEST_API int32_t
|
||||
U_CAPI int32_t
|
||||
udbg_stoi(const UnicodeString &s)
|
||||
{
|
||||
char ch[256];
|
||||
@ -121,7 +121,7 @@ udbg_stoi(const UnicodeString &s)
|
||||
}
|
||||
|
||||
|
||||
T_CTEST_API double
|
||||
U_CAPI double
|
||||
udbg_stod(const UnicodeString &s)
|
||||
{
|
||||
char ch[256];
|
||||
@ -132,7 +132,7 @@ udbg_stod(const UnicodeString &s)
|
||||
return atof(ch);
|
||||
}
|
||||
|
||||
T_CTEST_API UnicodeString *
|
||||
U_CAPI UnicodeString *
|
||||
udbg_escape(const UnicodeString &src, UnicodeString *dst)
|
||||
{
|
||||
dst->remove();
|
@ -1,7 +1,7 @@
|
||||
|
||||
/*
|
||||
************************************************************************
|
||||
* Copyright (c) 2007-2008, International Business Machines
|
||||
* Copyright (c) 2007-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
************************************************************************
|
||||
*/
|
||||
@ -12,31 +12,30 @@
|
||||
#define _DBGUTIL_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/testtype.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
//class UnicodeString;
|
||||
|
||||
T_CTEST_API const UnicodeString& T_CTEST_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field);
|
||||
U_CAPI const UnicodeString& U_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field);
|
||||
|
||||
/**
|
||||
* @return enum offset, or UDBG_INVALID_ENUM on error
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumByString(UDebugEnumType type, const UnicodeString& string);
|
||||
U_CAPI int32_t U_EXPORT2 udbg_enumByString(UDebugEnumType type, const UnicodeString& string);
|
||||
|
||||
/**
|
||||
* Convert a UnicodeString (with ascii digits) into a number.
|
||||
* @param s string
|
||||
* @return numerical value, or 0 on error
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_stoi(const UnicodeString &s);
|
||||
U_CAPI int32_t U_EXPORT2 udbg_stoi(const UnicodeString &s);
|
||||
|
||||
T_CTEST_API double T_CTEST_EXPORT2 udbg_stod(const UnicodeString &s);
|
||||
U_CAPI double U_EXPORT2 udbg_stod(const UnicodeString &s);
|
||||
|
||||
T_CTEST_API UnicodeString *udbg_escape(const UnicodeString &s, UnicodeString *dst);
|
||||
U_CAPI UnicodeString *udbg_escape(const UnicodeString &s, UnicodeString *dst);
|
||||
|
||||
#endif
|
||||
|
@ -647,6 +647,58 @@
|
||||
RelativePath=".\xmlparser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dbgutil.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\udbgutil.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dbgutil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\udbgutil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ucln_tu.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
DisableLanguageExtensions="false"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
DisableLanguageExtensions="false"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
DisableLanguageExtensions="false"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
DisableLanguageExtensions="false"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
17
icu4c/source/tools/toolutil/ucln_tu.c
Normal file
17
icu4c/source/tools/toolutil/ucln_tu.c
Normal file
@ -0,0 +1,17 @@
|
||||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 2007-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
||||
/** Auto-client **/
|
||||
#define UCLN_TYPE UCLN_TOOLUTIL
|
||||
#include "ucln_imp.h"
|
||||
|
||||
int dummyFunction();
|
||||
int dummyFunction()
|
||||
{
|
||||
/* this is here to prevent the compiler from complaining about an empty file */
|
||||
return 0;
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
#include "unicode/udbgutil.h"
|
||||
#include "udbgutil.h"
|
||||
#include <string.h>
|
||||
|
||||
/*
|
@ -10,7 +10,6 @@
|
||||
#ifndef _UDBGUTIL_H
|
||||
#define _UDBGUTIL_H
|
||||
|
||||
#include "unicode/testtype.h"
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
|
||||
@ -42,7 +41,7 @@ typedef enum UDebugEnumType UDebugEnumType;
|
||||
* Print how many enums are contained for this type.
|
||||
* Should be equal to the appropriate _COUNT constant or there is an error. Return -1 if unsupported.
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumCount(UDebugEnumType type);
|
||||
U_CAPI int32_t U_EXPORT2 udbg_enumCount(UDebugEnumType type);
|
||||
|
||||
/**
|
||||
* Convert an enum to a string
|
||||
@ -50,7 +49,7 @@ T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumCount(UDebugEnumType type);
|
||||
* @param field field number
|
||||
* @return string of the format "ERA", "YEAR", etc, or NULL if out of range or unsupported
|
||||
*/
|
||||
T_CTEST_API const char * T_CTEST_EXPORT2 udbg_enumName(UDebugEnumType type, int32_t field);
|
||||
U_CAPI const char * U_EXPORT2 udbg_enumName(UDebugEnumType type, int32_t field);
|
||||
|
||||
/**
|
||||
* for consistency checking
|
||||
@ -58,7 +57,7 @@ T_CTEST_API const char * T_CTEST_EXPORT2 udbg_enumName(UDebugEnumType type, int3
|
||||
* Print how many enums should be contained for this type.
|
||||
* This is equal to the appropriate _COUNT constant or there is an error. Returns -1 if unsupported.
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumExpectedCount(UDebugEnumType type);
|
||||
U_CAPI int32_t U_EXPORT2 udbg_enumExpectedCount(UDebugEnumType type);
|
||||
|
||||
/**
|
||||
* For consistency checking, returns the expected enum ordinal value for the given index value.
|
||||
@ -66,7 +65,7 @@ T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumExpectedCount(UDebugEnumType type);
|
||||
* @param field field number
|
||||
* @return should be equal to 'field' or -1 if out of range.
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumArrayValue(UDebugEnumType type, int32_t field);
|
||||
U_CAPI int32_t U_EXPORT2 udbg_enumArrayValue(UDebugEnumType type, int32_t field);
|
||||
|
||||
/**
|
||||
* Locate the specified field value by name.
|
||||
@ -74,6 +73,6 @@ T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumArrayValue(UDebugEnumType type, int
|
||||
* @param name name of string (case sensitive)
|
||||
* @return should be a field value or -1 if not found.
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2 udbg_enumByName(UDebugEnumType type, const char *name);
|
||||
U_CAPI int32_t U_EXPORT2 udbg_enumByName(UDebugEnumType type, const char *name);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user