:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / msvcrt / misc / amsg.c
1 /*
2  * COPYRIGHT:   See COPYING in the top level directory
3  * PROJECT:     ReactOS system libraries
4  * FILE:        lib/msvcrt/misc/amsg.c
5  * PURPOSE:     Print runtime error messages
6  * PROGRAMER:   Boudewijn Dekker
7  * UPDATE HISTORY:
8  *              28/12/98: Created
9  */
10
11 #include <msvcrt/stdio.h>
12
13
14 static char *__rt_err_msg[] =
15 {
16    "stack overflow",                            /* _RT_STACK */
17    "null pointer assignment",                   /* _RT_NULLPTR */
18    "floating point not loaded",                 /* _RT_FLOAT */
19    "integer divide by 0",                       /* _RT_INTDIV */
20    "not enough space for arguments",            /* _RT_SPACEARG */
21    "not enough space for environment",          /* _RT_SPACEENV */
22    "abnormal program termination",              /* _RT_ABORT */
23    "not enough space for thread data",          /* _RT_THREAD */
24    "unexpected multithread lock error",         /* _RT_LOCK */
25    "unexpected heap error",                     /* _RT_HEAP */
26    "unable to open console device",             /* _RT_OPENCON */
27    "non-continuable exception",                 /* _RT_NONCONT */
28    "invalid exception disposition",             /* _RT_INVALDISP */
29    "not enough space for _onexit/atexit table", /* _RT_ONEXIT */
30    "pure virtual function call",                /* _RT_PUREVIRT */
31    "not enough space for stdio initialization", /* _RT_STDIOINIT */
32    "not enough space for lowio initialization", /* _RT_LOWIOINIT */
33 };
34
35
36 int _aexit_rtn(int exitcode)
37 {
38    _exit(exitcode);
39 }
40
41 void _amsg_exit (int errnum)
42 {
43    fprintf(stderr, "runtime error - %s\n", __rt_err_msg[errnum]);
44    _aexit_rtn(-1);
45 }
46
47 /* EOF */