pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:7:   #include "pike_macros.h"   #include "error.h"   #include "interpret.h"   #include "stralloc.h"   #include "builtin_functions.h"   #include "array.h"   #include "object.h"   #include "main.h"   #include "builtin_functions.h"   #include "backend.h" + #include "operators.h"    - RCSID("$Id: error.c,v 1.16 1998/04/10 15:20:48 grubba Exp $"); + RCSID("$Id: error.c,v 1.17 1998/04/13 14:19:40 grubba Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)      JMP_BUF *recoveries=0;      JMP_BUF *init_recovery(JMP_BUF *r)   {    r->fp=fp;    r->sp=sp-evaluator_stack;
pike.git/src/error.c:82:   void push_error(char *description)   {    push_text(description);    f_backtrace(0);    f_aggregate(2);   }      struct svalue throw_value = { T_INT };   int throw_severity;    - static char *in_error; + static const char *in_error;   /* FIXME: NOTE: This function uses a static buffer.    * Check sizes of arguments passed!    */ - void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn)) + void va_error(const char *fmt, va_list args) ATTRIBUTE((noreturn))   {    char buf[2000];    if(in_error)    { -  char *tmp=in_error; +  const char *tmp=in_error;    in_error=0;    fatal("Recursive error() calls, original error: %s",tmp);    }       in_error=buf;       VSPRINTF(buf, fmt, args);       if(!recoveries)    {
pike.git/src/error.c:122:       push_error(buf);    free_svalue(& throw_value);    throw_value = *--sp;    throw_severity=THROW_ERROR;       in_error=0;    pike_throw(); /* Hope someone is catching, or we will be out of balls. */   }    - void new_error(char *name, char *text, struct svalue *oldsp, INT32 args, -  char *file, int line) ATTRIBUTE((noreturn)) + void new_error(const char *name, const char *text, struct svalue *oldsp, +  INT32 args, const char *file, int line) ATTRIBUTE((noreturn))   {    int i;       if(in_error)    { -  char *tmp=in_error; +  const char *tmp=in_error;    in_error=0;    fatal("Recursive error() calls, original error: %s",tmp);    }       in_error=text;       if(!recoveries)    {   #ifdef DEBUG    dump_backlog();
pike.git/src/error.c:196:      void fatal_on_error(void *msg)   {   #ifdef DEBUG    dump_backlog();   #endif    fprintf(stderr,"%s\n",(char *)msg);    abort();   }    - void error(char *fmt,...) ATTRIBUTE((noreturn,format (printf, 1, 2))) + void error(const char *fmt,...) ATTRIBUTE((noreturn,format (printf, 1, 2)))   {    va_list args;    va_start(args,fmt);    va_error(fmt,args);    va_end(args);   }       - void debug_fatal(char *fmt, ...) ATTRIBUTE((noreturn,format (printf, 1, 2))) + void debug_fatal(const char *fmt, ...) ATTRIBUTE((noreturn,format (printf, 1, 2)))   {    va_list args;    static int in_fatal = 0;       va_start(args,fmt);    /* Prevent double fatal. */    if (in_fatal)    {    (void)VFPRINTF(stderr, fmt, args);    abort();