Small, Fast S-Expression Library
sexp_ops.h
Go to the documentation of this file.
1 
37 #ifndef __SEXP_OPS_H__
38 #define __SEXP_OPS_H__
39 
48 #include "sexp.h"
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54  /*========*/
55  /* MACROS */
56  /*========*/
57 
61 #define hd_sexp(s) ((s)->list)
62 
66 #define tl_sexp(s) ((s)->list->next)
67 
71 #define next_sexp(s) ((s)->next)
72 
77 #define reset_pcont(c) ((c)->lastPos = NULL)
78 
89  sexp_t *find_sexp(const char *name, sexp_t *start);
90 
104  sexp_t *bfs_find_sexp(const char *name, sexp_t *start);
105 
116  int sexp_list_length(const sexp_t *sx);
117 
127  sexp_t *copy_sexp(const sexp_t *sx);
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif /* __SEXP_OPS_H__ */
API for a small, fast and portable s-expression parser library.
sexp_t * bfs_find_sexp(const char *name, sexp_t *start)
sexp_t * find_sexp(const char *name, sexp_t *start)
int sexp_list_length(const sexp_t *sx)
sexp_t * copy_sexp(const sexp_t *sx)
Definition: sexp.h:227