1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
#include <zip.h>
#include <syslog.h>
#include <cstring>
void zip_stat_init(struct zip_stat *sb) {
memset(sb, 0, sizeof(struct zip_stat));
}
void initTest() {
// hide almost all messages
setlogmask(LOG_MASK(LOG_EMERG));
}
// Unused functions. Not called inside main program.
void zip_error_clear(struct zip *) {
assert(false);
}
void zip_error_get(struct zip *, int *, int *) {
assert(false);
}
int zip_error_get_sys_type(int) {
assert(false);
return 0;
}
void zip_file_error_clear(struct zip_file *) {
assert(false);
}
void zip_file_error_get(struct zip_file *, int *, int *) {
assert(false);
}
struct zip_file *zip_fopen(struct zip *, const char *, int) {
assert(false);
return NULL;
}
const char *zip_get_archive_comment(struct zip *, int *, int) {
assert(false);
return NULL;
}
int zip_get_archive_flag(struct zip *, int, int) {
assert(false);
return 0;
}
const char *zip_get_file_comment(struct zip *, int, int *, int) {
assert(false);
return NULL;
}
int zip_name_locate(struct zip *, const char *, int) {
assert(false);
return 0;
}
int zip_set_archive_comment(struct zip *, const char *, int) {
assert(false);
return 0;
}
int zip_set_archive_flag(struct zip *, int, int) {
assert(false);
return 0;
}
int zip_set_file_comment(struct zip *, int, const char *, int) {
assert(false);
return 0;
}
struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int) {
assert(false);
return NULL;
}
struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t) {
assert(false);
return NULL;
}
struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t) {
assert(false);
return NULL;
}
struct zip_source *zip_source_zip(struct zip *, struct zip *, int, int, off_t, off_t) {
assert(false);
return NULL;
}
int zip_stat(struct zip *, const char *, int, struct zip_stat *) {
assert(false);
return 0;
}
int zip_unchange(struct zip *, int) {
assert(false);
return 0;
}
int zip_unchange_all(struct zip *) {
assert(false);
return 0;
}
int zip_unchange_archive(struct zip *) {
assert(false);
return 0;
}
zip_int16_t zip_file_extra_fields_count(struct zip *, zip_uint64_t, zip_flags_t) {
return 0;
}
zip_int16_t zip_file_extra_fields_count_by_id(struct zip *, zip_uint64_t, zip_uint16_t, zip_flags_t) {
return 0;
}
const zip_uint8_t *zip_file_extra_field_get(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t *, zip_uint16_t *, zip_flags_t) {
assert(false);
return NULL;
}
const zip_uint8_t *zip_file_extra_field_get_by_id(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t, zip_uint16_t *, zip_flags_t) {
assert(false);
return NULL;
}
int zip_file_extra_field_delete(struct zip *, zip_uint64_t, zip_uint16_t, zip_flags_t) {
assert(false);
return 0;
}
int zip_file_extra_field_set(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t, const zip_uint8_t *, zip_uint16_t, zip_flags_t) {
assert(false);
return 0;
}
int zip_file_get_external_attributes(struct zip *, zip_uint64_t, zip_flags_t, zip_uint8_t *opsysPtr, zip_uint32_t *attrPtr) {
*opsysPtr = ZIP_OPSYS_UNIX;
*attrPtr = 0;
return 0;
}
int zip_file_set_external_attributes(struct zip *, zip_uint64_t, zip_flags_t, zip_uint8_t, zip_uint32_t) {
return 0;
}
|