diff options
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/fgetws.c | 14 | ||||
-rw-r--r-- | newlib/libc/stdio/fputws.c | 13 | ||||
-rw-r--r-- | newlib/libc/stdio/fwprintf.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio/fwscanf.c | 5 | ||||
-rw-r--r-- | newlib/libc/stdio/swprintf.c | 15 | ||||
-rw-r--r-- | newlib/libc/stdio/swscanf.c | 16 | ||||
-rw-r--r-- | newlib/libc/stdio/vfwprintf.c | 13 | ||||
-rw-r--r-- | newlib/libc/stdio/vfwscanf.c | 26 | ||||
-rw-r--r-- | newlib/libc/stdio/vswprintf.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio/vswscanf.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio/vwprintf.c | 2 | ||||
-rw-r--r-- | newlib/libc/stdio/vwscanf.c | 5 | ||||
-rw-r--r-- | newlib/libc/stdio/wprintf.c | 2 | ||||
-rw-r--r-- | newlib/libc/stdio/wscanf.c | 3 |
14 files changed, 70 insertions, 56 deletions
diff --git a/newlib/libc/stdio/fgetws.c b/newlib/libc/stdio/fgetws.c index b5d8851e1..dfd7fe9cc 100644 --- a/newlib/libc/stdio/fgetws.c +++ b/newlib/libc/stdio/fgetws.c @@ -35,17 +35,19 @@ INDEX ANSI_SYNOPSIS #include <wchar.h> - wchar_t *fgetws(wchar_t *<[ws]>, int <[n]>, FILE *<[fp]>); + wchar_t *fgetws(wchar_t *__restrict <[ws]>, int <[n]>, + FILE *__restrict <[fp]>); #include <wchar.h> - wchar_t *_fgetws_r(struct _reent *<[ptr]>, wchar_t *<[ws]>, int <[n]>, FILE *<[fp]>); + wchar_t *_fgetws_r(struct _reent *<[ptr]>, wchar_t *<[ws]>, + int <[n]>, FILE *<[fp]>); TRAD_SYNOPSIS #include <wchar.h> wchar_t *fgetws(<[ws]>,<[n]>,<[fp]>) - wchar_t *<[ws]>; + wchar_t *__restrict <[ws]>; int <[n]>; - FILE *<[fp]>; + FILE *__restrict <[fp]>; #include <wchar.h> wchar_t *_fgetws_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>) @@ -156,9 +158,9 @@ error: wchar_t * _DEFUN(fgetws, (ws, n, fp), - wchar_t *ws _AND + wchar_t *__restrict ws _AND int n _AND - FILE *fp) + FILE *__restrict fp) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdio/fputws.c b/newlib/libc/stdio/fputws.c index a28a5551b..82945996f 100644 --- a/newlib/libc/stdio/fputws.c +++ b/newlib/libc/stdio/fputws.c @@ -35,16 +35,17 @@ INDEX ANSI_SYNOPSIS #include <wchar.h> - int fputws(const wchar_t *<[ws]>, FILE *<[fp]>); + int fputws(const wchar_t *__restrict <[ws]>, FILE *__restrict <[fp]>); #include <wchar.h> - int _fputws_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>, FILE *<[fp]>); + int _fputws_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>, + FILE *<[fp]>); TRAD_SYNOPSIS #include <wchar.h> int fputws(<[ws]>, <[fp]>) - wchar_t *<[ws]>; - FILE *<[fp]>; + wchar_t *__restrict <[ws]>; + FILE *__restrict <[fp]>; #include <wchar.h> int _fputws_r(<[ptr]>, <[ws]>, <[fp]>) @@ -142,8 +143,8 @@ error: int _DEFUN(fputws, (ws, fp), - const wchar_t *ws _AND - FILE *fp) + const wchar_t *__restrict ws _AND + FILE *__restrict fp) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdio/fwprintf.c b/newlib/libc/stdio/fwprintf.c index 76065e965..4b05824c4 100644 --- a/newlib/libc/stdio/fwprintf.c +++ b/newlib/libc/stdio/fwprintf.c @@ -41,8 +41,8 @@ _DEFUN(_fwprintf_r, (ptr, fp, fmt), int _DEFUN(fwprintf, (fp, fmt), - FILE *fp _AND - const wchar_t *fmt _DOTS) + FILE *__restrict fp _AND + const wchar_t *__restrict fmt _DOTS) { int ret; va_list ap; diff --git a/newlib/libc/stdio/fwscanf.c b/newlib/libc/stdio/fwscanf.c index f013cb8f9..8572f4185 100644 --- a/newlib/libc/stdio/fwscanf.c +++ b/newlib/libc/stdio/fwscanf.c @@ -14,7 +14,8 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ - +/* Doc in swscanf.c */ + #include <_ansi.h> #include <reent.h> #include <stdio.h> @@ -25,7 +26,7 @@ #ifndef _REENT_ONLY int -fwscanf (FILE *fp, _CONST wchar_t *fmt, ...) +fwscanf (FILE *__restrict fp, _CONST wchar_t *__restrict fmt, ...) { int ret; va_list ap; diff --git a/newlib/libc/stdio/swprintf.c b/newlib/libc/stdio/swprintf.c index 4e964bedd..60178e52d 100644 --- a/newlib/libc/stdio/swprintf.c +++ b/newlib/libc/stdio/swprintf.c @@ -36,15 +36,16 @@ ANSI_SYNOPSIS #include <wchar.h> int wprintf(const wchar_t *<[format]>, ...); - int fwprintf(FILE *<[fd]>, const wchar_t *<[format]>, ...); - int swprintf(wchar_t *<[str]>, size_t <[size]>, - const wchar_t *<[format]>, ...); + int fwprintf(FILE *__restrict <[fd]>, + const wchar_t *__restrict <[format]>, ...); + int swprintf(wchar_t *__restrict <[str]>, size_t <[size]>, + const wchar_t *__restrict <[format]>, ...); int _wprintf_r(struct _reent *<[ptr]>, const wchar_t *<[format]>, ...); int _fwprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const wchar_t *<[format]>, ...); + const wchar_t *<[format]>, ...); int _swprintf_r(struct _reent *<[ptr]>, wchar_t *<[str]>, - size_t <[size]>, const wchar_t *<[format]>, ...); + size_t <[size]>, const wchar_t *<[format]>, ...); DESCRIPTION <<wprintf>> accepts a series of arguments, applies to each a @@ -590,9 +591,9 @@ _DEFUN(_swprintf_r, (ptr, str, size, fmt), int _DEFUN(swprintf, (str, size, fmt), - wchar_t *str _AND + wchar_t *__restrict str _AND size_t size _AND - _CONST wchar_t *fmt _DOTS) + _CONST wchar_t *__restrict fmt _DOTS) { int ret; va_list ap; diff --git a/newlib/libc/stdio/swscanf.c b/newlib/libc/stdio/swscanf.c index 273f59b32..d7ad4b867 100644 --- a/newlib/libc/stdio/swscanf.c +++ b/newlib/libc/stdio/swscanf.c @@ -35,9 +35,11 @@ INDEX ANSI_SYNOPSIS #include <stdio.h> - int wscanf(const wchar_t *<[format]>, ...); - int fwscanf(FILE *<[fd]>, const wchar_t *<[format]>, ...); - int swscanf(const wchar_t *<[str]>, const wchar_t *<[format]>, ...); + int wscanf(const wchar_t *__restrict <[format]>, ...); + int fwscanf(FILE *__restrict <[fd]>, + const wchar_t *__restrict <[format]>, ...); + int swscanf(const wchar_t *__restrict <[str]>, + const wchar_t *__restrict <[format]>, ...); int _wscanf_r(struct _reent *<[ptr]>, const wchar_t *<[format]>, ...); int _fwscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>, @@ -50,15 +52,15 @@ TRAD_SYNOPSIS #include <stdio.h> int wscanf(<[format]> [, <[arg]>, ...]) - wchar_t *<[format]>; + wchar_t *__restrict <[format]>; int fwscanf(<[fd]>, <[format]> [, <[arg]>, ...]); FILE *<[fd]>; wchar_t *<[format]>; int swscanf(<[str]>, <[format]> [, <[arg]>, ...]); - wchar_t *<[str]>; - wchar_t *<[format]>; + wchar_t *__restrict <[str]>; + wchar_t *__restrict <[format]>; int _wscanf_r(<[ptr]>, <[format]> [, <[arg]>, ...]) struct _reent *<[ptr]>; @@ -378,7 +380,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #ifndef _REENT_ONLY int -swscanf (_CONST wchar_t *str, _CONST wchar_t *fmt, ...) +swscanf (_CONST wchar_t *__restrict str, _CONST wchar_t *__restrict fmt, ...) { int ret; va_list ap; diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c index 4788add23..c3b8b27bb 100644 --- a/newlib/libc/stdio/vfwprintf.c +++ b/newlib/libc/stdio/vfwprintf.c @@ -51,10 +51,11 @@ ANSI_SYNOPSIS #include <stdio.h> #include <stdarg.h> #include <wchar.h> - int vwprintf(const wchar_t *<[fmt]>, va_list <[list]>); - int vfwprintf(FILE *<[fp]>, const wchar_t *<[fmt]>, va_list <[list]>); - int vswprintf(wchar_t *<[str]>, size_t <[size]>, const wchar_t *<[fmt]>, - va_list <[list]>); + int vwprintf(const wchar_t *__restrict <[fmt]>, va_list <[list]>); + int vfwprintf(FILE *__restrict <[fp]>, + const wchar_t *__restrict <[fmt]>, va_list <[list]>); + int vswprintf(wchar_t * __restrict <[str]>, size_t <[size]>, + const wchar_t *__ restrict <[fmt]>, va_list <[list]>); int _vwprintf_r(struct _reent *<[reent]>, const wchar_t *<[fmt]>, va_list <[list]>); @@ -366,8 +367,8 @@ _EXFUN(get_arg, (struct _reent *data, int n, wchar_t *fmt, #ifndef STRING_ONLY int _DEFUN(VFWPRINTF, (fp, fmt0, ap), - FILE * fp _AND - _CONST wchar_t *fmt0 _AND + FILE *__restrict fp _AND + _CONST wchar_t *__restrict fmt0 _AND va_list ap) { int result; diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c index 3379b5e19..d86594ef6 100644 --- a/newlib/libc/stdio/vfwscanf.c +++ b/newlib/libc/stdio/vfwscanf.c @@ -35,14 +35,16 @@ INDEX ANSI_SYNOPSIS #include <stdio.h> #include <stdarg.h> - int vwscanf(const wchar_t *<[fmt]>, va_list <[list]>); - int vfwscanf(FILE *<[fp]>, const wchar_t *<[fmt]>, va_list <[list]>); - int vswscanf(const wchar_t *<[str]>, const wchar_t *<[fmt]>, va_list <[list]>); + int vwscanf(const wchar_t *__restrict <[fmt]>, va_list <[list]>); + int vfwscanf(FILE *__restrict <[fp]>, + const wchar_t *__restrict <[fmt]>, va_list <[list]>); + int vswscanf(const wchar_t *__restrict <[str]>, + const wchar_t *__restrict <[fmt]>, va_list <[list]>); int _vwscanf(struct _reent *<[reent]>, const wchar_t *<[fmt]>, va_list <[list]>); - int _vfwscanf(struct _reent *<[reent]>, FILE *<[fp]>, const wchar_t *<[fmt]>, - va_list <[list]>); + int _vfwscanf(struct _reent *<[reent]>, FILE *<[fp]>, + const wchar_t *<[fmt]>, va_list <[list]>); int _vswscanf(struct _reent *<[reent]>, const wchar_t *<[str]>, const wchar_t *<[fmt]>, va_list <[list]>); @@ -50,17 +52,17 @@ TRAD_SYNOPSIS #include <stdio.h> #include <varargs.h> int vwscanf( <[fmt]>, <[ist]>) - wchar_t *<[fmt]>; + wchar_t *__restrict <[fmt]>; va_list <[list]>; int vfwscanf( <[fp]>, <[fmt]>, <[list]>) - FILE *<[fp]>; - wchar_t *<[fmt]>; + FILE *__restrict <[fp]>; + wchar_t *__restrict <[fmt]>; va_list <[list]>; int vswscanf( <[str]>, <[fmt]>, <[list]>) - wchar_t *<[str]>; - wchar_t *<[fmt]>; + wchar_t *__restrict <[str]>; + wchar_t *__restrict <[fmt]>; va_list <[list]>; int _vwscanf( <[reent]>, <[fmt]>, <[ist]>) @@ -254,8 +256,8 @@ static void * get_arg (int, va_list *, int *, void **); int _DEFUN(VFWSCANF, (fp, fmt, ap), - register FILE *fp _AND - _CONST wchar_t *fmt _AND + register FILE *__restrict fp _AND + _CONST wchar_t *__restrict fmt _AND va_list ap) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdio/vswprintf.c b/newlib/libc/stdio/vswprintf.c index 2d9096c15..ac321b662 100644 --- a/newlib/libc/stdio/vswprintf.c +++ b/newlib/libc/stdio/vswprintf.c @@ -71,9 +71,9 @@ _DEFUN(_vswprintf_r, (ptr, str, size, fmt, ap), int _DEFUN(vswprintf, (str, size, fmt, ap), - wchar_t *str _AND + wchar_t *__restrict str _AND size_t size _AND - const wchar_t *fmt _AND + const wchar_t *__restrict fmt _AND va_list ap) { return _vswprintf_r (_REENT, str, size, fmt, ap); diff --git a/newlib/libc/stdio/vswscanf.c b/newlib/libc/stdio/vswscanf.c index 08108173a..0d090f021 100644 --- a/newlib/libc/stdio/vswscanf.c +++ b/newlib/libc/stdio/vswscanf.c @@ -16,6 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +/* Doc in vfwscanf.c */ #include <_ansi.h> #include <reent.h> @@ -36,7 +37,8 @@ #ifndef _REENT_ONLY int -vswscanf (_CONST wchar_t *str, _CONST wchar_t *fmt, va_list ap) +vswscanf (_CONST wchar_t *__restrict str, _CONST wchar_t * __restrict fmt, + va_list ap) { return _vswscanf_r (_REENT, str, fmt, ap); } diff --git a/newlib/libc/stdio/vwprintf.c b/newlib/libc/stdio/vwprintf.c index de95346a0..51d1df3a9 100644 --- a/newlib/libc/stdio/vwprintf.c +++ b/newlib/libc/stdio/vwprintf.c @@ -27,7 +27,7 @@ int _DEFUN(vwprintf, (fmt, ap), - _CONST wchar_t *fmt _AND + _CONST wchar_t *__restrict fmt _AND va_list ap) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdio/vwscanf.c b/newlib/libc/stdio/vwscanf.c index d0b535170..e40bdede5 100644 --- a/newlib/libc/stdio/vwscanf.c +++ b/newlib/libc/stdio/vwscanf.c @@ -16,7 +16,8 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ - +/* Doc in vfwscanf.c */ + #include <_ansi.h> #include <reent.h> #include <stdio.h> @@ -31,7 +32,7 @@ #ifndef _REENT_ONLY int -vwscanf (_CONST wchar_t *fmt, va_list ap) +vwscanf (_CONST wchar_t *__restrict fmt, va_list ap) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdio/wprintf.c b/newlib/libc/stdio/wprintf.c index 69dea53c6..e05ba1013 100644 --- a/newlib/libc/stdio/wprintf.c +++ b/newlib/libc/stdio/wprintf.c @@ -42,7 +42,7 @@ _DEFUN(_wprintf_r, (ptr, fmt), int _DEFUN(wprintf, (fmt), - const wchar_t *fmt _DOTS) + const wchar_t *__restrict fmt _DOTS) { int ret; va_list ap; diff --git a/newlib/libc/stdio/wscanf.c b/newlib/libc/stdio/wscanf.c index 9fee3c176..f953d9f81 100644 --- a/newlib/libc/stdio/wscanf.c +++ b/newlib/libc/stdio/wscanf.c @@ -14,6 +14,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ + /* Doc in swscanf.c */ #include <_ansi.h> #include <reent.h> @@ -25,7 +26,7 @@ #ifndef _REENT_ONLY int -wscanf(_CONST wchar_t *fmt, ...) +wscanf(_CONST wchar_t *__restrict fmt, ...) { int ret; va_list ap; |