From 481cb456a484b13e5fba53b86bdbc652227b8e2b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 18 Nov 2013 17:28:06 +0000 Subject: 2013-11-18 Sahil Patnayakuni * libc/include/stdio.h, libc/machine/powerpc/vfscanf.c, libc/machine/spu/fgetpos.c, libc/machine/spu/fgets.c, libc/machine/spu/fopen.c, libc/machine/spu/fputs.c, libc/machine/spu/fread.c, libc/machine/spu/freopen.c, libc/machine/spu/fwrite.c, libc/machine/spu/setbuf.c, libc/machine/spu/vfprintf.c, libc/machine/spu/vfscanf.c, libc/machine/spu/vsnprintf.c, libc/machine/spu/vsprintf.c, libc/machine/spu/vsscanf.c, libc/stdio/asnprintf.c, libc/stdio/asprintf.c, libc/stdio/dprintf.c, libc/stdio/fgetpos.c, libc/stdio/fgets.c, libc/stdio/fmemopen.c, libc/stdio/fopen.c, libc/stdio/fprintf.c, libc/stdio/fputs.c, libc/stdio/fread.c, libc/stdio/freopen.c, libc/stdio/fscanf.c, libc/stdio/fwrite.c, libc/stdio/printf.c, libc/stdio/scanf.c, libc/stdio/setbuf.c, libc/stdio/snprintf.c, libc/stdio/sprintf.c, libc/stdio/sscanf.c, libc/stdio/vdprintf.c, libc/stdio/vprintf.c, libc/stdio/vscanf.c, libc/stdio/vsnprintf.c, libc/stdio/vsprintf.c, libc/stdio/vsscanf.c: Add restrict keyword. --- newlib/libc/stdio/sscanf.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'newlib/libc/stdio/sscanf.c') diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c index 974ae812b..e08002ea2 100644 --- a/newlib/libc/stdio/sscanf.c +++ b/newlib/libc/stdio/sscanf.c @@ -35,15 +35,15 @@ INDEX ANSI_SYNOPSIS #include - int scanf(const char *<[format]>, ...); - int fscanf(FILE *<[fd]>, const char *<[format]>, ...); - int sscanf(const char *<[str]>, const char *<[format]>, ...); + int scanf(const char *restrict <[format]>, ...); + int fscanf(FILE *restrict <[fd]>, const char *restrict <[format]>, ...); + int sscanf(const char *restrict <[str]>, const char *restrict <[format]>, ...); - int _scanf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); - int _fscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const char *<[format]>, ...); - int _sscanf_r(struct _reent *<[ptr]>, const char *<[str]>, - const char *<[format]>, ...); + int _scanf_r(struct _reent *<[ptr]>, const char *restrict <[format]>, ...); + int _fscanf_r(struct _reent *<[ptr]>, FILE *restrict <[fd]>, + const char *restrict <[format]>, ...); + int _sscanf_r(struct _reent *<[ptr]>, const char *restrict <[str]>, + const char *restrict <[format]>, ...); TRAD_SYNOPSIS @@ -399,8 +399,8 @@ Supporting OS subroutines required: <>, <>, <>, #ifdef _HAVE_STDC int _DEFUN(sscanf, (str, fmt), - _CONST char *str _AND - _CONST char *fmt _DOTS) + _CONST char *__restrict str _AND + _CONST char * fmt _DOTS) #else int sscanf(str, fmt, va_alist) @@ -436,14 +436,14 @@ sscanf(str, fmt, va_alist) int _DEFUN(_sscanf_r, (ptr, str, fmt), struct _reent *ptr _AND - _CONST char *str _AND - _CONST char *fmt _DOTS) + _CONST char *__restrict str _AND + _CONST char *__restrict fmt _DOTS) #else int _sscanf_r(ptr, str, fmt, va_alist) struct _reent *ptr; - _CONST char *str; - _CONST char *fmt; + _CONST char *__restrict str; + _CONST char *__restrict fmt; va_dcl #endif { -- cgit v1.2.3