Index: src/newconn/fac_debug.h =================================================================== RCS file: /Lab/cengiz/.rep/genesis/src/newconn/fac_debug.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- src/newconn/fac_debug.h 5 May 2004 16:22:57 -0000 1.2 +++ src/newconn/fac_debug.h 6 May 2004 20:29:23 -0000 1.3 @@ -6,6 +6,10 @@ * Author: Mike Vanier * * $Log: fac_debug.h,v $ + * Revision 1.3 2004/05/06 20:29:23 cengiz + * Added a ERROR macro that prints the file and linu number of the error for + * general use. + * * Revision 1.2 2004/05/05 16:22:57 cengiz * Changed varargs.h to stdarg.h to be compatible with new versions of GCC. * @@ -101,7 +105,7 @@ */ #define ERROR() \ - ERROR2(" - in file %s line %d - ", __FILE__, __LINE__) + ErrorDebug(__FILE__, __LINE__) #endif /* FAC_DEBUG_H */ Index: src/shell/shell_error.c =================================================================== RCS file: /Lab/cengiz/.rep/genesis/src/shell/shell_error.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -p -r1.1.1.1 -r1.2 --- src/shell/shell_error.c 25 Apr 2001 17:17:00 -0000 1.1.1.1 +++ src/shell/shell_error.c 6 May 2004 20:30:22 -0000 1.2 @@ -1,7 +1,12 @@ -static char rcsid[] = "$Id: shell_error.c,v 1.1.1.1 2001/04/25 17:17:00 cengiz Exp $"; +static char rcsid[] = "$Id: shell_error.c,v 1.2 2004/05/06 20:30:22 cengiz Exp $"; /* ** $Log: shell_error.c,v $ +** Revision 1.2 2004/05/06 20:30:22 cengiz +** Added a ERROR macro that prints the file and linu number of the error for +** general use. Changed earlier Error() function to work with the new macro while +** keeping backwards compatibility. +** ** Revision 1.1.1.1 2001/04/25 17:17:00 cengiz ** Genesis 2.2.1, before any modifications. ** @@ -160,14 +165,19 @@ void Warning() } } -void Error() +void Error() +{ + ErrorDebug("-", 0); +} + +void ErrorDebug(char *source_file, int line_number) { TraceScript(); - printf("** Error - "); + printf("** Error in file %s line %d - ", source_file, line_number); error_cnt++; if(error_cnt > max_errors){ printf("Exceeded the maximum number of errors (%d)\n", - max_errors); + max_errors); error_cnt = 0; restore_context(); } Index: src/shell/shell_func_ext.h =================================================================== RCS file: /Lab/cengiz/.rep/genesis/src/shell/shell_func_ext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- src/shell/shell_func_ext.h 5 May 2004 16:22:57 -0000 1.2 +++ src/shell/shell_func_ext.h 6 May 2004 20:30:22 -0000 1.3 @@ -1,6 +1,11 @@ /* -** $Id: shell_func_ext.h,v 1.2 2004/05/05 16:22:57 cengiz Exp $ +** $Id: shell_func_ext.h,v 1.3 2004/05/06 20:30:22 cengiz Exp $ ** $Log: shell_func_ext.h,v $ +** Revision 1.3 2004/05/06 20:30:22 cengiz +** Added a ERROR macro that prints the file and linu number of the error for +** general use. Changed earlier Error() function to work with the new macro while +** keeping backwards compatibility. +** ** Revision 1.2 2004/05/05 16:22:57 cengiz ** Changed varargs.h to stdarg.h to be compatible with new versions of GCC. ** @@ -129,6 +134,7 @@ extern int EnableStatusLine(); extern void EndScript(); extern void EndScript(); extern void Error(); +extern void ErrorDebug(char*, int); extern int ExecuteCleanups(); extern Result ExecuteCommand(); extern int ExecuteJobs();