Changing varargs into stdarg, and updating the sources accordingly.
This commit is contained in:
parent
6510148d21
commit
502b08d578
|
@ -15,7 +15,7 @@
|
|||
/* traitement des erreur elp */
|
||||
/****************************************************************************/
|
||||
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
#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 ;
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#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;
|
||||
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);
|
||||
|
||||
|
|
|
@ -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 <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <mut.h>
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <mut.h>
|
||||
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue