Back to index

tetex-bin  3.0
Functions | Variables
strerror.c File Reference
#include <limits.h>

Go to the source code of this file.

Functions

int sprintf (char *, char const *,...)
char * strerror (int n)

Variables

int sys_nerr
char * sys_errlist []

Function Documentation

int sprintf ( char *  ,
char const ,
  ... 
)
char * strerror ( int  n)

Definition at line 37 of file strerror.c.

{
  static char const fmt[] = "Unknown error (%d)";
  static char mesg[sizeof fmt + sizeof n * CHAR_BIT / 3];

  if (n < 0 || n >= sys_nerr)
    {
      sprintf (mesg, fmt, n);
      return mesg;
    }
  else
    return sys_errlist[n];
}

Here is the call graph for this function:


Variable Documentation

char* sys_errlist[]