# HG changeset patch # User Mario de Sousa # Date 1339828890 -3600 # Node ID 7326a065810435f6126db0f4d2be876c9d687c9e # Parent 4efb11e4406512ac1caa9b173f440402235e25e4 Add file missing from previous commit. diff -r 4efb11e44065 -r 7326a0658104 main.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.hh Sat Jun 16 07:41:30 2012 +0100 @@ -0,0 +1,48 @@ +/* + * matiec - a compiler for the programming languages defined in IEC 61131-3 + * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt) + * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * + * This code is made available on the understanding that it will not be + * used in safety-critical situations without a full and competent review. + */ + +/* + * An IEC 61131-3 compiler. + * + * Based on the + * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) + * + */ + + + +#ifndef _MAIN_HH +#define _MAIN_HH + + /* Function used throughout the code --> used to report failed assertions (i.e. internal compiler errors)! */ + +#define ERROR error_exit(__FILE__,__LINE__) +#define ERROR_MSG(msg, ...) error_exit(__FILE__,__LINE__, msg) +// #define ERROR_MSG(msg, ...) error_exit(__FILE__,__LINE__, msg, __VA_ARGS__) + +extern void error_exit(const char *file_name, int line_no, const char *errmsg = NULL, ...); + + + + +#endif // #ifndef _MAIN_HH \ No newline at end of file