~ubuntu-branches/ubuntu/jaunty/texlive-bin/jaunty

« back to all changes in this revision

Viewing changes to build/source/libs/icu-xetex/tools/pkgdata/pkgtypes.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2008-06-26 23:14:59 UTC
  • mfrom: (2.1.30 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080626231459-y02rjsrgtafu83yr
Tags: 2007.dfsg.2-3
add missing source roadmap.fig of roadmap.eps in fontinst documentation
(Closes: #482915) (urgency medium due to RC bug)
(new patch add-missing-fontinst-source)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
*
 
3
*   Copyright (C) 2000-2005, International Business Machines
 
4
*   Corporation and others.  All Rights Reserved.
 
5
*
 
6
***************************************************************************
 
7
*   file name:  pkgdata.c
 
8
*   encoding:   ANSI X3.4 (1968)
 
9
*   tab size:   8 (not used)
 
10
*   indentation:4
 
11
*
 
12
*   created on: 2000may16
 
13
*   created by: Steven \u24C7 Loomis
 
14
*
 
15
*  common types for pkgdata
 
16
*/
 
17
 
 
18
#ifndef _PKGTYPES
 
19
#define _PKGTYPES
 
20
 
 
21
/* headers */
 
22
#include "unicode/utypes.h"
 
23
#include "filestrm.h"
 
24
 
 
25
/* linked list */
 
26
struct _CharList;
 
27
 
 
28
typedef struct _CharList
 
29
{
 
30
  const char       *str;
 
31
  struct _CharList *next;
 
32
} CharList;
 
33
 
 
34
 
 
35
 
 
36
/* 
 
37
 * write CharList 'l' into stream 's' using deliminter 'delim' (delim can be NULL). quoted: -1 remove, 0 as is, 1 add quotes
 
38
 */
 
39
const char *pkg_writeCharList(FileStream *s, CharList *l, const char *delim, int32_t quoted);
 
40
 
 
41
/*
 
42
 * Same, but use line breaks. quoted: -1 remove, 0 as is, 1 add quotes
 
43
 */
 
44
const char *pkg_writeCharListWrap(FileStream *s, CharList *l, const char *delim, const char *brk, int32_t quoted);
 
45
 
 
46
 
 
47
/*
 
48
 * Count items . 0 if null
 
49
 */
 
50
uint32_t pkg_countCharList(CharList *l);
 
51
 
 
52
/* 
 
53
 * Prepend string to CharList. Str is adopted!
 
54
 */
 
55
CharList *pkg_prependToList(CharList *l, const char *str);
 
56
 
 
57
/* 
 
58
 * append string to CharList. *end or even end can be null if you don't 
 
59
 * know it.[slow]
 
60
 * Str is adopted!
 
61
 */
 
62
CharList *pkg_appendToList(CharList *l, CharList** end, const char *str);
 
63
 
 
64
/* 
 
65
 * strAlias is an alias to a full or relative path to a FILE.  This function
 
66
 * will search strAlias for the directory name (with strrchr). Then, it will 
 
67
 * determine if that directory is already in list l.  If not, it will add it
 
68
 * with strdup(strAlias). 
 
69
 * @param l list to append to , or NULL
 
70
 * @param end end pointer-to-pointer.  Can point to null, or be null.  
 
71
 * @param strAlias alias to full path string
 
72
 * @return new list
 
73
 */
 
74
CharList *pkg_appendUniqueDirToList(CharList *l, CharList** end, const char *strAlias);
 
75
 
 
76
/*
 
77
 * does list contain string?  Returns: t/f
 
78
 */
 
79
UBool  pkg_listContains(CharList *l, const char *str);
 
80
 
 
81
/*
 
82
 * Delete list 
 
83
 */
 
84
void pkg_deleteList(CharList *l);
 
85
 
 
86
/*
 
87
 * Mode package function
 
88
 */
 
89
struct UPKGOptions_;
 
90
typedef   void (UPKGMODE)(struct UPKGOptions_ *, FileStream *s, UErrorCode *status);
 
91
 
 
92
/*
 
93
 * Static mode - write the readme file 
 
94
 * @param opt UPKGOptions
 
95
 * @param libName Name of the .lib, etc file
 
96
 * @param status ICU error code
 
97
 */
 
98
void pkg_sttc_writeReadme(struct UPKGOptions_ *opt, const char *libName, UErrorCode *status);
 
99
 
 
100
/* 
 
101
 * Options to be passed throughout the program
 
102
 */
 
103
 
 
104
typedef struct UPKGOptions_
 
105
{
 
106
  CharList   *fileListFiles; /* list of files containing files for inclusion in the package */
 
107
  CharList   *filePaths;     /* All the files, with long paths */
 
108
  CharList   *files;         /* All the files */
 
109
  CharList   *outFiles;      /* output files [full paths] */
 
110
 
 
111
  const char *shortName;   /* name of what we're building */
 
112
  const char *cShortName;   /* name of what we're building as a C identifier */
 
113
  const char *entryName;   /* special entrypoint name */
 
114
  const char *targetDir;  /* dir for packaged data to go */
 
115
  const char *dataDir;    /* parent of dir for package (default: tmpdir) */
 
116
  const char *tmpDir;     
 
117
  const char *srcDir;
 
118
  const char *options;     /* Options arg */
 
119
  const char *mode;        /* Mode of building */
 
120
  const char *version;     /* Library version */
 
121
  const char *makeArgs;    /* XXX Should be a CharList! */
 
122
  const char *comment;     /* comment string */
 
123
  const char *makeFile;    /* Makefile path */
 
124
  const char *install;     /* Where to install to (NULL = don't install) */
 
125
  const char *icuroot;     /* where does ICU lives */
 
126
  const char *libName;     /* name for library (default: shortName) */
 
127
  UBool      rebuild;
 
128
  UBool      clean;
 
129
  UBool      nooutput;
 
130
  UBool      verbose;
 
131
  UBool      quiet;
 
132
  UBool      hadStdin;     /* Stdin was a dependency - don't make anything depend on the file list coming in. */
 
133
  UBool      numeric;      /* use numeric, short, temporary file names */
 
134
  
 
135
  int32_t    embed;   /* embedded package - i.e.  .../mypkg_myfile.res  files */
 
136
 
 
137
  UPKGMODE  *fcn;          /* Handler function */
 
138
} UPKGOptions;
 
139
 
 
140
 
 
141
/* set up common defines for library naming */
 
142
 
 
143
#ifdef U_WINDOWS
 
144
# ifndef UDATA_SO_SUFFIX
 
145
#  define UDATA_SO_SUFFIX ".DLL"
 
146
# endif
 
147
# define LIB_PREFIX ""
 
148
# define LIB_STATIC_PREFIX ""
 
149
# define OBJ_SUFFIX ".obj"
 
150
# define UDATA_LIB_SUFFIX ".LIB"
 
151
 
 
152
#elif defined(U_CYGWIN)
 
153
# define LIB_PREFIX "cyg"
 
154
# define LIB_STATIC_PREFIX "lib"
 
155
# define OBJ_SUFFIX ".o"
 
156
# define UDATA_LIB_SUFFIX ".a"
 
157
 
 
158
#else  /* POSIX? */
 
159
# define LIB_PREFIX "lib"
 
160
# define LIB_STATIC_PREFIX "lib"
 
161
# define OBJ_SUFFIX ".o"
 
162
# define UDATA_LIB_SUFFIX ".a"
 
163
#endif 
 
164
 
 
165
#define ASM_SUFFIX ".s"
 
166
 
 
167
 
 
168
/* defines for common file names */
 
169
#define UDATA_CMN_PREFIX ""
 
170
#define UDATA_CMN_SUFFIX ".dat"
 
171
#define UDATA_CMN_INTERMEDIATE_SUFFIX "_dat"
 
172
 
 
173
#define PKGDATA_DERIVED_PATH '\t'
 
174
 
 
175
#endif