SYSTEMPAPERNAME(3)
β¨ 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:
- the
PAPERCONFenvironment variable π - the contents of the file returned by
systempapersizefile() - 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
- centos-stream 9: libpaper-devel 1.1.28-4.el9 Β· GPLv2
- centos-stream 9: libpaper-devel 1.1.28-4.el9 Β· GPLv2
- debian bookworm: libpaper-dev 1.1.29
- ubuntu jammy: libpaper-dev 1.1.28build2
- ubuntu noble: libpaper-dev 1.1.29build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms