diff --git a/alliance/src/elp/src/elperror.c b/alliance/src/elp/src/elperror.c index 0564e27e..06acf8ce 100644 --- a/alliance/src/elp/src/elperror.c +++ b/alliance/src/elp/src/elperror.c @@ -15,7 +15,7 @@ /* traitement des erreur elp */ /****************************************************************************/ -#include +#include #include "elp.h" @@ -36,10 +36,8 @@ /* ------------------- */ /* La fonction renvoie le numero de l'erreur. */ /*****************************************************************************/ -elperrorFCT short elpError(errnum,va_alist) +elperrorFCT short elpError(errnum, ...) short errnum ; -va_dcl - { va_list arg ; @@ -48,7 +46,7 @@ fprintf(stderr,"\n!!! elp error: %d !!!\n",errnum) ; else fprintf(stderr,"\n!!! erreur elp : %d !!!\n",errnum) ; -va_start(arg) ; +va_start(arg, errnum) ; switch(errnum) { @@ -111,6 +109,7 @@ switch(errnum) va_arg(arg,char *)) ; break ; } + va_end(arg); fflush(stderr) ; return errnum ; diff --git a/alliance/src/genpat/src/ARRAY.c b/alliance/src/genpat/src/ARRAY.c index 3a2b5fa2..98ae27d8 100644 --- a/alliance/src/genpat/src/ARRAY.c +++ b/alliance/src/genpat/src/ARRAY.c @@ -27,13 +27,13 @@ /* auteurs : RENAUD & VENOT & PITON */ /***************************************************************/ -#ident "$Id: ARRAY.c,v 1.2 2002/09/30 16:20:24 czo Exp $" +#ident "$Id: ARRAY.c,v 1.3 2003/09/11 13:07:05 fred Exp $" #include #include #include #include -#include +#include #include "mut.h" #include "pat.h" @@ -49,11 +49,9 @@ /* ###--------------------------------------------------------------### */ -void d_ARRAY (va_alist) -va_dcl +void d_ARRAY (char *param, ...) { -va_list pa; -char *param; +va_list pa; char buffer [80]; char buffer_anx [64]; char name [64]; @@ -77,11 +75,11 @@ struct alpha_num decomp; if (GNP_TAB_PAIOL_CREE == GNP_ACTIF) Erreur ("ARRAY already in descriptive part\n"); - va_start(pa); - - param = va_arg(pa, char *); if (param == NULL) Erreur ("ARRAY needs any parameters\n"); + + va_start(pa, param); + strcpy (buffer,param); KillEsp (buffer); diff --git a/alliance/src/mbkal/src/alc_pars_l6.c b/alliance/src/mbkal/src/alc_pars_l6.c index b43532c2..ffde550c 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.8 2003/09/11 13:07:06 fred +* Changing varargs into stdarg, and updating the sources accordingly. +* * Revision 1.7 2003/03/22 16:35:04 ludo * Bug fixing: core dump under Solaris 8 64 bits * @@ -83,7 +86,7 @@ #include #include #include -#include +#include #include #include @@ -108,7 +111,7 @@ #define MAL_LOSELF 0x00000800 /* Tampon de lecture */ -#define MALBUFMAX 1024 +#define MALBUFMAX 8192 /* ptype sur losig -> verification unicite du signal */ #define MALDEFINED 11223344 @@ -1283,16 +1286,15 @@ chain_list *head; /******************************************************************************/ -void mal_error( va_alist ) -va_dcl +void mal_error( char *fname, ... ) { va_list index; - char *fmt; char *fname; int line; char *func; + char *fmt; - va_start( index ); + va_start( fname, index ); fname = va_arg( index, char* ); line = va_arg( index, int ); func = va_arg( index, char* ); @@ -1308,6 +1310,8 @@ va_dcl ); vfprintf( stderr, fmt, index ); + va_end( index ); + EXIT(1); } diff --git a/alliance/src/mbkspice/src/spi_drive.c b/alliance/src/mbkspice/src/spi_drive.c index 740cde76..dc265150 100644 --- a/alliance/src/mbkspice/src/spi_drive.c +++ b/alliance/src/mbkspice/src/spi_drive.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -906,16 +906,13 @@ lofig_list *ptfig; } } -void tooutput( va_alist ) -va_dcl +void tooutput( FILE *fd, ... ) { va_list index; - FILE *fd; char *fmt; - va_start( index ); + va_start( fd, index ); - fd = va_arg( index, FILE* ); fmt = va_arg( index, char* ); if( vfprintf( fd, fmt, index ) < 0 ) @@ -925,6 +922,8 @@ va_dcl perror( "System say " ); EXIT( 1 ); } + + va_end( index ); } void spi_vect( s )