Missing dependencies added.
[AROS-Contrib.git] / rexx / lstring / stderr.c
blob4a7e132fcd3a144281d22e31ed3764a240698f61
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:38 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.2 1999/11/26 12:52:25 bnv
8 * Changed: To use new macros
10 * Revision 1.1 1998/07/02 17:18:00 bnv
11 * Initial Version
15 #include <lstring.h>
17 #ifdef WCE
18 # error "Lstderr: should not be included in the CE version"
19 #endif
20 /* ------------------ Lstderr ------------------- */
21 void
22 Lstderr( const int errno, const int subno, ... )
24 Lstr errmsg;
25 va_list ap;
27 LINITSTR(errmsg);
29 va_start(ap,subno);
30 Lerrortext(&errmsg,errno,subno,&ap);
31 va_end(ap);
33 if (LLEN(errmsg)==0)
34 fprintf(STDERR,"Ooops unknown error %d.%d!!!\n",errno,subno);
35 else {
36 LASCIIZ(errmsg);
37 if (subno==0)
38 fprintf(STDERR,"Error %d: %s\n",errno,LSTR(errmsg));
39 else
40 fprintf(STDERR,"Error %d.%d: %s\n",errno,subno,LSTR(errmsg));
43 LFREESTR(errmsg);
44 exit(errno);
45 } /* Lstderr */