Sync up with changes to the ZIPC code.

This commit is contained in:
Michael Sweet 2017-05-28 22:40:08 -04:00
parent 20a4221607
commit 703c0c9917
2 changed files with 14 additions and 7 deletions

4
zipc.c
View File

@ -33,12 +33,10 @@
#include "zipc.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <zlib.h>
@ -889,7 +887,7 @@ zipc_write_local_trailer(
* Update the CRC-32, compressed size, and uncompressed size fields...
*/
fseek(zc->fp, zf->offset + 14, SEEK_SET);
fseek(zc->fp, (long)(zf->offset + 14), SEEK_SET);
status |= zipc_write_u32(zc, zf->crc32);
status |= zipc_write_u32(zc, (unsigned)zf->compressed_size);

9
zipc.h
View File

@ -34,6 +34,7 @@
* Include necessary headers...
*/
# include <stdlib.h>
# include <sys/types.h>
@ -49,6 +50,10 @@ typedef struct _zipc_file_s zipc_file_t;/* File/directory in ZIP container */
* Functions...
*/
# ifdef __cplusplus
extern "C" {
# endif /* __cplusplus */
extern int zipcClose(zipc_t *zc);
extern int zipcCopyFile(zipc_t *zc, const char *dstname, const char *srcname, int text, int compressed);
extern int zipcCreateDirectory(zipc_t *zc, const char *filename);
@ -70,4 +75,8 @@ __attribute__ ((__format__ (__printf__, 2, 3)))
;
extern zipc_t *zipcOpen(const char *filename, const char *mode);
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !ZIPC_H */