/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by Mike Parker.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#include <stdio.h>

#ifndef VXWORKS_CFG
extern int errno;
extern int sys_nerr;
#ifdef LINUX_CFG
	     extern __const char *__const _sys_errlist[];
#else
	     extern char *sys_errlist[];
#endif


print_err()
{
 char *msg;

 if (errno < sys_nerr)
  { msg = sys_errlist[errno];
  }
 else
  { static char buf[64];
    msg = buf;
    sprintf(msg,"Unknown error (%d)",errno);
  }
 printf("%s\n",msg);
}
#else
print_err()
{
	printErrno(errnoGet());
}
#endif
