From: solar Date: Wed, 23 Jun 2010 08:39:21 +0000 (+0000) Subject: Individual init to get around warnings on 64bit. X-Git-Tag: v0.5~71 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=3c60673fd7479218b6f8069b848a1f5c2bd10114 Individual init to get around warnings on 64bit. --- diff --git a/functions/stdio/vfprintf.c b/functions/stdio/vfprintf.c index 14e666a..8e24d79 100644 --- a/functions/stdio/vfprintf.c +++ b/functions/stdio/vfprintf.c @@ -15,8 +15,16 @@ int vfprintf( struct _PDCLIB_file_t * _PDCLIB_restrict stream, const char * _PDCLIB_restrict format, va_list arg ) { /* TODO: This function should interpret format as multibyte characters. */ - /* base, flags, n, i, current, s, width, prec, stream, arg */ - struct _PDCLIB_status_t status = { 0, 0, SIZE_MAX, 0, 0, NULL, 0, 0, stream, NULL }; + struct _PDCLIB_status_t status; + status.base = 0; + status.flags = 0; + status.n = SIZE_MAX; + status.i = 0; + status.current = 0; + status.s = NULL; + status.width = 0; + status.prec = 0; + status.stream = stream; va_copy( status.arg, arg ); while ( *format != '\0' ) diff --git a/functions/stdio/vfscanf.c b/functions/stdio/vfscanf.c index 16ea592..a9ce3e9 100644 --- a/functions/stdio/vfscanf.c +++ b/functions/stdio/vfscanf.c @@ -14,9 +14,19 @@ int vfscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict format, va_list arg ) { - /* base, flags, n, i, current, s, width, prec, stream, arg */ - struct _PDCLIB_status_t status = { 0, 0, 0, 0, 0, NULL, 0, 0, stream, NULL }; + /* TODO: This function should interpret format as multibyte characters. */ + struct _PDCLIB_status_t status; + status.base = 0; + status.flags = 0; + status.n = 0; + status.i = 0; + status.current = 0; + status.s = NULL; + status.width = 0; + status.prec = 0; + status.stream = stream; va_copy( status.arg, arg ); + while ( *format != '\0' ) { const char * rc; diff --git a/functions/stdio/vsnprintf.c b/functions/stdio/vsnprintf.c index dee30dc..c2be5f9 100644 --- a/functions/stdio/vsnprintf.c +++ b/functions/stdio/vsnprintf.c @@ -13,8 +13,17 @@ int vsnprintf( char * _PDCLIB_restrict s, size_t n, const char * _PDCLIB_restrict format, _PDCLIB_va_list arg ) { - /* base, flags, n, i, current, s, width, prec, stream, arg */ - struct _PDCLIB_status_t status = { 0, 0, n, 0, 0, s, 0, 0, NULL, NULL }; + /* TODO: This function should interpret format as multibyte characters. */ + struct _PDCLIB_status_t status; + status.base = 0; + status.flags = 0; + status.n = n; + status.i = 0; + status.current = 0; + status.s = s; + status.width = 0; + status.prec = 0; + status.stream = NULL; va_copy( status.arg, arg ); while ( *format != '\0' ) diff --git a/functions/stdio/vsscanf.c b/functions/stdio/vsscanf.c index 20893c9..3fc09cf 100644 --- a/functions/stdio/vsscanf.c +++ b/functions/stdio/vsscanf.c @@ -14,8 +14,17 @@ int vsscanf( const char * _PDCLIB_restrict s, const char * _PDCLIB_restrict format, va_list arg ) { - /* base, flag, n, i, current, s, width, prec, stream, arg */ - struct _PDCLIB_status_t status = { 0, 0, 0, 0, 0, (char *)s, 0, 0, NULL, NULL }; + /* TODO: This function should interpret format as multibyte characters. */ + struct _PDCLIB_status_t status; + status.base = 0; + status.flags = 0; + status.n = 0; + status.i = 0; + status.current = 0; + status.s = (char *) s; + status.width = 0; + status.prec = 0; + status.stream = NULL; va_copy( status.arg, arg ); while ( *format != '\0' )