Commit 703c0c99 authored by Michael Sweet's avatar Michael Sweet

Sync up with changes to the ZIPC code.

parent 20a42216
......@@ -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);
......
......@@ -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);
......@@ -57,17 +62,21 @@ extern int zipcCreateFileWithString(zipc_t *zc, const char *filename, const cha
extern const char *zipcError(zipc_t *zc);
extern int zipcFileFinish(zipc_file_t *zf);
extern int zipcFilePrintf(zipc_file_t *zf, const char *format, ...)
# ifdef __GNUC__
# ifdef __GNUC__
__attribute__ ((__format__ (__printf__, 2, 3)))
# endif /* __GNUC__ */
# endif /* __GNUC__ */
;
extern int zipcFilePuts(zipc_file_t *zf, const char *s);
extern int zipcFileWrite(zipc_file_t *zf, const void *data, size_t bytes);
extern int zipcFileXMLPrintf(zipc_file_t *zf, const char *format, ...)
# ifdef __GNUC__
# ifdef __GNUC__
__attribute__ ((__format__ (__printf__, 2, 3)))
# endif /* __GNUC__ */
# endif /* __GNUC__ */
;
extern zipc_t *zipcOpen(const char *filename, const char *mode);
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !ZIPC_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment