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

Go to the source code of this file.

Macros

#define _ZIP_COMPILING_DEPRECATED
 

Functions

ZIP_EXTERN int zip_set_file_comment (zip_t *za, zip_uint64_t idx, const char *comment, int len)
 

Macro Definition Documentation

◆ _ZIP_COMPILING_DEPRECATED

#define _ZIP_COMPILING_DEPRECATED

Definition at line 35 of file zip_set_file_comment.c.

Function Documentation

◆ zip_set_file_comment()

ZIP_EXTERN int zip_set_file_comment ( zip_t za,
zip_uint64_t  idx,
const char *  comment,
int  len 
)

Definition at line 40 of file zip_set_file_comment.c.

40  {
41  if (len < 0 || len > ZIP_UINT16_MAX) {
43  return -1;
44  }
45  return zip_file_set_comment(za, idx, comment, (zip_uint16_t)len, 0);
46 }
size_t len
Definition: 6502dis.c:15
ZIP_EXTERN void zip_error_set(zip_error_t *_Nullable, int, int)
Definition: zip_error.c:126
ZIP_EXTERN int zip_file_set_comment(zip_t *_Nonnull, zip_uint64_t, const char *_Nullable, zip_uint16_t, zip_flags_t)
#define ZIP_ER_INVAL
Definition: zip.h:123
int idx
Definition: setup.py:197
zip_error_t error
Definition: zipint.h:281
#define ZIP_UINT16_MAX
Definition: zipconf.h:47
uint16_t zip_uint16_t
Definition: zipconf.h:35
zip_t * za
Definition: ziptool.c:79

References zip::error, setup::idx, len, za, ZIP_ER_INVAL, zip_error_set(), zip_file_set_comment(), and ZIP_UINT16_MAX.