PS_CLOSE(3)

πŸ’– PS_close β€” bestie, let's wrap this PostScript doc UP πŸ’…

okay so you've been writing a PostScript document with pslib and now you're done and you need to close it properly?? that's literally this function, she's the closer, the final boss of your file, the one who says "ok we're done here" ✨

🌸 SYNOPSIS 🌸

#include <pslib.h>

void PS_close(PSDoc *psdoc)

πŸŽ€ DESCRIPTION πŸŽ€

PS_close closes the PostScript document. that's it, that's the job, she's clocking out 🫢

but WAIT, there's lore. she will not close a file pointer that was passed to PS_open_fp(3). like, not her business, not her problem, she didn't open that file so she's not gonna close it. she only closes files which were opened by pslib itself. periodt πŸ’…

the way that she's actually doing something on the way out though?? iconic behavior fr fr. this function outputs a last line into the PostScript document, and that line is a PostScript comment containing the number of pages. cute right?? she's leaving a little note behind, a little "hey, here's how many pages we made" πŸ₯Ί

AND she also writes the bookmark tree. so like, don't skip her, she's got receipts to file πŸ“š

ngl, if you opened that file pointer yourself with PS_open_fp(3), you're the one responsible for closing it. PS_close said not me πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann uwe@steinmann.cx. slay, thank you for the docs bestie 🫑


and that's the whole page!! she lives in the Library Functions Manual, she's PS_CLOSE(3), go forth and close your documents properly, no cap πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from