You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
488 B

#ifndef _LIBSE_H
#define _LIBSE_H
#include <stdio.h>
typedef struct {
void* ptr;
int size;
int alloced;
int sexpr;
} car_t;
typedef struct cons {
union {
void* ptr;
car_t car;
};
struct cons* cdr;
} list_t;
//TODO: String quoting & escaping.
list_t* se_parse(const char* sexpr); //Parse string into list.
void se_free(list_t* list); //Free whole list.
void se_print(FILE* fp, const list_t* list); //Print list to fp, if fp is NULL, print to stdout.
#endif /* _LIBSE_H */