squareball 0.2.0.50-8649 A general-purpose library for C99

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

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
55 } sb_parser_error_t;
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_parser_error_new_printf
sb_error_t * sb_parser_error_new_printf(const char *src, size_t src_len, size_t pos, const char *format,...)
sb_parser_error_t::pos
size_t pos
Definition: sb-parsererror.h:53
sb_parser_error_new
sb_error_t * sb_parser_error_new(const char *src, size_t src_len, size_t pos, const char *msg)
sb_parser_error_t
Definition: sb-parsererror.h:32
sb_parser_error_t::linestr
char * linestr
Definition: sb-parsererror.h:42
sb_parser_error_t::msg
char * msg
Definition: sb-parsererror.h:37
sb_parser_error_t::lineno
size_t lineno
Definition: sb-parsererror.h:47
sb_error_t
struct _sb_error_t sb_error_t
Definition: sb-error.h:71