28 lines
489 B
C
28 lines
489 B
C
#ifndef _SPHO_CTX_H
|
|
#define _SPHO_CTX_H
|
|
|
|
#include "spho/data.h"
|
|
|
|
#define SPHO_ERR_BUF_LEN 2048
|
|
#define SPHO_ERR_FILEBUF_LEN 128
|
|
|
|
struct spho_ctx {
|
|
int err;
|
|
int err_info;
|
|
|
|
struct spho_nom_l noms;
|
|
struct spho_const_l cnsts;
|
|
|
|
#ifdef SPHO_DEBUG
|
|
char filebuf[SPHO_ERR_FILEBUF_LEN];
|
|
int errline;
|
|
#else
|
|
char errbuf[SPHO_ERR_BUF_LEN];
|
|
#endif
|
|
};
|
|
|
|
struct spho_ctx *spho_ctx_create(void);
|
|
void spho_ctx_destroy(struct spho_ctx *);
|
|
const char *spho_ctx_strerror(struct spho_ctx *);
|
|
|
|
#endif
|