archivers/dir.c
changeset 138 3af38f5bd54d
parent 137 66bddb94b6e0
child 214 19846c18071b
equal deleted inserted replaced
137:66bddb94b6e0 138:3af38f5bd54d
   242                           const FileFunctions *fileFuncs)
   242                           const FileFunctions *fileFuncs)
   243 {
   243 {
   244     char *f = __PHYSFS_platformCvtToDependent((char *)(h->opaque), name, NULL);
   244     char *f = __PHYSFS_platformCvtToDependent((char *)(h->opaque), name, NULL);
   245     void *rc;
   245     void *rc;
   246     FileHandle *retval;
   246     FileHandle *retval;
   247     char *str;
       
   248 
   247 
   249     BAIL_IF_MACRO(f == NULL, NULL, NULL);
   248     BAIL_IF_MACRO(f == NULL, NULL, NULL);
   250 
   249 
   251     retval = (FileHandle *) malloc(sizeof (FileHandle));
   250     retval = (FileHandle *) malloc(sizeof (FileHandle));
   252     if (!retval)
   251     if (!retval)
   259     free(f);
   258     free(f);
   260 
   259 
   261     if (!rc)
   260     if (!rc)
   262     {
   261     {
   263         free(retval);
   262         free(retval);
   264         BAIL_MACRO(str, NULL);
   263         return(NULL);
   265     } /* if */
   264     } /* if */
   266 
   265 
   267     retval->opaque = (void *) rc;
   266     retval->opaque = (void *) rc;
   268     retval->dirHandle = h;
   267     retval->dirHandle = h;
   269     retval->funcs = fileFuncs;
   268     retval->funcs = fileFuncs;