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 headerlistso as to create an empty list. Fresh start, clean slate, main character energy. β¨list_addheadβ addsnodeto the head oflist, returning the node just added. front-of-the-line behavior, honestly. πlist_addtailβ addsnodeto the tail oflist, 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 oflistorNULLif the list is empty. πlist_tailβ returns a pointer to the node at the tail oflistorNULLif the list is empty. π¦list_succβ returns the next (successor) node on the list afternodeorNULLifnodewas the final node. respectfully, the βwhat comes nextβ function. πΈlist_predβ returns the previous (predecessor) node on the list beforenodeorNULLifnodewas the first node. the βlook backβ function, lowkey. πlist_remheadβ removes the first node fromlistand returns it to the caller. If the list is emptyNULLis returned. bye bestie πlist_remtailβ removes the last node fromlistand returns it to the caller. If the list is emptyNULLis returned. last one out, etc. πlist_removeβ removesnodefrom the list it is on and returns it to the caller. uninvited from the list, but returned safely. π«Άlist_insertβ insertsnodeontolistafter the nodepred. IfpredisNULLthennodeis added to the head oflist. 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