queueing done
This commit is contained in:
parent
7a245f05cb
commit
80ee17692a
6 changed files with 32 additions and 37 deletions
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include "spho/data.h"
|
||||
|
||||
#define SPHO_ERR_BUF_LEN 2048
|
||||
#define SPHO_ERR_FILEBUF_LEN 128
|
||||
|
||||
struct spho_ctx {
|
||||
int err;
|
||||
int err_info;
|
||||
|
@ -20,6 +23,6 @@ struct spho_ctx {
|
|||
|
||||
struct spho_ctx *spho_ctx_create(void);
|
||||
void spho_ctx_destroy(struct spho_ctx *);
|
||||
char *spho_ctx_strerror(struct spho_ctx *);
|
||||
const char *spho_ctx_strerror(struct spho_ctx *);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,13 +24,13 @@ struct spho_nom_le {
|
|||
SLIST_ENTRY(spho_nom_le) next;
|
||||
};
|
||||
|
||||
struct spho_const_le {
|
||||
struct spho_cnst_le {
|
||||
struct spho_cnst cnst;
|
||||
SLIST_ENTRY(spho_const_le) next;
|
||||
SLIST_ENTRY(spho_cnst_le) next;
|
||||
};
|
||||
|
||||
|
||||
SLIST_HEAD(spho_nom_l, spho_nom_le);
|
||||
SLIST_HEAD(spho_const_l, spho_const_le);
|
||||
SLIST_HEAD(spho_const_l, spho_cnst_le);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
ctx->err_info = errno; \
|
||||
snprintf(ctx->filebuf, sizeof(ctx->filebuf), "%s", \
|
||||
__FILE__); \
|
||||
ctx->filebuf[sizeof(ctx->filebuf) - 1] = '\0'; \
|
||||
ctx->errline = __LINE__; \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -7,26 +7,4 @@
|
|||
|
||||
#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 *);
|
||||
char *spho_ctx_strerror(struct spho_ctx *);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue