summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/sprintf.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-18 17:28:06 +0000
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-18 17:28:06 +0000
commit481cb456a484b13e5fba53b86bdbc652227b8e2b (patch)
tree5fec15f7a7e00882113b9b84064a11279f40e120 /newlib/libc/stdio/sprintf.c
parent8ab08406dadea2499a556446a0112b9a104cb1d3 (diff)
downloadcygnal-481cb456a484b13e5fba53b86bdbc652227b8e2b.tar.gz
cygnal-481cb456a484b13e5fba53b86bdbc652227b8e2b.tar.bz2
cygnal-481cb456a484b13e5fba53b86bdbc652227b8e2b.zip
2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
* 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.
Diffstat (limited to 'newlib/libc/stdio/sprintf.c')
-rw-r--r--newlib/libc/stdio/sprintf.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c
index 0914b23b8..65dcc0fde 100644
--- a/newlib/libc/stdio/sprintf.c
+++ b/newlib/libc/stdio/sprintf.c
@@ -47,26 +47,26 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int printf(const char *<[format]>, ...);
- int fprintf(FILE *<[fd]>, const char *<[format]>, ...);
- int sprintf(char *<[str]>, const char *<[format]>, ...);
- int snprintf(char *<[str]>, size_t <[size]>, const char *<[format]>,
+ int printf(const char *restrict <[format]>, ...);
+ int fprintf(FILE *restrict <[fd]>, const char *restrict <[format]>, ...);
+ int sprintf(char *restrict <[str]>, const char *restrict <[format]>, ...);
+ int snprintf(char *restrict <[str]>, size_t <[size]>, const char *restrict <[format]>,
...);
- int asprintf(char **<[strp]>, const char *<[format]>, ...);
- char *asnprintf(char *<[str]>, size_t *<[size]>, const char *<[format]>,
+ int asprintf(char **restrict <[strp]>, const char *restrict <[format]>, ...);
+ char *asnprintf(char *restrict <[str]>, size_t *restrict <[size]>, const char *restrict <[format]>,
...);
- int _printf_r(struct _reent *<[ptr]>, const char *<[format]>, ...);
- int _fprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>,
- const char *<[format]>, ...);
- int _sprintf_r(struct _reent *<[ptr]>, char *<[str]>,
- const char *<[format]>, ...);
- int _snprintf_r(struct _reent *<[ptr]>, char *<[str]>, size_t <[size]>,
- const char *<[format]>, ...);
- int _asprintf_r(struct _reent *<[ptr]>, char **<[strp]>,
- const char *<[format]>, ...);
- char *_asnprintf_r(struct _reent *<[ptr]>, char *<[str]>,
- size_t *<[size]>, const char *<[format]>, ...);
+ int _printf_r(struct _reent *<[ptr]>, const char *restrict <[format]>, ...);
+ int _fprintf_r(struct _reent *<[ptr]>, FILE *restrict <[fd]>,
+ const char *restrict <[format]>, ...);
+ int _sprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>,
+ const char *restrict <[format]>, ...);
+ int _snprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>, size_t <[size]>,
+ const char *restrict <[format]>, ...);
+ int _asprintf_r(struct _reent *<[ptr]>, char **restrict <[strp]>,
+ const char *restrict <[format]>, ...);
+ char *_asnprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>,
+ size_t *restrict <[size]>, const char *restrict <[format]>, ...);
DESCRIPTION
<<printf>> accepts a series of arguments, applies to each a
@@ -579,13 +579,13 @@ int
#ifdef _HAVE_STDC
_DEFUN(_sprintf_r, (ptr, str, fmt),
struct _reent *ptr _AND
- char *str _AND
- _CONST char *fmt _DOTS)
+ char *__restrict str _AND
+ _CONST char *__restrict fmt _DOTS)
#else
_sprintf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
- char *str;
- _CONST char *fmt;
+ char *__restrict str;
+ _CONST char *__restrict fmt;
va_dcl
#endif
{
@@ -613,8 +613,8 @@ _sprintf_r(ptr, str, fmt, va_alist)
int
#ifdef _HAVE_STDC
_DEFUN(sprintf, (str, fmt),
- char *str _AND
- _CONST char *fmt _DOTS)
+ char *__restrict str _AND
+ _CONST char *__restrict fmt _DOTS)
#else
sprintf(str, fmt, va_alist)
char *str;