From bb12c1c00ecfeeb5998fcb3058e98436c4ff3b4b Mon Sep 17 00:00:00 2001 From: Frederic Petrot Date: Thu, 11 Sep 2003 15:08:54 +0000 Subject: [PATCH] Correction on stdarg --- alliance/src/elp/src/elp.h | 4 ++-- alliance/src/elp/src/elperror.c | 6 ++---- alliance/src/mbkal/src/alc_pars_l6.c | 8 +++++--- alliance/src/mbkspice/src/spi_drive.c | 2 +- alliance/src/mbkspice/src/spi_drive.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/alliance/src/elp/src/elp.h b/alliance/src/elp/src/elp.h index c796724e..4a0553b3 100644 --- a/alliance/src/elp/src/elp.h +++ b/alliance/src/elp/src/elp.h @@ -15,7 +15,7 @@ /* les inclusions */ #include -#include +#include #include "mut.h" #include "mlo.h" #include "rcn.h" @@ -117,4 +117,4 @@ extern float elpLotrsCapaGrid(lotrs_list *) ; extern int elpLofigCapaDiff(lofig_list *) ; extern int elpLofigCapaGrid(lofig_list *) ; extern int elpLofigShrink(lofig_list *) ; -extern short elpError() ; +extern short elpError(short, ...) ; diff --git a/alliance/src/elp/src/elperror.c b/alliance/src/elp/src/elperror.c index 06acf8ce..fda7dfe1 100644 --- a/alliance/src/elp/src/elperror.c +++ b/alliance/src/elp/src/elperror.c @@ -15,7 +15,6 @@ /* traitement des erreur elp */ /****************************************************************************/ -#include #include "elp.h" @@ -36,10 +35,9 @@ /* ------------------- */ /* La fonction renvoie le numero de l'erreur. */ /*****************************************************************************/ -elperrorFCT short elpError(errnum, ...) -short errnum ; +elperrorFCT short elpError(short errnum, ...) { -va_list arg ; +va_list arg; if(elpLang == elpENGLISH) fprintf(stderr,"\n!!! elp error: %d !!!\n",errnum) ; diff --git a/alliance/src/mbkal/src/alc_pars_l6.c b/alliance/src/mbkal/src/alc_pars_l6.c index ffde550c..1dc9a2d7 100644 --- a/alliance/src/mbkal/src/alc_pars_l6.c +++ b/alliance/src/mbkal/src/alc_pars_l6.c @@ -30,6 +30,9 @@ * is provided. * * Updates : AUGUST, 12th 2002, Pierre Nguyen Tuong * * $Log: alc_pars_l6.c,v $ +* Revision 1.9 2003/09/11 15:08:50 fred +* Correction on stdarg +* * Revision 1.8 2003/09/11 13:07:06 fred * Changing varargs into stdarg, and updating the sources accordingly. * @@ -172,7 +175,7 @@ float decode_capa __P(( losig_list*, chain_list*, char*, int )); int type_line __P(( chain_list*, char*, int )); chain_list* read_line __P(( FILE*, char*, int )); void free_line __P(( chain_list* )); -void mal_error __P(()); +void mal_error __P(( char *, ...)); void chk_header __P(( chain_list*, char*, int )); unsigned char decode_layer __P(( char*, char*, int )); data_loins* decode_ins __P(( chain_list*, char*, int )); @@ -1289,12 +1292,11 @@ chain_list *head; void mal_error( char *fname, ... ) { va_list index; - char *fname; int line; char *func; char *fmt; - va_start( fname, index ); + va_start( index, fname ); fname = va_arg( index, char* ); line = va_arg( index, int ); func = va_arg( index, char* ); diff --git a/alliance/src/mbkspice/src/spi_drive.c b/alliance/src/mbkspice/src/spi_drive.c index dc265150..f3acd8ab 100644 --- a/alliance/src/mbkspice/src/spi_drive.c +++ b/alliance/src/mbkspice/src/spi_drive.c @@ -911,7 +911,7 @@ void tooutput( FILE *fd, ... ) va_list index; char *fmt; - va_start( fd, index ); + va_start( index, fd ); fmt = va_arg( index, char* ); diff --git a/alliance/src/mbkspice/src/spi_drive.h b/alliance/src/mbkspice/src/spi_drive.h index 841b4af0..abad2636 100644 --- a/alliance/src/mbkspice/src/spi_drive.h +++ b/alliance/src/mbkspice/src/spi_drive.h @@ -67,7 +67,7 @@ void sorttransistormos __P(( lofig_list *ptfig, char *vdd )); void sortcircuit __P(( lofig_list *ptfig, FILE *df )); -void tooutput __P(()); /* va_list. */ +void tooutput __P(( FILE *, ...)); int sortconnecteur_ordre __P(( FILE *df, chain_list*, locon_list*, int )); #endif