2019-03-01 17:39:25 +00:00
|
|
|
/* Copyright (c) 2019 ACK Project.
|
|
|
|
* See the copyright notice in the ACK home directory,
|
|
|
|
* in the file "Copyright".
|
|
|
|
*
|
|
|
|
* Created on: 2019-02-26
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef ERROR_H_
|
|
|
|
#define ERROR_H_
|
|
|
|
|
2019-05-10 17:09:03 +00:00
|
|
|
struct node;
|
2019-03-01 17:39:25 +00:00
|
|
|
|
|
|
|
#if __STDC__
|
|
|
|
#ifdef DEBUG
|
|
|
|
/*VARARGS*/
|
|
|
|
void debug(char *fmt, ...);
|
|
|
|
#endif /* DEBUG */
|
|
|
|
|
|
|
|
/*VARARGS*/
|
|
|
|
void error(char *fmt, ...);
|
|
|
|
/*VARARGS*/
|
2019-05-10 17:09:03 +00:00
|
|
|
void node_error(struct node *node, char *fmt, ...);
|
2019-03-01 17:39:25 +00:00
|
|
|
/*VARARGS*/
|
|
|
|
void warning(int class, char *fmt, ...);
|
|
|
|
/*VARARGS*/
|
2019-05-10 17:09:03 +00:00
|
|
|
void node_warning(struct node *node, int class, char *fmt, ...);
|
2019-03-01 17:39:25 +00:00
|
|
|
/*VARARGS*/
|
|
|
|
void lexerror(char *fmt, ...);
|
|
|
|
/*VARARGS*/
|
|
|
|
void lexwarning(int class, char *fmt, ...);
|
|
|
|
/*VARARGS*/
|
|
|
|
void fatal(char *fmt, ...);
|
|
|
|
/*VARARGS*/
|
|
|
|
void crash(char *fmt, ...);
|
|
|
|
#else
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
/*VARARGS*/
|
|
|
|
void debug(va_alist);
|
|
|
|
#endif /* DEBUG */
|
|
|
|
|
|
|
|
/*VARARGS*/
|
|
|
|
void error(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void node_error(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void warning(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void node_warning(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void lexerror(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void lexwarning(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void fatal(va_alist);
|
|
|
|
/*VARARGS*/
|
|
|
|
void crash(va_alist);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* ERROR_H_ */
|