GENDERS_PARSE(3)

✨ GENDERS_PARSE ✨

okay bestie, welcome to genders_parse from LIBGENDERS πŸ’– β€” this is a <genders.h> girlie and she is literally the one you call when you need to figure out what went wrong with a genders file. no cap.


🌸 SYNOPSIS 🌸

#include <genders.h>

int genders_parse(genders_t handle, const char *filename, FILE *stream);

πŸ¦‹ DESCRIPTION πŸ¦‹

so genders_parse() parses the genders file that filename points at, and then it outputs info about all the parse errors it found in that genders file to stream. it's giving detective energy πŸ”βœ¨

if filename is NULL, she'll go check the default genders file instead. no biggie.

if stream is NULL, the info gets output to standard error. periodt.


πŸ’… RETURN VALUES πŸ’…

on success, the number of parse errors discovered is returned. so if there are zero errors, 0 comes back β€” slay. ✨

on error, -1 is returned, and an error code is returned in handle. you can grab that error code with genders_errnum(3), and get a description of it with genders_strerror(3). the error codes are defined in genders.h. iykyk πŸ’œ


😭 ERRORS 😭

  • GENDERS_ERR_NULLHANDLE β€” the handle parameter is NULL. bestie, the genders handle must be created with genders_handle_create(3) first, that's not optional 🫢
  • GENDERS_ERR_OPEN β€” the genders file that filename points at cannot be opened for reading. it's just not opening, sorry πŸ’€
  • GENDERS_ERR_OVERFLOW β€” a line in the genders database exceeds the maximum allowed length. too much going on fr fr πŸ™ˆ
  • GENDERS_ERR_MAGIC β€” handle has an incorrect magic number. basically handle does not point to a genders handle, OR handle has already been destroyed by genders_handle_destroy(3). rip ✨

πŸŽ€ FILES πŸŽ€

  • /usr/include/genders.h

🌈 SEE ALSO 🌈

libgenders(3), genders_handle_create(3), genders_errnum(3), genders_strerror(3)


bestie go read those. not me being obsessed with cross-references πŸ’…

okay that's the whole thing!! this page came to you from LLNL, dated August 2003 β€” vintage but iconic, main character energy forever πŸ‘‘πŸ’– bye bestie!!