globus_list.h(3)

πŸ“¦
version 18.15 Β· 5 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

✨ globus_list.h ✨

okay so bestie, welcome to globus_list.h β€” the Linked List header from globus_common πŸ’– this is a <pink>Library Functions Manual</pink> situation, and we're about to get so cozy with linked lists.


🌸 NAME 🌸

globus_list.h β€” Linked List. yes, that's it, that's the whole name. short, sweet, iconic πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

πŸ¦‹ Data Structures πŸ¦‹

  • struct globus_list β€” List data type. the moment. the blueprint. the main character πŸ’…

🌈 Typedefs 🌈

  • typedef struct globus_list globus_list_t β€” List data type. it's giving "we made a cute little alias so you don't have to type struct every single time" 🫢
  • typedef int(* globus_list_pred_t) (void *datum, void *arg) β€” List search predicate. a function pointer that takes a void *datum and a void *arg and hands you back an int. iykyk πŸ’–
  • typedef int(* globus_list_relation_t) (void *low_datum, void *high_datum, void *relation_arg) β€” Relation predicate. same energy, but it takes void *low_datum, void *high_datum, and void *relation_arg, and returns an int. lowkey the backbone of all the sorting stuff below πŸ”₯

⭐ Functions ⭐

  • int globus_list_empty (globus_list_t *head) β€” List empty predicate. is the list empty or not, bestie? yes/no, that's the whole vibe ✨
  • void * globus_list_first (globus_list_t *head) β€” Retrieve head datum. gimme the first thing in the list πŸŽ€
  • globus_list_t * globus_list_rest (globus_list_t *head) β€” Get the remainder of the list. everything after the first thing. the sequel πŸ¦‹
  • int globus_list_size (globus_list_t *head) β€” Get the number of elements in a list. how many besties are in here πŸ’œ
  • void * globus_list_replace_first (globus_list_t *head, void *datum) β€” Replace first datum. swap out the head element for datum, no cap πŸ‘‘
  • globus_list_t * globus_list_search (globus_list_t *head, void *datum) β€” Search a list for a datum. hunting for that one specific datum πŸ”
  • globus_list_t * globus_list_search_pred (globus_list_t *head, globus_list_pred_t predicate, void *pred_args) β€” Search a list with a predicate. same hunt, but you bring your own predicate and pred_args πŸ’…
  • globus_list_t * globus_list_min (globus_list_t *head, globus_list_relation_t relation, void *relation_args) β€” Find the minimum value of a list. the smallest one, using your relation and relation_args 🌸
  • globus_list_t * globus_list_sort (globus_list_t *head, globus_list_relation_t relation, void *relation_args) β€” Sort a list. putting it in order, with relation and relation_args doing the deciding ⭐
  • int globus_list_insert (globus_list_t *volatile *headp, void *datum) β€” Insert an item in a list. note the volatile on that headp, bestie β€” they're not playing πŸ™ˆ
  • globus_list_t * globus_list_cons (void *datum, globus_list_t *list) β€” List constructor. classic cons, taking a datum and a list 🧚
  • globus_list_t * globus_list_copy (globus_list_t *head) β€” Copy constructor. duplicate the whole thing πŸ’–
  • void * globus_list_remove (globus_list_t *volatile *headp, globus_list_t *entry) β€” Remove a datum from a list. again with the volatile on headp β€” the thread-safety girlies are thriving here πŸ”₯
  • void globus_list_free (globus_list_t *head) β€” Free a list. release it back into the wild πŸ•ŠοΈ

πŸ’– Detailed Description πŸ’–

Linked List. that's the whole thing. it's a linked list. it ate. periodt πŸ’…βœ¨


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for globus_common from the source code. not a human, just a doc generator doing its little thing πŸ€–πŸ’œ


okay and for the sign-off: this whole thing is globus_common, Version 18.15, and it's the globus_list.h(3) page πŸŽ€ thanks for reading bestie, go build something slay with your linked lists πŸ’–πŸ¦‹βœ¨