ZIP_ERROR_TO_DATA(3)
π ZIP_ERROR_TO_DATA(3) π
okay bestie, so like β this page is ZIP_ERROR_TO_DATA(3) from the Library Functions Manual, and we're gonna get you fluent in it, no cap π«Ά
β¨ NAME β¨
zip_error_to_data β the lil glow-up that turns a zip_error into a return value that's actually suitable for ZIP_SOURCE_ERROR π
π LIBRARY π
libzip (-lzip) β yes queen, link against it πΈ
π SYNOPSIS π
#include <zip.h>
zip_int64_t
zip_error_to_data(const zip_error_t *ze, void *data, zip_uint64_t len);
π DESCRIPTION π
so here's the vibe: zip_error_to_data() takes your zip_error β that's ze, the star of the show π β and converts it into data that's suitable as a return value for ZIP_SOURCE_ERROR. it's giving translator, it's giving middleman, it's giving i gotchu.
the data gets written into the buffer data, which is len big. that's the whole point.
β οΈ but listen β if that buffer is not large enough to hold 2 ints, an error is returned. it's literally not big enough, bestie, and it will say so. so make sure your len is eating well before you call this π
β RETURN VALUES β
- on success,
zip_error_to_data()returns2*(sizeof int)β iconic, correct, slay π - on error, it returns
-1β we do not love this but it's honest π
π SEE ALSO π
go read those too, iykyk π
π¦ HISTORY π¦
zip_error_to_data() was added in libzip 1.0. so it's been here a minute, it's a whole veteran, it has tenure β¨
πΈ AUTHORS πΈ
- Dieter Baron
<dillo@nih.at> - Thomas Klausner
<wiz@gatalith.at>
two absolute legends, we thank them for their service π«Ά
π ok that's the whole page, mwah π
this cutie came out of Debian, dated December 18, 2017, and it lives at page ZIP_ERROR_TO_DATA(3). that's the source, that's the version, that's the date β periodt. go forth and convert your errors, bestie, you're gonna ate this πβ¨π¦
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- debian trixie: libzip-dev 1.11.3-2 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- nixpkgs unstable: libzip 1.11.4
- ubuntu questing: libzip-dev 1.11.3-2
- ubuntu resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2014-2017 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms