Open SCAP Library
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
SEXPRESSIONS
Collaboration diagram for SEXPRESSIONS:

Data Structures

struct  SEXP_list_it
 
struct  __dbginf_t
 

Macros

#define SEXP_MANIP_H
 
#define SEXP_number_newi   SEXP_number_newi_32
 Create a new sexp object from an integer.
 
#define SEXP_number_geti   SEXP_number_geti_32
 Get integer value from a sexp object.
 
#define SEXP_number_newu   SEXP_number_newu_32
 Create a new sexp object from an unsigned integer.
 
#define SEXP_number_getu   SEXP_number_getu_32
 Get unsigned integer value from a sexp object.
 
#define SEXP_IT_RECURSIVE   0x01
 
#define SEXP_IT_HARDREF   0x02
 
#define SEXP_list_foreach(var, list)    for (uint32_t OSCAP_CONCAT(i,__LINE__) = 1; ((var) = SEXP_list_nth (list, OSCAP_CONCAT(i,__LINE__))) != NULL; ++OSCAP_CONCAT(i,__LINE__), SEXP_free (var), (var) = NULL)
 Iterate through a list, assigning each element to a variable.
 
#define SEXP_sublist_foreach(var, list, beg, end)    for (uint32_t OSCAP_CONCAT(i,__LINE__) = (beg); OSCAP_CONCAT(i,__LINE__) <= ((size_t)(end)) && ((var) = SEXP_list_nth (list, OSCAP_CONCAT(i,__LINE__))) != NULL; ++OSCAP_CONCAT(i,__LINE__), SEXP_free (var), (var) = NULL)
 Iterate through a sublist, assigning each element to a variable.
 
#define SEXP_LIST_END   (UINT32_MAX - 1)
 
#define SEXP_VALIDATE(s)   __SEXP_VALIDATE(s, __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
#define SEXP_LISTIT_ARRAY_INC   32
 
#define SEXP_LISTIT_ARRAY_INIT   32
 

Typedefs

typedef struct SEXP_it SEXP_it_t
 
typedef struct SEXP_list_it SEXP_list_it
 

Functions

OSCAP_API SEXP_tSEXP_number_new (SEXP_numtype_t t, const void *n) __attribute__((nonnull(2)))
 Create a new sexp object from a value and a number type.
 
OSCAP_API SEXP_tSEXP_number_newb (bool n)
 Create a new sexp object from a boolean value.
 
OSCAP_API SEXP_tSEXP_number_newi_8 (int8_t n)
 Create a new sexp object from an integer.
 
OSCAP_API SEXP_tSEXP_number_newu_8 (uint8_t n)
 Create a new sexp object from an unsigned integer.
 
OSCAP_API uint8_t SEXP_number_getu_8 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
 
OSCAP_API SEXP_tSEXP_number_newi_16 (int16_t n)
 Create a new sexp object from an integer.
 
OSCAP_API SEXP_tSEXP_number_newu_16 (uint16_t n)
 Create a new sexp object from an unsigned integer.
 
OSCAP_API SEXP_tSEXP_number_newi_32 (int32_t n)
 Create a new sexp object from an integer.
 
OSCAP_API int32_t SEXP_number_geti_32 (const SEXP_t *s_exp)
 Get integer value from a sexp object.
 
OSCAP_API bool SEXP_number_getb (const SEXP_t *s_exp)
 Get boolean value from a sexp object.
 
OSCAP_API SEXP_tSEXP_number_newu_32 (uint32_t n)
 Create a new sexp object from an unsigned integer.
 
OSCAP_API uint32_t SEXP_number_getu_32 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
 
OSCAP_API SEXP_tSEXP_number_newi_64 (int64_t n)
 Create a new sexp object from an integer.
 
OSCAP_API int64_t SEXP_number_geti_64 (const SEXP_t *s_exp)
 Get integer value from a sexp object.
 
OSCAP_API SEXP_tSEXP_number_newu_64 (uint64_t n)
 Create a new sexp object from an unsigned integer.
 
OSCAP_API uint64_t SEXP_number_getu_64 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
 
OSCAP_API SEXP_tSEXP_number_newf (double n)
 Create a new sexp object from an floating point value.
 
OSCAP_API double SEXP_number_getf (const SEXP_t *s_exp)
 Get floating point value from a sexp object.
 
OSCAP_API int SEXP_number_get (const SEXP_t *s_exp, void *dst, SEXP_numtype_t type)
 Get a value from a sexp object according to a specified type.
 
OSCAP_API uint16_t SEXP_number_getu_16 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
 
OSCAP_API void SEXP_number_free (SEXP_t *s_exp)
 Free the specified sexp object.
 
OSCAP_API bool SEXP_numberp (const SEXP_t *s_exp)
 Check whether the provided sexp object is a number.
 
OSCAP_API SEXP_numtype_t SEXP_number_type (const SEXP_t *sexp)
 Get the number type of an object.
 
OSCAP_API SEXP_tSEXP_string_new (const void *string, size_t strlen) __attribute__((nonnull(1)))
 Create a new sexp object from a string.
 
OSCAP_API SEXP_tSEXP_string_newf (const char *format,...) __attribute__((format(printf
 Create a new sexp object from a format string.
 
OSCAP_API SEXP_t nonnull (1)))
 
OSCAP_API void SEXP_string_free (SEXP_t *s_exp)
 Free the specified sexp object.
 
OSCAP_API bool SEXP_stringp (const SEXP_t *s_exp)
 Check whether the provided sexp object is a string.
 
OSCAP_API size_t SEXP_string_length (const SEXP_t *s_exp)
 Get the length of a string in a sexp object.
 
OSCAP_API int SEXP_strcmp (const SEXP_t *s_exp, const char *str) __attribute__((nonnull(2)))
 Compare a string in a sexp object with a C string.
 
OSCAP_API int SEXP_strncmp (const SEXP_t *s_exp, const char *str, size_t n) __attribute__((nonnull(2)))
 Compare a string in a sexp object with a C string.
 
OSCAP_API int SEXP_string_nth (const SEXP_t *s_exp, size_t n)
 Get the n-th byte of a string.
 
OSCAP_API char * SEXP_string_cstr (const SEXP_t *s_exp)
 Get a C string from a sexp object.
 
OSCAP_API size_t SEXP_string_cstr_r (const SEXP_t *s_exp, char *buf, size_t len) __attribute__((nonnull(2)))
 Get a C string from a sexp object.
 
OSCAP_API char * SEXP_string_cstrp (const SEXP_t *s_exp)
 Obsolete function.
 
OSCAP_API char * SEXP_string_subcstr (const SEXP_t *s_exp, size_t beg, size_t len)
 Get a C substring from a sexp object.
 
OSCAP_API int SEXP_string_cmp (const SEXP_t *str_a, const SEXP_t *str_b)
 Compare two sexp strings.
 
OSCAP_API bool SEXP_string_getb (const SEXP_t *s_exp)
 Try to cast the supplied sexp string to a boolean.
 
OSCAP_API SEXP_tSEXP_list_new (SEXP_t *memb,...)
 Create a new sexp list, optionally initialized with the provided sexp arguments.
 
OSCAP_API void SEXP_list_free (SEXP_t *s_exp)
 Free the specified sexp object.
 
OSCAP_API bool SEXP_listp (const SEXP_t *s_exp)
 Check whether the provided sexp object is a list.
 
OSCAP_API size_t SEXP_list_length (const SEXP_t *s_exp)
 Get the length of the sexp list.
 
OSCAP_API SEXP_tSEXP_list_first (const SEXP_t *list)
 Get the first element of a list.
 
OSCAP_API SEXP_tSEXP_list_rest (const SEXP_t *list)
 Get the rest of a list.
 
OSCAP_API SEXP_tSEXP_list_last (const SEXP_t *list)
 Get the last element of a list.
 
OSCAP_API SEXP_tSEXP_list_nth (const SEXP_t *list, uint32_t n)
 Get the n-th element of a list.
 
OSCAP_API SEXP_tSEXP_list_add (SEXP_t *list, const SEXP_t *s_exp)
 Add an element to a list.
 
OSCAP_API SEXP_tSEXP_list_join (const SEXP_t *list_a, const SEXP_t *list_b)
 Create a new list containing the concatenated contents of two lists.
 
OSCAP_API SEXP_tSEXP_list_push (SEXP_t *list, const SEXP_t *s_exp)
 Push an element to the head of a list.
 
OSCAP_API SEXP_tSEXP_list_pop (SEXP_t *list)
 Extract the first element of a list.
 
OSCAP_API SEXP_tSEXP_list_sort (SEXP_t *list, int(*compare)(const SEXP_t *, const SEXP_t *))
 Sort a list using ‘compare’ as the comparison function.
 
OSCAP_API SEXP_tSEXP_list_replace (SEXP_t *list, uint32_t n, const SEXP_t *s_exp)
 Replace the n-th element of a list.
 
OSCAP_API SEXP_tSEXP_listref_first (SEXP_t *list)
 Get the first element of a list.
 
OSCAP_API SEXP_tSEXP_listref_rest (SEXP_t *list)
 Get the rest of a list.
 
OSCAP_API SEXP_tSEXP_listref_last (SEXP_t *list)
 Get the last element of a list.
 
OSCAP_API SEXP_tSEXP_listref_nth (SEXP_t *list, uint32_t n)
 Get the n-th element of a list.
 
OSCAP_API SEXP_list_itSEXP_list_it_new (const SEXP_t *list)
 
OSCAP_API SEXP_tSEXP_list_it_next (SEXP_list_it *it)
 
OSCAP_API void SEXP_list_it_free (SEXP_list_it *it)
 
OSCAP_API SEXP_tSEXP_new (void)
 
OSCAP_API bool SEXP_emptyp (SEXP_t *sexp)
 
OSCAP_API SEXP_tSEXP_ref (const SEXP_t *s_exp)
 Create a new reference to a sexp object.
 
OSCAP_API SEXP_tSEXP_unref (SEXP_t *s_exp_o)
 
OSCAP_API SEXP_tSEXP_softref (SEXP_t *s_exp)
 Create a new soft reference to a sexp object.
 
OSCAP_API bool SEXP_softrefp (const SEXP_t *s_exp)
 Check whether an S-exp reference is a "soft" reference.
 
OSCAP_API uint32_t SEXP_refs (const SEXP_t *ref)
 Return the value of the reference counter.
 
OSCAP_API bool SEXP_eq (const SEXP_t *a, const SEXP_t *b)
 
OSCAP_API int SEXP_refcmp (const SEXP_t *a, const SEXP_t *b)
 Compare reference pointers.
 
OSCAP_API bool SEXP_deepcmp (const SEXP_t *a, const SEXP_t *b)
 
OSCAP_API void SEXP_free (SEXP_t *s_exp)
 Free a sexp object.
 
OSCAP_API const char * SEXP_datatype (const SEXP_t *s_exp)
 Get the user data type of a sexp object.
 
OSCAP_API int SEXP_datatype_set (SEXP_t *s_exp, const char *name) __attribute__((nonnull(2)))
 Set the user data type of a sexp object.
 
OSCAP_API int SEXP_datatype_set_nth (SEXP_t *list, uint32_t n, const char *name) __attribute__((nonnull(3)))
 Set the user data type of the nth sexp object in a list.
 
OSCAP_API SEXP_type_t SEXP_typeof (const SEXP_t *s_exp)
 Get the type of a sexp object.
 
OSCAP_API const char * SEXP_strtype (const SEXP_t *s_exp)
 Get a text description of the sexp object's type.
 
OSCAP_API SEXP_tSEXP_build (const char *s_str,...)
 
OSCAP_API size_t SEXP_sizeof (const SEXP_t *s_exp)
 
OSCAP_API void __SEXP_VALIDATE (const SEXP_t *s_exp, const char *file, uint32_t line, const char *func)
 
SEXP_ID_t SEXP_ID_v (const SEXP_t *s)
 Compute an S-exp value identifier.
 

Variables

struct SEXP_val_lblkSEXP_list_it::block
 
uint16_t SEXP_list_it::index
 
uint16_t SEXP_list_it::count
 
const char * __dbginf_t::file
 
uint32_t __dbginf_t::line
 
const char * __dbginf_t::func
 

Detailed Description

Macro Definition Documentation

◆ SEXP_list_foreach

#define SEXP_list_foreach ( var,
list )    for (uint32_t OSCAP_CONCAT(i,__LINE__) = 1; ((var) = SEXP_list_nth (list, OSCAP_CONCAT(i,__LINE__))) != NULL; ++OSCAP_CONCAT(i,__LINE__), SEXP_free (var), (var) = NULL)

Iterate through a list, assigning each element to a variable.

Parameters
varthe var variable is assigned one value from the list in each cycle
listthe list the loop iterates through

◆ SEXP_number_geti

#define SEXP_number_geti   SEXP_number_geti_32

Get integer value from a sexp object.

The size of the integer may be architecture dependent.

◆ SEXP_number_getu

#define SEXP_number_getu   SEXP_number_getu_32

Get unsigned integer value from a sexp object.

The size of the integer may be architecture dependent.

◆ SEXP_number_newi

#define SEXP_number_newi   SEXP_number_newi_32

Create a new sexp object from an integer.

The size of the integer may be architecture dependent.

◆ SEXP_number_newu

#define SEXP_number_newu   SEXP_number_newu_32

Create a new sexp object from an unsigned integer.

The size of the integer may be architecture dependent.

◆ SEXP_sublist_foreach

#define SEXP_sublist_foreach ( var,
list,
beg,
end )    for (uint32_t OSCAP_CONCAT(i,__LINE__) = (beg); OSCAP_CONCAT(i,__LINE__) <= ((size_t)(end)) && ((var) = SEXP_list_nth (list, OSCAP_CONCAT(i,__LINE__))) != NULL; ++OSCAP_CONCAT(i,__LINE__), SEXP_free (var), (var) = NULL)

Iterate through a sublist, assigning each element to a variable.

Parameters
varthe var variable is assigned one value from the list in each cycle
listthe list the loop iterates through
begthe index of the first element of the sublist
endthe index of the last element of the sublist

Function Documentation

◆ SEXP_datatype()

const char * SEXP_datatype ( const SEXP_t * s_exp)

Get the user data type of a sexp object.

Parameters
s_expthe object to be queried

◆ SEXP_datatype_set()

int SEXP_datatype_set ( SEXP_t * s_exp,
const char * name )

Set the user data type of a sexp object.

Parameters
s_expthe object to be modified

◆ SEXP_datatype_set_nth()

int SEXP_datatype_set_nth ( SEXP_t * list,
uint32_t n,
const char * name )

Set the user data type of the nth sexp object in a list.

Parameters
listlist containing the object to be modified
nthe position of the object
namename of the user data type

◆ SEXP_free()

void SEXP_free ( SEXP_t * s_exp)

Free a sexp object.

Parameters
s_expthe object to be freed

◆ SEXP_list_add()

SEXP_t * SEXP_list_add ( SEXP_t * list,
const SEXP_t * s_exp )

Add an element to a list.

This function increments element's reference count.

Parameters
listthe modified sexp object
s_expthe element to be added

◆ SEXP_list_first()

SEXP_t * SEXP_list_first ( const SEXP_t * list)

Get the first element of a list.

This function increments element's reference count

Parameters
listthe queried sexp object

◆ SEXP_list_free()

void SEXP_list_free ( SEXP_t * s_exp)

Free the specified sexp object.

Parameters
s_expthe object to be freed

◆ SEXP_list_join()

SEXP_t * SEXP_list_join ( const SEXP_t * list_a,
const SEXP_t * list_b )

Create a new list containing the concatenated contents of two lists.

This function increments element's reference count.

Parameters
list_athe first list to be contatenated
list_bthe list to be attached to the first one

◆ SEXP_list_last()

SEXP_t * SEXP_list_last ( const SEXP_t * list)

Get the last element of a list.

This function increments element's reference count.

Parameters
listthe queried sexp object

◆ SEXP_list_length()

size_t SEXP_list_length ( const SEXP_t * s_exp)

Get the length of the sexp list.

Parameters
s_sexpthe queried sexp object

◆ SEXP_list_new()

SEXP_t * SEXP_list_new ( SEXP_t * memb,
... )

Create a new sexp list, optionally initialized with the provided sexp arguments.

The argument list needs to be terminated with NULL.

Parameters
membthe first sexp object to be inserted into the new list. can be NULL.
...arbitrary number of elements to be inserted

◆ SEXP_list_nth()

SEXP_t * SEXP_list_nth ( const SEXP_t * list,
uint32_t n )

Get the n-th element of a list.

This function increments element's reference count.

Parameters
listthe queried sexp object
nthe position of the element in the list

◆ SEXP_list_pop()

SEXP_t * SEXP_list_pop ( SEXP_t * list)

Extract the first element of a list.

This function increments element's reference count.

Parameters
listthe modified sexp object

◆ SEXP_list_push()

SEXP_t * SEXP_list_push ( SEXP_t * list,
const SEXP_t * s_exp )

Push an element to the head of a list.

This function increments element's reference count.

Parameters
listthe modified sexp object
s_expthe element to be added

◆ SEXP_list_replace()

SEXP_t * SEXP_list_replace ( SEXP_t * list,
uint32_t n,
const SEXP_t * s_exp )

Replace the n-th element of a list.

This function increments element's reference count.

Parameters
listthe modified sexp object
nthe index of the element to be replaced
s_expthe element to be added
Returns
the replaced element

◆ SEXP_list_rest()

SEXP_t * SEXP_list_rest ( const SEXP_t * list)

Get the rest of a list.

This function increments elements' reference count.

Parameters
listthe queried sexp object

◆ SEXP_listp()

bool SEXP_listp ( const SEXP_t * s_exp)

Check whether the provided sexp object is a list.

Parameters
s_expthe sexp object to be tested

◆ SEXP_listref_first()

SEXP_t * SEXP_listref_first ( SEXP_t * list)

Get the first element of a list.

This function creates a soft reference to the element.

Parameters
listthe queried sexp object

◆ SEXP_listref_last()

SEXP_t * SEXP_listref_last ( SEXP_t * list)

Get the last element of a list.

This function creates a soft reference to the element.

Parameters
listthe queried sexp object

◆ SEXP_listref_nth()

SEXP_t * SEXP_listref_nth ( SEXP_t * list,
uint32_t n )

Get the n-th element of a list.

This function creates a soft reference to the element.

Parameters
listthe queried sexp object
nthe position of the element in the list

◆ SEXP_listref_rest()

SEXP_t * SEXP_listref_rest ( SEXP_t * list)

Get the rest of a list.

This function creates a soft reference to the list.

Parameters
listthe queried sexp object

◆ SEXP_number_free()

void SEXP_number_free ( SEXP_t * s_exp)

Free the specified sexp object.

Parameters
s_expthe object to be freed

◆ SEXP_number_get()

int SEXP_number_get ( const SEXP_t * s_exp,
void * dst,
SEXP_numtype_t type )

Get a value from a sexp object according to a specified type.

Parameters
s_expthe queried sexp object
dstbuffer for the value
typethe desired number type

◆ SEXP_number_getb()

bool SEXP_number_getb ( const SEXP_t * s_exp)

Get boolean value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_getf()

double SEXP_number_getf ( const SEXP_t * s_exp)

Get floating point value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_geti_32()

int32_t SEXP_number_geti_32 ( const SEXP_t * s_exp)

Get integer value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_geti_64()

int64_t SEXP_number_geti_64 ( const SEXP_t * s_exp)

Get integer value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_getu_16()

uint16_t SEXP_number_getu_16 ( const SEXP_t * s_exp)

Get unsigned integer value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_getu_32()

uint32_t SEXP_number_getu_32 ( const SEXP_t * s_exp)

Get unsigned integer value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_getu_64()

uint64_t SEXP_number_getu_64 ( const SEXP_t * s_exp)

Get unsigned integer value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_getu_8()

uint8_t SEXP_number_getu_8 ( const SEXP_t * s_exp)

Get unsigned integer value from a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_number_new()

SEXP_t * SEXP_number_new ( SEXP_numtype_t t,
const void * n )

Create a new sexp object from a value and a number type.

Parameters
tthe desired number type
npointer to the number value

◆ SEXP_number_newb()

SEXP_t * SEXP_number_newb ( bool n)

Create a new sexp object from a boolean value.

Parameters
nthe boolean value to store

◆ SEXP_number_newf()

SEXP_t * SEXP_number_newf ( double n)

Create a new sexp object from an floating point value.

Parameters
nthe floating point value to store

◆ SEXP_number_newi_16()

SEXP_t * SEXP_number_newi_16 ( int16_t n)

Create a new sexp object from an integer.

Parameters
nthe integer value to store

◆ SEXP_number_newi_32()

SEXP_t * SEXP_number_newi_32 ( int32_t n)

Create a new sexp object from an integer.

Parameters
nthe integer value to store

◆ SEXP_number_newi_64()

SEXP_t * SEXP_number_newi_64 ( int64_t n)

Create a new sexp object from an integer.

Parameters
nthe integer value to store

◆ SEXP_number_newi_8()

SEXP_t * SEXP_number_newi_8 ( int8_t n)

Create a new sexp object from an integer.

Parameters
nthe integer value to store

◆ SEXP_number_newu_16()

SEXP_t * SEXP_number_newu_16 ( uint16_t n)

Create a new sexp object from an unsigned integer.

Parameters
nthe unsigned integer value to store

◆ SEXP_number_newu_32()

SEXP_t * SEXP_number_newu_32 ( uint32_t n)

Create a new sexp object from an unsigned integer.

Parameters
nthe integer value to store

◆ SEXP_number_newu_64()

SEXP_t * SEXP_number_newu_64 ( uint64_t n)

Create a new sexp object from an unsigned integer.

Parameters
nthe integer value to store

◆ SEXP_number_newu_8()

SEXP_t * SEXP_number_newu_8 ( uint8_t n)

Create a new sexp object from an unsigned integer.

Parameters
nthe unsigned integer value to store

◆ SEXP_number_type()

SEXP_numtype_t SEXP_number_type ( const SEXP_t * sexp)

Get the number type of an object.

Parameters
sexpthe queried sexp object

◆ SEXP_numberp()

bool SEXP_numberp ( const SEXP_t * s_exp)

Check whether the provided sexp object is a number.

Parameters
s_expthe sexp object to be tested

◆ SEXP_ref()

SEXP_t * SEXP_ref ( const SEXP_t * s_exp)

Create a new reference to a sexp object.

Parameters
s_expthe object of which to increment the reference count

◆ SEXP_refs()

uint32_t SEXP_refs ( const SEXP_t * ref)

Return the value of the reference counter.

Parameters
ref

◆ SEXP_softref()

SEXP_t * SEXP_softref ( SEXP_t * s_exp)

Create a new soft reference to a sexp object.

Parameters
s_expthe object to which create the soft reference

◆ SEXP_softrefp()

bool SEXP_softrefp ( const SEXP_t * s_exp)

Check whether an S-exp reference is a "soft" reference.

Parameters
s_expthe S-exp reference

◆ SEXP_strcmp()

int SEXP_strcmp ( const SEXP_t * s_exp,
const char * str )

Compare a string in a sexp object with a C string.

Parameters
s_expthe sexp object to be compared
strthe C string to be compared

◆ SEXP_string_cmp()

int SEXP_string_cmp ( const SEXP_t * str_a,
const SEXP_t * str_b )

Compare two sexp strings.

Parameters
str_athe first string to compare
str_bthe second string to compare

◆ SEXP_string_cstr_r()

size_t SEXP_string_cstr_r ( const SEXP_t * s_exp,
char * buf,
size_t len )

Get a C string from a sexp object.

The name is stored in the provided buffer.

Parameters
s_expthe queried object
bufthe buffer to store the name in
lenthe length of the buffer

◆ SEXP_string_free()

void SEXP_string_free ( SEXP_t * s_exp)

Free the specified sexp object.

Parameters
s_expthe object to be freed

◆ SEXP_string_getb()

bool SEXP_string_getb ( const SEXP_t * s_exp)

Try to cast the supplied sexp string to a boolean.

Parameters
s_extthe string to be cast

◆ SEXP_string_length()

size_t SEXP_string_length ( const SEXP_t * s_exp)

Get the length of a string in a sexp object.

Parameters
s_expthe queried sexp object

◆ SEXP_string_new()

SEXP_t * SEXP_string_new ( const void * string,
size_t strlen )

Create a new sexp object from a string.

Parameters
stringthe string to be stored
strlenthe length of the string in bytes

◆ SEXP_string_newf()

SEXP_t * SEXP_string_newf ( const char * format,
... )

Create a new sexp object from a format string.

Parameters
formatthe format of the new string
...arguments for the format

◆ SEXP_string_nth()

int SEXP_string_nth ( const SEXP_t * s_exp,
size_t n )

Get the n-th byte of a string.

Parameters
s_expthe sexp object holding the string
nthe index of the desired character

◆ SEXP_string_subcstr()

char * SEXP_string_subcstr ( const SEXP_t * s_exp,
size_t beg,
size_t len )

Get a C substring from a sexp object.

Parameters
s_sexpthe queried sexp object
begthe position of the fisrt character of the substring
lenthe length of the substring

◆ SEXP_stringp()

bool SEXP_stringp ( const SEXP_t * s_exp)

Check whether the provided sexp object is a string.

Parameters
s_expthe sexp object to be tested

◆ SEXP_strncmp()

int SEXP_strncmp ( const SEXP_t * s_exp,
const char * str,
size_t n )

Compare a string in a sexp object with a C string.

Parameters
s_expthe sexp object to be compared
strthe C string to be compared
ncompare at most n bytes

◆ SEXP_strtype()

const char * SEXP_strtype ( const SEXP_t * s_exp)

Get a text description of the sexp object's type.

Parameters
s_expthe object to be queried

◆ SEXP_typeof()

SEXP_type_t SEXP_typeof ( const SEXP_t * s_exp)

Get the type of a sexp object.

Parameters
s_expthe object to be queried