XMTABLISTCOPY(3)

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

πŸ’… XmTabListCopy πŸ’…

okay bestie, gather round, because we're talking about XmTabListCopy from the library call crew β€” a lil convenience function that creates a new tab list from an existing list. yes, it's a copy-paste but make it ✨fancy✨.


✨ NAME ✨

XmTabListCopy β€” a convenience function that creates a new tab list from an existing list πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/Xm.h>
XmTabList XmTabListCopy(
XmTabList tablist,
int offset,
Cardinal count);

✨ DESCRIPTION ✨

so here's the tea πŸ“: XmTabListCopy creates a new tab list consisting of a copy of a portion of the contents of the tablist argument. it doesn't take the whole thing if you don't want it to β€” nope, it starts copying at the specified offset value of the tab list and copies count values. main character energy, honestly.

  • tablist β€” Specifies a tab list to be copied. πŸ‘‘
  • offset β€” Specifies where to start copying. A value of 0 (zero) indicates begin at the beginning, a value of 1 indicates to skip the first tab, and so on. A negative indicates to begin counting backwards from the end. A value of -1 indicates to start copying from the last tab. yes bestie, it counts backwards too, we love a flexible queen πŸ’…
  • count β€” Specifies the number of tabs to copy. A value of 0 (zero) indicates to copy all elements from the starting point to the end (beginning if offset is negative) of the tab list. so 0 is basically "give me everything from here, no cap" 🫢

✨ RETURN ✨

okay so here's the important bit, don't skip it πŸ™ˆ:

If tablist is NULL, this function returns NULL. Otherwise, this function returns a newly allocated XmTabList.

⚠️ If the function does allocate an XmTabList, then the application is responsible for managing the allocated space. that's your problem now, bestie 😭

The application can recover the allocated space by calling XmTabListFree. so like, clean up after yourself, periodt 🧚


go read those too, iykyk πŸ“š


XmTabListCopy(library call) β€” that's the source/version and date line, and yes we're folding it into the sign-off because we're cute like that πŸŽ€ mwah, go free your tab lists, love u, bye πŸ’–βœ¨πŸ¦‹