Rizin
unix-like reverse engineering framework and cli tools
zip_ftell.c File Reference
#include "zipint.h"

Go to the source code of this file.

Functions

ZIP_EXTERN zip_int64_t zip_ftell (zip_file_t *zf)
 

Function Documentation

◆ zip_ftell()

ZIP_EXTERN zip_int64_t zip_ftell ( zip_file_t zf)

Definition at line 38 of file zip_ftell.c.

38  {
39  zip_int64_t res;
40 
41  if (!zf)
42  return -1;
43 
44  if (zf->error.zip_err != 0)
45  return -1;
46 
47  res = zip_source_tell(zf->src);
48  if (res < 0) {
50  return -1;
51  }
52 
53  return res;
54 }
ZIP_EXTERN zip_int64_t zip_source_tell(zip_source_t *_Nonnull)
int zip_err
Definition: zip.h:285
zip_source_t * src
Definition: zipint.h:311
zip_error_t error
Definition: zipint.h:309
void _zip_error_set_from_source(zip_error_t *err, zip_source_t *src)
Definition: zip_error.c:135
int64_t zip_int64_t
Definition: zipconf.h:38

References _zip_error_set_from_source(), zip_file::error, zip_file::src, zip_error::zip_err, and zip_source_tell().