simplified error output
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <stdio.h> // tmp for printf, for float debug
|
||||
#include <stdarg.h> // for va_list
|
||||
#include <stdbool.h>
|
||||
#include <errno.h> // for errno
|
||||
#include <string.h> // for strerror
|
||||
|
||||
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* COMPUTORV1.C
|
||||
@@ -96,22 +98,8 @@ void reduce(s_term *terms, double *polynom);
|
||||
* UTILS/ERRORS.C
|
||||
*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ERROR_BASE = 1, // start at 1 to avoid exit(0) for errors
|
||||
ARGUMENTS_ERROR,
|
||||
ERROR_TOKEN_COUNT,
|
||||
ERROR_UNKNOWN_TOKEN,
|
||||
ERROR_NUMBER_TOO_BIG,
|
||||
ERROR_PARSING,
|
||||
ERROR_TERM_COUNT,
|
||||
ERROR_TOKEN_POSITION,
|
||||
ERROR_VAR_DIFF,
|
||||
ERROR_SENTINEL, // last token not used, only for enum count
|
||||
} e_program_error;
|
||||
|
||||
void print_state();
|
||||
int stop_errors(e_program_error err, const char *format, ...);
|
||||
int stop_errors(const char *format, ...);
|
||||
|
||||
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* UTILS/PRINT_ENUMS.C
|
||||
|
||||
Reference in New Issue
Block a user