diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:34:46 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:34:46 +0000 |
commit | 2777a04ed2ba4fd36138b991d66a32a283361f7e (patch) | |
tree | b0c3730533c36ca41402b6d0c5b98413f0a57bee /include/parserutils/errors.h | |
download | libparserutils-2777a04ed2ba4fd36138b991d66a32a283361f7e.tar.gz libparserutils-2777a04ed2ba4fd36138b991d66a32a283361f7e.tar.bz2 |
Import parser construction utility library
svn path=/trunk/libparserutils/; revision=4111
Diffstat (limited to 'include/parserutils/errors.h')
-rw-r--r-- | include/parserutils/errors.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/parserutils/errors.h b/include/parserutils/errors.h new file mode 100644 index 0000000..09c715c --- /dev/null +++ b/include/parserutils/errors.h @@ -0,0 +1,29 @@ +/* + * This file is part of LibParserUtils. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> + */ + +#ifndef parserutils_errors_h_ +#define parserutils_errors_h_ + +#include <stddef.h> + +typedef enum parserutils_error { + PARSERUTILS_OK = 0, + + PARSERUTILS_NOMEM = 1, + PARSERUTILS_BADPARM = 2, + PARSERUTILS_INVALID = 3, + PARSERUTILS_FILENOTFOUND = 4, + PARSERUTILS_NEEDDATA = 5, +} parserutils_error; + +/* Convert a parserutils error value to a string */ +const char *parserutils_error_to_string(parserutils_error error); +/* Convert a string to a parserutils error value */ +parserutils_error parserutils_error_from_string(const char *str, size_t len); + +#endif + |