]> git.ozlabs.org Git - ccan/blobdiff - junkcode/dongre.avinash@gmail.com-clibutils/inc/c_errors.h
junkcode: upload via website.
[ccan] / junkcode / dongre.avinash@gmail.com-clibutils / inc / c_errors.h
diff --git a/junkcode/dongre.avinash@gmail.com-clibutils/inc/c_errors.h b/junkcode/dongre.avinash@gmail.com-clibutils/inc/c_errors.h
new file mode 100644 (file)
index 0000000..52aee8e
--- /dev/null
@@ -0,0 +1,58 @@
+/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **\r
+ *  This file is part of clib library\r
+ *  Copyright (C) 2011 Avinash Dongre ( dongre.avinash@gmail.com )\r
+ *\r
+ *  Permission is hereby granted, free of charge, to any person obtaining a copy\r
+ *  of this software and associated documentation files (the "Software"), to deal\r
+ *  in the Software without restriction, including without limitation the rights\r
+ *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+ *  copies of the Software, and to permit persons to whom the Software is\r
+ *  furnished to do so, subject to the following conditions:\r
+ * \r
+ *  The above copyright notice and this permission notice shall be included in\r
+ *  all copies or substantial portions of the Software.\r
+ * \r
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+ *  THE SOFTWARE.\r
+ ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/\r
+\r
+#ifndef _C_ERRORS_H_\r
+#define _C_ERRORS_H_\r
+\r
+/* ------------------------------------------------------------------------*/\r
+/*                 C O M M O N    E R R O R    C O D E                     */\r
+/* ------------------------------------------------------------------------*/\r
+#define CLIB_ERROR_SUCCESS  0\r
+#define CLIB_ERROR_ERROR    1\r
+#define CLIB_ERROR_MEMORY   2\r
+#define CLIB_ELEMENT_RETURN_ERROR 3\r
+/* ------------------------------------------------------------------------*/\r
+/*         D Y N A M I C    A R R A Y   E R R O R    C O D E S             */\r
+/* ------------------------------------------------------------------------*/\r
+#define CLIB_ARRAY_NOT_INITIALIZED    101\r
+#define CLIB_ARRAY_INDEX_OUT_OF_BOUND 102\r
+#define CLIB_ARRAY_INSERT_FAILED      103\r
+\r
+#define CLIB_DEQUE_NOT_INITIALIZED    201\r
+#define CLIB_DEQUE_INDEX_OUT_OF_BOUND 202\r
+\r
+#define CLIB_RBTREE_NOT_INITIALIZED   401\r
+#define CLIB_RBTREE_KEY_DUPLICATE     401\r
+#define CLIB_RBTREE_KEY_NOT_FOUND     402\r
+\r
+#define CLIB_SET_NOT_INITIALIZED      501\r
+#define CLIB_SET_INVALID_INPUT        502\r
+\r
+#define CLIB_MAP_NOT_INITIALIZED      501\r
+#define CLIB_MAP_INVALID_INPUT        502\r
+\r
+#define CLIB_SLIST_INSERT_FAILED      601\r
+\r
+\r
+\r
+#endif
\ No newline at end of file