| | |
| | | // vals=(char *)values; |
| | | unsigned long data_len=0; |
| | | ts_double *curv_values=(double *)ts_decompress((unsigned char *)values,strlen((char *)values), &data_len); |
| | | data_len=data_len/sizeof(ts_double); |
| | | // token=strtok(vals," "); |
| | | for(idx=0;idx<data_len;idx++){ |
| | | // while(token!=NULL){ |
| | |
| | | //idx++; |
| | | //token=strtok(NULL," "); |
| | | } |
| | | |
| | | xmlFree(values); |
| | | free(curv_values); |
| | | } |
| | | xmlFree(property_name); |
| | | } |
| | |
| | | xmlNodePtr child = cur->xmlChildrenNode; |
| | | xmlChar *points; |
| | | // char *pts; |
| | | int idx, polyidx, monoidx, filidx, fonoidx; |
| | | int i,idx, polyidx, monoidx, filidx, fonoidx; |
| | | // char *token[3]; |
| | | while (child != NULL) { |
| | | if ((!xmlStrcmp(child->name, (const xmlChar *)"DataArray"))){ |
| | | points = xmlNodeListGetString(doc, child->xmlChildrenNode, 1); |
| | | unsigned long data_len=0; |
| | | ts_double *coords=(double *)ts_decompress((unsigned char *)points,strlen((char *)points), &data_len); |
| | | data_len=data_len/sizeof(ts_double); |
| | | //pts=(char *)points; |
| | | //token[0]=strtok(pts," "); |
| | | //token[1]=strtok(NULL," "); |
| | | //token[2]=strtok(NULL,"\n"); |
| | | for(idx=0;idx<data_len;idx+=3){ |
| | | for(i=0,idx=0;i<data_len;i+=3,idx++){ |
| | | // while(token[0]!=NULL){ |
| | | if(idx<vesicle->vlist->n){ |
| | | vesicle->vlist->vtx[idx]->x=coords[idx];//atof(token[0]); |
| | |
| | | xmlNodePtr child = cur->xmlChildrenNode; |
| | | xmlChar *bonds, *conname; |
| | | // char *b; |
| | | int idx, polyidx; |
| | | int i,idx, polyidx; |
| | | // char *token[2]; |
| | | // int temp_cnt=0; |
| | | while (child != NULL) { |
| | |
| | | bonds = xmlNodeListGetString(doc, child->xmlChildrenNode, 1); |
| | | unsigned long data_len=0; |
| | | unsigned long *conn=(unsigned long *)ts_decompress((unsigned char *)bonds,strlen((char *)bonds), &data_len); |
| | | data_len=data_len/sizeof(unsigned long); |
| | | //token[0]=strtok(b," "); |
| | | //token[1]=strtok(NULL,"\n"); |
| | | for(idx=0;idx<data_len;idx+=2){ |
| | | for(i=0,idx=0;i<data_len;i+=2,idx++){ |
| | | // while(token[0]!=NULL){ |
| | | if(idx<3*(vesicle->vlist->n-2)){ |
| | | bond_add(vesicle->blist, vesicle->vlist->vtx[conn[idx]], vesicle->vlist->vtx[conn[idx+1]]); |