00001 /* 00002 * This file is part of LibParserUtils. 00003 * Licensed under the MIT License, 00004 * http://www.opensource.org/licenses/mit-license.php 00005 * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> 00006 */ 00007 00008 #ifndef parserutils_errors_h_ 00009 #define parserutils_errors_h_ 00010 00011 #ifdef __cplusplus 00012 extern "C" 00013 { 00014 #endif 00015 00016 #include <stddef.h> 00017 00018 typedef enum parserutils_error { 00019 PARSERUTILS_OK = 0, 00020 00021 PARSERUTILS_NOMEM = 1, 00022 PARSERUTILS_BADPARM = 2, 00023 PARSERUTILS_INVALID = 3, 00024 PARSERUTILS_FILENOTFOUND = 4, 00025 PARSERUTILS_NEEDDATA = 5, 00026 PARSERUTILS_BADENCODING = 6, 00027 PARSERUTILS_EOF = 7 00028 } parserutils_error; 00029 00030 /* Convert a parserutils error value to a string */ 00031 const char *parserutils_error_to_string(parserutils_error error); 00032 /* Convert a string to a parserutils error value */ 00033 parserutils_error parserutils_error_from_string(const char *str, size_t len); 00034 00035 #ifdef __cplusplus 00036 } 00037 #endif 00038 00039 #endif 00040
1.5.6