1 /* 2 * This file is part of Hubbub. 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 hubbub_errors_h_ 9 #define hubbub_errors_h_ 10 11 #ifdef __cplusplus 12 extern "C" 13 { 14 #endif 15 16 #include <stddef.h> 17 18 typedef enum hubbub_error { 19 HUBBUB_OK = 0, /**< No error */ 20 HUBBUB_REPROCESS = 1, 21 HUBBUB_ENCODINGCHANGE = 2, 22 HUBBUB_PAUSED = 3, /**< tokenisation is paused */ 23 24 HUBBUB_NOMEM = 5, 25 HUBBUB_BADPARM = 6, 26 HUBBUB_INVALID = 7, 27 HUBBUB_FILENOTFOUND = 8, 28 HUBBUB_NEEDDATA = 9, 29 HUBBUB_BADENCODING = 10, 30 31 HUBBUB_UNKNOWN = 11 32 } hubbub_error; 33 34 /* Convert a hubbub error value to a string */ 35 const char *hubbub_error_to_string(hubbub_error error); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif 42 43