1 /****************************************************************************
2 *
3 *                            Open Watcom Project
4 *
5 *    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
6 *
7 *  ========================================================================
8 *
9 *    This file contains Original Code and/or Modifications of Original
10 *    Code as defined in and that are subject to the Sybase Open Watcom
11 *    Public License version 1.0 (the 'License'). You may not use this file
12 *    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
13 *    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
14 *    provided with the Original Code and Modifications, and is also
15 *    available at www.sybase.com/developer/opensource.
16 *
17 *    The Original Code and all software distributed under the License are
18 *    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
19 *    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
20 *    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
21 *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
22 *    NON-INFRINGEMENT. Please see the License for the specific language
23 *    governing rights and limitations under the License.
24 *
25 *  ========================================================================
26 *
27 * Description:  Assembler message output interface.
28 *               This file is included by globals.h.
29 *
30 ****************************************************************************/
31 
32 
33 #ifndef _ERRMSG_H_INCLUDED
34 #define _ERRMSG_H_INCLUDED
35 
36 /* error IDs */
37 #undef pick
38 #define pick( code, text )  code,
39 enum msgno {
40 #include "msgdef.h"
41     MSG_LAST
42 };
43 #undef pick
44 
45 #ifdef DEBUG_OUT
46     extern void DoDebugMsg( const char *format, ... );
47     extern void DoDebugMsg1( const char *format, ... );
48     #define DebugMsg( x ) DoDebugMsg x
49     #define DebugMsg1( x ) DoDebugMsg1 x
50     #define DebugCmd( x ) x
51 #else
52     #define DebugMsg( x )
53     #define DebugMsg1( x )
54     #define DebugCmd( x )
55 #endif
56 
57 #if defined( __UNIX__ ) || defined ( __SW_BD )
58 #define errout stderr
59 #else
60 #define errout stdout
61 #endif
62 
63 extern void Fatal( int msgnum, ... );
64 extern int  EmitError( int msgnum );
65 extern int  EmitErr( int msgnum, ... );
66 extern void EmitWarn( int level, int msgnum, ... );
67 extern void PrintNote( int msgnum, ... );
68 extern char *ErrnoStr( void );
69 extern int  write_logo( void );
70 extern void PrintUsage( void );
71 //extern void SeekError( void );
72 extern void WriteError( void );
73 
74 #endif
75