SYSTEMPAPERNAME(3)

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

✨ SYSTEMPAPERNAME(3) ✨

okay bestie, gather round, because this is the systempapername(3) page from the Library Functions Manual and it's literally all about figuring out which paper size your program should be using πŸŽ€ four little functions, one big "what paper am I printing on" vibe check. no cap.


πŸ’– NAME πŸ’–

systempapername, defaultpapername, systempapersizefile, defaultpapersizefile β€” the girlies that hand you back the names you need for managing system paper info 🫢


🌸 SYNOPSYS 🌸

#include <paper.h>

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

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

(yes, the heading really is spelled "SYNOPSYS" in the original, we do not fix what we were given, periodt πŸ’…)


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea on each one, one by one:

systempapername() returns the name of the default paper your program should use. it's not just vibes though β€” it goes looking in a very specific order:

  1. the PAPERCONF environment variable πŸ‘€
  2. the contents of the file returned by systempapersizefile()
  3. and as a last chance, it just calls defaultpapername() πŸ™ˆ

defaultpapername() returns the name of the default paper to use when it is impossible to get that name from the environment. like, environment said nothing, so this is the fallback bestie. main character energy as a safety net ✨

systempapersizefile() returns the path of the papersize file to use. it gets that path by looking at the PAPERCONF environment variable, or, if that's not happening, by calling defaultpapersizefile() 🌈

defaultpapersizefile returns the path of the default papersize file. simple. iconic. no notes πŸ‘‘


🌟 ENVIRONMENT 🌟

  • PAPERSIZE β€” paper size to use regardless of what the papersize file contains. yeah, regardless. it overrides the file, so it wins the argument, lowkey a little bossy but we respect it πŸ’…
  • PAPERCONF β€” full path to a file containing the paper size to use.

πŸŽ€ FILES πŸŽ€

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

⭐ SEE ALSO ⭐

papersize(5) β€” go read that one too, it's giving lore


and that's the whole page, bestie, no details left behind πŸ§šπŸ’œ this was the Library Functions Manual's systempapername(3), and the original was dated 17 September 2001 β€” yeah, ancient, but she still slays πŸ’–πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from