squareball  0.2.0.49-878a
A general-purpose library for C99
sb-parsererror.h
Go to the documentation of this file.
1 /*
2  * squareball: A general-purpose library for C99.
3  * Copyright (C) 2014-2018 Rafael G. Martins <rafael@rafaelmartins.eng.br>
4  *
5  * This program can be distributed under the terms of the BSD License.
6  * See the file LICENSE.
7  */
8 
9 #ifndef _SQUAREBALL_PARSERERROR_H
10 #define _SQUAREBALL_PARSERERROR_H
11 
12 #include <stdarg.h>
13 #include <stdlib.h>
14 
32 typedef struct {
33 
37  char *msg;
38 
42  char *linestr;
43 
47  size_t lineno;
48 
53  size_t pos;
54 
56 
67 sb_error_t* sb_parser_error_new(const char *src, size_t src_len, size_t pos,
68  const char *msg);
69 
81 sb_error_t* sb_parser_error_new_printf(const char *src, size_t src_len,
82  size_t pos, const char *format, ...);
83 
86 #endif /* _SQUAREBALL_PARSERERROR_H */
sb_error_t * sb_parser_error_new_printf(const char *src, size_t src_len, size_t pos, const char *format,...)
size_t pos
Definition: sb-parsererror.h:53
sb_error_t * sb_parser_error_new(const char *src, size_t src_len, size_t pos, const char *msg)
Definition: sb-parsererror.h:32
char * linestr
Definition: sb-parsererror.h:42
char * msg
Definition: sb-parsererror.h:37
size_t lineno
Definition: sb-parsererror.h:47
struct _sb_error_t sb_error_t
Definition: sb-error.h:71