Back to index

radiance  4R0+20100331
Functions | Variables
error.c File Reference
#include "copyright.h"
#include <stdio.h>
#include <stdlib.h>
#include "rterror.h"

Go to the source code of this file.

Functions

char * strerror ()
void error (int etype, char *emsg)

Variables

static const char RCSid [] = "$Id: error.c,v 2.10 2003/07/27 22:12:01 schorsch Exp $"
char errmsg [512]

Function Documentation

void error ( int  etype,
char *  emsg 
)

Definition at line 25 of file error.c.

{
       register struct erract      *ep;

       if ((etype < 0) | (etype >= NERRS))
              return;
       ep = erract + etype;
       if (ep->pf != NULL) {
              if (ep->pre[0]) (*ep->pf)(ep->pre);
              if (emsg != NULL && emsg[0]) (*ep->pf)(emsg);
              if (etype == SYSTEM && errno > 0) {
                     (*ep->pf)(": ");
                     (*ep->pf)(strerror(errno));
              }
              (*ep->pf)("\n");
       }
       if (!ep->ec)         /* non-fatal */
              return;
       if (ep->ec < 0)             /* dump core */
              abort();
       quit(ep->ec);        /* quit calls exit after cleanup */
}

Here is the call graph for this function:

char* strerror ( )

Here is the caller graph for this function:


Variable Documentation

char errmsg[512]

Definition at line 21 of file error.c.

const char RCSid[] = "$Id: error.c,v 2.10 2003/07/27 22:12:01 schorsch Exp $" [static]

Definition at line 2 of file error.c.