paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/physfs/archivers zip.c,1.1.1.1.6.3,1.1.1.


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/physfs/archivers zip.c,1.1.1.1.6.3,1.1.1.1.6.4
Date: Wed, 17 Jul 2002 10:48:36 -0400

Update of /cvsroot/paragui/paragui/src/physfs/archivers
In directory subversions:/tmp/cvs-serv30866/src/physfs/archivers

Modified Files:
      Tag: devel-1-0
        zip.c 
Log Message:
physfs update

Index: zip.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/zip.c,v
retrieving revision 1.1.1.1.6.3
retrieving revision 1.1.1.1.6.4
diff -C2 -r1.1.1.1.6.3 -r1.1.1.1.6.4
*** zip.c       15 Jul 2002 08:15:37 -0000      1.1.1.1.6.3
--- zip.c       17 Jul 2002 14:48:32 -0000      1.1.1.1.6.4
***************
*** 95,98 ****
--- 95,102 ----
  
  
+ #define UNIX_FILETYPE_MASK    0170000
+ #define UNIX_FILETYPE_SYMLINK 0120000
+ 
+ 
  #define MAXZIPENTRYSIZE 256  /* !!! FIXME: get rid of this. */
  
***************
*** 618,630 ****
      PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((version >> 8) & 0xFF);
  
-     /*
-      * These are the platforms that can build an archive with symlinks,
-      *  according to the Info-ZIP project.
-      */
      switch (hosttype)
      {
!         case 3:   /* Unix  */
!         case 16:  /* BeOS  */
!         case 5:   /* Atari */
              retval = 1;
              break;
--- 622,644 ----
      PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((version >> 8) & 0xFF);
  
      switch (hosttype)
      {
!             /*
!              * These are the platforms that can NOT build an archive with
!              *  symlinks, according to the Info-ZIP project.
!              */
!         case 0:  /* FS_FAT_  */
!         case 1:  /* AMIGA_   */
!         case 2:  /* VMS_     */
!         case 4:  /* VM_CSM_  */
!         case 6:  /* FS_HPFS_ */
!         case 11: /* FS_NTFS_ */
!         case 14: /* FS_VFAT_ */
!         case 13: /* ACORN_   */
!         case 15: /* MVS_     */
!         case 18: /* THEOS_   */
!             break;  /* do nothing. */
! 
!         default:  /* assume the rest to be unix-like. */
              retval = 1;
              break;
***************
*** 637,649 ****
  static int entry_is_symlink(ZIPentry *entry, PHYSFS_uint32 extern_attr)
  {
      return (
                (version_does_symlinks(entry->version)) &&
                (entry->uncompressed_size > 0) &&
! 
!             #if 0 /* !!! FIXME ... this check is incorrect for some files! */
!               (extern_attr & 0x0120000)  /* symlink flag. */
!             #else
!               0  /* always fail for now. Symlinks will just be small files. */
!             #endif
             );
  } /* entry_is_symlink */
--- 651,660 ----
  static int entry_is_symlink(ZIPentry *entry, PHYSFS_uint32 extern_attr)
  {
+     PHYSFS_uint16 xattr = ((extern_attr >> 16) & 0xFFFF);
+ 
      return (
                (version_does_symlinks(entry->version)) &&
                (entry->uncompressed_size > 0) &&
!               ((xattr & UNIX_FILETYPE_MASK) == UNIX_FILETYPE_SYMLINK)
             );
  } /* entry_is_symlink */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]