Patch - Add restrict to wchar.h
Joel Sherrill
joel.sherrill@oarcorp.com
Mon Nov 25 15:16:00 GMT 2013
Hi
This should be the last big patch in the add restrict series
from Google Code-In students.
This one is large and, although I think it is correct, there
is plenty of room for errors. It is a fairly large but
monotonous patch.
As best we can tell, newlib has all the wchar.h methods
which should have restrict added except wcsxfrm_l().
Let me know if this is OK to commit or needs revision.
2013-11-25 Julio Gutierrez <jgutleyva@gmail.com>
*libc/include/wchar.h: Add restrict keyword.
*libc/stdio/fgetws.c (fgetws): ditto.
*libc/stdio/fputws.c (fputws): ditto.
*libc/stdio/fwprintf.c (fwprintf): ditto.
*libc/stdio/fwscanf.c (fwscanf): ditto.
*libc/stdio/swprintf.c (swprintf): ditto.
*libc/stdio/swscanf.c (swscanf): ditto.
*libc/stdio/vfwprintf.c (vfwprintf): ditto.
*libc/stdio/vfwscanf.c (vfwscanf): ditto.
*libc/stdio/vswprintf.c (vswprintf): ditto.
*libc/stdio/vswscanf.c (vswscanf): ditto.
*libc/stdio/vwprintf.c (vwprintf): ditto.
*libc/stdio/vwscanf.c (vwscanf): ditto.
*libc/stdio/wprintf.c (wprintf): ditto.
*libc/stdio/wscanf.c (wscanf): ditto.
*libc/stdlib/mbrlen.c (mbrlen): ditto.
*libc/stdlib/mbrtowc.c (mbrtowc): ditto.
*libc/stdlib/mbsnrtowcs.c (mbsnrtowcs): ditto.
*libc/stdlib/mbsrtowcs.c (mbsrtowcs): ditto.
*libc/stdlib/wcrtomb.c (wcrtomb): ditto.
*libc/stdlib/wcsnrtombs.c (wcsnrtombs): ditto.
*libc/stdlib/wcsrtombs.c (wcsrtombs): ditto.
*libc/stdlib/wcstod.c (wcstod): ditto.
*libc/stdlib/wcstol.c (wcstol): ditto.
*libc/stdlib/wcstold.c (wcstold): ditto.
*libc/stdlib/wcstoll.c (wcstoll): ditto.
*libc/stdlib/wcstoul.c (wcstoul): ditto.
*libc/stdlib/wcstoull.c (cstoull): ditto.
*libc/string/wcpcpy.c (wcpcpy): ditto.
*libc/string/wcpncpy.c (wcpncpy): ditto.
*libc/string/wcscat.c (wcscat): ditto.
*libc/string/wcscpy.c (wcscpy): ditto.
*libc/string/wcsncat.c (wcsncat): ditto.
*libc/string/wcsncpy.c (wcsncpy): ditto.
*libc/string/wcsstr.c (wcsstr): ditto.
*libc/string/wcstok.c (wcstok): ditto.
*libc/string/wcsxfrm.c (wcsxfrm): ditto.
*libc/string/wmemcpy.c (wmemcpy): ditto.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
-------------- next part --------------
? cscope.out
Index: libc/include/wchar.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/wchar.h,v
retrieving revision 1.32
diff -u -r1.32 wchar.h
--- libc/include/wchar.h 25 Nov 2013 13:46:22 -0000 1.32
+++ libc/include/wchar.h 25 Nov 2013 15:06:25 -0000
@@ -49,78 +49,92 @@
wint_t _EXFUN(btowc, (int));
int _EXFUN(wctob, (wint_t));
-size_t _EXFUN(mbrlen, (const char * , size_t, mbstate_t *));
-size_t _EXFUN(mbrtowc, (wchar_t * , const char * , size_t, mbstate_t *));
+size_t _EXFUN(mbrlen, (const char *__restrict, size_t, mbstate_t *__restrict));
+size_t _EXFUN(mbrtowc, (wchar_t *__restrict, const char *__restrict, size_t,
+ mbstate_t *__restrict));
size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * ,
size_t, mbstate_t *));
int _EXFUN(mbsinit, (const mbstate_t *));
-size_t _EXFUN(mbsnrtowcs, (wchar_t * , const char ** , size_t, size_t,
- mbstate_t *));
+size_t _EXFUN(mbsnrtowcs, (wchar_t *__restrict, const char **__restrict,
+ size_t, size_t, mbstate_t *__restrict));
size_t _EXFUN(_mbsnrtowcs_r, (struct _reent *, wchar_t * , const char ** ,
size_t, size_t, mbstate_t *));
-size_t _EXFUN(mbsrtowcs, (wchar_t * , const char ** , size_t, mbstate_t *));
+size_t _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t,
+ mbstate_t *__restrict));
size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *));
-size_t _EXFUN(wcrtomb, (char * , wchar_t, mbstate_t *));
+size_t _EXFUN(wcrtomb, (char *__restrict, wchar_t, mbstate_t *__restrict));
size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *));
-size_t _EXFUN(wcsnrtombs, (char * , const wchar_t ** , size_t, size_t,
- mbstate_t *));
+size_t _EXFUN(wcsnrtombs, (char *__restrict, const wchar_t **__restrict,
+ size_t, size_t, mbstate_t *__restrict));
size_t _EXFUN(_wcsnrtombs_r, (struct _reent *, char * , const wchar_t ** ,
size_t, size_t, mbstate_t *));
-size_t _EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *));
+size_t _EXFUN(wcsrtombs, (char *__restrict, const wchar_t **__restrict,
+ size_t, mbstate_t *__restrict));
size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** ,
size_t, mbstate_t *));
int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcscat, (wchar_t * , const wchar_t *));
+wchar_t *_EXFUN(wcscat, (wchar_t *__restrict, const wchar_t *__restrict));
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
-wchar_t *_EXFUN(wcpcpy, (wchar_t * , const wchar_t *));
+wchar_t *_EXFUN(wcscpy, (wchar_t *__restrict, const wchar_t *__restrict));
+wchar_t *_EXFUN(wcpcpy, (wchar_t *__restrict,
+ const wchar_t *__restrict));
wchar_t *_EXFUN(wcsdup, (const wchar_t *));
wchar_t *_EXFUN(_wcsdup_r, (struct _reent *, const wchar_t * ));
size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
size_t _EXFUN(wcsftime, (wchar_t *__restrict, size_t,
- const wchar_t *__restrict, const struct tm *__restrict));
+ const wchar_t *__restrict, const struct tm *__restrict));
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t));
size_t _EXFUN(wcslen, (const wchar_t *));
int _EXFUN(wcsncasecmp, (const wchar_t *, const wchar_t *, size_t));
-wchar_t *_EXFUN(wcsncat, (wchar_t * , const wchar_t * , size_t));
+wchar_t *_EXFUN(wcsncat, (wchar_t *__restrict,
+ const wchar_t *__restrict, size_t));
int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t));
-wchar_t *_EXFUN(wcsncpy, (wchar_t * , const wchar_t * , size_t));
-wchar_t *_EXFUN(wcpncpy, (wchar_t * , const wchar_t * , size_t));
+wchar_t *_EXFUN(wcsncpy, (wchar_t *__restrict,
+ const wchar_t *__restrict, size_t));
+wchar_t *_EXFUN(wcpncpy, (wchar_t *__restrict,
+ const wchar_t *__restrict, size_t));
size_t _EXFUN(wcsnlen, (const wchar_t *, size_t));
wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *));
wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t));
size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcsstr, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcstok, (wchar_t *, const wchar_t *, wchar_t **));
-double _EXFUN(wcstod, (const wchar_t *, wchar_t **));
+wchar_t *_EXFUN(wcsstr, (const wchar_t *__restrict,
+ const wchar_t *__restrict));
+wchar_t *_EXFUN(wcstok, (wchar_t *__restrict, const wchar_t *__restrict,
+ wchar_t **__restrict));
+double _EXFUN(wcstod, (const wchar_t *__restrict, wchar_t **__restrict));
double _EXFUN(_wcstod_r, (struct _reent *, const wchar_t *, wchar_t **));
-float _EXFUN(wcstof, (const wchar_t *, wchar_t **));
+float _EXFUN(wcstof, (const wchar_t *__restrict, wchar_t **__restrict));
float _EXFUN(_wcstof_r, (struct _reent *, const wchar_t *, wchar_t **));
int _EXFUN(wcswidth, (const wchar_t *, size_t));
-size_t _EXFUN(wcsxfrm, (wchar_t *, const wchar_t *, size_t));
+size_t _EXFUN(wcsxfrm, (wchar_t *__restrict, const wchar_t *__restrict,
+ size_t));
int _EXFUN(wcwidth, (const wchar_t));
wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t));
int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t));
-wchar_t *_EXFUN(wmemcpy, (wchar_t * , const wchar_t * , size_t));
+wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict,
+ size_t));
wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t));
wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t));
-long _EXFUN(wcstol, (const wchar_t *, wchar_t **, int));
-long long _EXFUN(wcstoll, (const wchar_t *, wchar_t **, int));
-unsigned long _EXFUN(wcstoul, (const wchar_t *, wchar_t **, int));
-unsigned long long _EXFUN(wcstoull, (const wchar_t *, wchar_t **, int));
+long _EXFUN(wcstol, (const wchar_t *__restrict, wchar_t **__restrict, int));
+long long _EXFUN(wcstoll, (const wchar_t *__restrict, wchar_t **__restrict,
+ int));
+unsigned long _EXFUN(wcstoul, (const wchar_t *__restrict, wchar_t **__restrict,
+ int));
+unsigned long long _EXFUN(wcstoull, (const wchar_t *__restrict,
+ wchar_t **__restrict, int));
long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int));
long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int));
unsigned long _EXFUN(_wcstoul_r, (struct _reent *, const wchar_t *, wchar_t **, int));
unsigned long long _EXFUN(_wcstoull_r, (struct _reent *, const wchar_t *, wchar_t **, int));
wint_t _EXFUN(fgetwc, (__FILE *));
-wchar_t *_EXFUN(fgetws, (wchar_t *, int, __FILE *));
+wchar_t *_EXFUN(fgetws, (wchar_t *__restrict, int, __FILE *__restrict));
wint_t _EXFUN(fputwc, (wchar_t, __FILE *));
-int _EXFUN(fputws, (const wchar_t *, __FILE *));
+int _EXFUN(fputws, (const wchar_t *__restrict, __FILE *__restrict));
int _EXFUN (fwide, (__FILE *, int));
wint_t _EXFUN (getwc, (__FILE *));
wint_t _EXFUN (getwchar, (void));
@@ -150,12 +164,15 @@
#endif
#endif
-int _EXFUN(fwprintf, (__FILE *, const wchar_t *, ...));
-int _EXFUN(swprintf, (wchar_t *, size_t, const wchar_t *, ...));
-int _EXFUN(vfwprintf, (__FILE *, const wchar_t *, __VALIST));
-int _EXFUN(vswprintf, (wchar_t *, size_t, const wchar_t *, __VALIST));
-int _EXFUN(vwprintf, (const wchar_t *, __VALIST));
-int _EXFUN(wprintf, (const wchar_t *, ...));
+int _EXFUN(fwprintf, (__FILE *__restrict, const wchar_t *__restrict, ...));
+int _EXFUN(swprintf, (wchar_t *__restrict, size_t,
+ const wchar_t *__restrict, ...));
+int _EXFUN(vfwprintf, (__FILE *__restrict, const wchar_t *__restrict,
+ __VALIST));
+int _EXFUN(vswprintf, (wchar_t *__restrict, size_t,
+ const wchar_t *__restrict, __VALIST));
+int _EXFUN(vwprintf, (const wchar_t *__restrict, __VALIST));
+int _EXFUN(wprintf, (const wchar_t *__restrict, ...));
int _EXFUN(_fwprintf_r, (struct _reent *, __FILE *, const wchar_t *, ...));
int _EXFUN(_swprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, ...));
@@ -164,12 +181,15 @@
int _EXFUN(_vwprintf_r, (struct _reent *, const wchar_t *, __VALIST));
int _EXFUN(_wprintf_r, (struct _reent *, const wchar_t *, ...));
-int _EXFUN(fwscanf, (__FILE *, const wchar_t *, ...));
-int _EXFUN(swscanf, (const wchar_t *, const wchar_t *, ...));
-int _EXFUN(vfwscanf, (__FILE *, const wchar_t *, __VALIST));
-int _EXFUN(vswscanf, (const wchar_t *, const wchar_t *, __VALIST));
-int _EXFUN(vwscanf, (const wchar_t *, __VALIST));
-int _EXFUN(wscanf, (const wchar_t *, ...));
+int _EXFUN(fwscanf, (__FILE *__restrict, const wchar_t *__restrict, ...));
+int _EXFUN(swscanf, (const wchar_t *__restrict,
+ const wchar_t *__restrict, ...));
+int _EXFUN(vfwscanf, (__FILE *__restrict, const wchar_t *__restrict,
+ __VALIST));
+int _EXFUN(vswscanf, (const wchar_t *__restrict, const wchar_t *__restrict,
+ __VALIST));
+int _EXFUN(vwscanf, (const wchar_t *__restrict, __VALIST));
+int _EXFUN(wscanf, (const wchar_t *__restrict, ...));
int _EXFUN(_fwscanf_r, (struct _reent *, __FILE *, const wchar_t *, ...));
int _EXFUN(_swscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, ...));
Index: libc/stdio/fgetws.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/fgetws.c,v
retrieving revision 1.7
diff -u -r1.7 fgetws.c
--- libc/stdio/fgetws.c 29 Apr 2013 21:06:23 -0000 1.7
+++ libc/stdio/fgetws.c 25 Nov 2013 15:06:26 -0000
@@ -35,17 +35,19 @@
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 @@
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;
Index: libc/stdio/fputws.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/fputws.c,v
retrieving revision 1.5
diff -u -r1.5 fputws.c
--- libc/stdio/fputws.c 29 Apr 2013 21:06:23 -0000 1.5
+++ libc/stdio/fputws.c 25 Nov 2013 15:06:26 -0000
@@ -35,16 +35,17 @@
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 @@
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;
Index: libc/stdio/fwprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/fwprintf.c,v
retrieving revision 1.1
diff -u -r1.1 fwprintf.c
--- libc/stdio/fwprintf.c 6 Mar 2009 09:55:52 -0000 1.1
+++ libc/stdio/fwprintf.c 25 Nov 2013 15:06:26 -0000
@@ -41,8 +41,8 @@
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;
Index: libc/stdio/fwscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/fwscanf.c,v
retrieving revision 1.2
diff -u -r1.2 fwscanf.c
--- libc/stdio/fwscanf.c 15 Jul 2011 08:04:17 -0000 1.2
+++ libc/stdio/fwscanf.c 25 Nov 2013 15:06:26 -0000
@@ -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;
Index: libc/stdio/swprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/swprintf.c,v
retrieving revision 1.3
diff -u -r1.3 swprintf.c
--- libc/stdio/swprintf.c 13 Jan 2012 09:13:57 -0000 1.3
+++ libc/stdio/swprintf.c 25 Nov 2013 15:06:26 -0000
@@ -36,15 +36,16 @@
#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 @@
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;
Index: libc/stdio/swscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/swscanf.c,v
retrieving revision 1.2
diff -u -r1.2 swscanf.c
--- libc/stdio/swscanf.c 12 Mar 2009 14:30:28 -0000 1.2
+++ libc/stdio/swscanf.c 25 Nov 2013 15:06:26 -0000
@@ -35,9 +35,11 @@
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 @@
#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 @@
#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;
Index: libc/stdio/vfwprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vfwprintf.c,v
retrieving revision 1.13
diff -u -r1.13 vfwprintf.c
--- libc/stdio/vfwprintf.c 19 Jun 2013 15:58:50 -0000 1.13
+++ libc/stdio/vfwprintf.c 25 Nov 2013 15:06:26 -0000
@@ -51,10 +51,11 @@
#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 @@
#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;
Index: libc/stdio/vfwscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vfwscanf.c,v
retrieving revision 1.4
diff -u -r1.4 vfwscanf.c
--- libc/stdio/vfwscanf.c 29 Apr 2013 21:06:23 -0000 1.4
+++ libc/stdio/vfwscanf.c 25 Nov 2013 15:06:26 -0000
@@ -35,14 +35,16 @@
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 @@
#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 @@
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;
Index: libc/stdio/vswprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vswprintf.c,v
retrieving revision 1.3
diff -u -r1.3 vswprintf.c
--- libc/stdio/vswprintf.c 12 Mar 2009 10:27:10 -0000 1.3
+++ libc/stdio/vswprintf.c 25 Nov 2013 15:06:26 -0000
@@ -71,9 +71,9 @@
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);
Index: libc/stdio/vswscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vswscanf.c,v
retrieving revision 1.1
diff -u -r1.1 vswscanf.c
--- libc/stdio/vswscanf.c 11 Mar 2009 11:53:22 -0000 1.1
+++ libc/stdio/vswscanf.c 25 Nov 2013 15:06:26 -0000
@@ -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);
}
Index: libc/stdio/vwprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vwprintf.c,v
retrieving revision 1.2
diff -u -r1.2 vwprintf.c
--- libc/stdio/vwprintf.c 29 Apr 2013 21:06:23 -0000 1.2
+++ libc/stdio/vwprintf.c 25 Nov 2013 15:06:26 -0000
@@ -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;
Index: libc/stdio/vwscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vwscanf.c,v
retrieving revision 1.2
diff -u -r1.2 vwscanf.c
--- libc/stdio/vwscanf.c 29 Apr 2013 21:06:23 -0000 1.2
+++ libc/stdio/vwscanf.c 25 Nov 2013 15:06:26 -0000
@@ -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;
Index: libc/stdio/wprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/wprintf.c,v
retrieving revision 1.1
diff -u -r1.1 wprintf.c
--- libc/stdio/wprintf.c 6 Mar 2009 09:55:52 -0000 1.1
+++ libc/stdio/wprintf.c 25 Nov 2013 15:06:26 -0000
@@ -42,7 +42,7 @@
int
_DEFUN(wprintf, (fmt),
- const wchar_t *fmt _DOTS)
+ const wchar_t *__restrict fmt _DOTS)
{
int ret;
va_list ap;
Index: libc/stdio/wscanf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/wscanf.c,v
retrieving revision 1.3
diff -u -r1.3 wscanf.c
--- libc/stdio/wscanf.c 29 Apr 2013 21:06:23 -0000 1.3
+++ libc/stdio/wscanf.c 25 Nov 2013 15:06:26 -0000
@@ -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;
Index: libc/stdlib/mbrlen.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/mbrlen.c,v
retrieving revision 1.5
diff -u -r1.5 mbrlen.c
--- libc/stdlib/mbrlen.c 29 Apr 2013 21:06:23 -0000 1.5
+++ libc/stdlib/mbrlen.c 25 Nov 2013 15:06:26 -0000
@@ -6,7 +6,7 @@
#include <errno.h>
size_t
-mbrlen(const char *s, size_t n, mbstate_t *ps)
+mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
{
#ifdef _MB_CAPABLE
if (ps == NULL)
Index: libc/stdlib/mbrtowc.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/mbrtowc.c,v
retrieving revision 1.7
diff -u -r1.7 mbrtowc.c
--- libc/stdlib/mbrtowc.c 29 Apr 2013 21:06:23 -0000 1.7
+++ libc/stdlib/mbrtowc.c 25 Nov 2013 15:06:26 -0000
@@ -43,10 +43,10 @@
#ifndef _REENT_ONLY
size_t
_DEFUN (mbrtowc, (pwc, s, n, ps),
- wchar_t *pwc _AND
- const char *s _AND
+ wchar_t *__restrict pwc _AND
+ const char *__restrict s _AND
size_t n _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
return _mbrtowc_r (_REENT, pwc, s, n, ps);
Index: libc/stdlib/mbsnrtowcs.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/mbsnrtowcs.c,v
retrieving revision 1.1
diff -u -r1.1 mbsnrtowcs.c
--- libc/stdlib/mbsnrtowcs.c 19 Feb 2009 09:19:42 -0000 1.1
+++ libc/stdlib/mbsnrtowcs.c 25 Nov 2013 15:06:26 -0000
@@ -13,8 +13,10 @@
ANSI_SYNOPSIS
#include <wchar.h>
- size_t mbsrtowcs(wchar_t *<[dst]>, const char **<[src]>, size_t <[len]>,
- mbstate_t *<[ps]>);
+ size_t mbsrtowcs(wchar_t *__restrict <[dst]>,
+ const char **__restrict <[src]>,
+ size_t <[len]>,
+ mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _mbsrtowcs_r(struct _reent *<[ptr]>, wchar_t *<[dst]>,
@@ -22,8 +24,9 @@
mbstate_t *<[ps]>);
#include <wchar.h>
- size_t mbsnrtowcs(wchar_t *<[dst]>, const char **<[src]>,
- size_t <[nms]>, size_t <[len]>, mbstate_t *<[ps]>);
+ size_t mbsnrtowcs(wchar_t *__ restrict <[dst]>,
+ const char **__restrict <[src]>, size_t <[nms]>,
+ size_t <[len]>, mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _mbsnrtowcs_r(struct _reent *<[ptr]>, wchar_t *<[dst]>,
@@ -33,10 +36,10 @@
TRAD_SYNOPSIS
#include <wchar.h>
size_t mbsrtowcs(<[dst]>, <[src]>, <[len]>, <[ps]>)
- wchar_t *<[dst]>;
- const char **<[src]>;
+ wchar_t *__restrict <[dst]>;
+ const char **__restrict <[src]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _mbsrtowcs_r(<[ptr]>, <[dst]>, <[src]>, <[len]>, <[ps]>)
@@ -48,11 +51,11 @@
#include <wchar.h>
size_t mbsnrtowcs(<[dst]>, <[src]>, <[nms]>, <[len]>, <[ps]>)
- wchar_t *<[dst]>;
- const char **<[src]>;
+ wchar_t *__restrict <[dst]>;
+ const char **__restrict <[src]>;
size_t <[nms]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _mbsnrtowcs_r(<[ptr]>, <[dst]>, <[src]>, <[nms]>, <[len]>, <[ps]>)
@@ -168,11 +171,11 @@
#ifndef _REENT_ONLY
size_t
_DEFUN (mbsnrtowcs, (dst, src, nms, len, ps),
- wchar_t *dst _AND
- const char **src _AND
+ wchar_t *__restrict dst _AND
+ const char **__restrict src _AND
size_t nms _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _mbsnrtowcs_r (_REENT, dst, src, nms, len, ps);
}
Index: libc/stdlib/mbsrtowcs.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/mbsrtowcs.c,v
retrieving revision 1.6
diff -u -r1.6 mbsrtowcs.c
--- libc/stdlib/mbsrtowcs.c 19 Feb 2009 09:19:42 -0000 1.6
+++ libc/stdlib/mbsrtowcs.c 25 Nov 2013 15:06:26 -0000
@@ -1,3 +1,5 @@
+/* doc in mbsnrtowcs.c */
+
#include <reent.h>
#include <newlib.h>
#include <wchar.h>
@@ -19,10 +21,10 @@
#ifndef _REENT_ONLY
size_t
_DEFUN (mbsrtowcs, (dst, src, len, ps),
- wchar_t *dst _AND
- const char **src _AND
+ wchar_t *__restrict dst _AND
+ const char **__restrict src _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _mbsnrtowcs_r (_REENT, dst, src, (size_t) -1, len, ps);
}
Index: libc/stdlib/wcrtomb.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcrtomb.c,v
retrieving revision 1.6
diff -u -r1.6 wcrtomb.c
--- libc/stdlib/wcrtomb.c 29 Apr 2013 21:06:23 -0000 1.6
+++ libc/stdlib/wcrtomb.c 25 Nov 2013 15:06:26 -0000
@@ -42,9 +42,9 @@
#ifndef _REENT_ONLY
size_t
_DEFUN (wcrtomb, (s, wc, ps),
- char *s _AND
+ char *__restrict s _AND
wchar_t wc _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
return _wcrtomb_r (_REENT, s, wc, ps);
Index: libc/stdlib/wcsnrtombs.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcsnrtombs.c,v
retrieving revision 1.2
diff -u -r1.2 wcsnrtombs.c
--- libc/stdlib/wcsnrtombs.c 18 Nov 2009 09:49:57 -0000 1.2
+++ libc/stdlib/wcsnrtombs.c 25 Nov 2013 15:06:26 -0000
@@ -13,8 +13,9 @@
ANSI_SYNOPSIS
#include <wchar.h>
- size_t wcsrtombs(char *<[dst]>, const wchar_t **<[src]>, size_t <[len]>,
- mbstate_t *<[ps]>);
+ size_t wcsrtombs(char *__restrict <[dst]>,
+ const wchar_t **__restrict <[src]>, size_t <[len]>,
+ mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _wcsrtombs_r(struct _reent *<[ptr]>, char *<[dst]>,
@@ -22,8 +23,10 @@
mbstate_t *<[ps]>);
#include <wchar.h>
- size_t wcsnrtombs(char *<[dst]>, const wchar_t **<[src]>,
- size_t <[nwc]>, size_t <[len]>, mbstate_t *<[ps]>);
+ size_t wcsnrtombs(char *__restrict <[dst]>,
+ const wchar_t **__restrict <[src]>,
+ size_t <[nwc]>, size_t <[len]>,
+ mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _wcsnrtombs_r(struct _reent *<[ptr]>, char *<[dst]>,
@@ -33,10 +36,10 @@
TRAD_SYNOPSIS
#include <wchar.h>
size_t wcsrtombs(<[dst]>, <[src]>, <[len]>, <[ps]>)
- char *<[dst]>;
- const wchar_t **<[src]>;
+ char *__restrict <[dst]>;
+ const wchar_t **__restrict <[src]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _wcsrtombs_r(<[ptr]>, <[dst]>, <[src]>, <[len]>, <[ps]>)
@@ -48,11 +51,11 @@
#include <wchar.h>
size_t wcsnrtombs(<[dst]>, <[src]>, <[nwc]>, <[len]>, <[ps]>)
- char *<[dst]>;
- const wchar_t **<[src]>;
+ char *__restrict <[dst]>;
+ const wchar_t **__restrict <[src]>;
size_t <[nwc]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _wcsnrtombs_r(<[ptr]>, <[dst]>, <[src]>, <[nwc]>, <[len]>, <[ps]>)
@@ -174,11 +177,11 @@
#ifndef _REENT_ONLY
size_t
_DEFUN (wcsnrtombs, (dst, src, nwc, len, ps),
- char *dst _AND
- const wchar_t **src _AND
+ char *__restrict dst _AND
+ const wchar_t **__restrict src _AND
size_t nwc _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _wcsnrtombs_r (_REENT, dst, src, nwc, len, ps);
}
Index: libc/stdlib/wcsrtombs.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcsrtombs.c,v
retrieving revision 1.9
diff -u -r1.9 wcsrtombs.c
--- libc/stdlib/wcsrtombs.c 19 Feb 2009 09:19:42 -0000 1.9
+++ libc/stdlib/wcsrtombs.c 25 Nov 2013 15:06:26 -0000
@@ -1,3 +1,5 @@
+/* Doc in wcsnrtombs.c */
+
#include <reent.h>
#include <newlib.h>
#include <wchar.h>
@@ -16,10 +18,10 @@
#ifndef _REENT_ONLY
size_t
_DEFUN (wcsrtombs, (dst, src, len, ps),
- char *dst _AND
- const wchar_t **src _AND
+ char *__restrict dst _AND
+ const wchar_t **__restrict src _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _wcsnrtombs_r (_REENT, dst, src, (size_t) -1, len, ps);
}
Index: libc/stdlib/wcstod.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstod.c,v
retrieving revision 1.7
diff -u -r1.7 wcstod.c
--- libc/stdlib/wcstod.c 3 Dec 2009 16:11:27 -0000 1.7
+++ libc/stdlib/wcstod.c 25 Nov 2013 15:06:26 -0000
@@ -13,8 +13,10 @@
ANSI_SYNOPSIS
#include <stdlib.h>
- double wcstod(const wchar_t *<[str]>, wchar_t **<[tail]>);
- float wcstof(const wchar_t *<[str]>, wchar_t **<[tail]>);
+ double wcstod(const wchar_t *__restrict <[str]>,
+ wchar_t **__restrict <[tail]>);
+ float wcstof(const wchar_t *__restrict <[str]>,
+ wchar_t **__restrict <[tail]>);
double _wcstod_r(void *<[reent]>,
const wchar_t *<[str]>, wchar_t **<[tail]>);
@@ -24,12 +26,12 @@
TRAD_SYNOPSIS
#include <stdlib.h>
double wcstod(<[str]>,<[tail]>)
- wchar_t *<[str]>;
- wchar_t **<[tail]>;
+ wchar_t *__restrict <[str]>;
+ wchar_t **__restrict <[tail]>;
float wcstof(<[str]>,<[tail]>)
- wchar_t *<[str]>;
- wchar_t **<[tail]>;
+ wchar_t *__restrict <[str]>;
+ wchar_t **__restrict <[tail]>;
double _wcstod_r(<[reent]>,<[str]>,<[tail]>)
wchar_t *<[reent]>;
@@ -211,15 +213,15 @@
double
_DEFUN (wcstod, (nptr, endptr),
- _CONST wchar_t *nptr _AND wchar_t **endptr)
+ _CONST wchar_t *__restrict nptr _AND wchar_t **__restrict endptr)
{
return _wcstod_r (_REENT, nptr, endptr);
}
float
_DEFUN (wcstof, (nptr, endptr),
- _CONST wchar_t *nptr _AND
- wchar_t **endptr)
+ _CONST wchar_t *__restrict nptr _AND
+ wchar_t **__restrict endptr)
{
double retval = _wcstod_r (_REENT, nptr, endptr);
if (isnan (retval))
Index: libc/stdlib/wcstol.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstol.c,v
retrieving revision 1.1
diff -u -r1.1 wcstol.c
--- libc/stdlib/wcstol.c 6 Jul 2007 20:03:28 -0000 1.1
+++ libc/stdlib/wcstol.c 25 Nov 2013 15:06:26 -0000
@@ -9,7 +9,8 @@
ANSI_SYNOPSIS
#include <wchar.h>
- long wcstol(const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
+ long wcstol(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>,int <[base]>);
long _wcstol_r(void *<[reent]>,
const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
@@ -17,8 +18,8 @@
TRAD_SYNOPSIS
#include <stdlib.h>
long wcstol (<[s]>, <[ptr]>, <[base]>)
- wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
long _wcstol_r (<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -216,8 +217,8 @@
long
_DEFUN (wcstol, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstol_r (_REENT, s, ptr, base);
Index: libc/stdlib/wcstold.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstold.c,v
retrieving revision 1.2
diff -u -r1.2 wcstold.c
--- libc/stdlib/wcstold.c 17 Apr 2009 22:15:43 -0000 1.2
+++ libc/stdlib/wcstold.c 25 Nov 2013 15:06:26 -0000
@@ -34,7 +34,7 @@
/* On platforms where long double is as wide as double. */
#ifdef _LDBL_EQ_DBL
long double
-wcstold (const wchar_t *nptr, wchar_t **endptr)
+wcstold (const wchar_t *__restrict nptr, wchar_t **__restrict endptr)
{
return wcstod(nptr, endptr);
}
Index: libc/stdlib/wcstoll.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstoll.c,v
retrieving revision 1.1
diff -u -r1.1 wcstoll.c
--- libc/stdlib/wcstoll.c 6 Jul 2007 20:03:28 -0000 1.1
+++ libc/stdlib/wcstoll.c 25 Nov 2013 15:06:26 -0000
@@ -9,7 +9,8 @@
ANSI_SYNOPSIS
#include <wchar.h>
- long long wcstoll(const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
+ long long wcstoll(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>,int <[base]>);
long long _wcstoll_r(void *<[reent]>,
const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
@@ -17,8 +18,8 @@
TRAD_SYNOPSIS
#include <stdlib.h>
long long wcstoll (<[s]>, <[ptr]>, <[base]>)
- const wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ const wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
long long _wcstoll_r (<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -128,8 +129,8 @@
long long
_DEFUN (wcstoll, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstoll_r (_REENT, s, ptr, base);
Index: libc/stdlib/wcstoul.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstoul.c,v
retrieving revision 1.2
diff -u -r1.2 wcstoul.c
--- libc/stdlib/wcstoul.c 27 Nov 2008 20:45:37 -0000 1.2
+++ libc/stdlib/wcstoul.c 25 Nov 2013 15:06:26 -0000
@@ -9,8 +9,8 @@
ANSI_SYNOPSIS
#include <wchar.h>
- unsigned long wcstoul(const wchar_t *<[s]>, wchar_t **<[ptr]>,
- int <[base]>);
+ unsigned long wcstoul(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>, int <[base]>);
unsigned long _wcstoul_r(void *<[reent]>, const wchar_t *<[s]>,
wchar_t **<[ptr]>, int <[base]>);
@@ -18,8 +18,8 @@
TRAD_SYNOPSIS
#include <wchar.h>
unsigned long wcstoul(<[s]>, <[ptr]>, <[base]>)
- wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
unsigned long _wcstoul_r(<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -197,8 +197,8 @@
unsigned long
_DEFUN (wcstoul, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstoul_r (_REENT, s, ptr, base);
Index: libc/stdlib/wcstoull.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstoull.c,v
retrieving revision 1.2
diff -u -r1.2 wcstoull.c
--- libc/stdlib/wcstoull.c 24 Nov 2008 21:27:33 -0000 1.2
+++ libc/stdlib/wcstoull.c 25 Nov 2013 15:06:26 -0000
@@ -9,8 +9,8 @@
ANSI_SYNOPSIS
#include <wchar.h>
- unsigned long long wcstoull(const wchar_t *<[s]>, wchar_t **<[ptr]>,
- int <[base]>);
+ unsigned long long wcstoull(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>, int <[base]>);
unsigned long long _wcstoull_r(void *<[reent]>, const wchar_t *<[s]>,
wchar_t **<[ptr]>, int <[base]>);
@@ -18,8 +18,8 @@
TRAD_SYNOPSIS
#include <wchar.h>
unsigned long long wcstoull(<[s]>, <[ptr]>, <[base]>)
- wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
unsigned long long _wcstoull_r(<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -130,8 +130,8 @@
unsigned long long
_DEFUN (wcstoull, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstoull_r (_REENT, s, ptr, base);
Index: libc/string/wcpcpy.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcpcpy.c,v
retrieving revision 1.1
diff -u -r1.1 wcpcpy.c
--- libc/string/wcpcpy.c 19 Dec 2007 17:33:12 -0000 1.1
+++ libc/string/wcpcpy.c 25 Nov 2013 15:06:26 -0000
@@ -8,8 +8,8 @@
TRAD_SYNOPSIS
wchar_t *wcpcpy(<[s1]>, <[s2]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
DESCRIPTION
The <<wcpcpy>> function copies the wide-character string pointed to by
@@ -32,8 +32,8 @@
wchar_t *
_DEFUN (wcpcpy, (s1, s2),
- wchar_t * s1 _AND
- _CONST wchar_t * s2)
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2)
{
while ((*s1++ = *s2++))
;
Index: libc/string/wcpncpy.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcpncpy.c,v
retrieving revision 1.1
diff -u -r1.1 wcpncpy.c
--- libc/string/wcpncpy.c 19 Dec 2007 17:33:12 -0000 1.1
+++ libc/string/wcpncpy.c 25 Nov 2013 15:06:26 -0000
@@ -4,12 +4,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcpncpy(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+ wchar_t *wcpncpy(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wcpncpy(<[s1]>, <[s2]>, <[n]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
size_t <[n]>;
DESCRIPTION
@@ -39,8 +40,8 @@
wchar_t *
_DEFUN (wcpncpy, (dst, src, count),
- wchar_t * dst _AND
- _CONST wchar_t * src _AND
+ wchar_t *__restrict dst _AND
+ _CONST wchar_t *__restrict src _AND
size_t count)
{
wchar_t *ret = NULL;
Index: libc/string/wcscat.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcscat.c,v
retrieving revision 1.2
diff -u -r1.2 wcscat.c
--- libc/string/wcscat.c 28 Oct 2005 21:21:07 -0000 1.2
+++ libc/string/wcscat.c 25 Nov 2013 15:06:26 -0000
@@ -6,12 +6,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcscat(wchar_t *<[s1]>, const wchar_t *<[s2]>);
+ wchar_t *wcscat(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>);
TRAD_SYNOPSIS
wchar_t *wcscat(<[s1]>, <[s2]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
DESCRIPTION
The <<wcscat>> function appends a copy of the wide-character string
@@ -66,8 +67,8 @@
wchar_t *
_DEFUN (wcscat, (s1, s2),
- wchar_t * s1 _AND
- _CONST wchar_t * s2)
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2)
{
wchar_t *p;
wchar_t *q;
Index: libc/string/wcscpy.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcscpy.c,v
retrieving revision 1.2
diff -u -r1.2 wcscpy.c
--- libc/string/wcscpy.c 28 Oct 2005 21:21:07 -0000 1.2
+++ libc/string/wcscpy.c 25 Nov 2013 15:06:26 -0000
@@ -4,12 +4,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcscpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
+ wchar_t *wcscpy(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict ,<[s2]>);
TRAD_SYNOPSIS
wchar_t *wcscpy(<[s1]>, <[s2]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
DESCRIPTION
The <<wcscpy>> function copies the wide-character string pointed to by
@@ -62,8 +63,8 @@
wchar_t *
_DEFUN (wcscpy, (s1, s2),
- wchar_t * s1 _AND
- _CONST wchar_t * s2)
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2)
{
wchar_t *p;
_CONST wchar_t *q;
Index: libc/string/wcsncat.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcsncat.c,v
retrieving revision 1.2
diff -u -r1.2 wcsncat.c
--- libc/string/wcsncat.c 28 Oct 2005 21:21:07 -0000 1.2
+++ libc/string/wcsncat.c 25 Nov 2013 15:06:26 -0000
@@ -4,12 +4,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcsncat(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+ wchar_t *wcsncat(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wcsncat(<[s1]>, <[s2]>, <[n]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
size_t <[n]>;
DESCRIPTION
@@ -68,8 +69,8 @@
wchar_t *
_DEFUN (wcsncat, (s1, s2, n),
- wchar_t * s1 _AND
- _CONST wchar_t * s2 _AND
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2 _AND
size_t n)
{
wchar_t *p;
Index: libc/string/wcsncpy.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcsncpy.c,v
retrieving revision 1.3
diff -u -r1.3 wcsncpy.c
--- libc/string/wcsncpy.c 18 Aug 2009 16:03:06 -0000 1.3
+++ libc/string/wcsncpy.c 25 Nov 2013 15:06:26 -0000
@@ -4,12 +4,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcsncpy(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+ wchar_t *wcsncpy(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wcsncpy(<[s1]>, <[s2]>, <[n]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
size_t <[n]>;
DESCRIPTION
@@ -41,8 +42,8 @@
wchar_t *
_DEFUN (wcsncpy, (s1, s2, n),
- wchar_t * s1 _AND
- _CONST wchar_t * s2 _AND
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2 _AND
size_t n)
{
wchar_t *dscan=s1;
Index: libc/string/wcsstr.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcsstr.c,v
retrieving revision 1.3
diff -u -r1.3 wcsstr.c
--- libc/string/wcsstr.c 28 Oct 2005 21:33:23 -0000 1.3
+++ libc/string/wcsstr.c 25 Nov 2013 15:06:26 -0000
@@ -4,12 +4,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcsstr(const wchar_t *<[big]>, const wchar_t *<[little]>);
+ wchar_t *wcsstr(const wchar_t *__restrict <[big]>,
+ const wchar_t *__restrict <[little]>);
TRAD_SYNOPSIS
wchar_t *wcsstr(<[big]>, <[little]>
- const wchar_t *<[big]>;
- const wchar_t *<[little]>;
+ const wchar_t *__restrict <[big]>;
+ const wchar_t *__restrict <[little]>;
DESCRIPTION
The <<wcsstr>> function locates the first occurrence in the
@@ -66,8 +67,8 @@
wchar_t *
_DEFUN (wcsstr, (big, little),
- _CONST wchar_t * big _AND
- _CONST wchar_t * little)
+ _CONST wchar_t *__restrict big _AND
+ _CONST wchar_t *__restrict little)
{
_CONST wchar_t *p;
_CONST wchar_t *q;
Index: libc/string/wcstok.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcstok.c,v
retrieving revision 1.1
diff -u -r1.1 wcstok.c
--- libc/string/wcstok.c 12 Dec 2008 19:47:05 -0000 1.1
+++ libc/string/wcstok.c 25 Nov 2013 15:06:26 -0000
@@ -8,15 +8,16 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcstok(wchar_t *<[source]>, const wchar_t *<[delimiters]>,
- wchar_t **<[lasts]>)
+ wchar_t *wcstok(wchar_t *__restrict <[source]>,
+ const wchar_t *__restrict <[delimiters]>,
+ wchar_t **__restrict <[lasts]>)
TRAD_SYNOPSIS
#include <wchar.h>
wchar_t *wcstok(<[source]>, <[delimiters]>, <[lasts]>)
- wchar_t *<[source]>;
- wchar_t *<[delimiters]>;
- wchar_t **<[lasts]>;
+ wchar_t *__restrict <[source]>;
+ wchar_t *__restrict <[delimiters]>;
+ wchar_t **__restrict <[lasts]>;
DESCRIPTION
The <<wcstok>> function is the wide-character equivalent of the
@@ -97,9 +98,9 @@
wchar_t *
_DEFUN (wcstok, (s, delim, lasts),
- register wchar_t *s _AND
- register const wchar_t *delim _AND
- wchar_t **lasts)
+ register wchar_t *__restrict s _AND
+ register const wchar_t *__restrict delim _AND
+ wchar_t **__restrict lasts)
{
register const wchar_t *spanp;
register int c, sc;
Index: libc/string/wcsxfrm.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wcsxfrm.c,v
retrieving revision 1.1
diff -u -r1.1 wcsxfrm.c
--- libc/string/wcsxfrm.c 4 Jul 2007 16:18:34 -0000 1.1
+++ libc/string/wcsxfrm.c 25 Nov 2013 15:06:26 -0000
@@ -7,13 +7,14 @@
ANSI_SYNOPSIS
#include <wchar.h>
- int wcsxfrm(wchar_t *<[stra]>, const wchar_t * <[strb]>, size_t <[n]>);
+ int wcsxfrm(wchar_t *__restrict <[stra]>,
+ const wchar_t *__restrict <[strb]>, size_t <[n]>);
TRAD_SYNOPSIS
#include <wchar.h>
size_t wcsxfrm(<[stra]>, <[strb]>, <[n]>)
- wchar_t *<[stra]>;
- wchar_t *<[strb]>;
+ wchar_t *__restrict <[stra]>;
+ wchar_t *__restrict <[strb]>;
size_t <[n]>
DESCRIPTION
@@ -43,8 +44,8 @@
size_t
_DEFUN (wcsxfrm, (a, b, n),
- wchar_t *a _AND
- _CONST wchar_t *b _AND
+ wchar_t *__restrict a _AND
+ _CONST wchar_t *__restrict b _AND
size_t n)
{
Index: libc/string/wmemcpy.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/wmemcpy.c,v
retrieving revision 1.3
diff -u -r1.3 wmemcpy.c
--- libc/string/wmemcpy.c 28 Oct 2005 21:33:23 -0000 1.3
+++ libc/string/wmemcpy.c 25 Nov 2013 15:06:26 -0000
@@ -4,12 +4,13 @@
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wmemcpy(wchar_t *<[d]>, const wchar_t *<[s]>, size_t <[n]>);
+ wchar_t *wmemcpy(wchar_t *__restrict <[d]>,
+ const wchar_t *__restrict <[s]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wmemcpy(<[d]>, <[s]>, <[n]>
- wchar_t *<[d]>;
- const wchar_t *<[s]>;
+ wchar_t *__restrict <[d]>;
+ const wchar_t *__restrict <[s]>;
size_t <[n]>;
DESCRIPTION
@@ -67,8 +68,8 @@
wchar_t *
_DEFUN (wmemcpy, (d, s, n),
- wchar_t * d _AND
- _CONST wchar_t * s _AND
+ wchar_t *__restrict d _AND
+ _CONST wchar_t *__restrict s _AND
size_t n)
{
More information about the Newlib
mailing list