__FILE__ + cast foireux

This commit is contained in:
Ludovic Jacomme 2002-04-25 14:15:25 +00:00
parent c018a7454a
commit da73f50a92
5 changed files with 9 additions and 6 deletions

View File

@ -161,7 +161,8 @@ static int find_mc(s)
el_mc *pt;
loc = namealloc(s);
pt= (el_mc *) bsearch(loc, (char *)tab_mc,FBL_NB_MC,sizeof(el_mc),strcmp);
pt= (el_mc *) bsearch(loc, (char *)tab_mc,FBL_NB_MC,sizeof(el_mc),
(int (*)(const void *, const void *))strcmp);
if (pt==NULL) return(-1);
return(pt->kval);
}

View File

@ -2355,7 +2355,7 @@ choices2
fbl_error (30,NULL);
}
FBL_NM1LST = addchain (FBL_NM1LST ,$3.NAME);
fprintf( stdout, "%s%d: %s\n", __FILE__,__LINE__,$3.NAME );
fprintf( stdout, "%s%d: %s\n", basename(__FILE__),__LINE__,$3.NAME );
}
;

View File

@ -64,4 +64,4 @@ extern ablexpr *bddToAbl () ;
extern void fbl_toolbug __P((int code, char *str1, char *str2, int nbr1));
# define fbl_error( C, S ) \
fprintf( stderr, "%s.%d: ", __FILE__,__LINE__ ); loc_fbl_error( C, S );
fprintf( stderr, "%s.%d: ", basename(__FILE__),__LINE__ ); loc_fbl_error( C, S );

View File

@ -53,4 +53,4 @@ extern char *fbl_printabl();
extern char * fbl_vectorize __P((char *Name));
# define fbl_error( C, S ) \
fprintf( stderr, "%s.%d: ", __FILE__,__LINE__ ); loc_fbl_error( C, S )
fprintf( stderr, "%s.%d: ", basename(__FILE__),__LINE__ ); loc_fbl_error( C, S )

View File

@ -97,8 +97,10 @@
| |
\------------------------------------------------------------*/
# define fvherror( E, T, V ) (fvh_error((int)(E),(char *)(T),(long)(V),__FILE__,__LINE__))
# define fvhwarning( E, T, V ) (fvh_warning((int)(E),(char *)(T),(long)(V),__FILE__,__LINE__))
# define fvherror( E, T, V ) \
(fvh_error((int)(E),(char *)(T),(long)(V),basename(__FILE__),__LINE__))
# define fvhwarning( E, T, V ) \
(fvh_warning((int)(E),(char *)(T),(long)(V),basename(__FILE__),__LINE__))
/*------------------------------------------------------------\
| |