SYSTEMPAPERNAME(3)

πŸ“¦
version 1.1.29build1 Β· 2 versions
, in centos-stream 9, debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– SYSTEMPAPERNAME πŸ’–

okay so bestie, this is a <paper.h> girly through and through β€” it lives in the Library Functions Manual at section 3 (the "function" section, iykyk). she's not a program you run, she's a little squad of four functions that tell your code which paper size to use and where to go find that info. lowkey iconic. no cap. πŸŽ€


✨ SYNOPSYS ✨

(not me spelling it exactly how the original does, periodt πŸ’…)

#include <paper.h>

const char* systempapername(void)
const char* defaultpapername(void)

const char* systempapersizefile(void)
const char* defaultpapersizefile(void)

🌸 DESCRIPTION 🌸

okay so here's the tea, four functions, four vibes, all of them returning const char*:

  • systempapername() β€” returns the name of the default paper to be used by a program. the way she figures that out is a whole journey: she looks at the PAPERCONF environment variable first, then at the contents of the file returned by systempapersizefile(), and if all of that flops, she falls back to defaultpapername() as a last chance. three chances, main character energy fr fr.
  • defaultpapername() β€” returns the name of the default paper to use when it's literally impossible to get the paper name from the environment. she's the safety net bestie. 🫢
  • systempapersizefile() β€” returns the path of the papersize file to use. she gets that path by checking the PAPERCONF environment variable, or by calling defaultpapersizefile() if that doesn't pan out.
  • defaultpapersizefile β€” returns the path of the default papersize file. yes, the original description doesn't write the empty parens, and we're keeping it exactly that way, no edits, we don't fix other people's fits. πŸ‘‘

🌈 ENVIRONMENT 🌈

  • PAPERSIZE β€” Paper size to use regardless of what the papersize file contains. she said "I don't care what the file says", and honestly? respect.
  • PAPERCONF β€” Full path to a file containing the paper size to use. give her the whole path, not a little hint, the full path. πŸ’…

πŸ¦‹ FILES πŸ¦‹

  • /etc/papersize β€” Contains the name of the system-wide default paper size to be used.

πŸ’œ SEE ALSO πŸ’œ

  • papersize(5) β€” go read that one too bestie, it's the whole lore drop on the file format. 🧚

and that's the whole page!! ✨ written on 17 September 2001 by the fine folks behind this Library Functions Manual, and this little rewrite is just the same facts with a much cuter outfit. stay slay, stay const char*. πŸŽ€πŸ’–

πŸ“¦ where this page comes from