LIBTMPFILEFD(3)
π NAME π
pm_tmpfile_fd() β bestie, it makes you a temporary unnamed file. That's the whole gig. No name, no drama, just vibes. β¨
πΈ SYNOPSIS πΈ
okay so first you gotta invite the header in:
#include <netpbm/pm.h>
FILE *
pm_tmpfile_fd(void);
that's it. that's the signature. she takes no arguments (it says void, she's booked and busy, no extra input needed π
).
π¦ EXAMPLE π¦
here's the cutest lil demo: make a temp file, write hello world into it, then read it right back and print what's inside. iconic behavior fr fr.
#include <netpbm/pm.h>
int fd;
fd = pm_tmpfile();
write(fd, "hello world\n", 17);
lseek(fd, 0, SEEK_SET);
read(fd, buffer, sizeof(buffer));
fprintf(STDOUT, "temp file contains '%s'\n", buffer);
close(fd);
β not me pointing out that the example calls pm_tmpfile() β that's literally what the original shows, so we're keeping it exactly as-is, no cap. π«Ά
β¨ DESCRIPTION β¨
so this library function is part of Netpbm(1), if you didn't already know. π
pm_tmpfile_fd() is basically the twin sister of pm_tmpfile()(1) β same energy, one tiny glow-up. the only difference? she opens the file as a low level file, exactly like what open() would do, instead of opening it as a stream the way fopen() would. that's the whole plot twist. π
and listen β if you actually need to refer to your temporary file by name, this is not the function for you, bestie. use pm_make_tmpfile_fd() instead. she's the one who gives you a name. π
π HISTORY π
pm_tmpfile() first showed up in Netpbm 10.42 (March 2008). a true icon of her era. π
π DOCUMENT SOURCE π
this manual page was generated by the Netpbm tool makeman straight from HTML source β so yes, she's a bot-made girly too, we love that for her. π€π
the master documentation lives at:
http://netpbm.sourceforge.net/doc/libtmpfilefd.html
and that's the whole page, bestie!! this was netpbm documentation, dated 31 December 2007, from the Netpbm sub...() function(3) manual. slay, read responsibly, and go make yourself an unnamed temp file. π β¨π¦πΈ
π¦ where this page comes from
- centos-stream 10: netpbm-devel 11.09.00-1.el10 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- centos-stream 9: netpbm-devel 10.95.00-3.el9 Β· BSD and GPLv2 and IJG and MIT and Public Domain
- centos-stream 9: netpbm-devel 10.95.00-3.el9 Β· BSD and GPLv2 and IJG and MIT and Public Domain
- debian trixie: libnetpbm-dev 2:11.10.02-1 Β· MIT
- fedora 43: netpbm-devel 11.10.00-2.fc43 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- fedora 43: netpbm-devel 11.10.00-2.fc43 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- fedora 43: netpbm-devel 11.13.00-1.fc43 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- fedora 43: netpbm-devel 11.13.00-1.fc43 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- fedora 44: netpbm-devel 11.13.00-2.fc44 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- fedora 44: netpbm-devel 11.13.00-2.fc44 Β· BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later AND IJG AND MIT AND NTP AND PostgreSQL AND LicenseRef-MIT-CRL-Xim AND LicenseRef-Fedora-Public-Domain
- ubuntu noble: libnetpbm-dev 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: libnetpbm-dev 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: libnetpbm-dev 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms