Get string representation of zip error
libzip (-lzip)
#include <zip.h>
int
zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se);
The zip_error_to_str() function stores a string describing the libzip error code ze in the user-provided buffer buf which has size len. The buffer is always NUL-terminated. se should be the value of the global variable errno at the time of the error or the zlib error code, depending on ze.
zip_error_to_str() is especially useful if zip_open() failed, since then there is no struct zip is available to store the error code; otherwise zip_strerror() or zip_file_strerror() are more convenient.
zip_error_to_str() returns the number of characters that would have been written to a sufficiently sized buf, excluding the terminating NUL character.
Dieter Baron <[email protected]> and Thomas Klausner <[email protected]>