summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/tools/pkgdata/pkgtypes.h
diff options
context:
space:
mode:
authorSteven R. Loomis <srloomis@us.ibm.com>2016-04-08 19:03:16 -0700
committerSteven R. Loomis <srloomis@us.ibm.com>2016-05-04 16:02:45 -0700
commit2bbd1cd6004b3e1467e30d860385a85dad01fe24 (patch)
treeb812046e89e46e0de09bc858e0b128787cbc0632 /deps/icu-small/source/tools/pkgdata/pkgtypes.h
parentcd752e8463fad7c4805951d9ba47cd2f39691f2d (diff)
downloadandroid-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.tar.gz
android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.tar.bz2
android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.zip
deps: Intl: Check in "small-icu" 57.1
* this commit has "small" ICU 57.1. See other related commit for tools to generate this commit. Fixes: https://github.com/nodejs/node/issues/3476 PR-URL: https://github.com/nodejs/node/pull/6088 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/icu-small/source/tools/pkgdata/pkgtypes.h')
-rw-r--r--deps/icu-small/source/tools/pkgdata/pkgtypes.h170
1 files changed, 170 insertions, 0 deletions
diff --git a/deps/icu-small/source/tools/pkgdata/pkgtypes.h b/deps/icu-small/source/tools/pkgdata/pkgtypes.h
new file mode 100644
index 0000000000..0bba60c517
--- /dev/null
+++ b/deps/icu-small/source/tools/pkgdata/pkgtypes.h
@@ -0,0 +1,170 @@
+/**************************************************************************
+*
+* 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