mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 11:25:30 +00:00
Sync up with changes to the ZIPC code.
This commit is contained in:
parent
20a4221607
commit
703c0c9917
4
zipc.c
4
zipc.c
@ -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);
|
||||
|
17
zipc.h
17
zipc.h
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user