Libparserutils
errors.h
Go to the documentation of this file.
1 /*
2  * This file is part of LibParserUtils.
3  * Licensed under the MIT License,
4  * http://www.opensource.org/licenses/mit-license.php
5  * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
6  */
7 
8 #ifndef parserutils_errors_h_
9 #define parserutils_errors_h_
10 
11 #ifdef __cplusplus
12 extern "C"
13 {
14 #endif
15 
16 #include <stddef.h>
17 
18 typedef enum parserutils_error {
20 
27  PARSERUTILS_EOF = 7
29 
30 /* Convert a parserutils error value to a string */
32 /* Convert a string to a parserutils error value */
33 parserutils_error parserutils_error_from_string(const char *str, size_t len);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif
40 
size_t len
Definition: codec_8859.c:23
parserutils_error
Definition: errors.h:18
@ PARSERUTILS_OK
Definition: errors.h:19
@ PARSERUTILS_FILENOTFOUND
Definition: errors.h:24
@ PARSERUTILS_BADENCODING
Definition: errors.h:26
@ PARSERUTILS_EOF
Definition: errors.h:27
@ PARSERUTILS_NEEDDATA
Definition: errors.h:25
@ PARSERUTILS_INVALID
Definition: errors.h:23
@ PARSERUTILS_NOMEM
Definition: errors.h:21
@ PARSERUTILS_BADPARM
Definition: errors.h:22
const char * parserutils_error_to_string(parserutils_error error)
Convert a parserutils error code to a string.
Definition: errors.c:18
parserutils_error parserutils_error_from_string(const char *str, size_t len)
Convert a string representation of an error name to a parserutils error code.
Definition: errors.c:59