GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AG_LIST(3) FreeBSD Library Functions Manual AG_LIST(3)

AG_List
agar variable array structure

#include <agar/core/list.h>

The AG_List structure describes an ordered list of AG_Variable(3) items. It is defined as follows:
typedef struct ag_list {
	int n;			/* Element count */
	AG_Variable *v;		/* Items */
} AG_List;

AG_List *
AG_ListNew(void);


AG_List *
AG_ListDup(const AG_List *L);


int
AG_ListDestroy(AG_List *L);


int
AG_ListAppend(AG_List *L, const AG_Variable *V);


int
AG_ListPrepend(AG_List *L, const AG_Variable *V);


int
AG_ListInsert(AG_List *L, int idx, const AG_Variable *V);


int
AG_ListRemove(AG_List *L, int idx);


int
AG_ListClear(AG_List *L);

The AG_ListNew() function allocates and initializes a new, empty AG_List. AG_ListNew() returns a pointer to the new list or NULL on failure. AG_ListDup() duplicates an existing list L. AG_ListDestroy() frees all resources allocated by a list.

AG_ListAppend() appends a copy of variable V to the list. AG_ListPrepend() inserts at the beginning of the list. AG_ListInsert() inserts at a specified position idx. AG_ListAppend(), AG_ListPrepend() and AG_ListInsert() return the index of the new list entry or -1 on failure.

AG_ListRemove() removes the element at index idx from the list, returning 1 on success or -1 if the given index is invalid. AG_ListClear() removes all elements from the list.

AG_Intro(3), AG_List(3), AG_Tbl(3), AG_Tree(3), AG_Variable(3)

The AG_List interface first appeared in Agar 1.3.4
April 30, 2009 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.