1 /*------------------------------------------------------------\
2 | |
3 | This file is part of the Alliance CAD System Copyright |
4 | (C) Laboratoire LIP6 - D�partement ASIM Universite P&M Curie|
5 | |
6 | Home page : http://www-asim.lip6.fr/alliance/ |
7 | E-mail : mailto:alliance-users@asim.lip6.fr |
8 | |
9 | This progam is free software; you can redistribute it |
10 | and/or modify it under the terms of the GNU General Public |
11 | License as published by the Free Software Foundation; |
12 | either version 2 of the License, or (at your option) any |
13 | later version. |
14 | |
15 | Alliance VLSI CAD System is distributed in the hope that |
16 | it will be useful, but WITHOUT ANY WARRANTY; |
17 | without even the implied warranty of MERCHANTABILITY or |
18 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
19 | Public License for more details. |
20 | |
21 | You should have received a copy of the GNU General Public |
22 | License along with the GNU C Library; see the file COPYING. |
23 | If not, write to the Free Software Foundation, Inc., |
24 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
25 | |
26 \------------------------------------------------------------*/
27
28 /*------------------------------------------------------------\
29 | |
30 | Tool : GRAAL |
31 | |
32 | File : Gsb Errors |
33 | |
34 | Authors : Jacomme Ludovic |
35 | |
36 | Date : 28.03.95 |
37 | |
38 \------------------------------------------------------------*/
39
40 /*------------------------------------------------------------\
41 | |
42 | Include Files |
43 | |
44 \------------------------------------------------------------*/
45
46 # include <stdio.h>
47 # include "mut.h"
48 # include "mph.h"
49 # include "rds.h"
50 # include "rwi.h"
51 # include "rut.h"
52 # include "rpr.h"
53 # include "GSB.h"
54 # include "GSB_error.h"
55
56 /*------------------------------------------------------------\
57 | |
58 | Constants |
59 | |
60 \------------------------------------------------------------*/
61 /*------------------------------------------------------------\
62 | |
63 | Types |
64 | |
65 \------------------------------------------------------------*/
66 /*------------------------------------------------------------\
67 | |
68 | Variables |
69 | |
70 \------------------------------------------------------------*/
71 /*------------------------------------------------------------\
72 | |
73 | Functions |
74 | |
75 \------------------------------------------------------------*/
76
GsbError(ErrorType,Message,Data)77 void GsbError( ErrorType, Message, Data )
78
79 char ErrorType;
80 char *Message;
81 long Data;
82 {
83 fflush(stdout);
84
85 fprintf( stderr, "Gsb %s: ", GRAAL_TECHNO_NAME );
86
87 switch ( ErrorType )
88 {
89 case DEFINE_MISSING :
90
91 fprintf( stderr, "Some defines missing\n");
92 break;
93
94 case TABLE_MISSING :
95
96 fprintf( stderr, "Some tables missing\n");
97 break;
98
99 case LINE_EXPECTED :
100
101 fprintf( stderr, "%s expected line %lu\n",
102 Message, Data );
103 break;
104
105 case UNKNOWN_DEFINE :
106
107 fprintf( stderr, "Unknown define %s line %lu\n",
108 Message, Data );
109 break;
110
111 case NOT_DEFINED :
112
113 fprintf( stderr, "%s not defined line %lu\n",
114 Message, Data );
115 break;
116
117 case TOO_SMAL :
118
119 fprintf( stderr, "%s too smal line %lu\n",
120 Message, Data );
121 break;
122
123 case MISSING_VALUE :
124
125 fprintf( stderr, "Missing value at line %lu\n",
126 Data );
127 break;
128
129 case MISSING_NAME :
130
131 fprintf( stderr, "Missing name of %s line %lu\n",
132 Message, Data );
133 break;
134
135 case UNEXPECTED_LINE :
136
137 fprintf( stderr, "%s unexpected line %lu\n",
138 Message, Data );
139 break;
140
141 case UNEXPECTED_EOF :
142
143 fprintf( stderr, "Unexpected end of file, missing definitions\n");
144 break;
145
146 case TOO_MANY_WORDS :
147
148 fprintf( stderr, "Too many words %s unexpected line %lu\n",
149 Message, Data );
150 break;
151
152 case MISSING_TABLE :
153
154 fprintf( stderr, "Missing value in %s table line %lu\n",
155 Message, Data );
156 break;
157
158 case OPEN_FILE :
159
160 fprintf( stderr, "Parameters file can't be opened\n" );
161 break;
162
163 case UNKNOWN_TABLE :
164
165 fprintf( stderr, "Unknown table %s line %lu\n",
166 Message , Data );
167 break;
168
169 case SYNTAX_ERROR :
170
171 fprintf( stderr, "Syntax Error %s at line %lu\n",
172 Message , Data );
173 break;
174
175 case ILLEGAL_FLOAT :
176
177 fprintf( stderr, "Illegal floating point number %s line %lu\n",
178 Message , Data );
179 break;
180 }
181
182 fflush( stderr );
183
184 exit( 1 );
185 }
186