record(3)

πŸ“¦ version 1.2.3, in fedora 43, fedora 44

πŸ‘‘ record(3) β€” the Recorder Library, but make it a group chat πŸ‘‘

okay so bestie, welcome to record(3), the manual page for the Recorder Library. this is where you come when you wanna control how your recorder actually talks β€” where its output goes, how it shows up, and how events get formatted. three little functions, one very cute page. let's get into it πŸ’…


✨ NAME ✨

  • record_configure_output β€” set up where the recorder's output goes
  • record_configure_show β€” set up the output function itself
  • record_configure_format β€” set up how recorder events get formatted

πŸŽ€ SYNOPSIS πŸŽ€

#include <recorder/recorder.h>

typedef unsigned (*recorder_show_fn) (const char *text,
                                      size_tlen,
                                      void *output);
typedef void (*recorder_format_fn)(recorder_show_fn show,
                                   void *output,
                                   const char * label,
                                   const char *location,
                                   uintptr_torder,
                                   uintptr_ttimestamp,
                                   const char *message);

void *recorder_configure_output(void *output);
recorder_show_fn   recorder_configure_show(recorder_show_fnshow);
recorder_format_fn recorder_configure_format(recorder_format_fnformat);

like, look at those function pointer typedefs. main character energy, honestly. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

recorder_configure_output()

this one sets the output for the recorder output function, no big deal. the default output function is out here assuming that output is a FILE *, and it falls back to stderr if it's NULL. iconic behaviour tbh.

and ngl, since recorder tracing gets used for debugging a lot, it might be a good idea to make that output non-buffered, like this: c setvbuf(output,NULL,_IONBF,0); do it. your future self will thank you. πŸ™ˆ

recorder_configure_show()

this configures the output function for the recorder. and this output function receives that output value you set with recorder_configure_output. so yeah, they're besties, they work together. 🫢

recorder_configure_format()

this one configures the event record formatting function. that's it. that's the whole vibe. ✨


πŸ”₯ RETURN VALUE πŸ”₯

all three of these return the value that was previously configured. so you get the old one back. lowkey useful if you wanna restore it later, iykyk.


πŸ’€ BUGS πŸ’€

found a bug? not on my watch. report it right here:

go off, tell them everything. πŸ“


🌸 SEE ALSO 🌸

and if you want additional documentation and tutorials, they're all here:


🧚 AUTHOR 🧚

Written by Christophe de Dinechin. we stan. πŸ‘‘


and that's the whole page, bestie!! this was version 1.0, dated 2019-03-09, and it belongs to record(3). slay, you made it to the end, go configure something cute πŸ’–βœ¨

πŸ“¦ where this page comes from