gwenhywfar 5.10.1
context.c
Go to the documentation of this file.
1/***************************************************************************
2 begin : Mon Feb 08 2021
3 copyright : (C) 2021 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * Please see toplevel file COPYING for license details *
8 ***************************************************************************/
9
10#ifdef HAVE_CONFIG_H
11# include <config.h>
12#endif
13
14
15#include "gwenbuild/types/context_p.h"
16
17#include <gwenhywfar/debug.h>
18#include <gwenhywfar/memory.h>
19
20#include <stdlib.h>
21#include <string.h>
22
23
25
26
27
28static char *_combinedString(const char *string1, const char *string2, const char delim);
29static void _exportDbToXml(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode);
30
31
32
33
35{
36 GWB_CONTEXT *ctx;
37
39 GWEN_TREE2_INIT(GWB_CONTEXT, ctx, GWB_Context);
40
41 ctx->gwenbuild=gwenbuild;
42 ctx->vars=GWEN_DB_Group_new("vars");
43
44 return ctx;
45}
46
47
48
50{
51 GWB_CONTEXT *ctx;
52
54 GWEN_TREE2_INIT(GWB_CONTEXT, ctx, GWB_Context);
55
56 ctx->gwenbuild=originalCtx->gwenbuild;
57 ctx->currentTarget=originalCtx->currentTarget;
58
59 if (originalCtx->initialSourceDir)
60 ctx->initialSourceDir=strdup(originalCtx->initialSourceDir);
61 if (originalCtx->currentRelativeDir)
62 ctx->currentRelativeDir=strdup(originalCtx->currentRelativeDir);
63 if (originalCtx->topBuildDir)
64 ctx->topBuildDir=strdup(originalCtx->topBuildDir);
65 if (originalCtx->topSourceDir)
66 ctx->topSourceDir=strdup(originalCtx->topSourceDir);
67
68 if (originalCtx->currentBuildDir)
69 ctx->currentBuildDir=strdup(originalCtx->currentBuildDir);
70 if (originalCtx->currentSourceDir)
71 ctx->currentSourceDir=strdup(originalCtx->currentSourceDir);
72
73 if (originalCtx->compilerFlags)
74 ctx->compilerFlags=originalCtx->compilerFlags;
75
76 if (originalCtx->linkerFlags)
77 ctx->linkerFlags=originalCtx->linkerFlags;
78
79 if (originalCtx->includeList)
80 ctx->includeList=GWB_KeyValuePair_List_dup(originalCtx->includeList);
81
82 if (originalCtx->defineList)
83 ctx->defineList=GWB_KeyValuePair_List_dup(originalCtx->defineList);
84
85 if (originalCtx->vars)
86 ctx->vars=GWEN_DB_Group_dup(originalCtx->vars);
87
88 return ctx;
89}
90
91
92
94{
95 if (ctx) {
96 GWEN_TREE2_FINI(GWB_CONTEXT, ctx, GWB_Context);
97
98 free(ctx->topBuildDir);
99 free(ctx->topSourceDir);
100 free(ctx->currentBuildDir);
101 free(ctx->currentSourceDir);
102 free(ctx->initialSourceDir);
103 free(ctx->compilerFlags);
104 free(ctx->linkerFlags);
105
106 GWB_KeyValuePair_List_free(ctx->includeList);
107 GWB_KeyValuePair_List_free(ctx->defineList);
108 GWEN_DB_Group_free(ctx->vars);
109 GWB_File_List2_free(ctx->sourceFileList2);
110
111 GWEN_FREE_OBJECT(ctx);
112 }
113}
114
115
116
118{
119 return ctx->gwenbuild;
120}
121
122
123
125{
126 return ctx->topBuildDir;
127}
128
129
130
132{
133 if (ctx->topBuildDir)
134 free(ctx->topBuildDir);
135 if (s)
136 ctx->topBuildDir=strdup(s);
137 else
138 ctx->topBuildDir=NULL;
139}
140
141
142
144{
145 char *newValue;
146
147 newValue=_combinedString(s, ctx->topBuildDir, '/');
148 free(ctx->topBuildDir);
149 ctx->topBuildDir=newValue;
150}
151
152
153
155{
156 return ctx->topSourceDir;
157}
158
159
160
162{
163 if (ctx->topSourceDir)
164 free(ctx->topSourceDir);
165 if (s)
166 ctx->topSourceDir=strdup(s);
167 else
168 ctx->topSourceDir=NULL;
169}
170
171
172
174{
175 char *newValue;
176
177 newValue=_combinedString(s, ctx->topSourceDir, '/');
178 free(ctx->topSourceDir);
179 ctx->topSourceDir=newValue;
180}
181
182
183
185{
186 return ctx->currentBuildDir;
187}
188
189
190
192{
193 if (ctx->currentBuildDir)
194 free(ctx->currentBuildDir);
195 if (s)
196 ctx->currentBuildDir=strdup(s);
197 else
198 ctx->currentBuildDir=NULL;
199}
200
201
202
204{
205 char *newValue;
206
207 newValue=_combinedString(ctx->currentBuildDir, s, '/');
208 free(ctx->currentBuildDir);
209 ctx->currentBuildDir=newValue;
210}
211
212
213
215{
216 return ctx->currentSourceDir;
217}
218
219
220
222{
223 char *newValue;
224
225 newValue=_combinedString(ctx->currentSourceDir, s, '/');
226 free(ctx->currentSourceDir);
227 ctx->currentSourceDir=newValue;
228}
229
230
231
233{
234 char *newValue;
235
236 newValue=_combinedString(s, ctx->currentSourceDir, '/');
237 free(ctx->currentSourceDir);
238 ctx->currentSourceDir=newValue;
239}
240
241
242
244{
245 if (ctx->currentSourceDir)
246 free(ctx->currentSourceDir);
247 if (s)
248 ctx->currentSourceDir=strdup(s);
249 else
250 ctx->currentSourceDir=NULL;
251}
252
253
254
256{
257 return ctx->currentRelativeDir;
258}
259
260
261
263{
264 char *newValue;
265
266 newValue=_combinedString(ctx->currentRelativeDir, s, '/');
267 free(ctx->currentRelativeDir);
268 ctx->currentRelativeDir=newValue;
269}
270
271
272
274{
275 if (ctx->currentRelativeDir)
276 free(ctx->currentRelativeDir);
277 if (s)
278 ctx->currentRelativeDir=strdup(s);
279 else
280 ctx->currentRelativeDir=NULL;
281}
282
283
284
286{
287 return ctx->initialSourceDir;
288}
289
290
291
293{
294 free(ctx->initialSourceDir);
295 ctx->initialSourceDir=s?strdup(s):NULL;
296}
297
298
299
301{
302 return ctx->compilerFlags;
303}
304
305
306
308{
309 if (ctx->compilerFlags)
310 free(ctx->compilerFlags);
311 if (s)
312 ctx->compilerFlags=strdup(s);
313 else
314 ctx->compilerFlags=NULL;
315}
316
317
318
320{
321 char *newValue;
322
323 newValue=_combinedString(ctx->compilerFlags, s, ' ');
324 free(ctx->compilerFlags);
325 ctx->compilerFlags=newValue;
326}
327
328
329
331{
332 return ctx->linkerFlags;
333}
334
335
336
338{
339 if (ctx->linkerFlags)
340 free(ctx->linkerFlags);
341 if (s)
342 ctx->linkerFlags=strdup(s);
343 else
344 ctx->linkerFlags=NULL;
345}
346
347
348
350{
351 char *newValue;
352
353 newValue=_combinedString(ctx->linkerFlags, s, ' ');
354 free(ctx->linkerFlags);
355 ctx->linkerFlags=newValue;
356}
357
358
359
360GWB_KEYVALUEPAIR_LIST *GWB_Context_GetIncludeList(const GWB_CONTEXT *ctx)
361{
362 return ctx->includeList;
363}
364
365
366
367void GWB_Context_AddInclude(GWB_CONTEXT *ctx, const char *genType, const char *incl)
368{
369 if (genType && *genType &&incl && *incl) {
370 GWB_KEYVALUEPAIR *kvp;
371
372 if (ctx->includeList==NULL)
373 ctx->includeList=GWB_KeyValuePair_List_new();
374
375 kvp=GWB_KeyValuePair_new(genType, incl);
376 GWB_KeyValuePair_List_Add(kvp, ctx->includeList);
377 }
378}
379
380
381
383{
384 if (ctx->includeList==NULL)
385 ctx->includeList=GWB_KeyValuePair_List_new();
386 else
387 GWB_KeyValuePair_List_Clear(ctx->includeList);
388}
389
390
391
392GWB_KEYVALUEPAIR_LIST *GWB_Context_GetDefineList(const GWB_CONTEXT *ctx)
393{
394 return ctx->defineList;
395}
396
397
398
399void GWB_Context_SetDefine(GWB_CONTEXT *ctx, const char *name, const char *value)
400{
401 if (name && *name) {
402 GWB_KEYVALUEPAIR *kvp;
403
404 if (ctx->defineList==NULL)
405 ctx->defineList=GWB_KeyValuePair_List_new();
406
407 kvp=GWB_KeyValuePair_List_GetFirstByKey(ctx->defineList, name);
408 if (kvp)
409 GWB_KeyValuePair_SetValue(kvp, value);
410 else
411 GWB_KeyValuePair_List_Add(GWB_KeyValuePair_new(name, value), ctx->defineList);
412 }
413}
414
415
416
418{
419 if (ctx->defineList==NULL)
420 ctx->defineList=GWB_KeyValuePair_List_new();
421 else
422 GWB_KeyValuePair_List_Clear(ctx->defineList);
423}
424
425
426
428{
429 return ctx->vars;
430}
431
432
433
435{
436 return ctx->sourceFileList2;
437}
438
439
440
442{
443 if (ctx->sourceFileList2==NULL)
444 ctx->sourceFileList2=GWB_File_List2_new();
445 GWB_File_List2_PushBack(ctx->sourceFileList2, f);
446}
447
448
449
451{
452 if (ctx->sourceFileList2==NULL)
453 ctx->sourceFileList2=GWB_File_List2_new();
454 else
455 GWB_File_List2_Clear(ctx->sourceFileList2);
456}
457
458
459
461{
462 return ctx->currentTarget;
463}
464
465
467{
468 ctx->currentTarget=target;
469}
470
471
472
473
474/* mindmap for my stupid brain...
475 abcde abc
476 5 3 = 8 + 1 (blank) +1 (0)
477 abcde abc = 9 + '0'
478 0123456789
479 */
480
481char *_combinedString(const char *string1, const char *string2, const char delim)
482{
483 if (string2 && *string2) {
484 if (string1==NULL)
485 return strdup(string2);
486 else {
487 int len1;
488 int len2;
489 char *newS;
490
491 len1=strlen(string1);
492 len2=strlen(string2);
493
494 newS=(char*) malloc(len1+len2+2); /* blank plus trailing 0 */
495 assert(newS);
496 memmove(newS, string1, len1);
497 newS[len1]=delim;
498 memmove(newS+len1+1, string2, len2);
499 newS[len1+len2+1]=0;
500 return newS;
501 }
502 }
503 else {
504 if (string1)
505 return strdup(string1);
506 return NULL;
507 }
508}
509
510
511
512void GWB_Context_toXml(const GWB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, int withDb)
513{
514 const GWB_CONTEXT *ctxChild;
515
516 if (ctx->initialSourceDir)
517 GWEN_XMLNode_SetCharValue(xmlNode, "initialSourceDir", ctx->initialSourceDir);
518 if (ctx->currentRelativeDir)
519 GWEN_XMLNode_SetCharValue(xmlNode, "currentRelativeDir", ctx->currentRelativeDir);
520 if (ctx->topBuildDir)
521 GWEN_XMLNode_SetCharValue(xmlNode, "topBuildDir", ctx->topBuildDir);
522 if (ctx->topSourceDir)
523 GWEN_XMLNode_SetCharValue(xmlNode, "topSourceDir", ctx->topSourceDir);
524 if (ctx->currentBuildDir)
525 GWEN_XMLNode_SetCharValue(xmlNode, "currentBuildDir", ctx->currentBuildDir);
526 if (ctx->currentSourceDir)
527 GWEN_XMLNode_SetCharValue(xmlNode, "currentSourceDir", ctx->currentSourceDir);
528 if (ctx->compilerFlags)
529 GWEN_XMLNode_SetCharValue(xmlNode, "compilerFlags", ctx->compilerFlags);
530 if (ctx->linkerFlags)
531 GWEN_XMLNode_SetCharValue(xmlNode, "linkerFlags", ctx->linkerFlags);
532
533 if (ctx->includeList) {
534 GWEN_XMLNODE *n;
535
536 n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "includeList");
537 GWB_KeyValuePair_List_WriteXml(ctx->includeList, n, "Include");
538 GWEN_XMLNode_AddChild(xmlNode, n);
539 }
540
541 if (ctx->defineList) {
542 GWEN_XMLNODE *n;
543
544 n=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "defineList");
545 GWB_KeyValuePair_List_WriteXml(ctx->defineList, n, "Define");
546 GWEN_XMLNode_AddChild(xmlNode, n);
547 }
548
549 if (withDb && ctx->vars) {
550 GWEN_XMLNODE *n;
551
553 _exportDbToXml(ctx->vars, n);
554 GWEN_XMLNode_AddChild(xmlNode, n);
555 }
556
557 ctxChild=GWB_Context_Tree2_GetFirstChild(ctx);
558 if (ctxChild) {
559 GWEN_XMLNODE *nTree;
560
561 nTree=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "Children");
562 while(ctxChild) {
563 GWEN_XMLNODE *n;
564
566 GWB_Context_toXml(ctxChild, n, 0); /* only write db for root context */
567 GWEN_XMLNode_AddChild(nTree, n);
568 ctxChild=GWB_Context_Tree2_GetNext(ctxChild);
569 }
570 GWEN_XMLNode_AddChild(xmlNode, nTree);
571 }
572}
573
574
575
577{
578 GWEN_BUFFER *dbuf;
579 int rv;
580
581 dbuf=GWEN_Buffer_new(0, 256, 0, 1);
583 if (rv<0) {
584 DBG_ERROR(NULL, "here (%d)", rv);
585 GWEN_Buffer_free(dbuf);
586 }
587 else {
588 GWEN_XMLNODE *xmlData;
589
591 GWEN_XMLNode_AddChild(xmlNode, xmlData);
592 GWEN_Buffer_free(dbuf);
593 }
594}
595
596
597
598void GWB_Context_Dump(const GWB_CONTEXT *ctx, int indent)
599{
600 if (ctx) {
601 int i;
602
603 for(i=0; i<indent; i++)
604 fprintf(stderr, " ");
605 fprintf(stderr, "Context:\n");
606
607 GWBUILD_Debug_PrintValue("currentTarget.....", (ctx->currentTarget)?GWB_Target_GetName(ctx->currentTarget):NULL, indent+2);
608 GWBUILD_Debug_PrintValue("currentRelativeDir", ctx->currentRelativeDir, indent+2);
609 GWBUILD_Debug_PrintValue("topBuildDir.......", ctx->topBuildDir, indent+2);
610 GWBUILD_Debug_PrintValue("topSourceDir......", ctx->topSourceDir, indent+2);
611 GWBUILD_Debug_PrintValue("currentBuildDir...", ctx->currentBuildDir, indent+2);
612 GWBUILD_Debug_PrintValue("currentSourceDir..", ctx->currentSourceDir, indent+2);
613 GWBUILD_Debug_PrintValue("compilerFlags.....", ctx->compilerFlags, indent+2);
614 GWBUILD_Debug_PrintValue("linkerFlags.......", ctx->linkerFlags, indent+2);
615 GWBUILD_Debug_PrintKvpList("includeList", ctx->includeList, indent+2);
616 GWBUILD_Debug_PrintKvpList("defineList", ctx->defineList, indent+2);
617 GWBUILD_Debug_PrintDb("vars", ctx->vars, indent+2);
618 GWBUILD_Debug_PrintFileList2("sourceFileList2", ctx->sourceFileList2, indent+2);
619 }
620}
621
622
623
624void GWB_Context_Tree2_Dump(const GWB_CONTEXT *ctx, int indent)
625{
626 if (ctx) {
627 const GWB_CONTEXT *childCtx;
628
629 GWB_Context_Dump(ctx, indent);
630 childCtx=GWB_Context_Tree2_GetFirstChild(ctx);
631 while(childCtx) {
632 GWB_Context_Tree2_Dump(childCtx, indent+2);
633 childCtx=GWB_Context_Tree2_GetNext(childCtx);
634 }
635 }
636}
637
638
639
#define NULL
Definition: binreloc.c:300
GWEN_BUFFER * GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take)
Definition: buffer.c:42
void GWEN_Buffer_free(GWEN_BUFFER *bf)
Definition: buffer.c:89
char * GWEN_Buffer_GetStart(const GWEN_BUFFER *bf)
Definition: buffer.c:235
void GWB_Context_AddCurrentSourceDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:221
void GWB_Context_ClearDefineList(GWB_CONTEXT *ctx)
Definition: context.c:417
void GWB_Context_SetCurrentSourceDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:243
void GWB_Context_Tree2_Dump(const GWB_CONTEXT *ctx, int indent)
Definition: context.c:624
const char * GWB_Context_GetCurrentRelativeDir(const GWB_CONTEXT *ctx)
Definition: context.c:255
const char * GWB_Context_GetCurrentSourceDir(const GWB_CONTEXT *ctx)
Definition: context.c:214
static void _exportDbToXml(GWEN_DB_NODE *db, GWEN_XMLNODE *xmlNode)
Definition: context.c:576
GWB_CONTEXT * GWB_Context_new(GWENBUILD *gwenbuild)
Definition: context.c:34
void GWB_Context_SetTopBuildDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:131
void GWB_Context_AddCurrentBuildDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:203
void GWB_Context_Dump(const GWB_CONTEXT *ctx, int indent)
Definition: context.c:598
void GWB_Context_SetInitialSourceDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:292
void GWB_Context_InsertCurrentSourceDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:232
void GWB_Context_InsertTopSourceDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:173
GWB_TARGET * GWB_Context_GetCurrentTarget(const GWB_CONTEXT *ctx)
Definition: context.c:460
const char * GWB_Context_GetCompilerFlags(const GWB_CONTEXT *ctx)
Definition: context.c:300
void GWB_Context_SetTopSourceDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:161
void GWB_Context_AddLinkerFlags(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:349
void GWB_Context_AddInclude(GWB_CONTEXT *ctx, const char *genType, const char *incl)
Definition: context.c:367
void GWB_Context_AddSourceFile(GWB_CONTEXT *ctx, GWB_FILE *f)
Definition: context.c:441
GWB_FILE_LIST2 * GWB_Context_GetSourceFileList2(const GWB_CONTEXT *ctx)
Definition: context.c:434
void GWB_Context_SetCurrentTarget(GWB_CONTEXT *ctx, GWB_TARGET *target)
Definition: context.c:466
const char * GWB_Context_GetTopBuildDir(const GWB_CONTEXT *ctx)
Definition: context.c:124
void GWB_Context_free(GWB_CONTEXT *ctx)
Definition: context.c:93
GWB_KEYVALUEPAIR_LIST * GWB_Context_GetDefineList(const GWB_CONTEXT *ctx)
Definition: context.c:392
void GWB_Context_AddCurrentRelativeDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:262
void GWB_Context_SetCompilerFlags(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:307
void GWB_Context_SetLinkerFlags(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:337
void GWB_Context_AddCompilerFlags(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:319
void GWB_Context_ClearSourceFileList2(GWB_CONTEXT *ctx)
Definition: context.c:450
void GWB_Context_SetCurrentRelativeDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:273
const char * GWB_Context_GetTopSourceDir(const GWB_CONTEXT *ctx)
Definition: context.c:154
const char * GWB_Context_GetLinkerFlags(const GWB_CONTEXT *ctx)
Definition: context.c:330
GWEN_DB_NODE * GWB_Context_GetVars(const GWB_CONTEXT *ctx)
Definition: context.c:427
void GWB_Context_SetCurrentBuildDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:191
static char * _combinedString(const char *string1, const char *string2, const char delim)
Definition: context.c:481
void GWB_Context_toXml(const GWB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, int withDb)
Definition: context.c:512
GWB_CONTEXT * GWB_Context_dup(const GWB_CONTEXT *originalCtx)
Definition: context.c:49
GWENBUILD * GWB_Context_GetGwenbuild(const GWB_CONTEXT *ctx)
Definition: context.c:117
const char * GWB_Context_GetInitialSourceDir(const GWB_CONTEXT *ctx)
Definition: context.c:285
GWB_KEYVALUEPAIR_LIST * GWB_Context_GetIncludeList(const GWB_CONTEXT *ctx)
Definition: context.c:360
const char * GWB_Context_GetCurrentBuildDir(const GWB_CONTEXT *ctx)
Definition: context.c:184
void GWB_Context_InsertTopBuildDir(GWB_CONTEXT *ctx, const char *s)
Definition: context.c:143
void GWB_Context_SetDefine(GWB_CONTEXT *ctx, const char *name, const char *value)
Definition: context.c:399
void GWB_Context_ClearIncludeList(GWB_CONTEXT *ctx)
Definition: context.c:382
struct GWB_CONTEXT GWB_CONTEXT
Definition: context.h:17
GWEN_DB_NODE * GWEN_DB_Group_new(const char *name)
Definition: db.c:173
GWEN_DB_NODE * GWEN_DB_Group_dup(const GWEN_DB_NODE *n)
Definition: db.c:428
void GWEN_DB_Group_free(GWEN_DB_NODE *n)
Definition: db.c:421
GWENHYWFAR_API int GWEN_DB_WriteToBuffer(GWEN_DB_NODE *n, GWEN_BUFFER *buf, uint32_t dbflags)
Definition: dbrw.c:1061
#define GWEN_DB_FLAGS_DEFAULT
Definition: db.h:168
struct GWEN_DB_NODE GWEN_DB_NODE
Definition: db.h:228
#define DBG_ERROR(dbg_logger, format, args...)
Definition: debug.h:97
struct GWB_FILE GWB_FILE
Definition: file.h:18
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition: buffer.h:38
void GWBUILD_Debug_PrintKvpList(const char *sName, const GWB_KEYVALUEPAIR_LIST *kvpList, int indent)
Definition: gwenbuild.c:247
void GWBUILD_Debug_PrintFileList2(const char *sName, const GWB_FILE_LIST2 *fileList2, int indent)
Definition: gwenbuild.c:334
void GWBUILD_Debug_PrintDb(const char *sName, GWEN_DB_NODE *db, int indent)
Definition: gwenbuild.c:273
void GWBUILD_Debug_PrintValue(const char *sName, const char *sValue, int indent)
Definition: gwenbuild.c:225
struct GWENBUILD GWENBUILD
Definition: gwenbuild.h:15
void GWB_KeyValuePair_List_WriteXml(const GWB_KEYVALUEPAIR_LIST *kvpList, GWEN_XMLNODE *xmlNode, const char *groupName)
Definition: keyvaluepair.c:240
GWB_KEYVALUEPAIR * GWB_KeyValuePair_new(const char *key, const char *value)
Definition: keyvaluepair.c:34
GWB_KEYVALUEPAIR * GWB_KeyValuePair_List_GetFirstByKey(const GWB_KEYVALUEPAIR_LIST *kvpList, const char *key)
Definition: keyvaluepair.c:144
void GWB_KeyValuePair_SetValue(GWB_KEYVALUEPAIR *kvp, const char *s)
Definition: keyvaluepair.c:104
GWB_KEYVALUEPAIR_LIST * GWB_KeyValuePair_List_dup(const GWB_KEYVALUEPAIR_LIST *oldKvpList)
Definition: keyvaluepair.c:115
struct GWB_KEYVALUEPAIR GWB_KEYVALUEPAIR
Definition: keyvaluepair.h:19
#define GWEN_FREE_OBJECT(varname)
Definition: memory.h:61
#define GWEN_NEW_OBJECT(typ, varname)
Definition: memory.h:55
const char * GWB_Target_GetName(const GWB_TARGET *target)
Definition: target.c:71
struct GWB_TARGET GWB_TARGET
Definition: target.h:17
#define GWEN_TREE2_FUNCTIONS(t, pr)
Definition: tree2.h:354
#define GWEN_TREE2_FINI(t, element, pr)
Definition: tree2.h:457
#define GWEN_TREE2_INIT(t, element, pr)
Definition: tree2.h:445
GWEN_XMLNODE * GWEN_XMLNode_new(GWEN_XMLNODE_TYPE t, const char *data)
Definition: xml.c:144
void GWEN_XMLNode_AddChild(GWEN_XMLNODE *n, GWEN_XMLNODE *child)
Definition: xml.c:423
void GWEN_XMLNode_SetCharValue(GWEN_XMLNODE *n, const char *name, const char *value)
Definition: xml.c:897
struct GWEN__XMLNODE GWEN_XMLNODE
Definition: xml.h:156
@ GWEN_XMLNodeTypeData
Definition: xml.h:147
@ GWEN_XMLNodeTypeTag
Definition: xml.h:145