XMFONTLISTREMOVEENTRY(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

πŸ’… XmFontListRemoveEntry πŸ’…

okay bestie, gather round, we're doing a library call today and honestly? it's giving ✨font list surgery✨. this is XmFontListRemoveEntry from the Xm fam, and she's here to yeet an entry out of your font list. let's get into it πŸŽ€


✨ NAME ✨

XmFontListRemoveEntry β€” a font list function that removes a font list entry from a font list πŸ¦‹


🌸 SYNOPSIS 🌸

#include <Xm/Xm.h>
XmFontList XmFontListRemoveEntry(
XmFontList oldlist,
XmFontListEntry entry);

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea, fr fr: XmFontListRemoveEntry creates a new font list that contains the contents of oldlist minus those entries specified in entry. the routine removes any entries from oldlist that match the components (tag, type font/font set) of the specified entry. πŸ’«

the function deallocates the original font list after extracting the required information β€” no cap, she's gone after this. the caller uses XmFontListEntryFree to recover memory allocated for the specified entry. and listen, this one matters: this routine does not free the XFontSet or XFontStruct associated with the font list entry that is removed. not her job, not her problem, she said πŸ’…

  • oldlist β€” Specifies the font list 🌈
  • entry β€” Specifies the font list entry to be removed 🎯

⭐ RETURN ⭐

okay so the return value situation is a whole vibe check, pay attention:

  • if oldlist is NULL, the function returns NULL. bye πŸ‘‹
  • if entry is NULL or no entries are removed, the function returns oldlist. nothing happened, no notes 🫢
  • otherwise, it returns a new font list. and if the function returns a new font list, the function allocates space to hold the new font list. the application is responsible for managing the allocated space 😭 β€” that's on you bestie. the application can recover the allocated space by calling XmFontListFree. periodt.
lowkey important: that new font list is your problem to free now. XmFontListFree is right there, use her 🧚

the squad, the friend group, the whole ensemble πŸ’–


and that's the whole page, bestie β€” she came to us as XmFontListRemoveEntry(library call) on both the top and the bottom of the original, and we're shouting her out one more time on the way out because she ate and left no crumbs πŸ“πŸ’œ go forth, remove those entries, manage that memory, and stay iconic. mwah πŸ’‹πŸŒΈ