/* $Id: h,v.xperror 1.1 1998/07/31 14:58:55 stoklund Exp stoklund $ */
/* xperror.h: Extended perror and strerror functions.

   Copyright (C) 1998 Jakob Stoklund Olesen

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifndef _XPERROR_H
#define _XPERROR_H

/* Same as strerror() from string.h */
extern const char *xstrerror (int /* errno */ );

/* Same as perror() from stdio.h */
extern void xperror (const char * /* msg */ );

/* Set errno to reflect the returned error from a SWI.
   If ERP is NULL errno os set from _kernel_last_oserror */
extern void errno_swi (void * /* ERP */ );

/* Set errno to reflect the error message in MSG */
extern void errno_string (const char * /* msg */ );

/* Replace library functions with ours */
#ifndef _XPERROR_C
#define perror xperror
#define strerror xstrerror
#endif

#endif /* not _XPERROR_H */
