~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to source/tools/pkgdata/pkgtypes.h

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
*
 
3
*   Copyright (C) 2000, 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
 * does list contain string?  Returns: t/f
 
66
 */
 
67
UBool  pkg_listContains(CharList *l, const char *str);
 
68
 
 
69
/*
 
70
 * Delete list 
 
71
 */
 
72
void pkg_deleteList(CharList *l);
 
73
 
 
74
 
 
75
 
 
76
 
 
77
/*
 
78
 * Mode package function
 
79
 */
 
80
struct UPKGOptions_;
 
81
typedef   void (UPKGMODE)(struct UPKGOptions_ *, FileStream *s, UErrorCode *status);
 
82
 
 
83
/* 
 
84
 * Options to be passed throughout the program
 
85
 */
 
86
 
 
87
typedef struct UPKGOptions_
 
88
{
 
89
  CharList   *fileListFiles; /* list of files containing files for inclusion in the package */
 
90
  CharList   *filePaths;     /* All the files, with long paths */
 
91
  CharList   *files;         /* All the files */
 
92
  CharList   *outFiles;      /* output files [full paths] */
 
93
 
 
94
  const char *shortName;   /* name of what we're building */
 
95
  const char *entryName;   /* special entrypoint name */
 
96
  const char *targetDir;
 
97
  const char *tmpDir;
 
98
  const char *srcDir;
 
99
  const char *options;     /* Options arg */
 
100
  const char *mode;        /* Mode of building */
 
101
  const char *version;     /* Library version */
 
102
  const char *makeArgs;    /* XXX Should be a CharList! */
 
103
  const char *comment;     /* comment string */
 
104
  const char *makeFile;    /* Makefile path */
 
105
  const char *install;     /* Where to install to (NULL = don't install) */
 
106
  const char *icuroot;     /* where does ICU lives */
 
107
 
 
108
  UBool      rebuild;
 
109
  UBool      clean;
 
110
  UBool      nooutput;
 
111
  UBool      verbose;
 
112
  UBool      hadStdin;     /* Stdin was a dependency - don't make anything depend on the file list coming in. */
 
113
 
 
114
  UPKGMODE  *fcn;          /* Handler function */
 
115
} UPKGOptions;
 
116
 
 
117
 
 
118
/* set up common defines for library naming */
 
119
 
 
120
#ifdef WIN32
 
121
# ifndef UDATA_SO_SUFFIX
 
122
#  define UDATA_SO_SUFFIX ".DLL"
 
123
# endif
 
124
# define LIB_PREFIX ""
 
125
# define OBJ_SUFFIX ".obj"
 
126
 
 
127
#else  /* POSIX? */
 
128
# define LIB_PREFIX "lib"
 
129
# define OBJ_SUFFIX ".o"
 
130
# define UDATA_LIB_SUFFIX ".a"
 
131
#endif 
 
132
 
 
133
 
 
134
/* defines for common file names */
 
135
#define UDATA_CMN_PREFIX ""
 
136
#define UDATA_CMN_SUFFIX ".dat"
 
137
#define UDATA_CMN_INTERMEDIATE_SUFFIX "_dat"
 
138
 
 
139
 
 
140
#endif