ZIP_ERROR_SET_FROM_SOURCE(3)

πŸ’– ZIP_ERROR_SET_FROM_SOURCE β€” ok bestie let's talk error structs

sooo this is a page from the Library Functions Manual (yes that's the manual name, iconic) and it's about a little function that goes by zip_error_set_from_source. Come sit, I got you. 🫢


✨ NAME ✨

zip_error_set_from_source β€” fill in zip_error structure from source. That's the whole vibe. It copies the error situation from one place into another. Slay.


πŸ“š LIBRARY πŸ“š

libzip (-lzip) β€” so like, link against it with -lzip, duh. πŸ’…


🌸 SYNOPSIS 🌸

#include <zip.h>

void
zip_error_set_from_source(zip_error_t *ze, zip_source_t *src);

void return, two pointers, no funny business. She's a simple girl. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea β˜•: the zip_error_set_from_source() function sets the zip_error pointed to by ze to the error reported by src β€” specifically as returned by zip_error_source(3). Like, it's giving "transfer the error energy from src to ze". ✨

⚠️ IMPORTANT bestie, do not skip this: ze must be allocated and initialized with zip_error_init(3) before calling zip_error_set_from_source(). No cap. If you skip the init, that's on you and the vibes will be cursed. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

Go read those, they're the supporting cast and honestly they ate. πŸ”₯


πŸ•°οΈ HISTORY πŸ•°οΈ

zip_error_set_from_source() was added in libzip 1.10. So if your libzip is ancient, that's why it's ghosting you. πŸ™ˆ


πŸ‘‘ AUTHORS πŸ‘‘

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

Legends. Periodt. πŸ’œ


Debian, December 5, 2022 β€” that's the source/version and date stamp, mwah, love that for us. Byeee, go init your structs first!! πŸ§šβœ¨πŸ“