NetSurf
Functions
generics.c File Reference
#include <stdlib.h>
#include "utils/http/generics.h"
#include "utils/http/primitives.h"
Include dependency graph for generics.c:

Go to the source code of this file.

Functions

void http___item_list_destroy (http__item *list)
 Destructor for an item list. More...
 
nserror http___item_list_parse (const char **input, http__itemparser itemparser, http__item *first, http__item **items)
 Parse a list of items. More...
 

Function Documentation

◆ http___item_list_destroy()

void http___item_list_destroy ( http__item list)

Destructor for an item list.

Parameters
listList to destroy

Definition at line 29 of file generics.c.

References http__item::free, and http__item::next.

◆ http___item_list_parse()

nserror http___item_list_parse ( const char **  input,
http__itemparser  itemparser,
http__item first,
http__item **  items 
)

Parse a list of items.

Parameters
inputPointer to current input byte. Updated on exit.
itemparserPointer to function to parse list items
firstPointer to first item, or NULL.
itemsPointer to location to receive on-heap parameter list.
Returns
NSERROR_OK on success, NSERROR_NOMEM on memory exhaustion, NSERROR_NOT_FOUND if no items could be parsed

The returned list is owned by the caller

Note
Ownership of the first item is passed to this function.

Definition at line 55 of file generics.c.

References http__item_list_destroy, http__skip_LWS(), items, http__item::next, NSERROR_NOT_FOUND, and NSERROR_OK.

Here is the call graph for this function: