-
Notifications
You must be signed in to change notification settings - Fork 0
/
backend_sfcb.c
627 lines (569 loc) · 19.7 KB
/
backend_sfcb.c
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
/**
* $Id: backend_sfcb.c,v 1.21 2009/12/22 00:18:29 buccella Exp $
*
* (C) Copyright IBM Corp. 2004
*
* THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
* ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
* CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
*
* You can obtain a current copy of the Eclipse Public License from
* http://www.opensource.org/licenses/eclipse-1.0.php
*
* Author: Viktor Mihajlovski <mihajlov@de.ibm.com>
* Contributors:
*
* Description: MOF Compiler sfcb Backend
* This backend produces Small Footprint CIM Broker
* objects for the parsed CIM classes.
*
*/
#include "cmpi/cmpidt.h"
#include "objectImpl.h"
#include "fileRepository.h"
#include "mofdecl.h"
#include "symtab.h"
#include "mofc.h"
#include "hash.h"
#include "backend.h"
#include "objectpath.h"
#include <sys/utsname.h>
extern CMPIStatus sfcb_simpleArrayAdd(CMPIArray * array, CMPIValue * val, CMPIType type);
extern CMPIObjectPath *getObjectPath(char *path, char **msg);
extern CMPIBroker *Broker;
static unsigned sfcb_options = BACKEND_DEFAULT;
static int endianMode = SFCB_LOCAL_ENDIAN;
typedef void *(*SwapClass)(ClClass * cls, int *size);
typedef void *(*SwapInstance)(ClInstance * inst, int *size);
typedef void *(*SwapQualifier)(ClQualifierDeclaration * inst, int *size);
static void *swapLib;
static SwapClass swapEntryClass;
static SwapInstance swapEntryInstance;
static SwapQualifier swapEntryQualifier;
static int swapMode=0;
extern int opt_reduced;
extern char * repfn; //in fileRepository - rep location
#define BACKEND_SFCB_NO_QUALIFIERS 0x0100
#define BACKEND_SFCB_REDUCED_QUALIFIERS 0x0200
CMPIType make_cmpi_type(type_type lextype, int arrayspec)
{
int array_flag = arrayspec == -1 ? 0 : CMPI_ARRAY;
switch (lextype.type_base) {
case BaseTypeUINT8:
return CMPI_uint8 | array_flag;
case BaseTypeSINT8:
return CMPI_sint8 | array_flag;
case BaseTypeUINT16:
return CMPI_uint16 | array_flag;
case BaseTypeSINT16:
return CMPI_sint16 | array_flag;
case BaseTypeUINT32:
return CMPI_uint32 | array_flag;
case BaseTypeSINT32:
return CMPI_sint32 | array_flag;
case BaseTypeUINT64:
return CMPI_uint64 | array_flag;
case BaseTypeSINT64:
return CMPI_sint64 | array_flag;
case BaseTypeREAL32:
return CMPI_real32 | array_flag;
case BaseTypeREAL64:
return CMPI_real64 | array_flag;
case BaseTypeCHAR16:
return CMPI_char16 | array_flag;
case BaseTypeSTRING:
return CMPI_string | array_flag;
case BaseTypeBOOLEAN:
return CMPI_boolean | array_flag;
case BaseTypeDATETIME:
return CMPI_dateTime | array_flag;
default:
return CMPI_ref | array_flag;
}
}
static CMPIData make_cmpi_data( type_type lextype, int arrayspec,
value_chain * vals )
{
CMPIData data;
CMPIData arr_data;
int i = 0;
data.type = make_cmpi_type(lextype,arrayspec);
data.value.uint64 = 0L; /* set to binary zeros */
if ( vals == NULL ) {
data.state = CMPI_nullValue;
} else if (vals -> val_value == NULL) {
fprintf (stderr,"*** fatal error in backend: NULL value recieved.\n");
abort(); /* paranoia */
}else {
data.state = CMPI_goodValue;
}
if ( data.state == CMPI_goodValue ) {
if (data.type & CMPI_ARRAY) {
/* process array entries */
data.value.array =
CMNewArray(Broker,0,data.type&~CMPI_ARRAY,NULL);
while (vals && vals -> val_value) {
arr_data = make_cmpi_data(lextype,-1,vals);
sfcb_simpleArrayAdd(data.value.array, &arr_data.value, data.type&~CMPI_ARRAY);
i++;
vals = vals -> val_next;
}
} else {
switch (data.type & ~CMPI_ARRAY) {
case CMPI_uint8:
sscanf(vals -> val_value, "%hhu", &data.value.uint8 );
break;
case CMPI_sint8:
sscanf(vals -> val_value, "%hhd", &data.value.sint8 );
break;
case CMPI_uint16:
sscanf(vals -> val_value, "%hu", &data.value.uint16 );
break;
case CMPI_sint16:
sscanf(vals -> val_value, "%hd", &data.value.sint16 );
break;
case CMPI_uint32:
sscanf(vals -> val_value, "%u", &data.value.uint32 );
break;
case CMPI_sint32:
sscanf(vals -> val_value, "%d", &data.value.sint32 );
break;
case CMPI_uint64:
sscanf(vals -> val_value, "%llu", &data.value.uint64);
break;
case CMPI_sint64:
sscanf(vals -> val_value, "%lld", &data.value.uint64 );
break;
case CMPI_real32:
sscanf(vals -> val_value, "%f", &data.value.real32 );
break;
case CMPI_real64:
sscanf(vals -> val_value, "%lf", &data.value.real64 );
break;
case CMPI_char16:
/* this one is suspect to produce garbage */
sscanf(vals -> val_value, "%c", &data.value.uint8 );
break;
case CMPI_string:
data.value.string = CMNewString(Broker,vals -> val_value,NULL);
break;
case CMPI_boolean:
if (strcasecmp("true",vals -> val_value) == 0) {
data.value.boolean = 1;
} else {
data.value.boolean = 0;
}
break;
case CMPI_dateTime:
data.value.dateTime =
CMNewDateTimeFromChars(Broker,vals -> val_value,NULL);
if (data.value.dateTime == NULL) {
fprintf(stderr,"failed to build datetime from %s", vals -> val_value);
data.state = CMPI_nullValue;
}
break;
default: {
char *msg=NULL;
data.value.ref = getObjectPath(vals -> val_value, &msg);
if(msg) {
fprintf(stderr, "Problem with Objectpath %s: %s\n", vals -> val_value, msg);
exit(0);
}
}
}
}
}
return data;
}
static void sfcb_add_version(FILE * f, unsigned short opt, int endianMode)
{
ClVersionRecord rec;
long size;
rec = ClBuildVersionRecord(opt, endianMode, &size);
fwrite(&rec,size,1,f);
}
static int skipQuals(qual_chain* quals) {
if (sfcb_options & BACKEND_SFCB_NO_QUALIFIERS) {
return (quals->qual_qual->qual_type.type_base == BaseTypeSTRING);
}
if (sfcb_options & BACKEND_SFCB_REDUCED_QUALIFIERS) {
return (strcasecmp("description",quals->qual_id) == 0 ||
strcasecmp("arraytype",quals->qual_id) == 0 ||
strcasecmp("deprecated",quals->qual_id) == 0 ||
strcasecmp("mappingstrings",quals->qual_id) == 0 ||
strcasecmp("punit",quals->qual_id) == 0 ||
strcasecmp("umlpackagepath",quals->qual_id) == 0 ||
strcasecmp("units",quals->qual_id) == 0 ||
strcasecmp("version",quals->qual_id) == 0 ||
strcasecmp("valuemap",quals->qual_id) == 0 ||
strcasecmp("values",quals->qual_id) == 0);
}
return 0;
}
static int sfcb_add_class(FILE * f, hashentry * he, class_entry * ce, int endianMode)
{
/* SFCB related */
ClClass * sfcbClass;
ClClass * sfcbClassRewritten;
ClProperty * sfcbProp;
ClMethod * sfcbMeth;
ClParameter * sfcbParam;
CMPIParameter param;
CMPIData data;
int prop_id;
int meth_id;
int meth_param_id;
int size;
/* Symtab related */
qual_chain * quals = ce -> class_quals;
prop_chain * props = ce -> class_props;
method_chain * meths = ce -> class_methods;
param_chain * meth_params;
/* postfix processing - recursive */
if ( ce -> class_parent) {
sfcb_add_class( f, he, ce -> class_parent, endianMode );
}
if ( htlookup(he, upstrdup(ce -> class_id, strlen(ce -> class_id)),
strlen(ce -> class_id)) == NULL ) {
if (sfcb_options & BACKEND_VERBOSE) {
fprintf(stderr," adding class %s \n", ce -> class_id );
}
/* remember we did this class already */
htinsert(he, upstrdup(ce -> class_id, strlen(ce -> class_id)), strlen(ce -> class_id), (void *)1);
sfcbClass = ClClassNew( ce -> class_id,
ce -> class_parent ?
ce -> class_parent -> class_id : NULL );
if (sfcbClass == NULL) {
fprintf(stderr,"Error: could not create SFCB class for %s\n",ce -> class_id);
return 1;
}
while (quals) {
if (sfcb_options & BACKEND_VERBOSE) {
fprintf(stderr," adding qualifier %s for class %s \n",
quals -> qual_id, ce -> class_id );
}
if (!skipQuals(quals)) {
ClClassAddQualifier(&sfcbClass->hdr, &sfcbClass->qualifiers, quals->qual_id,
make_cmpi_data(quals->qual_qual->qual_type,
quals->qual_qual->qual_array,
quals->qual_vals));
}
quals = quals -> qual_next;
}
while (props) {
if (sfcb_options & BACKEND_VERBOSE) {
if (props->prop_attr & PROPERTY_KEY)
fprintf(stderr," adding key property %s for class %s \n",
props -> prop_id, ce -> class_id );
else
fprintf(stderr," adding property %s for class %s \n",
props -> prop_id, ce -> class_id );
}
data = make_cmpi_data(props->prop_type, props->prop_array, props->prop_value);
prop_id = ClClassAddProperty(sfcbClass, props->prop_id,
data, data.type == CMPI_ref ? props->prop_type.type_ref->class_id : NULL);
if (prop_id == 0) {
fprintf(stderr,"Error: could not add SFCB class property %s for %s\n",
props -> prop_id, ce -> class_id);
return 1;
}
quals = props -> prop_quals;
sfcbProp=((ClProperty*)ClObjectGetClSection(&sfcbClass->hdr,&sfcbClass->properties))+prop_id-1;
while (quals) {
if (!skipQuals(quals)) {
if (sfcb_options & BACKEND_VERBOSE) {
fprintf(stderr," adding qualifier %s for property %s in class %s\n",
quals -> qual_id, props -> prop_id, ce -> class_id );
}
ClClassAddPropertyQualifier(&sfcbClass->hdr, sfcbProp, quals->qual_id,
make_cmpi_data(quals->qual_qual->qual_type,
quals->qual_qual->qual_array,
quals->qual_vals));
}
quals = quals -> qual_next;
}
props = props -> prop_next;
}
while (meths) {
meth_id = ClClassAddMethod(sfcbClass, meths->method_id,
make_cmpi_type(meths->method_type, meths->method_array));
quals = meths->method_quals;
sfcbMeth=((ClMethod*)ClObjectGetClSection(&sfcbClass->hdr,&sfcbClass->methods))+meth_id-1;
while(quals) {
if (!skipQuals(quals)) {
ClClassAddMethodQualifier(&sfcbClass->hdr, sfcbMeth, quals->qual_id,
make_cmpi_data(quals->qual_qual->qual_type,
quals->qual_qual->qual_array,
quals->qual_vals));
}
quals = quals->qual_next;
}
meth_params = meths->method_params;
while(meth_params && meth_params->param_id) {
param.type = make_cmpi_type(meth_params->param_type, meth_params->param_array);
param.arraySize = meth_params->param_array;
if((param.type == CMPI_ref || param.type == CMPI_refA) && meth_params->param_type.type_ref) {
param.refName = meth_params->param_type.type_ref->class_id;
} else {
param.refName = NULL;
}
meth_param_id = ClClassAddMethParameter(&sfcbClass->hdr,
sfcbMeth,
meth_params->param_id,
param);
quals = meth_params->param_quals;
sfcbParam=((ClParameter*)ClObjectGetClSection(&sfcbClass->hdr,&sfcbMeth->parameters))+meth_param_id-1;
while(quals) {
if (!skipQuals(quals)) {
ClClassAddMethParamQualifier(&sfcbClass->hdr, sfcbParam, quals->qual_id,
make_cmpi_data(quals->qual_qual->qual_type,
quals->qual_qual->qual_array,
quals->qual_vals));
}
quals = quals->qual_next;
}
meth_params = meth_params->param_next;
}
meths = meths->method_next;
}
sfcbClassRewritten = ClClassRebuildClass(sfcbClass,NULL);
if (opt_reduced) {
sfcbClassRewritten->hdr.type = HDR_IncompleteClass;
}
size=sfcbClassRewritten->hdr.size;
if (swapMode) {
void *tmp=sfcbClassRewritten;
sfcbClassRewritten = swapEntryClass(sfcbClassRewritten,&size);
free(tmp);
}
fwrite(sfcbClassRewritten,size,1,f);
free(sfcbClassRewritten);
}
return 0;
}
CMPIObjectPath * mofc_getObjectPath(class_entry * ce, class_entry * ie, const char * ns)
{
prop_chain * classprop = ce->class_props;
prop_chain * tempprop = NULL;
CMPIObjectPath *path;
CMPIData data;
path = NewCMPIObjectPath(ns, ie->class_id, NULL);
while(classprop) {
if(classprop->prop_attr & PROPERTY_KEY) { //found key - see if it's defined in the instance
// fprintf(stderr, " getOP: adding a key\n");
tempprop = check_for_prop(ie, classprop->prop_id);
if (opt_reduced && !tempprop) {
// fprintf(stderr, " getOP: prop not found; checking parent\n");
tempprop = check_for_parent_prop(ie, classprop->prop_id);
// if (tempprop) fprintf(stderr, " getOP: found prop in parent");
}
if (tempprop) {
data = make_cmpi_data(classprop->prop_type, classprop->prop_array, tempprop->prop_value);
path->ft->addKey(path, tempprop->prop_id, &data.value, data.type);
} else {
//should not happen since keys have been checked before
fprintf(stderr," not all keys defined for %s\n", ce->class_id);
}
}
classprop = classprop->prop_next;
}
return path;
}
#ifdef HAVE_QUALREP
int sfcb_add_qualifier(qual_entry * q, const char * ns)
{
ClQualifierDeclaration * qual;
CMPIQualifierDecl * cmpi_qual = malloc(sizeof(CMPIQualifierDecl));
void * blob;
int len, size;
CMPIData d;
qual = ClQualifierDeclarationNew(ns, q->qual_id);
qual->type = make_cmpi_type(q->qual_type, q->qual_array);
d = make_cmpi_data(q->qual_type, q->qual_array, q->qual_defval);
ClQualifierAddQualifier(&qual->hdr, &qual->qualifierData, q->qual_id, d);
//negate the 2 to match obejctImpl's representation
if(q->qual_attrs.flavor & Qual_F_DisableOverride)
q->qual_attrs.flavor &= ~ Qual_F_DisableOverride;
else
q->qual_attrs.flavor |= Qual_F_DisableOverride;
if(q->qual_attrs.flavor & Qual_F_Restricted)
q->qual_attrs.flavor &= ~ Qual_F_Restricted;
else
q->qual_attrs.flavor |= Qual_F_Restricted;
qual->flavor = q->qual_attrs.flavor;
qual->scope = q->qual_attrs.scope;
cmpi_qual->hdl=qual;
len=getQualifierSerializedSize(cmpi_qual);
blob=malloc(len);
getSerializedQualifier(cmpi_qual,blob);
if (swapMode) {
size=((ClQualifierDeclaration *)((CMPIQualifierDecl * )blob)->hdl)->hdr.size;
int offset = len-size;
qual = swapEntryQualifier(blob+offset,&size);
len = offset + size;
blob = realloc(blob, len);
memcpy(blob+offset, qual, size);
free(qual);
}
if (addBlob((char*)ns, "qualifiers", q->qual_id, blob,(int)len)) {
fprintf(stderr,"could not write qualifier %s\n",q->qual_id);
return 1;
}
free(blob);
return 0;
}
#endif // HAVE_QUALREP
int sfcb_add_instance(class_entry * ie, const char * ns)
{
void * blob;
int len, size;
CMPIData data;
class_entry * ce=NULL; //class definition for instance ie
CMPIObjectPath * path;
ClInstance * inst;
CMPIInstance* cmpi_instance = malloc(sizeof(CMPIInstance));
prop_chain * class_prop;
prop_chain * inst_props = ie -> class_props;
ce = get_class_def_for_instance(ie);
if(!ce) {
//class def not found
fprintf(stderr,"class definition for %s not found\n",
ie->class_id);
return 1;
}
path = mofc_getObjectPath(ce, ie, ns);
// fprintf(stderr, "add_inst: OP= %s\n", CMGetCharPtr(path->ft->toString(path, NULL)));
if (ie->instmig)
inst = ClInstanceNew(ns, ie->class_id);
else
inst = ClInstanceNewFromMof(ns, ie->class_id);
while (inst_props) {
if (sfcb_options & BACKEND_VERBOSE) {
fprintf(stderr,"add_inst: adding property %s for instance %s \n",
inst_props -> prop_id, ie -> class_id );
}
class_prop = check_for_prop(ce, inst_props->prop_id);
if (!class_prop && opt_reduced) {
class_prop = check_for_parent_prop(ce, inst_props->prop_id);
}
if (!class_prop) {
fprintf(stderr, "bad property name \"%s\" for %s\n", inst_props->prop_id, inst_props->prop_class);
return 1;
}
data = make_cmpi_data(class_prop->prop_type, class_prop->prop_array, inst_props->prop_value);
ClInstanceAddProperty(inst, inst_props->prop_id, data);
inst_props = inst_props->prop_next;
}
cmpi_instance->hdl=inst;
len=getInstanceSerializedSize(cmpi_instance);
blob=malloc(len);
getSerializedInstance(cmpi_instance,blob);
if (swapMode) {
size=((ClInstance *)((CMPIInstance * )blob)->hdl)->hdr.size;
int offset = len-size;
inst = swapEntryInstance(blob+offset,&size);
len = offset + size;
blob = realloc(blob, len);
memcpy(blob+offset, inst, size);
free(inst);
}
if (addBlob((char*)ns,ie->class_id,normalizeObjectPathChars(path),blob,(int)len)) {
fprintf(stderr,"could not write instance for class definition %s\n",ie->class_id);
return 1;
}
free(blob);
return 0;
}
int backend_sfcb(class_chain * cls_chain, class_chain * inst_chain, qual_chain * qual_chain,
const char * outfile, const char * outdir,
const char * ns, unsigned options, const char * extraopts)
{
hashentry * classes_done = htcreate("SFCB");
short test = 1;
char *tp = (char*)&test;
struct utsname uName;
static int ix86=1,first=1;
FILE * class_file = NULL;// = fopen(outfile, "w");
if(cls_chain && cls_chain->class_item) {
class_file = fopen(outfile, "w");
}
if(outdir)
repfn = strdup(outdir);
else
repfn = strdup("./");
if (first) {
uname(&uName);
if (uName.machine[0]!='i' || strcmp(uName.machine+2,"86")!=0) ix86=0;
first=0;
}
/*if (class_file == NULL) {
return 1;
}*/
sfcb_options = options;
if (strchr(extraopts,'Q')) {
sfcb_options |= BACKEND_SFCB_NO_QUALIFIERS;
sfcb_options |= BACKEND_SFCB_REDUCED_QUALIFIERS;
} else if (strchr(extraopts,'q')) {
sfcb_options |= BACKEND_SFCB_REDUCED_QUALIFIERS;
if (sfcb_options & BACKEND_VERBOSE) {
fprintf(stderr," information: omitting selected qualifiers.\n");
}
}
if (tp[0]==1) endianMode = SFCB_LITTLE_ENDIAN;
else if (tp[1]==1) endianMode = SFCB_BIG_ENDIAN;
if (strstr(extraopts,"P32")) {
if (ix86) {
char libName[]="libsfcObjectImplSwapI32toP32.so";
char entryNameClass[]="swapI32toP32Class";
char entryNameInstance[]="swapI32toP32Instance";
char entryNameQualifier[]="swapI32toP32QualifierDeclaration";
char *error;
endianMode=SFCB_BIG_ENDIAN;
swapLib=dlopen(libName, RTLD_LAZY);
if (swapLib==NULL) {
fprintf (stderr, "--- swap library not found - %s\n", dlerror());
exit(16);
}
dlerror();
swapEntryClass = dlsym(swapLib, entryNameClass);
swapEntryInstance = dlsym(swapLib, entryNameInstance);
swapEntryQualifier = dlsym(swapLib, entryNameQualifier);
if ((error = dlerror()) != NULL) {
fprintf (stderr, "--- swap library entry not found - %s\n", error);
exit(16);
}
swapMode=1;
}
else {
fprintf(stderr,"--- backend_sfcb: P32 option can only be used on ix86 class machines\n");
exit(16);
}
}
if(class_file) {
int rep_type = (opt_reduced) ? ClTypeClassReducedRep : ClTypeClassRep;
sfcb_add_version(class_file, rep_type, endianMode);
}
while (cls_chain && cls_chain->class_item) {
if (sfcb_add_class(class_file, classes_done, cls_chain->class_item,endianMode)) {
return 1;
}
cls_chain = cls_chain -> class_next;
}
while (inst_chain && inst_chain->class_item) {
if (sfcb_add_instance(inst_chain->class_item, ns)) {
return 1;
}
inst_chain = inst_chain -> class_next;
}
#ifdef HAVE_QUALREP
while (qual_chain && qual_chain->qual_qual) {
if(sfcb_add_qualifier(qual_chain->qual_qual, ns)) {
return 1;
}
qual_chain = qual_chain -> qual_next;
}
#endif
if(class_file) fclose(class_file);
return 0;
}
backend_type * backend_ptr = backend_sfcb;