Changeset 490 for trunk/zoo-project/zoo-kernel/service.h
- Timestamp:
- Jun 27, 2014, 1:14:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service.h
r474 r490 61 61 #include <string.h> 62 62 #ifndef WIN32 63 #ifndef bool 63 64 #define bool int 65 #endif 66 #ifndef true 64 67 #define true 1 65 68 #define false -1 69 #endif 66 70 #else 67 71 //#include <stdbool.h> … … 422 426 if(hasKey(m,n)==false){ 423 427 map* _cursor=m; 424 if(_cursor->next!=NULL){425 addToMap(_cursor->next,n,v);426 } else427 428 while(_cursor->next!=NULL){ 429 _cursor=_cursor->next; 430 } 431 _cursor->next=createMap(n,v); 428 432 } 429 433 else{ … … 478 482 } 479 483 480 static map* getMapOrFill(map** m,const char *key,c har* value){484 static map* getMapOrFill(map** m,const char *key,const char* value){ 481 485 map* tmp=*m; 482 486 map* tmpMap=getMap(tmp,key); 483 487 if(tmpMap==NULL){ 484 if(tmp!=NULL) 485 addToMap(*m,key,value); 488 if(tmp!=NULL){ 489 addToMap((*m),key,value); 490 } 486 491 else 487 492 (*m)=createMap(key,value); … … 580 585 } 581 586 582 static map* getMapArray(map* m,c har* key,int index){587 static map* getMapArray(map* m,const char* key,int index){ 583 588 char tmp[1024]; 584 589 if(index>0) … … 659 664 addToMap(_cursor->content,"length",tmpLen); 660 665 int i=0; 661 map* tmpSizeI=getMap(tmp->content,tmpV[i]);662 666 for(i=0;i<8;i++){ 663 667 map* tmpVI=getMap(tmp->content,tmpV[i]); … … 887 891 888 892 static void dumpServiceAsYAML(service* s){ 889 int level=0;890 893 int i; 891 894 fprintf(stderr,"# %s\n\n",s->name); … … 905 908 } 906 909 if(s->inputs!=NULL){ 907 fprintf(stderr,"\ninputs:\n" ,s->name);910 fprintf(stderr,"\ninputs:\n"); 908 911 dumpElementsAsYAML(s->inputs); 909 912 } 910 913 if(s->outputs!=NULL){ 911 fprintf(stderr,"\noutputs:\n" ,s->name);914 fprintf(stderr,"\noutputs:\n"); 912 915 dumpElementsAsYAML(s->outputs); 913 916 }
Note: See TracChangeset
for help on using the changeset viewer.