[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/physfs/archivers dir.c,1.1.1.1.6.3,1.1.1.
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/physfs/archivers dir.c,1.1.1.1.6.3,1.1.1.1.6.4 grp.c,1.1.1.1.6.4,1.1.1.1.6.5 zip.c,1.1.1.1.6.6,1.1.1.1.6.7 |
Date: |
Tue, 30 Jul 2002 16:50:29 -0400 |
Update of /cvsroot/paragui/paragui/src/physfs/archivers
In directory subversions:/tmp/cvs-serv15063/src/physfs/archivers
Modified Files:
Tag: devel-1-0
dir.c grp.c zip.c
Log Message:
physfs sync
memleaks fixed
fixed callbacks within modal loops
Index: dir.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/dir.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
*** dir.c 1 Jul 2002 17:15:22 -0000 1.1.1.1.6.3
--- dir.c 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.4
***************
*** 47,50 ****
--- 47,59 ----
+ const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR =
+ {
+ "",
+ DIR_ARCHIVE_DESCRIPTION,
+ "Ryan C. Gordon <address@hidden>",
+ "http://icculus.org/physfs/",
+ };
+
+
static const FileFunctions __PHYSFS_FileFunctions_DIR =
{
***************
*** 73,76 ****
--- 82,86 ----
const DirFunctions __PHYSFS_DirFunctions_DIR =
{
+ &__PHYSFS_ArchiveInfo_DIR,
DIR_isArchive, /* isArchive() method */
DIR_openArchive, /* openArchive() method */
***************
*** 87,102 ****
DIR_dirClose /* dirClose() method */
};
-
-
- /* This doesn't get listed, since it's technically not an archive... */
- #if 0
- const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR =
- {
- "DIR",
- "non-archive directory I/O",
- "Ryan C. Gordon <address@hidden>",
- "http://www.icculus.org/physfs/",
- };
- #endif
--- 97,100 ----
Index: grp.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/grp.c,v
retrieving revision 1.1.1.1.6.4
retrieving revision 1.1.1.1.6.5
diff -C2 -r1.1.1.1.6.4 -r1.1.1.1.6.5
*** grp.c 25 Jul 2002 07:27:38 -0000 1.1.1.1.6.4
--- grp.c 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.5
***************
*** 91,94 ****
--- 91,103 ----
static FileHandle *GRP_openRead(DirHandle *h, const char *name);
+ const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_GRP =
+ {
+ "GRP",
+ GRP_ARCHIVE_DESCRIPTION,
+ "Ryan C. Gordon <address@hidden>",
+ "http://icculus.org/physfs/",
+ };
+
+
static const FileFunctions __PHYSFS_FileFunctions_GRP =
{
***************
*** 105,108 ****
--- 114,118 ----
const DirFunctions __PHYSFS_DirFunctions_GRP =
{
+ &__PHYSFS_ArchiveInfo_GRP,
GRP_isArchive, /* isArchive() method */
GRP_openArchive, /* openArchive() method */
***************
*** 120,131 ****
};
- const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_GRP =
- {
- "GRP",
- "Build engine Groupfile format",
- "Ryan C. Gordon <address@hidden>",
- "http://www.icculus.org/physfs/",
- };
-
--- 130,133 ----
***************
*** 502,505 ****
--- 504,511 ----
static PHYSFS_sint64 GRP_getLastModTime(DirHandle *h, const char *name)
{
+ GRPinfo *info = ((GRPinfo *) h->opaque);
+ if (grp_find_entry(info, name) == NULL)
+ return(-1); /* no such entry. */
+
/* Just return the time of the GRP itself in the physical filesystem. */
return(((GRPinfo *) h->opaque)->last_mod_time);
Index: zip.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/archivers/zip.c,v
retrieving revision 1.1.1.1.6.6
retrieving revision 1.1.1.1.6.7
diff -C2 -r1.1.1.1.6.6 -r1.1.1.1.6.7
*** zip.c 25 Jul 2002 07:27:38 -0000 1.1.1.1.6.6
--- zip.c 30 Jul 2002 20:50:27 -0000 1.1.1.1.6.7
***************
*** 142,149 ****
static FileHandle *ZIP_openRead(DirHandle *h, const char *filename);
static void ZIP_dirClose(DirHandle *h);
-
static int zip_resolve(void *in, ZIPinfo *info, ZIPentry *entry);
static const FileFunctions __PHYSFS_FileFunctions_ZIP =
{
--- 142,156 ----
static FileHandle *ZIP_openRead(DirHandle *h, const char *filename);
static void ZIP_dirClose(DirHandle *h);
static int zip_resolve(void *in, ZIPinfo *info, ZIPentry *entry);
+ const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
+ {
+ "ZIP",
+ ZIP_ARCHIVE_DESCRIPTION,
+ "Ryan C. Gordon <address@hidden>",
+ "http://icculus.org/physfs/",
+ };
+
static const FileFunctions __PHYSFS_FileFunctions_ZIP =
{
***************
*** 160,163 ****
--- 167,171 ----
const DirFunctions __PHYSFS_DirFunctions_ZIP =
{
+ &__PHYSFS_ArchiveInfo_ZIP,
ZIP_isArchive, /* isArchive() method */
ZIP_openArchive, /* openArchive() method */
***************
*** 175,186 ****
};
! const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
{
! "ZIP",
! "PkZip/WinZip/Info-Zip compatible",
! "Ryan C. Gordon <address@hidden>",
! "http://www.icculus.org/physfs/",
! };
--- 183,204 ----
};
!
! static const char *zlib_error_string(int rc)
{
! switch (rc)
! {
! case Z_OK: return(NULL); /* not an error. */
! case Z_STREAM_END: return(NULL); /* not an error. */
! case Z_ERRNO: return(strerror(errno));
! case Z_NEED_DICT: return(ERR_ZLIB_NEED_DICT);
! case Z_DATA_ERROR: return(ERR_ZLIB_DATA_ERROR);
! case Z_MEM_ERROR: return(ERR_ZLIB_MEMORY_ERROR);
! case Z_BUF_ERROR: return(ERR_ZLIB_BUFFER_ERROR);
! case Z_VERSION_ERROR: return(ERR_ZLIB_VERSION_ERROR);
! default: return(ERR_ZLIB_UNKNOWN_ERROR);
! } /* switch */
+ return(NULL);
+ } /* zlib_error_string */
***************
*** 190,228 ****
static int zlib_err(int rc)
{
! const char *err = NULL;
!
! switch (rc)
! {
! case Z_OK:
! case Z_STREAM_END:
! break; /* not errors. */
!
! case Z_ERRNO:
! err = strerror(errno);
! break;
!
! case Z_NEED_DICT:
! err = "zlib: need dictionary";
! break;
! case Z_DATA_ERROR:
! err = "zlib: need dictionary";
! break;
! case Z_MEM_ERROR:
! err = "zlib: memory error";
! break;
! case Z_BUF_ERROR:
! err = "zlib: buffer error";
! break;
! case Z_VERSION_ERROR:
! err = "zlib: version error";
! break;
! default:
! err = "unknown zlib error";
! break;
! } /* switch */
!
! if (err != NULL)
! __PHYSFS_setError(err);
!
return(rc);
} /* zlib_err */
--- 208,214 ----
static int zlib_err(int rc)
{
! const char *str = zlib_error_string(rc);
! if (str != NULL)
! __PHYSFS_setError(str);
return(rc);
} /* zlib_err */
***************
*** 414,417 ****
--- 400,404 ----
free(finfo);
+ free(handle);
return(1);
} /* ZIP_fileClose */
***************
*** 421,425 ****
{
PHYSFS_uint8 buf[256];
! PHYSFS_sint32 i;
PHYSFS_sint64 filelen;
PHYSFS_sint64 filepos;
--- 408,412 ----
{
PHYSFS_uint8 buf[256];
! PHYSFS_sint32 i = 0;
PHYSFS_sint64 filelen;
PHYSFS_sint64 filepos;
***************
*** 427,431 ****
PHYSFS_sint32 totalread = 0;
int found = 0;
! PHYSFS_uint32 extra;
filelen = __PHYSFS_platformFileLength(in);
--- 414,418 ----
PHYSFS_sint32 totalread = 0;
int found = 0;
! PHYSFS_uint32 extra = 0;
filelen = __PHYSFS_platformFileLength(in);
***************
*** 516,520 ****
* first local file record, so it makes for a quick determination.
*/
! BAIL_IF_MACRO(!readui32(in, &sig), NULL, 0);
retval = (sig == ZIP_LOCAL_FILE_SIG);
if (!retval)
--- 503,511 ----
* first local file record, so it makes for a quick determination.
*/
! if(!readui32(in, &sig))
! {
! __PHYSFS_platformClose(in);
! BAIL_IF_MACRO(1, NULL, 0);
! }
retval = (sig == ZIP_LOCAL_FILE_SIG);
if (!retval)
***************
*** 1291,1297 ****
{
char *e_new = info->entries[i].name;
! if ((strncmp(e, e_new, ln) == 0) && (e_new[ln] == '/'))
! continue;
! ptr = NULL;
} /* while */
} /* else */
--- 1282,1287 ----
{
char *e_new = info->entries[i].name;
! if ((strncmp(e, e_new, ln) != 0) || (e_new[ln] != '/'))
! break;
} /* while */
} /* else */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/physfs/archivers dir.c,1.1.1.1.6.3,1.1.1.1.6.4 grp.c,1.1.1.1.6.4,1.1.1.1.6.5 zip.c,1.1.1.1.6.6,1.1.1.1.6.7,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/widgets pgwidget.cpp,1.4.4.8,1.4.4.9
- Next by Date:
[paragui-cvs] CVS: paragui/src/physfs/platform os2.c,NONE,1.1.2.1 Makefile.am,1.1.1.1.6.6,1.1.1.1.6.7 beos.cpp,1.1.2.5,1.1.2.6 macclassic.c,1.1.2.5,1.1.2.6 posix.c,1.1.2.4,1.1.2.5 unix.c,1.1.1.1.6.6,1.1.1.1.6.7 win32.c,1.1.1.1.6.13,1.1.1.1.6.14
- Previous by thread:
[paragui-cvs] CVS: paragui/src/widgets pgwidget.cpp,1.4.4.8,1.4.4.9
- Next by thread:
[paragui-cvs] CVS: paragui/src/physfs/platform os2.c,NONE,1.1.2.1 Makefile.am,1.1.1.1.6.6,1.1.1.1.6.7 beos.cpp,1.1.2.5,1.1.2.6 macclassic.c,1.1.2.5,1.1.2.6 posix.c,1.1.2.4,1.1.2.5 unix.c,1.1.1.1.6.6,1.1.1.1.6.7 win32.c,1.1.1.1.6.13,1.1.1.1.6.14
- Index(es):