Debian Codegraph @

terps/tads/tads3/tcerr.cpp

raw
1 #ifdef RCSID
2 static char RCSid[] =
3 "$Header: d:/cvsroot/tads/tads3/TCERR.CPP,v 1.5 1999/07/11 00:46:52 MJRoberts Exp $";
4 #endif
5
6 /*
7 * Copyright (c) 1999, 2002 Michael J. Roberts. All Rights Reserved.
8 *
9 * Please see the accompanying license file, LICENSE.TXT, for information
10 * on using and copying this software.
11 */
12 /*
13 Name
14 tcerr.cpp - TADS 3 Compiler Messages
15 Function
16
17 Notes
18
19 Modified
20 04/22/99 MJRoberts - Creation
21 */
22
23 #include "tcerr.h"
24 #include "tcerrnum.h"
25
26 /* ------------------------------------------------------------------------ */
27 /*
28 * Look up a message
29 */
30 const char *tcerr_get_msg(int msgnum, int verbose)
31 {
32 const char *msg;
33
34 /* look up the message in the compiler message array */
35 msg = err_get_msg(tc_messages, tc_message_count,
36 msgnum, verbose);
37 if (msg != 0)
38 return msg;
39
40 /* look up the message in the interpreter message array */
41 msg = err_get_msg(vm_messages, vm_message_count,
42 msgnum, verbose);
43 if (msg != 0)
44 return msg;
45
46 /* there's nowhere else to look - return failiure */
47 return 0;
48 }
49