ZIP_ERROR_SET(3)

πŸ“¦
version 1.11.4 Β· 3 versions
, in arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ ZIP_ERROR_SET(3) ✨

okay bestie, we're in the Library Functions Manual section, and this one is short but SO important, like the little function that could πŸ’–


🌸 NAME 🌸

zip_error_set β€” fill in zip_error structure

no cap, that's literally all it does and it does it flawlessly πŸ’…


πŸ“š LIBRARY πŸ“š

libzip (-lzip)

link against her or she will NOT work, periodt πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <zip.h>

void
zip_error_set(zip_error_t *ze, int le, int se);

πŸ’œ DESCRIPTION πŸ’œ

okay so. the zip_error_set() function sets the zip_error pointed to by ze to the libzip error code le and the system error code se. that's it. that's the whole vibe. two little codes, one struct, slay ✨

🚨 IMPORTANT BESTIE: ze must be allocated and initialized with zip_error_init(3) before you call zip_error_set(). do not skip this step. do not pass in some random uninitialized struct and hope for the best, because it's giving undefined behaviour energy and we are NOT about that life 😭

πŸ‘€ SEE ALSO πŸ‘€

go read those too, iykyk 🌈


πŸ“œ HISTORY πŸ“œ

zip_error_set() was added in libzip 1.0. iconic behaviour since day one πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>


and that's the whole page, bestie!! 🫢 this little cutie is from Debian, dated December 5, 2022 β€” mwah, go forth and set those error codes correctly πŸ’–βœ¨πŸŽ€