Ignore:
Timestamp:
Jan 6, 2011, 11:19:42 AM (13 years ago)
Author:
djay
Message:

Add binary files support for DataInputs?. Managing this binary format for the Python language, this should resolve the GRASS support in case of binary DataInputs?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/zoo_service_loader.c

    r57 r58  
    953953                InternetReadFile(res, (LPVOID)tmpContent,res.nDataLen, &dwRead);
    954954                map* tmpMap=getMap(tmpmaps->content,"value");
    955                 if(tmpMap!=NULL)
    956                   tmpMap->value=strdup(tmpContent);
     955                if(tmpMap!=NULL){
     956                  tmpMap->value=(char*)malloc((res.nDataLen+1)*sizeof(char));
     957                  memmove(tmpMap->value,tmpContent,(res.nDataLen)*sizeof(char));
     958                  tmpMap->value[res.nDataLen]=0;
     959                  fprintf(stderr,"%d = %d ?\n",res.nDataLen/sizeof(char),strlen(tmpContent));
     960                  if(strlen(tmpContent)!=res.nDataLen/sizeof(char)){
     961                    char tmp[256];
     962                    sprintf(tmp,"%d",res.nDataLen);
     963                    addToMap(tmpmaps->content,"size",tmp);
     964                  }
     965                  /*FILE* fd=fopen("/tmp/test.png","w");
     966                  fwrite(tmpContent,1,(res.nDataLen)*sizeof(char),fd);
     967                  fclose(fd);
     968                  dumpMap(tmpMap);*/
     969                }
    957970                free(tmpContent);
    958971              }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

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