@@ -81,13 +81,13 @@ find_struct(char *name, char *next)
8181if (p -> type -> typ != ECPGt_array )
8282{
8383sprintf (errortext ,"variable %s is not a pointer" ,name );
84- mmerror (ET_FATAL ,errortext );
84+ mmerror (PARSE_ERROR , ET_FATAL ,errortext );
8585}
8686
8787if (p -> type -> u .element -> typ != ECPGt_struct && p -> type -> u .element -> typ != ECPGt_union )
8888{
8989sprintf (errortext ,"variable %s is not a pointer to a structure or a union" ,name );
90- mmerror (ET_FATAL ,errortext );
90+ mmerror (PARSE_ERROR , ET_FATAL ,errortext );
9191}
9292
9393/* restore the name, we will need it later on */
@@ -101,7 +101,7 @@ find_struct(char *name, char *next)
101101if (p -> type -> typ != ECPGt_struct && p -> type -> typ != ECPGt_union )
102102{
103103sprintf (errortext ,"variable %s is neither a structure nor a union" ,name );
104- mmerror (ET_FATAL ,errortext );
104+ mmerror (PARSE_ERROR , ET_FATAL ,errortext );
105105}
106106
107107/* restore the name, we will need it later on */
@@ -143,7 +143,7 @@ find_variable(char *name)
143143if (p == NULL )
144144{
145145sprintf (errortext ,"The variable %s is not declared" ,name );
146- mmerror (ET_FATAL ,errortext );
146+ mmerror (PARSE_ERROR , ET_FATAL ,errortext );
147147}
148148
149149return (p );
@@ -277,7 +277,7 @@ check_indicator(struct ECPGtype * var)
277277check_indicator (var -> u .element );
278278break ;
279279default :
280- mmerror (ET_ERROR ,"indicator variable must be integer type" );
280+ mmerror (PARSE_ERROR , ET_ERROR ,"indicator variable must be integer type" );
281281break ;
282282}
283283}
@@ -291,7 +291,7 @@ get_typedef(char *name)
291291if (!this )
292292{
293293sprintf (errortext ,"invalid datatype '%s'" ,name );
294- mmerror (ET_FATAL ,errortext );
294+ mmerror (PARSE_ERROR , ET_FATAL ,errortext );
295295}
296296
297297return (this );
@@ -303,15 +303,15 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
303303if (type_index >=0 )
304304{
305305if (* length >=0 )
306- mmerror (ET_FATAL ,"No multi-dimensional array support" );
306+ mmerror (PARSE_ERROR , ET_FATAL ,"No multi-dimensional array support" );
307307
308308* length = type_index ;
309309}
310310
311311if (type_dimension >=0 )
312312{
313313if (* dimension >=0 && * length >=0 )
314- mmerror (ET_FATAL ,"No multi-dimensional array support" );
314+ mmerror (PARSE_ERROR , ET_FATAL ,"No multi-dimensional array support" );
315315
316316if (* dimension >=0 )
317317* length = * dimension ;
@@ -321,17 +321,17 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
321321
322322if (pointer_len > 2 )
323323{sprintf (errortext ,"No multilevel (more than 2) pointer supported %d" ,pointer_len );
324- mmerror (ET_FATAL ,errortext );
325- /*mmerror(ET_FATAL, "No multilevel (more than 2) pointer supported %d",pointer_len);*/
324+ mmerror (PARSE_ERROR , ET_FATAL ,errortext );
325+ /*mmerror(PARSE_ERROR, ET_FATAL, "No multilevel (more than 2) pointer supported %d",pointer_len);*/
326326}
327327if (pointer_len > 1 && type_enum != ECPGt_char && type_enum != ECPGt_unsigned_char )
328- mmerror (ET_FATAL ,"No pointer to pointer supported for this type" );
328+ mmerror (PARSE_ERROR , ET_FATAL ,"No pointer to pointer supported for this type" );
329329
330330if (pointer_len > 1 && (* length >=0 || * dimension >=0 ))
331- mmerror (ET_FATAL ,"No multi-dimensional array support" );
331+ mmerror (PARSE_ERROR , ET_FATAL ,"No multi-dimensional array support" );
332332
333333if (* length >=0 && * dimension >=0 && pointer_len )
334- mmerror (ET_FATAL ,"No multi-dimensional array support" );
334+ mmerror (PARSE_ERROR , ET_FATAL ,"No multi-dimensional array support" );
335335
336336switch (type_enum )
337337{
@@ -345,7 +345,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
345345}
346346
347347if (* length >=0 )
348- mmerror (ET_FATAL ,"No multi-dimensional array support for structures" );
348+ mmerror (PARSE_ERROR , ET_FATAL ,"No multi-dimensional array support for structures" );
349349
350350break ;
351351case ECPGt_varchar :
@@ -390,7 +390,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
390390}
391391
392392if (* length >=0 )
393- mmerror (ET_FATAL ,"No multi-dimensional array support for simple data types" );
393+ mmerror (PARSE_ERROR , ET_FATAL ,"No multi-dimensional array support for simple data types" );
394394
395395break ;
396396}