rc_stringlist(3)

rc_stringlist3

Rc string list functions

Usage

#include <rc.h>

RC_STRINGLIST * Fn rc_stringlist_new void

RC_STRING * Fn rc_stringlist_add RC_STRINGLIST *list const char *item

RC_STRING * Fn rc_stringlist_addu RC_STRINGLIST *list const char *item

bool Fn rc_stringlist_delete RC_STRINGLIST const char *item

void Fn rc_stringlist_free RC_STRINGLIST *list

void Fn rc_stringlist_sort RC_STRINGLIST *list

Library

Run Command library (librc, -lrc)

Overview

These functions provide an easy means of manipulating string lists. They are basically wrappers around TAILQ macros found in queue(3).

rc_stringlist_new() creates a new list head to store the list.

rc_stringlist_add() adds a malloced copy of item to list. It returns a pointer to the new item on success, or NULL on failure and sets errno accordingly. rc_stringlist_addu() only works if list does not already contain item.

rc_stringlist_delete() removes and frees item from list, retuning true on success, otherwise false.

rc_stringlist_sort() sorts the list according to C locale.

rc_stringlist_free() frees each item on list and the list itself.

Releases

6 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8
  2. 9–11
  3. 12–13

Authors

Roy Marples <[email protected]>

From librc-dev 0.56-1 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.