Lines Matching refs:error
45 static int _zip_seek_win32_u(void *h, zip_uint64_t offset, int whence, zip_error_t *error);
46 static int _zip_seek_win32(void *h, zip_int64_t offset, int whence, zip_error_t *error);
56 return zip_source_win32handle_create(h, start, len, &za->error); in zip_source_win32handle()
61 zip_source_win32handle_create(HANDLE h, zip_uint64_t start, zip_int64_t length, zip_error_t *error) in zip_source_win32handle_create() argument
64 zip_error_set(error, ZIP_ER_INVAL, 0); in zip_source_win32handle_create()
68 return _zip_source_win32_handle_or_name(NULL, h, start, length, 1, NULL, NULL, error); in zip_source_win32handle_create()
73 …t64_t len, int closep, const zip_stat_t *st, _zip_source_win32_file_ops_t *ops, zip_error_t *error) in _zip_source_win32_handle_or_name() argument
79 zip_error_set(error, ZIP_ER_INVAL, 0); in _zip_source_win32_handle_or_name()
84 zip_error_set(error, ZIP_ER_MEMORY, 0); in _zip_source_win32_handle_or_name()
91 zip_error_set(error, ZIP_ER_MEMORY, 0); in _zip_source_win32_handle_or_name()
114 zip_error_init(&ctx->error); in _zip_source_win32_handle_or_name()
132 if ((zs = zip_source_function_create(_win32_read_file, ctx, error)) == NULL) { in _zip_source_win32_handle_or_name()
156 zip_error_set(&ctx->error, ZIP_ER_OPNOTSUPP, 0); in _win32_read_file()
164 zip_error_set(&ctx->error, ZIP_ER_WRITE, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
168 zip_error_set(&ctx->error, ZIP_ER_RENAME, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
184 return zip_error_to_data(&ctx->error, data, len); in _win32_read_file()
197 zip_error_set(&ctx->error, ZIP_ER_OPEN, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
203 if (_zip_seek_win32_u(ctx->h, ctx->start, SEEK_SET, &ctx->error) < 0) { in _win32_read_file()
225 if (_zip_seek_win32_u(ctx->h, ctx->current, SEEK_SET, &ctx->error) < 0) { in _win32_read_file()
231 zip_error_set(&ctx->error, ZIP_ER_READ, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
240 zip_error_set(&ctx->error, ZIP_ER_REMOVE, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
258 zip_source_args_seek_t *args = ZIP_SOURCE_GET_ARGS(zip_source_args_seek_t, data, len, &ctx->error); in _win32_read_file()
275 if (_zip_seek_win32(ctx->h, args->offset, SEEK_END, &ctx->error) < 0) { in _win32_read_file()
280 zip_error_set(&ctx->error, ZIP_ER_SEEK, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
295 zip_error_set(&ctx->error, ZIP_ER_INVAL, 0); in _win32_read_file()
300 zip_error_set(&ctx->error, ZIP_ER_INVAL, 0); in _win32_read_file()
307 if (_zip_seek_win32_u(ctx->h, ctx->current, SEEK_SET, &ctx->error) < 0) { in _win32_read_file()
317 args = ZIP_SOURCE_GET_ARGS(zip_source_args_seek_t, data, len, &ctx->error); in _win32_read_file()
322 if (_zip_seek_win32(ctx->hout, args->offset, args->whence, &ctx->error) < 0) { in _win32_read_file()
348 zip_error_set(&ctx->error, ZIP_ER_READ, ENOENT); in _win32_read_file()
363 zip_error_set(&ctx->error, ZIP_ER_READ, _zip_win32_error_to_errno(win32err)); in _win32_read_file()
383 zip_error_set(&ctx->error, ZIP_ER_TELL, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
394 zip_error_set(&ctx->error, ZIP_ER_WRITE, _zip_win32_error_to_errno(GetLastError())); in _win32_read_file()
402 zip_error_set(&ctx->error, ZIP_ER_OPNOTSUPP, 0); in _win32_read_file()
438 zip_error_set(&ctx->error, ZIP_ER_MEMORY, 0); in _win32_create_temp_file()
461 zip_error_set(&ctx->error, ZIP_ER_TMPOPEN, _zip_win32_error_to_errno(GetLastError())); in _win32_create_temp_file()
474 _zip_seek_win32_u(HANDLE h, zip_uint64_t offset, int whence, zip_error_t *error) in _zip_seek_win32_u() argument
477 zip_error_set(error, ZIP_ER_SEEK, EOVERFLOW); in _zip_seek_win32_u()
480 return _zip_seek_win32(h, (zip_int64_t)offset, whence, error); in _zip_seek_win32_u()
485 _zip_seek_win32(HANDLE h, zip_int64_t offset, int whence, zip_error_t *error) in _zip_seek_win32() argument
501 zip_error_set(error, ZIP_ER_SEEK, EINVAL); in _zip_seek_win32()
507 zip_error_set(error, ZIP_ER_SEEK, _zip_win32_error_to_errno(GetLastError())); in _zip_seek_win32()
551 zip_error_set(&ctx->error, ZIP_ER_READ, _zip_win32_error_to_errno(GetLastError())); in _zip_stat_win32()
555 zip_error_set(&ctx->error, ZIP_ER_READ, ERANGE); in _zip_stat_win32()
565 zip_error_set(&ctx->error, ZIP_ER_READ, _zip_win32_error_to_errno(GetLastError())); in _zip_stat_win32()