diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-06-23 22:40:25 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-06-23 22:40:25 +0000 |
commit | 7b30a5520cfb56e651f0eb4da85a3e07747da7dc (patch) | |
tree | 5d6281c071c089e1e7a8ae6f8044cecaf6a7db16 /include/hubbub/errors.h | |
download | libhubbub-7b30a5520cfb56e651f0eb4da85a3e07747da7dc.tar.gz libhubbub-7b30a5520cfb56e651f0eb4da85a3e07747da7dc.tar.bz2 |
Import hubbub -- an HTML parsing library.
Plenty of work still to do (like tree generation ;)
svn path=/trunk/hubbub/; revision=3359
Diffstat (limited to 'include/hubbub/errors.h')
-rw-r--r-- | include/hubbub/errors.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/hubbub/errors.h b/include/hubbub/errors.h new file mode 100644 index 0000000..c3b1f5d --- /dev/null +++ b/include/hubbub/errors.h @@ -0,0 +1,29 @@ +/* + * This file is part of Hubbub. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> + */ + +#ifndef hubbub_errors_h_ +#define hubbub_errors_h_ + +#include <stddef.h> + +typedef enum hubbub_error { + HUBBUB_OK = 0, + + HUBBUB_NOMEM = 1, + HUBBUB_BADPARM = 2, + HUBBUB_INVALID = 3, + HUBBUB_FILENOTFOUND = 4, + HUBBUB_NEEDDATA = 5, +} hubbub_error; + +/* Convert a hubbub error value to a string */ +const char *hubbub_error_to_string(hubbub_error error); +/* Convert a string to a hubbub error value */ +hubbub_error hubbub_error_from_string(const char *str, size_t len); + +#endif + |