aboutsummaryrefslogtreecommitdiff
path: root/include/error.h
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-10 19:46:07 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-10 20:32:25 +0200
commit98990d5195e93154abbfd16eaa9d1fcc3572bc5c (patch)
tree110a4cedf6ada1281cdc356b21ebe2b55acec32a /include/error.h
parentb16d4b834d95d5cc0757d09e74fe6042e55f5440 (diff)
downloadminishell-98990d5195e93154abbfd16eaa9d1fcc3572bc5c.tar.gz
minishell-98990d5195e93154abbfd16eaa9d1fcc3572bc5c.tar.bz2
minishell-98990d5195e93154abbfd16eaa9d1fcc3572bc5c.zip
Added errorf_ret helper, Removing error to status (just status code and fatal error)
Diffstat (limited to 'include/error.h')
-rw-r--r--include/error.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/include/error.h b/include/error.h
index 2326d1a..3933fe9 100644
--- a/include/error.h
+++ b/include/error.h
@@ -6,7 +6,7 @@
/* By: charles <me@cacharle.xyz> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/08/27 20:34:25 by charles #+# #+# */
-/* Updated: 2020/09/10 14:48:42 by charles ### ########.fr */
+/* Updated: 2020/09/10 20:29:17 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,23 +20,10 @@
** error.c
*/
-enum
-{
- ERR_NONE = 1024,
- ERR_FATAL,
- ERR_SYNTAX,
- ERR_OPEN,
- ERR_AMBIGUOUS_REDIR,
- ERR_CMD_NOT_FOUND,
- ERR_IS_DIRECTORY,
- ERR_ERRNO,
-};
-
-typedef int t_err;
+# define EVAL_FATAL 1024
void errorf(const char *format, ...);
void verrorf(const char *format, va_list ap);
-void error_set_status(int status);
-int error_get_status(int status);
+int errorf_ret(int err, const char *format, ...);
#endif