mirror of
https://github.com/QuasarApp/zip.git
synced 2025-04-26 12:44:30 +00:00
clang-format
This commit is contained in:
parent
bfcfd1aa4e
commit
a631ce45f7
@ -6,3 +6,4 @@ for file in $(git ls-files | \grep -E '\.(c|h)$' | \grep -v -- '#')
|
||||
do
|
||||
clang-format -i $file
|
||||
done
|
||||
```
|
||||
|
@ -1078,7 +1078,8 @@ struct entry_mark {
|
||||
mz_uint64 lf_length;
|
||||
};
|
||||
|
||||
struct zip_t *zip_open_stream(const char *stream, size_t size, int level, char mode) {
|
||||
struct zip_t *zip_open_stream(const char *stream, size_t size, int level,
|
||||
char mode) {
|
||||
struct zip_t *zip = NULL;
|
||||
zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t));
|
||||
if (!zip) {
|
||||
@ -1119,7 +1120,8 @@ static inline void zip_write_end(struct zip_t *zip){
|
||||
}
|
||||
|
||||
ssize_t zip_copy_stream(struct zip_t *zip, void **buf, ssize_t *bufsize) {
|
||||
if(zip == NULL) return -1;
|
||||
if (zip == NULL)
|
||||
return -1;
|
||||
zip_write_end(zip);
|
||||
if (bufsize != NULL)
|
||||
*bufsize = zip->archive.m_archive_size;
|
||||
|
@ -331,8 +331,8 @@ extern int zip_extract_stream(const char *stream, size_t size, const char *dir,
|
||||
*
|
||||
* @return the zip archive handler or NULL on error
|
||||
*/
|
||||
extern struct zip_t *zip_open_stream(const char *stream, size_t size,
|
||||
int level, char mode);
|
||||
extern struct zip_t *zip_open_stream(const char *stream, size_t size, int level,
|
||||
char mode);
|
||||
|
||||
/**
|
||||
* Copy zip archive stream output buffer.
|
||||
|
@ -548,7 +548,8 @@ static void test_open_stream(void) {
|
||||
#else
|
||||
remove(ZIPNAME);
|
||||
/* COMPRESS MEM TO MEM */
|
||||
struct zip_t *zip = zip_open_stream(NULL, 0, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
|
||||
struct zip_t *zip =
|
||||
zip_open_stream(NULL, 0, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
|
||||
assert(zip != NULL);
|
||||
|
||||
assert(0 == zip_entry_open(zip, "test/test-1.txt"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user