source: trunk/zoo-kernel/service_conf.y @ 73

Last change on this file since 73 was 73, checked in by djay, 13 years ago

Small fix for metadata mixing.

File size: 21.8 KB
Line 
1%{
2//======================================================
3/**
4 * Thx to Jean-Marie CODOL and Naitan GROLLEMUND
5 * copyright 2009 GeoLabs SARL
6 * Author : Gérald FENOY
7 *
8 */
9//======================================================
10
11#include <string>
12#include <stdio.h>
13#include <ctype.h>
14#include <service.h>
15  //#include <vector>
16
17static int tmp_count=1;
18static int defaultsc=0;
19static bool wait_maincontent=true;
20static bool wait_mainmetadata=false;
21static bool wait_metadata=false;
22static bool wait_inputs=false;
23static bool wait_defaults=false;
24static bool wait_supporteds=false;
25static bool wait_outputs=false;
26static bool wait_data=false;
27static int services_c=0;
28static service* my_service=NULL;
29static map* previous_content=NULL;
30static map* current_content=NULL;
31static elements* current_element=NULL;
32static map* scontent=NULL;
33static char* curr_key;
34static int debug=0;
35static int data=-1;
36static int previous_data=0;
37static int current_data=0;
38static char* myFinalObjectAsJSON="{";
39// namespace
40using namespace std;
41//======================================================
42
43// srerror
44void srerror(char *s);
45//======================================================
46
47// usage ()
48void usage(void) ;
49//======================================================
50
51// srdebug
52extern int srdebug;
53//======================================================
54
55extern char srtext[];
56
57// srlineno
58extern int srlineno;
59//======================================================
60
61// srin
62extern FILE* srin;
63//======================================================
64
65// srlex
66extern int srlex(void);
67extern int srlex_destroy(void);
68
69//vector<char*> lattribute;
70
71%}
72
73
74
75%union
76{char * s;char* chaine;char* key;char* val;}
77
78// jetons //
79%token <s> ID
80%token <s> CHAINE
81/* STARTXMLDECL et ENDXMLDECL qui sont <?xml et ?>*/
82%token STARTXMLDECL ENDXMLDECL
83//======================================================
84/* version="xxx" et encoding="xxx" */
85%token VERSIONDECL ENCODINGDECL SDDECL
86//======================================================
87/* < et > */
88%token INFCAR SUPCAR
89//======================================================
90/* / = a1  texte "texte" */
91%token SLASH Eq CHARDATA ATTVALUE PAIR SPAIR EPAIR ANID
92%type <chaine> PAIR
93%type <chaine> EPAIR
94%type <chaine> SPAIR
95//======================================================
96/* <!-- xxx -> <? xxx yyy ?> */
97%token PI PIERROR /** COMMENT **/
98//======================================================
99/* <!-- xxx -> <? xxx yyy ?> */
100%token ERREURGENERALE CDATA WHITESPACE NEWLINE
101%type <s> STag
102%type <s> ETag
103%type <s> ANID
104//======================================================
105// %start
106//======================================================
107
108%%
109// document <//===
110//======================================================
111// regle 1
112// on est a la racine du fichier xml
113//======================================================
114document
115 : miscetoile element miscetoile {}
116 | contentetoile processid contentetoile document {}
117 ;
118
119miscetoile
120 : miscetoile PIERROR {  srerror("processing instruction begining with <?xml ?> impossible\n");}
121 | miscetoile PI {}
122 | {}
123 ;
124// element
125//======================================================
126// regle 39
127// OUVRANTE CONTENU FERMANTE obligatoirement
128// ou neutre
129// on ne peut pas avoir Epsilon
130// un fichier xml ne peut pas etre vide ou seulement avec un prolog
131//======================================================
132element
133 : STag contentetoile ETag     
134{
135}
136
137// pour neutre
138// on a rien a faire, meme pas renvoyer l identificateur de balise
139// vu qu'il n y a pas de comparaison d'identificateurs avec un balise jumelle .
140 | EmptyElemTag          {}
141 ;
142
143//======================================================
144// STag
145//======================================================
146// regle 40
147// BALISE OUVRANTE
148// on est obligé de faire appel a infcar et supcar
149// pour acceder aux start conditions DANSBALISE et INITIAL
150//======================================================
151STag
152: INFCAR ID Attributeetoile SUPCAR
153{
154  if(my_service->content==NULL){
155#ifdef DEBUG_SERVICE_CONF
156    fprintf(stderr,"NO CONTENT\n");
157#endif
158    addMapToMap(&my_service->content,current_content);
159    freeMap(&current_content);
160    free(current_content);
161    current_content=NULL;
162    my_service->metadata=NULL;
163    wait_maincontent=false;
164  }
165  if(strncasecmp($2,"DataInputs",10)==0){
166    if(wait_mainmetadata==true){
167      addMapToMap(&my_service->metadata,current_content);
168      freeMap(&current_content);
169      free(current_content);
170      current_content=NULL;
171    }
172    if(current_element==NULL){
173#ifdef DEBUG_SERVICE_CONF
174      fprintf(stderr,"(DATAINPUTS - 184) FREE current_element\n");
175#endif
176      freeElements(&current_element);
177      free(current_element);
178#ifdef DEBUG_SERVICE_CONF
179      fprintf(stderr,"(DATAINPUTS - 186) ALLOCATE current_element\n");
180#endif
181      current_element=NULL;
182      current_element=(elements*)malloc(ELEMENTS_SIZE);
183      current_element->name=NULL;
184      current_element->content=NULL;
185      current_element->metadata=NULL;
186      current_element->format=NULL;
187      current_element->defaults=NULL;
188      current_element->supported=NULL;
189      current_element->next=NULL;
190    }
191    wait_inputs=true;
192    current_data=1;
193    previous_data=1;
194  }
195  else
196    if(strncasecmp($2,"DataOutputs",11)==0){
197      if(wait_inputs==true){
198#ifdef DEBUG_SERVICE_CONF
199        fprintf(stderr,"(DATAOUTPUTS) DUP INPUTS current_element\n");
200        fprintf(stderr,"CURRENT_ELEMENT\n");
201        dumpElements(current_element);
202        fprintf(stderr,"SERVICE INPUTS\n");
203        dumpElements(my_service->inputs);
204        dumpService(my_service);
205#endif 
206        if(my_service->inputs==NULL){
207          my_service->inputs=dupElements(current_element);
208          my_service->inputs->next=NULL;
209        }
210        else if(current_element!=NULL && current_element->name!=NULL){
211          addToElements(&my_service->inputs,current_element);
212        }
213#ifdef DEBUG_SERVICE_CONF
214        fprintf(stderr,"CURRENT_ELEMENT\n");
215        dumpElements(current_element);
216        fprintf(stderr,"SERVICE INPUTS\n");
217        dumpElements(my_service->inputs);
218        fprintf(stderr,"(DATAOUTPUTS) FREE current_element\n");
219#endif
220        freeElements(&current_element);
221        free(current_element);
222        current_element=NULL;
223        wait_inputs=false;
224      }
225      if(current_element==NULL){
226#ifdef DEBUG_SERVICE_CONF
227        fprintf(stderr,"(DATAOUTPUTS - 206) ALLOCATE current_element (%s)\n",$2);
228#endif
229        current_element=(elements*)malloc(ELEMENTS_SIZE);
230        current_element->name=NULL;
231        current_element->content=NULL;
232        current_element->metadata=NULL;
233        current_element->format=NULL;
234        current_element->defaults=NULL;
235        current_element->supported=NULL;
236        current_element->next=NULL;
237      }
238      wait_outputs=true;
239      current_data=2;
240      previous_data=2;
241    }
242    else
243      if(strncasecmp($2,"MetaData",8)==0){
244        previous_data=current_data;
245        current_data=3;
246        if(current_element!=NULL){
247#ifdef DEBUG_SERVICE_CONF
248          fprintf(stderr,"add current_content to current_element->content\n");
249          fprintf(stderr,"LINE 247");
250#endif
251          addMapToMap(&current_element->content,current_content);
252          freeMap(&current_content);
253          free(current_content);
254          wait_metadata=true;
255        }
256        else{
257          wait_mainmetadata=true;
258        }
259        current_content=NULL;
260      }
261      else
262        if(strncasecmp($2,"ComplexData",11)==0 || strncasecmp($2,"LiteralData",10)==0
263           || strncasecmp($2,"ComplexOutput",13)==0 || strncasecmp($2,"LiteralOutput",12)==0){
264          current_data=4;
265          if(wait_metadata==true){
266            if(current_content!=NULL){
267              addMapToMap(&current_element->metadata,current_content);
268              current_element->next=NULL;
269              current_element->format=strdup($2);
270              current_element->defaults=NULL;
271              current_element->supported=NULL;
272              freeMap(&current_content);
273              free(current_content);
274            }
275          }else{
276            // No MainMetaData
277            addMapToMap(&current_element->content,current_content);
278            freeMap(&current_content);
279            free(current_content);
280            current_element->metadata=NULL;
281            current_element->next=NULL;
282            current_element->format=strdup($2);
283            current_element->defaults=NULL;
284            current_element->supported=NULL;
285          }
286          current_content=NULL;
287          wait_metadata=false;
288        }
289        else
290          if(strncasecmp($2,"Default",7)==0){
291            wait_defaults=true;
292            current_data=5;
293          }
294          else
295            if(strncasecmp($2,"Supported",9)==0){
296              wait_supporteds=true;
297              if(wait_defaults==true){
298                defaultsc++;
299              }
300              current_data=5;
301            }
302#ifdef DEBUG_SERVICE_CONF
303  printf("* Identifiant : %s\n",$2);
304#endif
305}
306 ;
307
308//======================================================
309// Attributeetoile
310//======================================================
311// regle 41
312// une liste qui peut etre vide d'attributs
313// utiliser la récursivité a gauche
314//======================================================
315Attributeetoile
316 : Attributeetoile attribute  {}
317 |                                {/* Epsilon */}
318 ;
319
320//======================================================
321// attribute
322//======================================================
323// regle 41
324// un attribut est compose d'un identifiant
325// d'un "="
326// et d'une définition de chaine de caractere
327// ( "xxx" ou 'xxx' )
328//======================================================
329attribute
330 : ID Eq ATTVALUE               
331{
332#ifdef DEBUG_SERVICE_CONF
333  printf ("attribute : %s\n",$1) ;
334#endif
335}
336 ;
337
338//======================================================
339// EmptyElemTag
340//======================================================
341// regle 44
342// ICI ON DEFINIT NEUTRE
343// on ne renvoie pas de char*
344// parce qu'il n'y a pas de comparaisons a faire
345// avec un identifiant d'une balise jumelle
346//======================================================
347EmptyElemTag
348 : INFCAR ID Attributeetoile SLASH SUPCAR       {/*lattribute.clear();/* voir Stag */}
349 ;
350
351//======================================================
352// ETag
353//======================================================
354// regle 42
355// BALISE FERMANTE
356// les separateurs après ID sont filtrés
357//======================================================
358ETag
359 : INFCAR SLASH ID SUPCAR
360{
361  if(strcmp($3,"DataInputs")==0){
362    current_data=1;
363  }
364  if(strcmp($3,"DataOutputs")==0){
365    current_data=2;
366  }
367  if(strcmp($3,"MetaData")==0){
368    current_data=previous_data;
369    wait_metadata=true;
370  }
371  if(strcmp($3,"ComplexData")==0 || strcmp($3,"LiteralData")==0
372     || strcmp($3,"ComplexOutput")==0 || strcmp($3,"LiteralOutput")==0){
373    current_content=NULL;
374  }
375  if(strcmp($3,"Default")==0){
376    current_data=previous_data;
377    if(current_element->defaults==NULL){
378      current_element->defaults=(iotype*)malloc(IOTYPE_SIZE);
379      current_element->defaults->content=NULL;
380    }
381    addMapToMap(&current_element->defaults->content,current_content);
382    freeMap(&current_content);
383    free(current_content);
384    current_element->defaults->next=NULL;
385    wait_defaults=false;
386    current_content=NULL;
387    current_element->supported=NULL;
388    current_element->next=NULL;
389  }
390  if(strcmp($3,"Supported")==0){
391    current_data=previous_data;
392    if(current_element->supported==NULL){
393      if(current_content!=NULL){
394        current_element->supported=(iotype*)malloc(IOTYPE_SIZE);
395        current_element->supported->content=NULL;
396        addMapToMap(&current_element->supported->content,current_content);
397        freeMap(&current_content);
398        free(current_content);
399        current_element->supported->next=NULL;
400        current_content=NULL;
401      }else{
402        current_element->supported=NULL;
403        current_element->next=NULL;
404      }
405    }
406    else{
407#ifdef DEBUG_SERVICE_CONF
408      fprintf(stderr,"SECOND SUPPORTED FORMAT !!!!\n");
409#endif
410      addMapToIoType(&current_element->supported,current_content);
411      freeMap(&current_content);
412      free(current_content);
413      current_content=NULL;
414#ifdef DEBUG_SERVICE_CONF
415      dumpElements(current_element);
416      fprintf(stderr,"SECOND SUPPORTED FORMAT !!!!\n");
417#endif
418    }
419    current_content=NULL;
420  }
421}
422 ;
423
424//======================================================
425// contentetoile
426//======================================================
427// regle 43
428// ENTRE 2 BALISES
429// entre 2 balises, on peut avoir :
430// --- OUVRANTE CONTENU FERMANTE (recursivement !)
431// --- DU TEXTE quelconque
432// --- COMMENTS
433// --- DES PROCESSES INSTRUCTIONS
434// --- /!\ il peut y avoir une processing instruction invalide ! <?xml
435// --- EPSILON
436// ### et/ou tout ca a la suite en nombre indeterminé
437// ### donc c'est un operateur etoile (*)
438//======================================================
439contentetoile
440: contentetoile element           {}
441 | contentetoile PIERROR                  {srerror("processing instruction <?xml ?> impossible\n");}
442 | contentetoile PI                       {}
443///// on filtre les commentaires | contentetoile comment              {}
444 | contentetoile NEWLINE {/*printf("NEWLINE FOUND !!");*/}
445 | contentetoile pair {}
446 | contentetoile processid {}
447 | contentetoile texteinterbalise         {}
448 | contentetoile CDATA {} 
449 | {/* Epsilon */}
450 ;
451
452//======================================================
453// texteinterbalise
454//======================================================
455// regle 14
456// DU TEXTE quelconque
457// c'est du CHARDATA
458// il y a eut un probleme avec ID,
459// on a mis des starts conditions,
460// maintenant on croise les ID dans les dbalises
461// et des CHARDATA hors des balises
462//======================================================
463texteinterbalise
464 : CHARDATA             {}
465 ;
466//======================================================
467
468pair: PAIR {  if(debug) fprintf(stderr,"PAIR FOUND !!\n");if(curr_key!=NULL){free(curr_key);curr_key=NULL;} }
469| EPAIR {
470#ifdef DEBUG_SERVICE_CONF
471    fprintf(stderr,"EPAIR FOUND !! \n");
472    fprintf(stderr,"[%s=>%s]\n",curr_key,$1);
473    fprintf(stderr,"[ZOO: service_conf.y line 482 free(%s)]\n",curr_key);
474    dumpMap(current_content);
475    fflush(stderr);
476#endif
477  if(current_content==NULL){
478#ifdef DEBUG_SERVICE_CONF
479    fprintf(stderr,"[ZOO: service_conf.y line 482 free(%s)]\n",curr_key);
480#endif
481    current_content=createMap(curr_key,$1);
482#ifdef DEBUG_SERVICE_CONF
483    fprintf(stderr,"[ZOO: service_conf.y line 482 free(%s)]\n",curr_key);
484#endif
485    //current_content->next=NULL;
486  }
487  else{
488#ifdef DEBUG_SERVICE_CONF
489    dumpMap(current_content);
490    fprintf(stderr,"addToMap(current_content,%s,%s) !! \n",curr_key,$1);
491#endif
492    addToMap(current_content,curr_key,$1);
493#ifdef DEBUG_SERVICE_CONF
494    fprintf(stderr,"addToMap(current_content,%s,%s) end !! \n",curr_key,$1);
495#endif   
496  }
497#ifdef DEBUG_SERVICE_CONF
498  fprintf(stderr,"EPAIR FOUND !! \n");
499  fprintf(stderr,"[%s=>%s]\n",curr_key,$1);
500  fprintf(stderr,"[ZOO: service_conf.y line 505 free(%s)]\n",curr_key);
501  fflush(stderr);
502#endif
503  if(curr_key!=NULL){
504    free(curr_key);
505    curr_key=NULL;
506  }
507  }
508| SPAIR  { curr_key=strdup($1);if(debug) fprintf(stderr,"SPAIR FOUND !!\n"); }
509 ;
510
511
512processid
513: ANID  {
514  if(data==-1){
515    data=1;
516    char *cen=strdup($1);
517    my_service->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
518    cen[strlen(cen)-1]=0;
519    cen+=1;
520    sprintf(my_service->name,"%s",cen);
521    cen-=1;
522    free(cen);
523    my_service->content=NULL;
524    my_service->metadata=NULL;
525    my_service->inputs=NULL;
526    my_service->outputs=NULL;
527  } else {
528    if(current_data==1){
529      if(my_service->content!=NULL && current_element->name!=NULL){
530        if(my_service->inputs==NULL){
531          my_service->inputs=dupElements(current_element);
532          my_service->inputs->next=NULL;
533          tmp_count++;
534        }
535        else{
536          addToElements(&my_service->inputs,current_element);
537        }
538#ifdef DEBUG_SERVICE_CONF
539        fprintf(stderr,"(%s %d)FREE current_element (after adding to allread existing inputs)",__FILE__,__LINE__);
540        dumpElements(current_element);
541        fprintf(stderr,"(%s %d)FREE current_element (after adding to allread existing inputs)",__FILE__,__LINE__);
542        dumpElements(my_service->inputs);
543#endif
544        freeElements(&current_element);
545        free(current_element);
546        current_element=NULL;
547#ifdef DEBUG_SERVICE_CONF
548        fprintf(stderr,"(DATAINPUTS - 489) ALLOCATE current_element\n");
549#endif
550        current_element=(elements*)malloc(ELEMENTS_SIZE);
551        current_element->name=NULL;
552        current_element->content=NULL;
553        current_element->metadata=NULL;
554        current_element->format=NULL;
555        current_element->defaults=NULL;
556        current_element->supported=NULL;
557        current_element->next=NULL;
558      }
559      if(current_element->name==NULL){
560#ifdef DEBUG_SERVICE_CONF
561        fprintf(stderr,"NAME IN %s (current - %s)\n",
562                $1,current_element->name);
563#endif
564        wait_inputs=true;
565#ifdef DEBUG_SERVICE_CONF
566        fprintf(stderr,"(DATAINPUTS - 501) SET NAME OF current_element\n");
567#endif
568        char *cen=strdup($1);
569        current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
570        cen[strlen(cen)-1]=0;
571        cen+=1;
572        sprintf(current_element->name,"%s",cen);
573        cen-=1;
574        free(cen);
575#ifdef DEBUG_SERVICE_CONF
576        fprintf(stderr,"NAME IN %s (current - %s)\n",$1,current_element->name);
577#endif
578        current_element->content=NULL;
579        current_element->metadata=NULL;
580        current_element->format=NULL;
581        current_element->defaults=NULL;
582        current_element->supported=NULL;
583        current_element->next=NULL;
584#ifdef DEBUG_SERVICE_CONF
585        fprintf(stderr,"NAME IN %s (current - %s)\n",$1,current_element->name);
586#endif
587      }
588    }
589    else
590      if(current_data==2){
591        wait_outputs=true;
592        if(wait_inputs){
593          if(current_element!=NULL && current_element->name!=NULL){
594            if(my_service->outputs==NULL){
595              my_service->outputs=dupElements(current_element);
596              my_service->outputs->next=NULL;
597            }
598            else{
599#ifdef DEBUG_SERVICE_CONF
600              fprintf(stderr,"LAST NAME IN %s (current - %s)\n",$1,current_element->name);
601#endif
602              addToElements(&my_service->outputs,current_element);
603            }
604#ifdef DEBUG_SERVICE_CONF
605            dumpElements(current_element);
606            fprintf(stderr,"(DATAOUTPUTS) FREE current_element %s %i\n",__FILE__,__LINE__);
607#endif
608            freeElements(&current_element);
609            free(current_element);
610            current_element=NULL;
611#ifdef DEBUG_SERVICE_CONF
612            fprintf(stderr,"(DATAOUTPUTS) ALLOCATE current_element %s %i\n",__FILE__,__LINE__);
613#endif
614            current_element=(elements*)malloc(ELEMENTS_SIZE);
615            current_element->name=NULL;
616            current_element->content=NULL;
617            current_element->metadata=NULL;
618            current_element->format=NULL;
619            current_element->defaults=NULL;
620            current_element->supported=NULL;
621            current_element->next=NULL;
622          }
623          if(current_element->name==NULL){
624#ifdef DEBUG_SERVICE_CONF
625            fprintf(stderr,"NAME OUT %s\n",$1);
626            fprintf(stderr,"(DATAOUTPUTS - 545) SET NAME OF current_element\n");
627#endif
628            char *cen=strdup($1);
629            current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char));
630            cen[strlen(cen)-1]=0;
631            cen+=1;
632            sprintf(current_element->name,"%s",cen);
633            cen-=1;
634            free(cen);
635            current_element->content=NULL;
636            current_element->metadata=NULL;
637            current_element->format=NULL;
638            current_element->defaults=NULL;
639            current_element->supported=NULL;
640            current_element->next=NULL;
641          }
642
643          current_content=NULL;
644        }
645        else
646          if(current_element!=NULL && current_element->name!=NULL){
647            if(my_service->outputs==NULL)
648              my_service->outputs=dupElements(current_element);
649            else
650              addToElements(&my_service->outputs,current_element);
651            fprintf(stderr,"ADD TO OUTPUTS Elements\n");
652            dupElements(current_element);
653
654            freeElements(&current_element);
655            free(current_element);
656            current_element=NULL;
657          }
658          else{
659#ifdef DEBUG_SERVICE_CONF
660            fprintf(stderr,"NAME OUT %s\n",$1);
661            fprintf(stderr,"(DATAOUTPUTS - 545) SET NAME OF current_element\n");
662#endif
663            char *cen=strdup($1);
664            current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
665            cen[strlen(cen)-1]=0;
666#ifdef DEBUG
667            fprintf(stderr,"tmp %s\n",cen);
668#endif
669            cen+=1;
670            sprintf(current_element->name,"%s",cen);
671            cen-=1;
672            free(cen);
673            current_element->content=NULL;
674            current_element->metadata=NULL;
675            current_element->format=NULL;
676            current_element->defaults=NULL;
677            current_element->supported=NULL;
678            current_element->next=NULL;
679          }
680        wait_inputs=false;
681        wait_outputs=true;
682        //wait_outputs=true;
683      }
684  }
685 }
686 ;
687
688%%
689
690// srerror
691//======================================================
692/* fonction qui affiche l erreur si il y en a une */
693//======================================================
694void srerror(char *s)
695{
696  if(debug)
697    fprintf(stderr,"\nligne %d : %s\n",srlineno,s);
698}
699
700/**
701 * getServiceFromFile :
702 * set service given as second parameter with informations extracted from the
703 * definition file.
704 */
705int getServiceFromFile(char* file,service** service){
706
707  freeMap(&previous_content);
708  previous_content=NULL;
709  freeMap(&current_content);
710  current_content=NULL;
711  freeMap(&scontent);
712#ifdef DEBUG_SERVICE_CONF
713  fprintf(stderr,"(STARTING)FREE current_element\n");
714#endif
715  freeElements(&current_element);
716  free(current_element);
717  current_element=NULL;
718  my_service=NULL;
719  scontent=NULL;
720
721  wait_maincontent=true;
722  wait_mainmetadata=false;
723  wait_metadata=false;
724  wait_inputs=false;
725  wait_defaults=false;
726  wait_supporteds=false;
727  wait_outputs=false;
728  wait_data=false;
729  data=-1;
730  previous_data=1;
731  current_data=0;
732 
733  my_service=*service;
734
735  srin = fopen(file,"r");
736  if (srin==NULL){
737    fprintf(stderr,"error : file not found\n") ;
738    return -1;
739  }
740
741  int resultatYYParse = srparse() ;
742 
743  if(wait_outputs && current_element!=NULL && current_element->name!=NULL){
744    if(my_service->outputs==NULL){     
745#ifdef DEBUG_SERVICE_CONF
746      fprintf(stderr,"(DATAOUTPUTS - 623) DUP current_element\n");
747#endif
748      my_service->outputs=dupElements(current_element);
749      my_service->outputs->next=NULL;
750    }
751    else{
752#ifdef DEBUG_SERVICE_CONF
753      fprintf(stderr,"(DATAOUTPUTS - 628) COPY current_element\n");
754#endif
755      addToElements(&my_service->outputs,current_element);
756    }
757#ifdef DEBUG_SERVICE_CONF
758    fprintf(stderr,"(DATAOUTPUTS - 631) FREE current_element\n");
759#endif
760    freeElements(&current_element);
761    free(current_element);
762    current_element=NULL;
763#ifdef DEBUG_SERVICE_CONF
764    fprintf(stderr,"(DATAOUTPUTS - 631) FREE current_element\n");
765#endif
766  }
767  if(current_element!=NULL){
768    freeElements(&current_element);
769    free(current_element);
770    current_element=NULL;
771  }
772  if(current_content!=NULL){
773    freeMap(&current_content);
774    free(current_content);
775    current_content=NULL;
776  }
777  fclose(srin);
778#ifdef DEBUG_SERVICE_CONF
779  dumpService(my_service);
780#endif
781  *service=my_service;
782
783  srlex_destroy();
784  return resultatYYParse;
785}
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png