File: xpather.h

package info (click to toggle)
eclipse-titan 6.5.0-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 101,128 kB
  • sloc: cpp: 259,139; ansic: 47,560; yacc: 22,554; makefile: 14,074; sh: 12,630; lex: 9,101; xml: 5,362; java: 4,849; perl: 3,784; awk: 48; php: 32; python: 13
file content (297 lines) | stat: -rw-r--r-- 10,363 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
/******************************************************************************
 * Copyright (c) 2000-2018 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Baji, Laszlo
 *   Balasko, Jeno
 *   Baranyi, Botond
 *   Beres, Szabolcs
 *   Delic, Adam
 *   Kovacs, Ferenc
 *   Raduly, Csaba
 *   Szabo, Bence Janos
 *   Pandi, Krisztian
 *
 ******************************************************************************/
#ifndef XPATHER_H_
#define XPATHER_H_

#include <stdio.h>

typedef int boolean;
#define TRUE 1
#define FALSE 0

enum tpd_result { TPD_FAILED = -1, TPD_SKIPPED = 0, TPD_SUCCESS = 1 };

struct string_list {
char* str;
struct string_list* next;
};

struct string2_list {
char* str1;
char* str2;
struct string2_list* next;
};

// This contains a project's configuration and the 
// data that are important for determining the required configurations.
struct config_struct {
char* project_name; // Name of the project
char* project_conf; // Configuration of the project
boolean is_active; // True if this configuration is an active configuration
struct string_list* dependencies; // Projects that references this project
struct string2_list* requirements; // Configuration requirements (Project, Config)
struct string_list* children; // Projects that are being referenced by this project
boolean processed; // True if this project is already processed.
struct config_struct* next; // Pointer to the next element
};

// This contains a Project with it's configuration and the 
// flag to determine if this configuration is the active one.
struct config_list {
char* str1; // Project name
char* str2; // Configuration
boolean is_active; // Is active configuration?
struct config_list* next; // Pointer to the next element
};

#ifdef __cplusplus
extern "C"
#endif
boolean isTopLevelExecutable(const char* projName);

#ifdef __cplusplus
extern "C"
#endif
boolean isDynamicLibrary(const char* key);

#ifdef __cplusplus
extern "C"
#endif
const char* findLibraryPath(const char* libraryName, const char* projName);

#ifdef __cplusplus
extern "C"
#endif
const char* findLibraryName(const char* libraryName, const char* projName);

#ifdef __cplusplus
extern "C"
#endif
void erase_libs(void);

#ifdef __cplusplus
extern "C"
#endif
const char* getLibFromProject(const char* projName);

#ifdef __cplusplus
  extern "C"
#endif
struct string_list* getExternalLibs(const char* projName);

#ifdef __cplusplus
extern "C"
#endif
struct string_list* getExternalLibPaths(const char* projName);

#ifdef __cplusplus
extern "C"
#endif
struct string2_list* getLinkerLibs(const char* projName);

#ifdef __cplusplus
extern "C"
#endif
struct string_list* getRefWorkingDirs(const char* projName);

#ifdef __cplusplus
extern "C" 
#endif
boolean hasExternalLibrary(const char* libName, const char* projName);

#ifdef __cplusplus
extern "C" 
#endif
boolean hasSubProject(const char* projName);

#ifdef __cplusplus
extern "C"
#endif
void print_libs(void);

#ifdef __cplusplus
extern "C"
#endif
boolean isTtcn3ModuleInLibrary(const char* moduleName);

#ifdef __cplusplus
extern "C"
#endif
const char* getTPDFileName(const char* projName);

#ifdef __cplusplus
extern "C"
#endif
const char* getPathToRootDir(const char* projName);

#ifdef __cplusplus
extern "C" 
#endif
boolean isAsn1ModuleInLibrary(const char* moduleName);

#ifdef __cplusplus
extern "C" 
#endif
boolean isSourceFileInLibrary(const char* fileName);

#ifdef __cplusplus
extern "C" 
#endif
boolean isHeaderFileInLibrary(const char* fileName);

#ifdef __cplusplus
extern "C" 
#endif
boolean isTtcnPPFileInLibrary(const char* fileName);

#ifdef __cplusplus
extern "C" 
#endif
boolean isXSDModuleInLibrary(const char* fileName);

#ifdef __cplusplus
extern "C" 
#endif
boolean buildObjects(const char* projName, boolean add_referenced);

#ifdef __cplusplus
extern "C" 
#endif
void free_string_list(struct string_list* act_elem);

#ifdef __cplusplus
extern "C" 
#endif
void free_string2_list(struct string2_list* act_elem);

#ifdef __cplusplus
extern "C" 
#endif
int is_xsd_module(const char *file_name, char **module_name);

#ifdef __cplusplus
extern "C" 
#endif
const char *get_suffix(const char *file_name);

/**
 *
 * @param p_tpd_name filename
 * @param actcfg actual configuration name
 * @param file_list_path the argument of the -P switch
 * @param argc pointer to argv
 * @param argv pointer to argc
 * @param optind pointer to optind
 * @param ets_name from the -e switch
 * @param gnu_make from the -g switch
 * @param single_mode -s switch
 * @param central_storage -c switch
 * @param absolute_paths -a switch
 * @param preprocess -p switch
 * @param use_runtime_2 -R switch
 * @param dynamic dynamic linking, -l switch
 * @param makedepend -m switch
 * @param filelist -P switch
 * @param recursive -r switch
 * @param force_overwrite -F switch
 * @param output_file from the -o switch
 * @param abs_work_dir workingDirectory element of TPD will be stored here, must be Free()'d
 * @param sub_project_dirs directories of sub-projects that need to be built before this one,
                           if set to NULL when calling this function then it won't be set, otherwise it must be deallocated after the call
 * @param program_name original value of argv[0], which is the executable path used to start this program
 * @param prj_graph_fp write project graph xml data into this file if not NULL
 * @create_symlink_list a list of symlinks to be created
 * @param ttcn3_prep_includes TTCN3preprocessorIncludes
 * @param ttcn3_prep_defines preprocessorDefines
 * @param prep_includes preprocessorIncludes
 * @param prep_defines preprocessorDefines
 * @param codesplit codeSplitting
 * @param quietly quietly
 * @param disablesubtypecheck disableSubtypeChecking
 * @param cxxcompiler CxxCompiler
 * @param optlevel optimizationLevel
 * @param optflags otherOptimizationFlags
 * @param disableber disableBER -b
 * @param disableraw disableRAW -r
 * @param disabletext disableTEXT -x
 * @param disablexer disableXER -X
 * @param disablejson disableJSON -j
 * @param forcexerinasn forceXERinASN.1 -a
 * @param defaultasomit defaultasOmit -d
 * @param gccmessageformat gccMessageFormat -g
 * @param linenumber lineNumbersOnlyInMessages -i
 * @param includesourceinfo includeSourceInfo -L
 * @param addsourcelineinfo addSourceLineInfo -l
 * @param suppresswarnings suppressWarnings -S
 * @param outparamboundness  outParamBoundness -Y
 * @param omit_in_value_list omitInValueList -M
 * @param warnings_for_bad_variants warningsForBadVariants -E
 * @param activate_debugger activateDebugger -n
 * @param disable_predef_exp_folder disablePredefinedExternalFolder
 * @param solspeclibs SolarisSpecificLibraries
 * @param sol8speclibs Solaris8SpecificLibraries
 * @param linuxspeclibs LinuxSpecificLibraries
 * @param freebsdspeclibs FreeBSDSpecificLibraries
 * @param win32speclibs Win32SpecificLibraries
 * @param ttcn3preprocessor ttcn3preprocessor
 * @param linkerlibs linkerlibs
 * @param linkerlibrarysearchpath linkerlibrarysearchpath
 * @param Vflag -V switch
 * @param Dflag -D switch
 * @param generatorCommandOutput the output of the command that generates a Makefile snippet
 * @param target_placement_list a list of (target,placement) strings pairs from the TPD
 * @param prefix_workdir prefix working directory with project name
 * @param run_command_list contains the working directories and the makefilegen commands to be called there
 * @param search_paths contains the paths that can be tried if a file is not found
 * @param n_search_paths contains the size of relative_prefixes
 * @param makefileScript contains the script that can modify the makefile
 * @return TPD_SUCCESS if parsing successful, TPD_SKIPPED if the tpd
 *         was seen already, or TPD_FAILED on error.
 */
#ifdef __cplusplus
extern "C"
#else
enum
#endif
tpd_result process_tpd(const char **p_tpd_name, const char *actcfg,
  const char *file_list_path,
  int *argc, char ***argv, boolean* p_free_argv,
  int *optind, char **ets_name, char **project_name,
  boolean *gnu_make, boolean *single_mode,
  boolean *central_storage, boolean *absolute_paths,
  boolean *preprocess, boolean *use_runtime_2,
  boolean *dynamic, boolean *makedepend, boolean *filelist,
  boolean *library, boolean recursive, boolean force_overwrite, boolean gen_only_top_level,
  const char *output_file, char** abs_work_dir, struct string_list* sub_project_dirs,
  const char* program_name, FILE* prj_graph_fp, struct string2_list* create_symlink_list, struct string_list* ttcn3_prep_includes,
  struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes,
  struct string_list* prep_defines, struct string_list* prep_undefines, char **codesplit, boolean *quietly, boolean *disablesubtypecheck,
  char** cxxcompiler, char** optlevel, char** optflags, boolean *disableber, boolean *disableraw, boolean *disabletext, boolean *disablexer,
  boolean *disablejson, boolean *disableoer, boolean *forcexerinasn, boolean *defaultasomit, boolean *gccmessageformat,
  boolean *linenumber, boolean *includesourceinfo, boolean *addsourcelineinfo, boolean *suppresswarnings,
  boolean *outparamboundness, boolean *omit_in_value_list, boolean *warnings_for_bad_variants, boolean *activate_debugger, boolean* ignore_untagged_union,
  boolean *disable_predef_exp_folder, boolean* enable_legacy_encoding, boolean* disable_userinfo, boolean* realtime_features,
  struct string_list* solspeclibs, struct string_list* sol8speclibs,
  struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs,
  char** ttcn3preprocessor, struct string_list* linkerlibs, struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, boolean Vflag, boolean Dflag,
  boolean *Zflag, boolean *Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, struct string2_list* run_command_list,
  struct string2_list* required_configs, struct string_list** profiled_file_list, const char **search_paths, size_t n_search_paths, char** makefileScript);

#endif /* XPATHER_H_ */