XMFONTLISTCOPY(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

XmFontListCopy β€” bestie, this is a font list function that copies a font list. That's it. That's the whole job. Copying. Iconic behaviour, honestly. πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/Xm.h>
XmFontList XmFontListCopy(
XmFontList fontlist);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so XmFontListCopy makes a brand-new font list, and that new list is made up of the contents of the fontlist argument. Like, you hand it a list, it hands you back a twin. No cap. ✨

  • fontlist β€” bestie, this specifies the font list you want copied. That's the one going under the photocopier. 🫢

πŸ‘‘ RETURN πŸ‘‘

So here's the vibe check on what you get back:

  • If fontlist is NULL, you get NULL back. That's it. Nothing copied, nothing allocated, we move on. πŸ’€
  • Otherwise? You get a new font list, and it allocates space to hold that font list. Slay. ✨
⚠️ But listen, and this part is important: the application is responsible for managing the allocated space. That memory is YOURS now, bestie. It does not manage itself. Main character energy comes with main character responsibilities. 😭

Good news though β€” you can recover that allocated space whenever you're done by calling XmFontListFree. So the cleanup is literally one function call away. Free the list, free the memory, hydrate, move on. πŸ’…


Go read these too, they're part of the same friend group:


That's the whole page, bestie β€” from the library call shelf of the manual, no date on this one so we're keeping it timeless. Mwah. πŸ’–βœ¨πŸ§š