platform/pocketpc.c
changeset 754 e7cd7411eadf
parent 747 3da194b12f43
child 763 efadd9cdb6a4
equal deleted inserted replaced
753:ad9d219dcb59 754:e7cd7411eadf
   294 } /* __PHYSFS_platformTimeslice */
   294 } /* __PHYSFS_platformTimeslice */
   295 
   295 
   296 
   296 
   297 void __PHYSFS_platformEnumerateFiles(const char *dirname,
   297 void __PHYSFS_platformEnumerateFiles(const char *dirname,
   298                                      int omitSymLinks,
   298                                      int omitSymLinks,
   299                                      PHYSFS_StringCallback callback,
   299                                      PHYSFS_EnumFilesCallback callback,
       
   300                                      const char *origdir,
   300                                      void *callbackdata)
   301                                      void *callbackdata)
   301 {
   302 {
   302     HANDLE dir;
   303     HANDLE dir;
   303     WIN32_FIND_DATA ent;
   304     WIN32_FIND_DATA ent;
   304     char *SearchPath;
   305     char *SearchPath;
   344         /* !!! FIXME: avoid malloc in UnicodeToAsc? */
   345         /* !!! FIXME: avoid malloc in UnicodeToAsc? */
   345         str = UnicodeToAsc(ent.cFileName);
   346         str = UnicodeToAsc(ent.cFileName);
   346         if (str == NULL)
   347         if (str == NULL)
   347             break;
   348             break;
   348 
   349 
   349         callback(callbackdata, str);
   350         callback(callbackdata, origdir, str);
   350         allocator.Free(str);
   351         allocator.Free(str);
   351     } while (FindNextFile(dir, &ent) != 0);
   352     } while (FindNextFile(dir, &ent) != 0);
   352 
   353 
   353     FindClose(dir);
   354     FindClose(dir);
   354 } /* __PHYSFS_platformEnumerateFiles */
   355 } /* __PHYSFS_platformEnumerateFiles */