PS_GET_BUFFER(3)

🌸 NAME 🌸

PS_get_buffer β€” bestie, it hands you back the internal memory buffer πŸ’–


✨ SYNOPSIS ✨

#include <pslib.h>

const char *PS_get_buffer(PSDoc *psdoc, long *size)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea πŸ«– β€” when your document was created in memory, this function returns the current internal memory buffer. that's it, that's the whole vibe.

but listen, this part is important, no cap: the internal buffer gets set to a length of 0 when you call this function. 😭 literally zero, immediately, the second you call it.

so you should output or save that returned buffer pointer before you call any other pslib functions. like, do it right away, don't get distracted, don't go check your other tabs πŸ’€

and the size parameter? that's your girl for retrieving the number of bytes in the buffer. πŸ“βœ¨


πŸ’… RETURN VALUE πŸ’…

ngl the original page just leaves this section sitting there empty πŸ™ˆ no cap, nothing to report, we move.


πŸ‘‘ SEE ALSO πŸ‘‘


πŸŽ€ AUTHOR πŸŽ€

This manual page was written by Uwe Steinmann uwe@steinmann.cx. icon behavior, honestly πŸ‘‘


and that's the whole page, bestie 🫢 it's PS_GET_BUFFER(3) from the Library Functions Manual, and yeah, the page doesn't hand us a date so we're just vibing without one 🌈 periodt πŸ’…

πŸ“¦ where this page comes from