|
@@ -1,9 +1,12 @@
|
|
|
-#ifndef NORCSID
|
|
|
-static char rcsid[] = "$Id$";
|
|
|
-#endif
|
|
|
-
|
|
|
+/*
|
|
|
+ * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
+ * See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
+ *
|
|
|
+ * Author: Hans van Staveren
|
|
|
+ */
|
|
|
#include <stdlib.h>
|
|
|
#include <stdio.h>
|
|
|
+#include <stdarg.h>
|
|
|
#include "param.h"
|
|
|
#include "types.h"
|
|
|
#include "tes.h"
|
|
@@ -13,22 +16,17 @@ static char rcsid[] = "$Id$";
|
|
|
#include "optim.h"
|
|
|
#include "ext.h"
|
|
|
|
|
|
-/*
|
|
|
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
- * See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
- *
|
|
|
- * Author: Hans van Staveren
|
|
|
- */
|
|
|
-
|
|
|
-
|
|
|
/* VARARGS1 */
|
|
|
-void error(char *s, char *a)
|
|
|
+void error(char *s, ...)
|
|
|
{
|
|
|
+ va_list ap;
|
|
|
fprintf(stderr,"%s: error on line %u",progname,linecount);
|
|
|
if (prodepth != 0)
|
|
|
fprintf(stderr,"(%.*s)",IDL,curpro.symbol->s_name);
|
|
|
fprintf(stderr,": ");
|
|
|
- fprintf(stderr,s,a);
|
|
|
+ va_start(ap, s);
|
|
|
+ vfprintf(stderr,s, ap);
|
|
|
+ va_end(ap);
|
|
|
fprintf(stderr,"\n");
|
|
|
#ifndef NDEBUG
|
|
|
abort();
|
|
@@ -40,7 +38,7 @@ void error(char *s, char *a)
|
|
|
void badassertion(char *file, unsigned int line)
|
|
|
{
|
|
|
fprintf(stderr,"assertion failed file %s, line %u\n",file,line);
|
|
|
- error("assertion", NULL);
|
|
|
+ error("assertion");
|
|
|
}
|
|
|
#endif
|
|
|
|