summaryrefslogtreecommitdiff
path: root/include/libcss/errors.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-05-01 16:36:27 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-05-01 16:36:27 +0000
commit72c39e3522c5781d1e7dc8abad77d96141c5d49b (patch)
treee16497caaa0bf20771ef34787de02fc95e5993bf /include/libcss/errors.h
downloadlibcss-72c39e3522c5781d1e7dc8abad77d96141c5d49b.tar.gz
libcss-72c39e3522c5781d1e7dc8abad77d96141c5d49b.tar.bz2
Import beginnings of a CSS parsing library.
Currently comprises a lexer. svn path=/trunk/libcss/; revision=4112
Diffstat (limited to 'include/libcss/errors.h')
-rw-r--r--include/libcss/errors.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/libcss/errors.h b/include/libcss/errors.h
new file mode 100644
index 0000000..f7eeba2
--- /dev/null
+++ b/include/libcss/errors.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of LibCSS.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
+ */
+
+#ifndef css_errors_h_
+#define css_errors_h_
+
+#include <stddef.h>
+
+typedef enum css_error {
+ CSS_OK = 0,
+
+ CSS_NOMEM = 1,
+ CSS_BADPARM = 2,
+ CSS_INVALID = 3,
+ CSS_FILENOTFOUND = 4,
+ CSS_NEEDDATA = 5,
+ CSS_BADCHARSET = 6,
+ CSS_EOF = 7,
+} css_error;
+
+/* Convert a libcss error value to a string */
+const char *css_error_to_string(css_error error);
+/* Convert a string to a libcss error value */
+css_error css_error_from_string(const char *str, size_t len);
+
+#endif
+