AUPARSE_NEXT_RECORD(3)

πŸ“¦
version 4.2.1 Β· 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

auparse_next_record β€” move record cursor, bestie ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <auparse.h>

int auparse_next_record(auparse_state_t *au);"

🌸 DESCRIPTION 🌸

okay so picture this: the library has these internal cursors, right? and auparse_next_record is literally just the glow-up move that slides those cursors over to point at the next record of the current event. that's it. that's the whole job. slay πŸ’…

but bestie. listen. 🫢

do NOT call this function from a feed interface callback function. the way that will deadlock the code 😭 like, full stop, everything just sits there. not cute, not iconic, absolutely not the vibe.

so if you're in that scenario (iykyk), the move is: check how many records are in the current event with auparse_get_num_records first, and only call this if there are actually more records left. vibe check before you commit, periodt ✨


πŸ”₯ RETURN VALUE πŸ”₯

  • -1 β€” something went wrong, an error happened 😭
  • 0 β€” no more records in the current event, that's a wrap 🎬
  • 1 β€” success!! we ate πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Steve Grubb πŸ’œ (giving main character energy fr fr)


and that's the whole page, bestie β€” this came out of Red Hat back in Feb 2007, so it's been serving correct cursor-moving realness for literal decades πŸŽ€βœ¨ no cap.