Changeset 627 for trunk/zoo-project/zoo-kernel/service.h
- Timestamp:
- Apr 11, 2015, 2:40:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service.h
r623 r627 637 637 638 638 /** 639 * Add a key and an integer value to an existing map. 640 * 641 * @param m the map to add the KVP 642 * @param n the key to add 643 * @param v the corresponding value to add 644 */ 645 static void addIntToMap(map* m,const char* n,const int v){ 646 char svalue[10]; 647 sprintf(svalue,"%d",v); 648 if(hasKey(m,n)==false){ 649 map* _cursor=m; 650 while(_cursor->next!=NULL){ 651 _cursor=_cursor->next; 652 } 653 _cursor->next=createMap(n,svalue); 654 } 655 else{ 656 map *tmp=getMap(m,n); 657 if(tmp->value!=NULL) 658 free(tmp->value); 659 tmp->value=zStrdup(svalue); 660 } 661 } 662 663 /** 639 664 * Add a key and a binary value to an existing map. 640 665 * … … 1010 1035 } 1011 1036 1012 char *tmpV[1 1]={1037 char *tmpV[12]={ 1013 1038 (char*)"size", 1014 1039 (char*)"value", 1015 1040 (char*)"uom", 1016 1041 (char*)"Reference", 1042 (char*)"Order", 1017 1043 (char*)"cache_file", 1018 1044 (char*)"fmimeType", … … 1026 1052 addToMap(_cursor->content,"length",tmpLen); 1027 1053 int i=0; 1028 for(i=0;i<1 1;i++){1054 for(i=0;i<12;i++){ 1029 1055 map* tmpVI=getMap(tmp->content,tmpV[i]); 1030 1056 if(tmpVI!=NULL){
Note: See TracChangeset
for help on using the changeset viewer.