archive_zip.c
changeset 879 c2afc800b743
parent 859 71d3c2f7a5f9
equal deleted inserted replaced
878:88fa43d9788d 879:c2afc800b743
  1018     PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((version >> 8) & 0xFF);
  1018     PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((version >> 8) & 0xFF);
  1019 
  1019 
  1020     switch (hosttype)
  1020     switch (hosttype)
  1021     {
  1021     {
  1022             /*
  1022             /*
  1023              * These are the platforms that can NOT build an archive with
  1023              * These are the platforms that CANNOT build an archive with
  1024              *  symlinks, according to the Info-ZIP project.
  1024              *  symlinks, according to the Info-ZIP project.
  1025              */
  1025              */
  1026         case 0:  /* FS_FAT_  */
  1026         case 0:  /* FS_FAT_  */
  1027         case 1:  /* AMIGA_   */
  1027         case 1:  /* AMIGA_   */
  1028         case 2:  /* VMS_     */
  1028         case 2:  /* VMS_     */
  1669                 rc = -1;
  1669                 rc = -1;
  1670             else if ('/' > ch)
  1670             else if ('/' > ch)
  1671                 rc = 1;
  1671                 rc = 1;
  1672             else 
  1672             else 
  1673             {
  1673             {
  1674                 if (stop_on_first_find) /* Just checking dir's existance? */
  1674                 if (stop_on_first_find) /* Just checking dir's existence? */
  1675                     return(middle);
  1675                     return(middle);
  1676 
  1676 
  1677                 if (name[dlen + 1] == '\0') /* Skip initial dir entry. */
  1677                 if (name[dlen + 1] == '\0') /* Skip initial dir entry. */
  1678                     return(middle + 1);
  1678                     return(middle + 1);
  1679 
  1679 
  1692     return(retval);
  1692     return(retval);
  1693 } /* zip_find_start_of_dir */
  1693 } /* zip_find_start_of_dir */
  1694 
  1694 
  1695 
  1695 
  1696 /*
  1696 /*
  1697  * Moved to seperate function so we can use alloca then immediately throw
  1697  * Moved to separate function so we can use alloca then immediately throw
  1698  *  away the allocated stack space...
  1698  *  away the allocated stack space...
  1699  */
  1699  */
  1700 static void doEnumCallback(PHYSFS_EnumFilesCallback cb, void *callbackdata,
  1700 static void doEnumCallback(PHYSFS_EnumFilesCallback cb, void *callbackdata,
  1701                            const char *odir, const char *str, PHYSFS_sint32 ln)
  1701                            const char *odir, const char *str, PHYSFS_sint32 ln)
  1702 {
  1702 {