mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-8972 merge gennames into genprops
X-SVN-Rev: 31178
This commit is contained in:
parent
2730ee27c3
commit
94f470f3bf
12 changed files with 258 additions and 1238 deletions
16
.gitignore
vendored
16
.gitignore
vendored
|
@ -980,22 +980,6 @@ tools/unicode/c/gencase/gencase.vcproj.*.*.user
|
|||
tools/unicode/c/gencase/release
|
||||
tools/unicode/c/gencase/x64
|
||||
tools/unicode/c/gencase/x86
|
||||
tools/unicode/c/gennames/*.d
|
||||
tools/unicode/c/gennames/*.ncb
|
||||
tools/unicode/c/gennames/*.o
|
||||
tools/unicode/c/gennames/*.opt
|
||||
tools/unicode/c/gennames/*.pdb
|
||||
tools/unicode/c/gennames/*.plg
|
||||
tools/unicode/c/gennames/Debug
|
||||
tools/unicode/c/gennames/Makefile
|
||||
tools/unicode/c/gennames/Release
|
||||
tools/unicode/c/gennames/debug
|
||||
tools/unicode/c/gennames/gennames
|
||||
tools/unicode/c/gennames/gennames.[0-9]
|
||||
tools/unicode/c/gennames/gennames.vcproj.*.*.user
|
||||
tools/unicode/c/gennames/release
|
||||
tools/unicode/c/gennames/x64
|
||||
tools/unicode/c/gennames/x86
|
||||
tools/unicode/c/genprops/*.d
|
||||
tools/unicode/c/genprops/*.ncb
|
||||
tools/unicode/c/genprops/*.o
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2010-2011, International Business Machines
|
||||
# Copyright (C) 2010-2012, International Business Machines
|
||||
# Corporation and others. All Rights Reserved.
|
||||
#
|
||||
# created on: 2010jun03
|
||||
|
@ -18,7 +18,6 @@ include_directories(
|
|||
${ICU_SRC_DIR}/source/tools/toolutil)
|
||||
link_directories(${ICU_INST_DIR}/lib)
|
||||
add_subdirectory(gencase)
|
||||
add_subdirectory(gennames)
|
||||
add_subdirectory(genprops)
|
||||
add_subdirectory(genuca)
|
||||
add_subdirectory(genuts46)
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# Copyright (C) 2010, International Business Machines
|
||||
# Corporation and others. All Rights Reserved.
|
||||
#
|
||||
# created on: 2010jun03
|
||||
# created by: Markus W. Scherer
|
||||
# edited on: 2010jul20
|
||||
# edited by: Stuart G. Gill
|
||||
add_executable(gennames gennames.c)
|
||||
target_link_libraries(gennames icuuc icutu)
|
|
@ -1,97 +0,0 @@
|
|||
## Makefile.in for ICU - tools/gennames
|
||||
## Copyright (c) 1999-2005, International Business Machines Corporation and
|
||||
## others. All Rights Reserved.
|
||||
## Steven R. Loomis
|
||||
|
||||
## Source directory information
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
include $(top_builddir)/icudefs.mk
|
||||
|
||||
## Build directory information
|
||||
subdir = tools/gennames
|
||||
|
||||
TARGET_STUB_NAME = gennames
|
||||
|
||||
SECTION = 8
|
||||
|
||||
#MAN_FILES = $(TARGET_STUB_NAME).$(SECTION)
|
||||
|
||||
|
||||
## Extra files to remove for 'make clean'
|
||||
CLEANFILES = *~ $(DEPS) $(MAN_FILES)
|
||||
|
||||
## Target information
|
||||
TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
|
||||
|
||||
ifneq ($(top_builddir),$(top_srcdir))
|
||||
CPPFLAGS += -I$(top_builddir)/common
|
||||
endif
|
||||
CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil
|
||||
LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
|
||||
|
||||
OBJECTS = gennames.o
|
||||
|
||||
DEPS = $(OBJECTS:.o=.d)
|
||||
|
||||
## List of phony targets
|
||||
.PHONY : all all-local install install-local clean clean-local \
|
||||
distclean distclean-local dist dist-local check check-local install-man
|
||||
|
||||
## Clear suffix list
|
||||
.SUFFIXES :
|
||||
|
||||
## List of standard targets
|
||||
all: all-local
|
||||
install: install-local
|
||||
clean: clean-local
|
||||
distclean : distclean-local
|
||||
dist: dist-local
|
||||
check: all check-local
|
||||
|
||||
all-local: $(TARGET) $(MAN_FILES)
|
||||
|
||||
install-local: all-local install-man
|
||||
# $(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
|
||||
# $(INSTALL) $(TARGET) $(DESTDIR)$(sbindir)
|
||||
|
||||
install-man: $(MAN_FILES)
|
||||
# $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
# $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
|
||||
|
||||
dist-local:
|
||||
|
||||
clean-local:
|
||||
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
|
||||
$(RMV) $(TARGET) $(OBJECTS)
|
||||
|
||||
distclean-local: clean-local
|
||||
$(RMV) Makefile
|
||||
|
||||
check-local: all-local
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(TARGET) : $(OBJECTS)
|
||||
$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
|
||||
$(POST_BUILD_STEP)
|
||||
|
||||
|
||||
%.$(SECTION): $(srcdir)/%.$(SECTION).in
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
ifeq (,$(MAKECMDGOALS))
|
||||
-include $(DEPS)
|
||||
else
|
||||
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
endif
|
||||
|
|
@ -1,399 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gennames"
|
||||
ProjectGUID="{F5281B04-A9E0-4680-BBA8-1D7F7D115458}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\x86\Release"
|
||||
IntermediateDirectory=".\x86\Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="copy "$(TargetPath)" ..\..\..\bin
"
|
||||
Outputs="..\..\..\bin\$(TargetFileName)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\x86\Release/gennames.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\common;..\toolutil"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
DisableLanguageExtensions="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
PrecompiledHeaderFile=".\x86\Release/gennames.pch"
|
||||
AssemblerListingLocation=".\x86\Release/"
|
||||
ObjectFile=".\x86\Release/"
|
||||
ProgramDataBaseFileName=".\x86\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\x86\Release/gennames.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\x86\Release/gennames.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\x86\Debug"
|
||||
IntermediateDirectory=".\x86\Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="copy "$(TargetPath)" ..\..\..\bin
"
|
||||
Outputs="..\..\..\bin\$(TargetFileName)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\x86\Debug/gennames.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\common;..\toolutil"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
DisableLanguageExtensions="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
PrecompiledHeaderFile=".\x86\Debug/gennames.pch"
|
||||
AssemblerListingLocation=".\x86\Debug/"
|
||||
ObjectFile=".\x86\Debug/"
|
||||
ProgramDataBaseFileName=".\x86\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\x86\Debug/gennames.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\x86\Debug/gennames.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
UseFAT32Workaround="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory=".\x64\Release"
|
||||
IntermediateDirectory=".\x64\Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="copy "$(TargetPath)" ..\..\..\bin64
"
|
||||
Outputs="..\..\..\bin64\$(TargetFileName)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\x64\Release/gennames.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\common;..\toolutil"
|
||||
PreprocessorDefinitions="WIN64;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
DisableLanguageExtensions="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
PrecompiledHeaderFile=".\x64\Release/gennames.pch"
|
||||
AssemblerListingLocation=".\x64\Release/"
|
||||
ObjectFile=".\x64\Release/"
|
||||
ProgramDataBaseFileName=".\x64\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\x64\Release/gennames.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\x64\Release/gennames.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory=".\x64\Debug"
|
||||
IntermediateDirectory=".\x64\Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="copy "$(TargetPath)" ..\..\..\bin64
"
|
||||
Outputs="..\..\..\bin64\$(TargetFileName)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\x64\Debug/gennames.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\common;..\toolutil"
|
||||
PreprocessorDefinitions="WIN64;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
DisableLanguageExtensions="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
PrecompiledHeaderFile=".\x64\Debug/gennames.pch"
|
||||
AssemblerListingLocation=".\x64\Debug/"
|
||||
ObjectFile=".\x64\Debug/"
|
||||
ProgramDataBaseFileName=".\x64\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile=".\x64\Debug/gennames.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\x64\Debug/gennames.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
UseFAT32Workaround="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\gennames.c"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2010-2011, International Business Machines
|
||||
# Copyright (C) 2010-2012, International Business Machines
|
||||
# Corporation and others. All Rights Reserved.
|
||||
#
|
||||
# created on: 2010jun03
|
||||
|
@ -7,5 +7,6 @@
|
|||
# edited by: Stuart G. Gill
|
||||
add_executable(genprops genprops.cpp
|
||||
pnamesbuilder.cpp corepropsbuilder.cpp
|
||||
bidipropsbuilder.cpp)
|
||||
bidipropsbuilder.cpp
|
||||
namespropsbuilder.cpp)
|
||||
target_link_libraries(genprops icuuc icutu)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2004-2011, International Business Machines
|
||||
* Copyright (C) 2004-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -33,8 +33,6 @@
|
|||
#include "ubidi_props.h"
|
||||
#include "genprops.h"
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
/* Unicode bidi/shaping properties file format ---------------------------------
|
||||
|
||||
The file format prepared and written here contains several data
|
||||
|
@ -519,11 +517,11 @@ BiDiPropsBuilder::writeBinaryData(const char *path, UBool withCopyright, UErrorC
|
|||
PropsBuilder *
|
||||
createBiDiPropsBuilder(UErrorCode &errorCode) {
|
||||
if(U_FAILURE(errorCode)) { return NULL; }
|
||||
PropsBuilder *pw=new BiDiPropsBuilder(errorCode);
|
||||
if(pw==NULL) {
|
||||
PropsBuilder *pb=new BiDiPropsBuilder(errorCode);
|
||||
if(pb==NULL) {
|
||||
errorCode=U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
return pw;
|
||||
return pb;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2011, International Business Machines
|
||||
* Copyright (C) 1999-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -236,8 +236,6 @@ Change from UTrie to UTrie2.
|
|||
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
/* UDataInfo cf. udata.h */
|
||||
|
@ -813,11 +811,11 @@ CorePropsBuilder::writeBinaryData(const char *path, UBool withCopyright, UErrorC
|
|||
PropsBuilder *
|
||||
createCorePropsBuilder(UErrorCode &errorCode) {
|
||||
if(U_FAILURE(errorCode)) { return NULL; }
|
||||
PropsBuilder *pw=new CorePropsBuilder(errorCode);
|
||||
if(pw==NULL) {
|
||||
PropsBuilder *pb=new CorePropsBuilder(errorCode);
|
||||
if(pb==NULL) {
|
||||
errorCode=U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
return pw;
|
||||
return pb;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2011, International Business Machines
|
||||
* Copyright (C) 1999-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -29,15 +29,16 @@
|
|||
#include "toolutil.h"
|
||||
#include "uoptions.h"
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
UBool beVerbose=FALSE;
|
||||
UBool beQuiet=FALSE;
|
||||
|
||||
PropsBuilder::PropsBuilder() {}
|
||||
PropsBuilder::~PropsBuilder() {}
|
||||
void PropsBuilder::setUnicodeVersion(const UVersionInfo) {}
|
||||
void PropsBuilder::setAlgNamesRange(UChar32, UChar32,
|
||||
const char *, const char *, UErrorCode &) {}
|
||||
void PropsBuilder::setProps(const UniProps &, const UnicodeSet &, UErrorCode &) {}
|
||||
void PropsBuilder::build(UErrorCode &) {}
|
||||
void PropsBuilder::writeCSourceFile(const char *, UErrorCode &) {}
|
||||
|
@ -47,6 +48,7 @@ enum {
|
|||
HELP_H,
|
||||
HELP_QUESTION_MARK,
|
||||
VERBOSE,
|
||||
QUIET,
|
||||
COPYRIGHT
|
||||
};
|
||||
|
||||
|
@ -55,6 +57,7 @@ static UOption options[]={
|
|||
UOPTION_HELP_H,
|
||||
UOPTION_HELP_QUESTION_MARK,
|
||||
UOPTION_VERBOSE,
|
||||
UOPTION_QUIET,
|
||||
UOPTION_COPYRIGHT
|
||||
};
|
||||
|
||||
|
@ -86,18 +89,21 @@ main(int argc, char* argv[]) {
|
|||
"Options:\n"
|
||||
"\t-h or -? or --help this usage text\n"
|
||||
"\t-v or --verbose verbose output\n"
|
||||
"\t-q or --quiet no output\n"
|
||||
"\t-c or --copyright include a copyright notice\n");
|
||||
return argc<2 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR;
|
||||
}
|
||||
|
||||
/* get the options values */
|
||||
beVerbose=options[VERBOSE].doesOccur;
|
||||
beQuiet=options[QUIET].doesOccur;
|
||||
|
||||
/* initialize */
|
||||
IcuToolErrorCode errorCode("genprops");
|
||||
LocalPointer<PNamesBuilder> pnamesBuilder(createPNamesBuilder(errorCode));
|
||||
LocalPointer<PropsBuilder> corePropsBuilder(createCorePropsBuilder(errorCode));
|
||||
LocalPointer<PropsBuilder> bidiPropsBuilder(createBiDiPropsBuilder(errorCode));
|
||||
LocalPointer<PropsBuilder> namesPropsBuilder(createNamesPropsBuilder(errorCode));
|
||||
if(errorCode.isFailure()) {
|
||||
fprintf(stderr, "genprops: unable to create PropsBuilders - %s\n", errorCode.errorName());
|
||||
return errorCode.reset();
|
||||
|
@ -138,10 +144,19 @@ main(int argc, char* argv[]) {
|
|||
const UniProps *props=ppucd.getProps(newValues, errorCode);
|
||||
corePropsBuilder->setProps(*props, newValues, errorCode);
|
||||
bidiPropsBuilder->setProps(*props, newValues, errorCode);
|
||||
namesPropsBuilder->setProps(*props, newValues, errorCode);
|
||||
} else if(lineType==PreparsedUCD::UNICODE_VERSION_LINE) {
|
||||
const UVersionInfo &version=ppucd.getUnicodeVersion();
|
||||
corePropsBuilder->setUnicodeVersion(version);
|
||||
bidiPropsBuilder->setUnicodeVersion(version);
|
||||
namesPropsBuilder->setUnicodeVersion(version);
|
||||
} else if(lineType==PreparsedUCD::ALG_NAMES_RANGE_LINE) {
|
||||
UChar32 start, end;
|
||||
if(ppucd.getRangeForAlgNames(start, end, errorCode)) {
|
||||
const char *type=ppucd.nextField();
|
||||
const char *prefix=ppucd.nextField(); // NULL if type==hangul
|
||||
namesPropsBuilder->setAlgNamesRange(start, end, type, prefix, errorCode);
|
||||
}
|
||||
}
|
||||
if(errorCode.isFailure()) {
|
||||
fprintf(stderr,
|
||||
|
@ -153,6 +168,7 @@ main(int argc, char* argv[]) {
|
|||
|
||||
corePropsBuilder->build(errorCode);
|
||||
bidiPropsBuilder->build(errorCode);
|
||||
namesPropsBuilder->build(errorCode);
|
||||
if(errorCode.isFailure()) {
|
||||
fprintf(stderr, "genprops error: failure finalizing the data - %s\n",
|
||||
errorCode.errorName());
|
||||
|
@ -174,6 +190,7 @@ main(int argc, char* argv[]) {
|
|||
corePropsBuilder->writeBinaryData(sourceDataIn.data(), withCopyright, errorCode);
|
||||
bidiPropsBuilder->writeCSourceFile(sourceCommon.data(), errorCode);
|
||||
bidiPropsBuilder->writeBinaryData(sourceDataIn.data(), withCopyright, errorCode);
|
||||
namesPropsBuilder->writeBinaryData(sourceDataIn.data(), withCopyright, errorCode);
|
||||
|
||||
return errorCode;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2011, International Business Machines
|
||||
* Copyright (C) 1999-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -23,11 +23,15 @@
|
|||
#include "ppucd.h"
|
||||
#include "unewdata.h"
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
class PropsBuilder {
|
||||
public:
|
||||
PropsBuilder();
|
||||
virtual ~PropsBuilder();
|
||||
virtual void setUnicodeVersion(const UVersionInfo version);
|
||||
virtual void setAlgNamesRange(UChar32 start, UChar32 end,
|
||||
const char *type, const char *prefix, UErrorCode &errorCode);
|
||||
virtual void setProps(const icu::UniProps &props, const icu::UnicodeSet &newValues, UErrorCode &errorCode);
|
||||
virtual void build(UErrorCode &errorCode);
|
||||
virtual void writeCSourceFile(const char *path, UErrorCode &errorCode);
|
||||
|
@ -42,8 +46,10 @@ public:
|
|||
PNamesBuilder *createPNamesBuilder(UErrorCode &errorCode);
|
||||
PropsBuilder *createCorePropsBuilder(UErrorCode &errorCode);
|
||||
PropsBuilder *createBiDiPropsBuilder(UErrorCode &errorCode);
|
||||
PropsBuilder *createNamesPropsBuilder(UErrorCode &errorCode);
|
||||
|
||||
/* global flags */
|
||||
U_CFUNC UBool beVerbose;
|
||||
extern UBool beVerbose;
|
||||
extern UBool beQuiet;
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2002-2011, International Business Machines
|
||||
* Copyright (C) 2002-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Date Name Description
|
||||
|
@ -34,8 +34,6 @@
|
|||
# error This builder requires U_CHARSET_FAMILY==U_ASCII_FAMILY.
|
||||
#endif
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -524,11 +522,11 @@ PNamesBuilderImpl::writeCSourceFile(const char *path, UErrorCode &errorCode) {
|
|||
PNamesBuilder *
|
||||
createPNamesBuilder(UErrorCode &errorCode) {
|
||||
if(U_FAILURE(errorCode)) { return NULL; }
|
||||
PNamesBuilder *pw=new PNamesBuilderImpl(errorCode);
|
||||
if(pw==NULL) {
|
||||
PNamesBuilder *pb=new PNamesBuilderImpl(errorCode);
|
||||
if(pb==NULL) {
|
||||
errorCode=U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
return pw;
|
||||
return pb;
|
||||
}
|
||||
|
||||
// Note: The following is a partial copy of runtime propname.cpp code.
|
||||
|
|
Loading…
Add table
Reference in a new issue