ZIP_ERROR_INIT(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_INIT(3) πŸ’–

okay bestie, gather round, because today we're talking about libzip's Library Functions Manual and honestly? it's giving foundational. ✨


🌸 NAME 🌸

zip_error_init, zip_error_init_with_code β€” initialize zip_error structure

like, the whole glow-up of getting your zip_error struct ready to be something. πŸ’…


πŸŽ€ LIBRARY πŸŽ€

libzip (-lzip)

the girlies link it with -lzip, no cap. 🫢


✨ SYNOPSIS ✨

#include <zip.h>

void
zip_error_init(zip_error_t *error);

void
zip_error_init_with_code(zip_error_t *error, int ze);

πŸ¦‹ DESCRIPTION πŸ¦‹

so, the zip_error_init() function initializes the zip_error pointed to by error. that's it, that's the job, she's a simple queen. πŸ‘‘

but listen β€” *error must be allocated before calling zip_error_init(). not optional. allocate first, init second. iykyk. πŸ’€

the zip_error_init_with_code() function does the same thing, but she does more, because she's the main character. on top of initializing, she also sets the zip error code to ze and sets the system error code to the current errno(3) value, if appropriate. slay. 🌈


πŸ‘€ SEE ALSO πŸ‘€

(because every init needs her fini counterpart, that's just balance, bestie 🧚)


πŸ“œ HISTORY πŸ“œ

zip_error_init() and zip_error_init_with_code() were added in libzip 1.0. iconic behavior, truly. ⭐


πŸ’œ AUTHORS πŸ’œ

Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β€” absolute legends, we stan. πŸ“


and that's the whole page, fr fr! this cutie came to you from the Debian crew, dated December 18, 2017, filed under ZIP_ERROR_INIT(3). go forth and initialize responsibly, mwah πŸ’–βœ¨πŸŽ€