ZIP_STAT_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_STAT_INIT(3) β€” the libzip girlies' manual, Library Functions Manual

okay bestie, welcome to the libzip section of the man pages, pull up a chair πŸŽ€


✨ NAME ✨

zip_stat_init β€” bestie, it initializes a zip_stat structure. that's it, that's the whole job πŸ‘‘


πŸ“š LIBRARY πŸ“š

libzip (-lzip) β€” yeah you gotta link it, don't forget, i'm watching 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <zip.h>

void
zip_stat_init(zip_stat_t *sb);

πŸ’– DESCRIPTION πŸ’–

so, the zip_stat_init() function initializes the members of a struct zip_stat. like, all of them. every single field. it's giving full-coverage foundation, no patches skipped 🌸

the current members are described in zip_stat(3), but listen β€” you should still use this function to initialize it, so you can make sure none are missed. not me trusting my memory when a function exists that does it perfectly 😭 use the function. the function ate.

the structure pointed to by sb must be allocated before calling zip_stat_init(). like, girl, you can't initialize a vibe that doesn't exist yet πŸ’€ allocate first, init second, that's the order, periodt.

also highkey important: this function should be used by functions provided to zip_source_function(3) when returning ZIP_SOURCE_STAT information, so you can make sure all fields are initialized. if you're handing back ZIP_SOURCE_STAT without init-ing it first, that's not the move bestie, the fields will be uninitialized and the whole thing is gonna be a mess πŸ™ˆ


⭐ RETURN VALUES ⭐

if sb is valid, the function is always successful. like, it literally cannot fail. icon behavior honestly πŸ‘‘


🌈 SEE ALSO 🌈


πŸŽ€ HISTORY πŸŽ€

zip_stat_init() was added in libzip 0.8. she's been here since 0.8 and she's been slaying ever since πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β€” the founding mothers of this whole operation, we thank them for their service 🫢✨


and that's the whole page, bestie!! this one came from the Debian crew, dated December 18, 2017, and it's filed under ZIP_STAT_INIT(3) in the Library Functions Manual. go forth and initialize your structs fr fr πŸ¦‹πŸ’–