libinn_list(3)

🌸 NAME 🌸

okay so welcome to libinn_list(3), straight outta the InterNetNews documentation πŸ’– β€” this is the page for the list routines. The official name vibe is list - list routines, and yes bestie, that’s literally what it says. πŸŽ€


✨ SYNOPSIS ✨

           #include <inn/list.h>

           struct node {
               struct node *succ;
               struct node *pred;
           };

           struct list {
               struct node *head;
               struct node *tail;
               struct node *tailpred;
           };

           void list_new(struct list *list);

           struct node *list_addhead(struct list *list, struct node *node);

           struct node *list_addtail(struct list *list, struct node *node);

           struct node *list_head(struct list *list);

           struct node *list_tail(struct list *list);

           struct node *list_succ(struct node *node);

           struct node *list_pred(struct node *node);

           struct node *list_remhead(struct list *list);

           struct node *list_remtail(struct list *list);

           struct node *list_remove(struct node *node);

           struct node *list_insert(struct list *list, struct node *node,
                                    struct node *pred);

           bool list_isempty(struct list *list);

πŸ’… DESCRIPTION πŸ’…

okay so here’s the group-chat rundown of what each of these does β€” no cap, every detail stays. 🫢

  • list_new β€” initialises the list header list so as to create an empty list. Fresh start, clean slate, main character energy. ✨
  • list_addhead β€” adds node to the head of list, returning the node just added. front-of-the-line behavior, honestly. πŸ’…
  • list_addtail β€” adds node to the tail of list, returning the node just added. it’s giving β€œend of the queue but make it iconic.” πŸŽ€
  • list_head β€” returns a pointer to the node at the head of list or NULL if the list is empty. πŸ’–
  • list_tail β€” returns a pointer to the node at the tail of list or NULL if the list is empty. πŸ¦‹
  • list_succ β€” returns the next (successor) node on the list after node or NULL if node was the final node. respectfully, the β€œwhat comes next” function. 🌸
  • list_pred β€” returns the previous (predecessor) node on the list before node or NULL if node was the first node. the β€œlook back” function, lowkey. 🌈
  • list_remhead β€” removes the first node from list and returns it to the caller. If the list is empty NULL is returned. bye bestie πŸ‘‹
  • list_remtail β€” removes the last node from list and returns it to the caller. If the list is empty NULL is returned. last one out, etc. πŸ’€
  • list_remove β€” removes node from the list it is on and returns it to the caller. uninvited from the list, but returned safely. 🫢
  • list_insert β€” inserts node onto list after the node pred. If pred is NULL then node is added to the head of list. insertion drama, but make it organized. ✨
little sidebar bestie: the synopsis declares bool list_isempty(struct list *list);, and the DESCRIPTION genuinely doesn’t give it its own entry. that’s not me skipping it β€” that’s literally what’s on the page. πŸ’€

πŸ¦‹ HISTORY πŸ¦‹

This was written by Alex Kiernan <alex.kiernan@thus.net> for InterNetNews 2.4.0 β€” iconic origin story, fr fr. πŸ‘‘


and that’s the page, bestie: INN 2.7.4, dated 2023-03-07 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from
  • arch rolling: inn 2.7.4-4 Β· ISC
  • epel 10: inn-devel 2.7.4-5.el10_3 Β· ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms