mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
101
intl/icu/source/tools/pkgdata/Makefile.in
Normal file
101
intl/icu/source/tools/pkgdata/Makefile.in
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
## Makefile.in for ICU - tools/pkgdata
|
||||
## Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
## License & terms of use: http://www.unicode.org/copyright.html
|
||||
## Copyright (c) 1999-2011, 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/pkgdata
|
||||
|
||||
TARGET_STUB_NAME = pkgdata
|
||||
|
||||
SECTION = 1
|
||||
|
||||
MAN_FILES = $(TARGET_STUB_NAME).$(SECTION)
|
||||
|
||||
## Extra files to remove for 'make clean'
|
||||
CLEANFILES = *~ $(DEPS) $(MAN_FILES)
|
||||
|
||||
ifneq ($(PKGDATA_DEFS),)
|
||||
DEFS += $(PKGDATA_DEFS)
|
||||
endif
|
||||
|
||||
## Target information
|
||||
TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
|
||||
|
||||
CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil
|
||||
DEFS += -DUDATA_SO_SUFFIX=\".$(SO)\" -DSTATIC_O=\"$(STATIC_O)\"
|
||||
LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
|
||||
|
||||
OBJECTS = pkgdata.o pkgtypes.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)$(bindir)
|
||||
$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
|
||||
|
||||
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
|
||||
|
||||
260
intl/icu/source/tools/pkgdata/pkgdata.1.in
Normal file
260
intl/icu/source/tools/pkgdata/pkgdata.1.in
Normal file
|
|
@ -0,0 +1,260 @@
|
|||
.\" Hey, Emacs! This is -*-nroff-*- you know...
|
||||
.\"
|
||||
.\" pkgdata.1: manual page for the pkgdata utility
|
||||
.\"
|
||||
.\" Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
.\" License & terms of use: http://www.unicode.org/copyright.html
|
||||
.\" Copyright (C) 2000-2009 IBM, Inc. and others.
|
||||
.\"
|
||||
.\" Manual page by Yves Arrouye <yves@realnames.com>.
|
||||
.\" Modified by Michael Ow <mow@us.ibm.com>.
|
||||
.\"
|
||||
.TH PKGDATA 1 "6 February 2009" "ICU MANPAGE" "ICU @VERSION@ Manual"
|
||||
.SH NAME
|
||||
.B pkgdata
|
||||
\- package data for use by ICU
|
||||
.SH SYNOPSIS
|
||||
.B pkgdata
|
||||
[
|
||||
.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
|
||||
]
|
||||
[
|
||||
.BI "\-v\fP, \fB\-\-verbose"
|
||||
]
|
||||
[
|
||||
.BR "\-c\fP, \fB\-\-copyright"
|
||||
|
|
||||
.BI "\-C\fP, \fB\-\-comment" " comment"
|
||||
]
|
||||
[
|
||||
.BI "\-m\fP, \fB\-\-mode" " mode"
|
||||
]
|
||||
.BI "\-p\fP, \fB\-\-name" " name"
|
||||
.BI "\-O\fP, \fB\-\-bldopt" " options"
|
||||
[
|
||||
.BI "\-e\fP, \fB\-\-entrypoint" " name"
|
||||
]
|
||||
[
|
||||
.BI "\-r\fP, \fB\-\-revision" " version"
|
||||
]
|
||||
[
|
||||
.BI "\-F\fP, \fB\-\-rebuild"
|
||||
]
|
||||
[
|
||||
.BI "\-I\fP, \fB\-\-install"
|
||||
]
|
||||
[
|
||||
.BI "\-s\fP, \fB\-\-sourcedir" " source"
|
||||
]
|
||||
[
|
||||
.BI "\-d\fP, \fB\-\-destdir" " destination"
|
||||
]
|
||||
[
|
||||
.BI "\-T\fP, \fB\-\-tempdir" " directory"
|
||||
]
|
||||
[
|
||||
.IR file " .\|.\|."
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.B pkgdata
|
||||
takes a set of data files and packages them for use by ICU or
|
||||
applications that use ICU. The typical reason to package files using
|
||||
.B pkgdata
|
||||
is to make their distribution easier and their loading by ICU faster
|
||||
and less consuming of limited system resources such as file
|
||||
descriptors.
|
||||
Packaged data also allow applications to be distributed with fewer
|
||||
resource files, or even with none at all if they link against the
|
||||
packaged data directly.
|
||||
.PP
|
||||
.B pkgdata
|
||||
supports a few different methods of packaging data that serve
|
||||
different purposes.
|
||||
.PP
|
||||
The default packaging
|
||||
.I mode
|
||||
is
|
||||
.BR common ,
|
||||
or
|
||||
.BR archive .
|
||||
In this mode, the different data files are bundled together as an
|
||||
architecture-dependent file that can later be memory mapped for use by
|
||||
ICU. Data packaged using this mode will be looked up under the ICU
|
||||
data directory. Such packaging is easy to use for applications resource
|
||||
bundles, for example, as long as the application can install the
|
||||
packaged file in the ICU data directory.
|
||||
.PP
|
||||
Another packaging mode is the
|
||||
.BR dll ,
|
||||
or
|
||||
.BR library ,
|
||||
mode, where the data files are compiled into a shared library. ICU
|
||||
used to be able to dynamically load these shared libraries, but as of
|
||||
ICU 2.0, such support has been removed. This mode is still useful for
|
||||
two main purposes: to build ICU itself, as the ICU data is packaged as
|
||||
a shared library by default; and to build resource bundles that are
|
||||
linked to the application that uses them. Such resource bundles can
|
||||
then be placed anywhere where the system's dynamic linker will be
|
||||
looking for shared libraries, instead of being forced to live inside
|
||||
the ICU data directory.
|
||||
.PP
|
||||
The
|
||||
.BR static
|
||||
packaging mode is similar to the shared library one except that it
|
||||
produces a static library.
|
||||
.\" Note that many platforms are not able to
|
||||
.\" dynamically load symbols from static object files, so for this reason
|
||||
.\" .BR udata_setAppData()
|
||||
.\" must be called
|
||||
.\" to install this data. As a convenience, pkgdata will build a C source file
|
||||
.\" and a header file. Given a data package named
|
||||
.\" .IR name, in the output
|
||||
.\" directory will be created
|
||||
.\" .IR name .c
|
||||
.\" and
|
||||
.\" .IR name .h with the single
|
||||
.\" function
|
||||
.\" .BR "udata_install_\fcIname\fB(UErrorCode *err)" ,
|
||||
.\" where
|
||||
.\" .I cname
|
||||
.\" is
|
||||
.\" .I name
|
||||
.\" turned into a valid C identifier.
|
||||
.\" The application need to call this function once. The error code returned
|
||||
.\" is that of
|
||||
.\" .BR udata_setAppData() .
|
||||
.\" .PP
|
||||
.\" Data pakackaged in a library, whether shared or static,
|
||||
.\" Subsequently, the application can access this data by passing
|
||||
.\" .I name for the
|
||||
.\" .I path
|
||||
.\" rgument to functions such as
|
||||
.\" .BR Bures_open() .
|
||||
.PP
|
||||
Finally,
|
||||
.B pkgdata
|
||||
supports a
|
||||
.B files
|
||||
mode which simply copies the data files instead of packaging
|
||||
them as a single file or library. This mode is mainly intended to
|
||||
provide support for building ICU before it is packaged as separate
|
||||
small packages for distribution with operating systems such as Debian
|
||||
GNU/Linux for example. Please refer to the packaging documentation in
|
||||
the ICU source distribution for further information on the use of this
|
||||
mode.
|
||||
.PP
|
||||
.B pkgdata
|
||||
builds, packages, installs, or cleans the appropriate data based on the options given
|
||||
without the need to call GNU
|
||||
.BR make
|
||||
anymore.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
|
||||
Print help about usage and exit.
|
||||
.TP
|
||||
.BR "\-v\fP, \fB\-\-verbose"
|
||||
Display extra informative messages during execution.
|
||||
.TP
|
||||
.BR "\-c\fP, \fB\-\-copyright"
|
||||
Include a copyright notice in the binary data.
|
||||
.TP
|
||||
.BI "\-C\fP, \fB\-\-comment" " comment"
|
||||
Includes the specified
|
||||
.I comment
|
||||
in the resulting data instead of the ICU copyright notice.
|
||||
.TP
|
||||
.BI "\-m\fP, \fB\-\-mode" " mode"
|
||||
Set the packaging
|
||||
.I mode
|
||||
to be used by
|
||||
.BR pkgdata .
|
||||
The different modes and their meaning are explained in the
|
||||
.B DESCRIPTION
|
||||
section above. The valid mode names are
|
||||
.BR common
|
||||
(or
|
||||
.BR archive ),
|
||||
.BR dll
|
||||
(or
|
||||
.BR library ),
|
||||
and
|
||||
.BR files .
|
||||
.TP
|
||||
.BI "\-O\fP, \fB\-\-bldopt" " options"
|
||||
Specify options for the builder. The builder is used internally by
|
||||
.B pkgdata
|
||||
to generate the correct packaged file. Such options include, but are
|
||||
not limited to, setting variables used by
|
||||
.BR make (1)
|
||||
during the build of the packaged file. Note: If
|
||||
.BR icu-config
|
||||
is available, then this option is not needed.
|
||||
.TP
|
||||
.BI "\-p\fP, \fB\-\-name" " name"
|
||||
Set the packaged file name to
|
||||
.IR name .
|
||||
This name is also used as the default entry point name after having
|
||||
been turned into a valid C identifier.
|
||||
.TP
|
||||
.BI "\-e\fP, \fB\-\-entrypoint" " name"
|
||||
Set the data entry point (used for linking against the data in a
|
||||
shared library form) to
|
||||
.IR name .
|
||||
The default entry point name is the name set by the
|
||||
.BI "\-n\fP, \fB\-\-name"
|
||||
option.
|
||||
.TP
|
||||
.BI "\-r\fP, \fB\-\-revision" " version"
|
||||
Enable versioning of the shared library produced in
|
||||
.BR dll ,
|
||||
or
|
||||
.BR library ,
|
||||
mode. The version number has the format
|
||||
.I major\fP.\fIminor\fP.\fIpatchlevel
|
||||
and all parts except for
|
||||
.I major
|
||||
are optional. If only
|
||||
.I major
|
||||
is supplied then the version is
|
||||
assumed to be
|
||||
.IR major .0
|
||||
for versioning purposes.
|
||||
.TP
|
||||
.BI "\-F\fP, \fB\-\-rebuild"
|
||||
Force the rebuilding of all data and their repackaging.
|
||||
.TP
|
||||
.BI "\-I\fP, \fB\-\-install"
|
||||
Install the packaged file (or all the files in the
|
||||
.B files
|
||||
mode). If the variable
|
||||
.B DESTDIR
|
||||
is set it will be used for installation.
|
||||
.TP
|
||||
.BI "\-s\fP, \fB\-\-sourcedir" " source"
|
||||
Set the source directory to
|
||||
.IR source .
|
||||
The default source directory is the current directory.
|
||||
.TP
|
||||
.BI "\-d\fP, \fB\-\-destdir" " destination"
|
||||
Set the destination directory to
|
||||
.IR destination .
|
||||
The default destination directory is the current directory.
|
||||
.TP
|
||||
.BI "\-T\fP, \fB\-\-tempdir" " directory"
|
||||
Set the directory used to generate temporary files to
|
||||
.IR directory .
|
||||
The default temporary directory is the same as the destination
|
||||
directory
|
||||
as set by the
|
||||
.BI "\-d\fP, \fB\-\-destdir"
|
||||
option.
|
||||
.SH AUTHORS
|
||||
Steven Loomis
|
||||
.br
|
||||
Yves Arrouye
|
||||
.SH VERSION
|
||||
@VERSION@
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2000-2009 IBM, Inc. and others.
|
||||
|
||||
2213
intl/icu/source/tools/pkgdata/pkgdata.cpp
Normal file
2213
intl/icu/source/tools/pkgdata/pkgdata.cpp
Normal file
File diff suppressed because it is too large
Load diff
278
intl/icu/source/tools/pkgdata/pkgdata.vcxproj
Normal file
278
intl/icu/source/tools/pkgdata/pkgdata.vcxproj
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\x86\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\x86\Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\x86\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\x86\Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\x64\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\x64\Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\x64\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\x64\Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<CustomBuildStep>
|
||||
<Command>copy "$(TargetPath)" ..\..\..\bin
|
||||
</Command>
|
||||
<Outputs>..\..\..\bin\$(TargetFileName);%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\x86\Debug/pkgdata.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../../include;../../common;../toolutil;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<DisableLanguageExtensions>true</DisableLanguageExtensions>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeaderOutputFile>.\x86\Debug/pkgdata.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x86\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x86\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x86\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0411</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\x86\Debug/pkgdata.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\x86\Debug/pkgdata.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<CustomBuildStep>
|
||||
<Command>copy "$(TargetPath)" ..\..\..\bin
|
||||
</Command>
|
||||
<Outputs>..\..\..\bin\$(TargetFileName);%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\x86\Release/pkgdata.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../../include;../../common;../toolutil;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<DisableLanguageExtensions>true</DisableLanguageExtensions>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeaderOutputFile>.\x86\Release/pkgdata.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x86\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x86\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x86\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0411</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\x86\Release/pkgdata.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>.\x86\Release/pkgdata.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<CustomBuildStep>
|
||||
<Command>copy "$(TargetPath)" ..\..\..\bin64
|
||||
</Command>
|
||||
<Outputs>..\..\..\bin64\$(TargetFileName);%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\x64\Debug/pkgdata.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../../include;../../common;../toolutil;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<DisableLanguageExtensions>true</DisableLanguageExtensions>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeaderOutputFile>.\x64\Debug/pkgdata.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x64\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x64\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x64\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0411</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\x64\Debug/pkgdata.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\x64\Debug/pkgdata.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<CustomBuildStep>
|
||||
<Command>copy "$(TargetPath)" ..\..\..\bin64
|
||||
</Command>
|
||||
<Outputs>..\..\..\bin64\$(TargetFileName);%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\x64\Release/pkgdata.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../../include;../../common;../toolutil;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<DisableLanguageExtensions>true</DisableLanguageExtensions>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeaderOutputFile>.\x64\Release/pkgdata.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x64\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x64\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x64\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0411</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\x64\Release/pkgdata.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>.\x64\Release/pkgdata.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pkgdata.cpp" />
|
||||
<ClCompile Include="pkgtypes.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pkgtypes.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\common\common.vcxproj">
|
||||
<Project>{73c0a65b-d1f2-4de1-b3a6-15dad2c23f3d}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\genccode\genccode.vcxproj">
|
||||
<Project>{fdd3c4f2-9805-44eb-9a77-bc1c1c95b547}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\gencmn\gencmn.vcxproj">
|
||||
<Project>{a8d36f8d-09e6-4174-91c3-7beaa9c3f04f}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\icupkg\icupkg.vcxproj">
|
||||
<Project>{62d4b15d-7a90-4ecb-ba19-5e021d6a21bc}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\toolutil\toolutil.vcxproj">
|
||||
<Project>{6b231032-3cb5-4eed-9210-810d666a23a0}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
30
intl/icu/source/tools/pkgdata/pkgdata.vcxproj.filters
Normal file
30
intl/icu/source/tools/pkgdata/pkgdata.vcxproj.filters
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{73901add-40cd-4d05-a0ba-d336fa136062}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{0dcaab2b-a92a-430e-8185-de2a2ababd2a}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{4a7309b1-40ce-4bb5-b80d-2cc01b68e8d0}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pkgdata.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pkgtypes.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pkgtypes.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
302
intl/icu/source/tools/pkgdata/pkgtypes.c
Normal file
302
intl/icu/source/tools/pkgdata/pkgtypes.c
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2000-2016, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
***************************************************************************
|
||||
* file name: pkgdata.c
|
||||
* encoding: ANSI X3.4 (1968)
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
* created on: 2000may16
|
||||
* created by: Steven \u24C7 Loomis
|
||||
*
|
||||
* common types for pkgdata
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/putil.h"
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
#include "pkgtypes.h"
|
||||
#include "putilimp.h"
|
||||
|
||||
const char *pkg_writeCharListWrap(FileStream *s, CharList *l, const char *delim, const char *brk, int32_t quote)
|
||||
{
|
||||
int32_t ln = 0;
|
||||
char buffer[1024];
|
||||
while(l != NULL)
|
||||
{
|
||||
if(l->str)
|
||||
{
|
||||
uprv_strncpy(buffer, l->str, 1020);
|
||||
buffer[1019]=0;
|
||||
|
||||
if(quote < 0) { /* remove quotes */
|
||||
if(buffer[uprv_strlen(buffer)-1] == '"') {
|
||||
buffer[uprv_strlen(buffer)-1] = '\0';
|
||||
}
|
||||
if(buffer[0] == '"') {
|
||||
uprv_strcpy(buffer, buffer+1);
|
||||
}
|
||||
} else if(quote > 0) { /* add quotes */
|
||||
if(l->str[0] != '"') {
|
||||
uprv_strcpy(buffer, "\"");
|
||||
uprv_strncat(buffer, l->str,1020);
|
||||
}
|
||||
if(l->str[uprv_strlen(l->str)-1] != '"') {
|
||||
uprv_strcat(buffer, "\"");
|
||||
}
|
||||
}
|
||||
T_FileStream_write(s, buffer, (int32_t)uprv_strlen(buffer));
|
||||
|
||||
ln += (int32_t)uprv_strlen(l->str);
|
||||
}
|
||||
|
||||
if(l->next && delim)
|
||||
{
|
||||
if(ln > 60 && brk) {
|
||||
ln = 0;
|
||||
T_FileStream_write(s, brk, (int32_t)uprv_strlen(brk));
|
||||
}
|
||||
T_FileStream_write(s, delim, (int32_t)uprv_strlen(delim));
|
||||
}
|
||||
l = l->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const char *pkg_writeCharList(FileStream *s, CharList *l, const char *delim, int32_t quote)
|
||||
{
|
||||
char buffer[1024];
|
||||
while(l != NULL)
|
||||
{
|
||||
if(l->str)
|
||||
{
|
||||
uprv_strncpy(buffer, l->str, 1023);
|
||||
buffer[1023]=0;
|
||||
if(uprv_strlen(l->str) >= 1023)
|
||||
{
|
||||
fprintf(stderr, "%s:%d: Internal error, line too long (greater than 1023 chars)\n",
|
||||
__FILE__, __LINE__);
|
||||
exit(0);
|
||||
}
|
||||
if(quote < 0) { /* remove quotes */
|
||||
if(buffer[uprv_strlen(buffer)-1] == '"') {
|
||||
buffer[uprv_strlen(buffer)-1] = '\0';
|
||||
}
|
||||
if(buffer[0] == '"') {
|
||||
uprv_strcpy(buffer, buffer+1);
|
||||
}
|
||||
} else if(quote > 0) { /* add quotes */
|
||||
if(l->str[0] != '"') {
|
||||
uprv_strcpy(buffer, "\"");
|
||||
uprv_strcat(buffer, l->str);
|
||||
}
|
||||
if(l->str[uprv_strlen(l->str)-1] != '"') {
|
||||
uprv_strcat(buffer, "\"");
|
||||
}
|
||||
}
|
||||
T_FileStream_write(s, buffer, (int32_t)uprv_strlen(buffer));
|
||||
}
|
||||
|
||||
if(l->next && delim)
|
||||
{
|
||||
T_FileStream_write(s, delim, (int32_t)uprv_strlen(delim));
|
||||
}
|
||||
l = l->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Count items . 0 if null
|
||||
*/
|
||||
uint32_t pkg_countCharList(CharList *l)
|
||||
{
|
||||
uint32_t c = 0;
|
||||
while(l != NULL)
|
||||
{
|
||||
c++;
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepend string to CharList
|
||||
*/
|
||||
CharList *pkg_prependToList(CharList *l, const char *str)
|
||||
{
|
||||
CharList *newList;
|
||||
newList = uprv_malloc(sizeof(CharList));
|
||||
|
||||
/* test for NULL */
|
||||
if(newList == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
newList->str = str;
|
||||
newList->next = l;
|
||||
return newList;
|
||||
}
|
||||
|
||||
/*
|
||||
* append string to CharList. *end or even end can be null if you don't
|
||||
* know it.[slow]
|
||||
* Str is adopted!
|
||||
*/
|
||||
CharList *pkg_appendToList(CharList *l, CharList** end, const char *str)
|
||||
{
|
||||
CharList *endptr = NULL, *tmp;
|
||||
|
||||
if(end == NULL)
|
||||
{
|
||||
end = &endptr;
|
||||
}
|
||||
|
||||
/* FIND the end */
|
||||
if((*end == NULL) && (l != NULL))
|
||||
{
|
||||
tmp = l;
|
||||
while(tmp->next)
|
||||
{
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
*end = tmp;
|
||||
}
|
||||
|
||||
/* Create a new empty list and append it */
|
||||
if(l == NULL)
|
||||
{
|
||||
l = pkg_prependToList(NULL, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*end)->next = pkg_prependToList(NULL, str);
|
||||
}
|
||||
|
||||
/* Move the end pointer. */
|
||||
if(*end)
|
||||
{
|
||||
(*end) = (*end)->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
*end = l;
|
||||
}
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
char * convertToNativePathSeparators(char *path) {
|
||||
#if defined(U_MAKE_IS_NMAKE)
|
||||
char *itr;
|
||||
while ((itr = uprv_strchr(path, U_FILE_ALT_SEP_CHAR))) {
|
||||
*itr = U_FILE_SEP_CHAR;
|
||||
}
|
||||
#endif
|
||||
return path;
|
||||
}
|
||||
|
||||
CharList *pkg_appendUniqueDirToList(CharList *l, CharList** end, const char *strAlias) {
|
||||
char aBuf[1024];
|
||||
char *rPtr;
|
||||
rPtr = uprv_strrchr(strAlias, U_FILE_SEP_CHAR);
|
||||
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
|
||||
{
|
||||
char *aPtr = uprv_strrchr(strAlias, U_FILE_ALT_SEP_CHAR);
|
||||
if(!rPtr || /* regular char wasn't found or.. */
|
||||
(aPtr && (aPtr > rPtr)))
|
||||
{ /* alt ptr exists and is to the right of r ptr */
|
||||
rPtr = aPtr; /* may copy NULL which is OK */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(!rPtr) {
|
||||
return l; /* no dir path */
|
||||
}
|
||||
if((rPtr-strAlias) >= UPRV_LENGTHOF(aBuf)) {
|
||||
fprintf(stderr, "## ERR: Path too long [%d chars]: %s\n", (int)sizeof(aBuf), strAlias);
|
||||
return l;
|
||||
}
|
||||
strncpy(aBuf, strAlias,(rPtr-strAlias));
|
||||
aBuf[rPtr-strAlias]=0; /* no trailing slash */
|
||||
convertToNativePathSeparators(aBuf);
|
||||
|
||||
if(!pkg_listContains(l, aBuf)) {
|
||||
return pkg_appendToList(l, end, uprv_strdup(aBuf));
|
||||
} else {
|
||||
return l; /* already found */
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static CharList *
|
||||
pkg_appendFromStrings(CharList *l, CharList** end, const char *s, int32_t len)
|
||||
{
|
||||
CharList *endptr = NULL;
|
||||
const char *p;
|
||||
char *t;
|
||||
const char *targ;
|
||||
if(end == NULL) {
|
||||
end = &endptr;
|
||||
}
|
||||
|
||||
if(len==-1) {
|
||||
len = uprv_strlen(s);
|
||||
}
|
||||
targ = s+len;
|
||||
|
||||
while(*s && s<targ) {
|
||||
while(s<targ&&isspace(*s)) s++;
|
||||
for(p=s;s<targ&&!isspace(*p);p++);
|
||||
if(p!=s) {
|
||||
t = uprv_malloc(p-s+1);
|
||||
uprv_strncpy(t,s,p-s);
|
||||
t[p-s]=0;
|
||||
l=pkg_appendToList(l,end,t);
|
||||
fprintf(stderr, " P %s\n", t);
|
||||
}
|
||||
s=p;
|
||||
}
|
||||
|
||||
return l;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Delete list
|
||||
*/
|
||||
void pkg_deleteList(CharList *l)
|
||||
{
|
||||
CharList *tmp;
|
||||
while(l != NULL)
|
||||
{
|
||||
uprv_free((void*)l->str);
|
||||
tmp = l;
|
||||
l = l->next;
|
||||
uprv_free(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
UBool pkg_listContains(CharList *l, const char *str)
|
||||
{
|
||||
for(;l;l=l->next){
|
||||
if(!uprv_strcmp(l->str, str)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
172
intl/icu/source/tools/pkgdata/pkgtypes.h
Normal file
172
intl/icu/source/tools/pkgdata/pkgtypes.h
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2000-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
***************************************************************************
|
||||
* file name: pkgdata.c
|
||||
* encoding: ANSI X3.4 (1968)
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
* created on: 2000may16
|
||||
* created by: Steven \u24C7 Loomis
|
||||
*
|
||||
* common types for pkgdata
|
||||
*/
|
||||
|
||||
#ifndef _PKGTYPES
|
||||
#define _PKGTYPES
|
||||
|
||||
/* headers */
|
||||
#include "unicode/utypes.h"
|
||||
#include "filestrm.h"
|
||||
|
||||
/* linked list */
|
||||
struct _CharList;
|
||||
|
||||
typedef struct _CharList
|
||||
{
|
||||
const char *str;
|
||||
struct _CharList *next;
|
||||
} CharList;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* write CharList 'l' into stream 's' using deliminter 'delim' (delim can be NULL). quoted: -1 remove, 0 as is, 1 add quotes
|
||||
*/
|
||||
const char *pkg_writeCharList(FileStream *s, CharList *l, const char *delim, int32_t quoted);
|
||||
|
||||
/*
|
||||
* Same, but use line breaks. quoted: -1 remove, 0 as is, 1 add quotes
|
||||
*/
|
||||
const char *pkg_writeCharListWrap(FileStream *s, CharList *l, const char *delim, const char *brk, int32_t quoted);
|
||||
|
||||
|
||||
/*
|
||||
* Count items . 0 if null
|
||||
*/
|
||||
uint32_t pkg_countCharList(CharList *l);
|
||||
|
||||
/*
|
||||
* Prepend string to CharList. Str is adopted!
|
||||
*/
|
||||
CharList *pkg_prependToList(CharList *l, const char *str);
|
||||
|
||||
/*
|
||||
* append string to CharList. *end or even end can be null if you don't
|
||||
* know it.[slow]
|
||||
* Str is adopted!
|
||||
*/
|
||||
CharList *pkg_appendToList(CharList *l, CharList** end, const char *str);
|
||||
|
||||
/*
|
||||
* strAlias is an alias to a full or relative path to a FILE. This function
|
||||
* will search strAlias for the directory name (with strrchr). Then, it will
|
||||
* determine if that directory is already in list l. If not, it will add it
|
||||
* with strdup(strAlias).
|
||||
* @param l list to append to , or NULL
|
||||
* @param end end pointer-to-pointer. Can point to null, or be null.
|
||||
* @param strAlias alias to full path string
|
||||
* @return new list
|
||||
*/
|
||||
CharList *pkg_appendUniqueDirToList(CharList *l, CharList** end, const char *strAlias);
|
||||
|
||||
/*
|
||||
* does list contain string? Returns: t/f
|
||||
*/
|
||||
UBool pkg_listContains(CharList *l, const char *str);
|
||||
|
||||
/*
|
||||
* Delete list
|
||||
*/
|
||||
void pkg_deleteList(CharList *l);
|
||||
|
||||
/*
|
||||
* Mode package function
|
||||
*/
|
||||
struct UPKGOptions_;
|
||||
typedef void (UPKGMODE)(struct UPKGOptions_ *, FileStream *s, UErrorCode *status);
|
||||
|
||||
/*
|
||||
* Static mode - write the readme file
|
||||
* @param opt UPKGOptions
|
||||
* @param libName Name of the .lib, etc file
|
||||
* @param status ICU error code
|
||||
*/
|
||||
void pkg_sttc_writeReadme(struct UPKGOptions_ *opt, const char *libName, UErrorCode *status);
|
||||
|
||||
/*
|
||||
* Options to be passed throughout the program
|
||||
*/
|
||||
|
||||
typedef struct UPKGOptions_
|
||||
{
|
||||
CharList *fileListFiles; /* list of files containing files for inclusion in the package */
|
||||
CharList *filePaths; /* All the files, with long paths */
|
||||
CharList *files; /* All the files */
|
||||
CharList *outFiles; /* output files [full paths] */
|
||||
|
||||
const char *shortName; /* name of what we're building */
|
||||
const char *cShortName; /* name of what we're building as a C identifier */
|
||||
const char *entryName; /* special entrypoint name */
|
||||
const char *targetDir; /* dir for packaged data to go */
|
||||
const char *dataDir; /* parent of dir for package (default: tmpdir) */
|
||||
const char *tmpDir;
|
||||
const char *srcDir;
|
||||
const char *options; /* Options arg */
|
||||
const char *mode; /* Mode of building */
|
||||
const char *version; /* Library version */
|
||||
const char *comment; /* comment string */
|
||||
const char *install; /* Where to install to (NULL = don't install) */
|
||||
const char *icuroot; /* where does ICU lives */
|
||||
const char *libName; /* name for library (default: shortName) */
|
||||
UBool rebuild;
|
||||
UBool verbose;
|
||||
UBool quiet;
|
||||
UBool withoutAssembly;
|
||||
UBool pdsbuild; /* for building PDS in z/OS */
|
||||
} UPKGOptions;
|
||||
|
||||
char * convertToNativePathSeparators(char *path);
|
||||
|
||||
|
||||
/* set up common defines for library naming */
|
||||
|
||||
#if U_PLATFORM_HAS_WIN32_API
|
||||
# ifndef UDATA_SO_SUFFIX
|
||||
# define UDATA_SO_SUFFIX ".dll"
|
||||
# endif
|
||||
# define LIB_PREFIX ""
|
||||
# define LIB_STATIC_PREFIX ""
|
||||
# define OBJ_SUFFIX ".obj"
|
||||
# define UDATA_LIB_SUFFIX ".lib"
|
||||
|
||||
#elif U_PLATFORM == U_PF_CYGWIN
|
||||
# define LIB_PREFIX "cyg"
|
||||
# define LIB_STATIC_PREFIX "lib"
|
||||
# define OBJ_SUFFIX ".o"
|
||||
# define UDATA_LIB_SUFFIX ".a"
|
||||
|
||||
#else /* POSIX? */
|
||||
# define LIB_PREFIX "lib"
|
||||
# define LIB_STATIC_PREFIX "lib"
|
||||
# define OBJ_SUFFIX ".o"
|
||||
# define UDATA_LIB_SUFFIX ".a"
|
||||
#endif
|
||||
|
||||
#define ASM_SUFFIX ".s"
|
||||
|
||||
/* defines for common file names */
|
||||
#define UDATA_CMN_PREFIX ""
|
||||
#define UDATA_CMN_SUFFIX ".dat"
|
||||
#define UDATA_CMN_INTERMEDIATE_SUFFIX "_dat"
|
||||
|
||||
#define ICUDATA_RES_FILE "icudata.res"
|
||||
|
||||
#define PKGDATA_DERIVED_PATH '\t'
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue