SEXPRESSIONS
[PROBES]

Defines

#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_VALIDATE(s)

Typedefs

typedef struct SEXP_it SEXP_it_t

Functions

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.
SEXP_tSEXP_number_newb (bool n)
 Create a new sexp object from a boolean value.
SEXP_tSEXP_number_newi_8 (int8_t n)
 Create a new sexp object from an integer.
SEXP_tSEXP_number_newu_8 (uint8_t n)
 Create a new sexp object from an unsigned integer.
uint8_t SEXP_number_getu_8 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
SEXP_tSEXP_number_newi_16 (int16_t n)
 Create a new sexp object from an integer.
SEXP_tSEXP_number_newu_16 (uint16_t n)
 Create a new sexp object from an unsigned integer.
SEXP_tSEXP_number_newi_32 (int32_t n)
 Create a new sexp object from an integer.
int32_t SEXP_number_geti_32 (const SEXP_t *s_exp)
 Get integer value from a sexp object.
bool SEXP_number_getb (const SEXP_t *s_exp)
 Get boolean value from a sexp object.
SEXP_tSEXP_number_newu_32 (uint32_t n)
 Create a new sexp object from an unsigned integer.
uint32_t SEXP_number_getu_32 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
SEXP_tSEXP_number_newi_64 (int64_t n)
 Create a new sexp object from an integer.
int64_t SEXP_number_geti_64 (const SEXP_t *s_exp)
 Get integer value from a sexp object.
SEXP_tSEXP_number_newu_64 (uint64_t n)
 Create a new sexp object from an unsigned integer.
uint64_t SEXP_number_getu_64 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
SEXP_tSEXP_number_newf (double n)
 Create a new sexp object from an floating point value.
double SEXP_number_getf (const SEXP_t *s_exp)
 Get floating point value from a sexp object.
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.
uint16_t SEXP_number_getu_16 (const SEXP_t *s_exp)
 Get unsigned integer value from a sexp object.
void SEXP_number_free (SEXP_t *s_exp)
 Free the specified sexp object.
bool SEXP_numberp (const SEXP_t *s_exp)
 Check whether the provided sexp object is a number.
SEXP_numtype_t SEXP_number_type (const SEXP_t *sexp)
 Get the number type of an object.
SEXP_tSEXP_string_new (const void *string, size_t strlen) __attribute__((nonnull(1)))
 Create a new sexp object from a string.
SEXP_tSEXP_string_newf (const char *format,...) __attribute__((format(printf
 Create a new sexp object from a format string.
SEXP_t nonnull (1)))
void SEXP_string_free (SEXP_t *s_exp)
 Free the specified sexp object.
bool SEXP_stringp (const SEXP_t *s_exp)
 Check whether the provided sexp object is a string.
size_t SEXP_string_length (const SEXP_t *s_exp)
 Get the length of a string in a sexp object.
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.
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.
int SEXP_string_nth (const SEXP_t *s_exp, size_t n)
 Get the n-th byte of a string.
char * SEXP_string_cstr (const SEXP_t *s_exp)
 Get a C string from a sexp object.
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.
char * SEXP_string_cstrp (const SEXP_t *s_exp)
 Obsolete function.
char * SEXP_string_subcstr (const SEXP_t *s_exp, size_t beg, size_t len)
 Get a C substring from a sexp object.
int SEXP_string_cmp (const SEXP_t *str_a, const SEXP_t *str_b)
 Compare two sexp strings.
SEXP_tSEXP_list_new (SEXP_t *memb,...)
 Create a new sexp list, optionally initialized with the provided sexp arguments.
void SEXP_list_free (SEXP_t *s_exp)
 Free the specified sexp object.
bool SEXP_listp (const SEXP_t *s_exp)
 Check whether the provided sexp object is a list.
size_t SEXP_list_length (const SEXP_t *s_exp)
 Get the length of the sexp list.
SEXP_tSEXP_list_first (const SEXP_t *list)
 Get the first element of a list.
SEXP_tSEXP_list_rest (const SEXP_t *list)
 Get the rest of a list.
SEXP_tSEXP_list_last (const SEXP_t *list)
 Get the last element of a list.
SEXP_tSEXP_list_nth (const SEXP_t *list, uint32_t n)
 Get the n-th element of a list.
SEXP_tSEXP_list_add (SEXP_t *list, const SEXP_t *s_exp)
 Add an element to a list.
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.
SEXP_tSEXP_list_push (SEXP_t *list, const SEXP_t *s_exp)
 Push an element to the head of a list.
SEXP_tSEXP_list_pop (SEXP_t *list)
 Extract the first element of a list.
SEXP_tSEXP_list_replace (SEXP_t *list, uint32_t n, const SEXP_t *s_exp)
 Replace the n-th element of a list.
SEXP_tSEXP_listref_first (SEXP_t *list)
 Get the first element of a list.
SEXP_tSEXP_listref_rest (SEXP_t *list)
 Get the rest of a list.
SEXP_tSEXP_listref_last (SEXP_t *list)
 Get the last element of a list.
SEXP_tSEXP_listref_nth (SEXP_t *list, uint32_t n)
 Get the n-th element of a list.
SEXP_it_t * SEXP_listit_new (const SEXP_t *list, int flags)
SEXP_tSEXP_listit_next (SEXP_it_t *it)
SEXP_tSEXP_listit_prev (SEXP_it_t *it)
SEXP_tSEXP_listit_length (SEXP_it_t *it)
SEXP_tSEXP_listit_seek (SEXP_it_t *it, uint32_t n)
void SEXP_listit_free (SEXP_it_t *it)
SEXP_tSEXP_new (void)
SEXP_tSEXP_ref (const SEXP_t *s_exp)
 Create a new reference to a sexp object.
SEXP_tSEXP_unref (SEXP_t *s_exp_o)
SEXP_tSEXP_softref (SEXP_t *s_exp)
 Create a new soft reference to a sexp object.
uint32_t SEXP_refs (const SEXP_t *ref)
 Return the value of the reference counter.
bool SEXP_eq (const SEXP_t *a, const SEXP_t *b)
void SEXP_free (SEXP_t *s_exp)
 Free a sexp object.
void SEXP_vfree (SEXP_t *s_exp,...)
 Free multiple sexp objects.
const char * SEXP_datatype (const SEXP_t *s_exp)
 Get the user data type of a sexp object.
int SEXP_datatype_set (SEXP_t *s_exp, const char *name) __attribute__((nonnull(2)))
 Set the user data type of a sexp object.
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.
SEXP_type_t SEXP_typeof (const SEXP_t *s_exp)
 Get the type of a sexp object.
const char * SEXP_strtype (const SEXP_t *s_exp)
 Get a text description of the sexp object's type.
SEXP_tSEXP_build (const char *s_str,...)
size_t SEXP_sizeof (const SEXP_t *s_exp)
void SEXP_lstack_init (SEXP_lstack_t *stack)
SEXP_lstack_tSEXP_lstack_new (void)
void SEXP_lstack_destroy (SEXP_lstack_t *stack)
void SEXP_lstack_free (SEXP_lstack_t *stack)
SEXP_tSEXP_lstack_push (SEXP_lstack_t *stack, SEXP_t *s_exp)
SEXP_tSEXP_lstack_pop (SEXP_lstack_t *stack)
SEXP_tSEXP_lstack_top (const SEXP_lstack_t *stack)
SEXP_tSEXP_lstack_list (SEXP_lstack_t *stack)
size_t SEXP_lstack_depth (SEXP_lstack_t *stack)

Define Documentation

#define SEXP_number_geti   SEXP_number_geti_32

Get integer value from a sexp object.

The size of the integer may be architecture dependent.

#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.

#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.

#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.


Function Documentation

const char * SEXP_datatype ( const SEXP_t s_exp  ) 

Get the user data type of a sexp object.

Parameters:
s_exp the object to be queried
int SEXP_datatype_set ( SEXP_t s_exp,
const char *  name 
)

Set the user data type of a sexp object.

Parameters:
s_exp the object to be modified
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:
list list containing the object to be modified
n the position of the object
name name of the user data type
void SEXP_free ( SEXP_t s_exp  ) 

Free a sexp object.

Parameters:
s_exp the object to be freed
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:
list the modified sexp object
s_exp the element to be added
SEXP_t * SEXP_list_first ( const SEXP_t list  ) 

Get the first element of a list.

This function increments element's reference count

Parameters:
list the queried sexp object
void SEXP_list_free ( SEXP_t s_exp  ) 

Free the specified sexp object.

Parameters:
s_exp the object to be freed
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_a the first list to be contatenated
list_b the list to be attached to the first one
SEXP_t * SEXP_list_last ( const SEXP_t list  ) 

Get the last element of a list.

This function increments element's reference count.

Parameters:
list the queried sexp object
size_t SEXP_list_length ( const SEXP_t s_exp  ) 

Get the length of the sexp list.

Parameters:
s_sexp the queried sexp object
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:
memb the first sexp object to be inserted into the new list. can be NULL.
... arbitrary number of elements to be inserted
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:
list the queried sexp object
n the position of the element in the list
SEXP_t * SEXP_list_pop ( SEXP_t list  ) 

Extract the first element of a list.

This function increments element's reference count.

Parameters:
list the modified sexp object
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:
list the modified sexp object
s_exp the element to be added
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:
list the modified sexp object
n the index of the element to be replaced
s_exp the element to be added
Returns:
the replaced element
SEXP_t * SEXP_list_rest ( const SEXP_t list  ) 

Get the rest of a list.

This function increments elements' reference count.

Parameters:
list the queried sexp object
bool SEXP_listp ( const SEXP_t s_exp  ) 

Check whether the provided sexp object is a list.

Parameters:
s_exp the sexp object to be tested
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:
list the queried sexp object
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:
list the queried sexp object
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:
list the queried sexp object
n the position of the element in the list
SEXP_t * SEXP_listref_rest ( SEXP_t list  ) 

Get the rest of a list.

This function creates a soft reference to the list.

Parameters:
list the queried sexp object
void SEXP_number_free ( SEXP_t s_exp  ) 

Free the specified sexp object.

Parameters:
s_exp the object to be freed
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_exp the queried sexp object
dst buffer for the value
type the desired number type
bool SEXP_number_getb ( const SEXP_t s_exp  ) 

Get boolean value from a sexp object.

Parameters:
s_exp the queried sexp object
double SEXP_number_getf ( const SEXP_t s_exp  ) 

Get floating point value from a sexp object.

Parameters:
s_exp the queried sexp object
int32_t SEXP_number_geti_32 ( const SEXP_t s_exp  ) 

Get integer value from a sexp object.

Parameters:
s_exp the queried sexp object
int64_t SEXP_number_geti_64 ( const SEXP_t s_exp  ) 

Get integer value from a sexp object.

Parameters:
s_exp the queried sexp object
uint16_t SEXP_number_getu_16 ( const SEXP_t s_exp  ) 

Get unsigned integer value from a sexp object.

Parameters:
s_exp the queried sexp object
uint32_t SEXP_number_getu_32 ( const SEXP_t s_exp  ) 

Get unsigned integer value from a sexp object.

Parameters:
s_exp the queried sexp object
uint64_t SEXP_number_getu_64 ( const SEXP_t s_exp  ) 

Get unsigned integer value from a sexp object.

Parameters:
s_exp the queried sexp object
uint8_t SEXP_number_getu_8 ( const SEXP_t s_exp  ) 

Get unsigned integer value from a sexp object.

Parameters:
s_exp the queried sexp object
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:
t the desired number type
n pointer to the number value
SEXP_t * SEXP_number_newb ( bool  n  ) 

Create a new sexp object from a boolean value.

Parameters:
n the boolean value to store
SEXP_t * SEXP_number_newf ( double  n  ) 

Create a new sexp object from an floating point value.

Parameters:
n the floating point value to store
SEXP_t * SEXP_number_newi_16 ( int16_t  n  ) 

Create a new sexp object from an integer.

Parameters:
n the integer value to store
SEXP_t * SEXP_number_newi_32 ( int32_t  n  ) 

Create a new sexp object from an integer.

Parameters:
n the integer value to store
SEXP_t * SEXP_number_newi_64 ( int64_t  n  ) 

Create a new sexp object from an integer.

Parameters:
n the integer value to store
SEXP_t * SEXP_number_newi_8 ( int8_t  n  ) 

Create a new sexp object from an integer.

Parameters:
n the integer value to store
SEXP_t * SEXP_number_newu_16 ( uint16_t  n  ) 

Create a new sexp object from an unsigned integer.

Parameters:
n the unsigned integer value to store
SEXP_t * SEXP_number_newu_32 ( uint32_t  n  ) 

Create a new sexp object from an unsigned integer.

Parameters:
n the integer value to store
SEXP_t * SEXP_number_newu_64 ( uint64_t  n  ) 

Create a new sexp object from an unsigned integer.

Parameters:
n the integer value to store
SEXP_t * SEXP_number_newu_8 ( uint8_t  n  ) 

Create a new sexp object from an unsigned integer.

Parameters:
n the unsigned integer value to store
SEXP_numtype_t SEXP_number_type ( const SEXP_t sexp  ) 

Get the number type of an object.

Parameters:
sexp the queried sexp object
bool SEXP_numberp ( const SEXP_t s_exp  ) 

Check whether the provided sexp object is a number.

Parameters:
s_exp the sexp object to be tested
SEXP_t * SEXP_ref ( const SEXP_t s_exp  ) 

Create a new reference to a sexp object.

Parameters:
s_exp the object of which to increment the reference count
uint32_t SEXP_refs ( const SEXP_t ref  ) 

Return the value of the reference counter.

Parameters:
ref 
SEXP_t * SEXP_softref ( SEXP_t s_exp  ) 

Create a new soft reference to a sexp object.

Parameters:
s_exp the object to which create the soft reference
int SEXP_strcmp ( const SEXP_t s_exp,
const char *  str 
)

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

Parameters:
s_exp the sexp object to be compared
str the C string to be compared
int SEXP_string_cmp ( const SEXP_t str_a,
const SEXP_t str_b 
)

Compare two sexp strings.

Parameters:
str_a the first string to compare
str_b the second string to compare
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_exp the queried object
buf the buffer to store the name in
len the length of the buffer
void SEXP_string_free ( SEXP_t s_exp  ) 

Free the specified sexp object.

Parameters:
s_exp the object to be freed
size_t SEXP_string_length ( const SEXP_t s_exp  ) 

Get the length of a string in a sexp object.

Parameters:
s_exp the queried sexp object
SEXP_t * SEXP_string_new ( const void *  string,
size_t  strlen 
)

Create a new sexp object from a string.

Parameters:
string the string to be stored
strlen the length of the string in bytes
SEXP_t * SEXP_string_newf ( const char *  format,
  ... 
)

Create a new sexp object from a format string.

Parameters:
format the format of the new string
... arguments for the format
int SEXP_string_nth ( const SEXP_t s_exp,
size_t  n 
)

Get the n-th byte of a string.

Parameters:
s_exp the sexp object holding the string
n the index of the desired character
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_sexp the queried sexp object
beg the position of the fisrt character of the substring
len the length of the substring
bool SEXP_stringp ( const SEXP_t s_exp  ) 

Check whether the provided sexp object is a string.

Parameters:
s_exp the sexp object to be tested
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_exp the sexp object to be compared
str the C string to be compared
n compare at most n bytes
const char * SEXP_strtype ( const SEXP_t s_exp  ) 

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

Parameters:
s_exp the object to be queried
SEXP_type_t SEXP_typeof ( const SEXP_t s_exp  ) 

Get the type of a sexp object.

Parameters:
s_exp the object to be queried
void SEXP_vfree ( SEXP_t s_exp,
  ... 
)

Free multiple sexp objects.

The argument list needs to be terminated with NULL.

Parameters:
s_exp the object to be freed
... arbitrary number of objects to be freed

Generated on 14 Jul 2010 for Open SCAP Library by  doxygen 1.6.1