Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-26 21:21:01 +0400
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-26 21:21:01 +0400
commit380c9f61651aaa785dc0d678edd17c17af1c6f90 (patch)
tree54b44f66459cc0895bfcddd37d66fa614b85b3d5 /newlib/libc/string
parentbb9d95eb38185520967c2501a878ec6719b35a0d (diff)
2013-11-26 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.
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/wcpcpy.c8
-rw-r--r--newlib/libc/string/wcpncpy.c11
-rw-r--r--newlib/libc/string/wcscat.c11
-rw-r--r--newlib/libc/string/wcscpy.c11
-rw-r--r--newlib/libc/string/wcsncat.c11
-rw-r--r--newlib/libc/string/wcsncpy.c11
-rw-r--r--newlib/libc/string/wcsstr.c11
-rw-r--r--newlib/libc/string/wcstok.c17
-rw-r--r--newlib/libc/string/wcsxfrm.c11
-rw-r--r--newlib/libc/string/wmemcpy.c11
10 files changed, 61 insertions, 52 deletions
diff --git a/newlib/libc/string/wcpcpy.c b/newlib/libc/string/wcpcpy.c
index 7bb9a1e9f..ea687abd4 100644
--- a/newlib/libc/string/wcpcpy.c
+++ b/newlib/libc/string/wcpcpy.c
@@ -8,8 +8,8 @@ ANSI_SYNOPSIS
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 @@ No supporting OS subroutines are required.
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++))
;
diff --git a/newlib/libc/string/wcpncpy.c b/newlib/libc/string/wcpncpy.c
index 654bdb78f..87843b422 100644
--- a/newlib/libc/string/wcpncpy.c
+++ b/newlib/libc/string/wcpncpy.c
@@ -4,12 +4,13 @@ FUNCTION
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 @@ No supporting OS subroutines are required.
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;
diff --git a/newlib/libc/string/wcscat.c b/newlib/libc/string/wcscat.c
index 54c0b503b..11afbe3a6 100644
--- a/newlib/libc/string/wcscat.c
+++ b/newlib/libc/string/wcscat.c
@@ -6,12 +6,13 @@ INDEX
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 @@ No supporting OS subroutines are required.
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;
diff --git a/newlib/libc/string/wcscpy.c b/newlib/libc/string/wcscpy.c
index ede693d9c..c75866e1d 100644
--- a/newlib/libc/string/wcscpy.c
+++ b/newlib/libc/string/wcscpy.c
@@ -4,12 +4,13 @@ FUNCTION
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 @@ No supporting OS subroutines are required.
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;
diff --git a/newlib/libc/string/wcsncat.c b/newlib/libc/string/wcsncat.c
index fd77c0cc8..b73f6e93e 100644
--- a/newlib/libc/string/wcsncat.c
+++ b/newlib/libc/string/wcsncat.c
@@ -4,12 +4,13 @@ FUNCTION
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 @@ No supporting OS subroutines are required.
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;
diff --git a/newlib/libc/string/wcsncpy.c b/newlib/libc/string/wcsncpy.c
index 533b0ce53..3d6d70b7d 100644
--- a/newlib/libc/string/wcsncpy.c
+++ b/newlib/libc/string/wcsncpy.c
@@ -4,12 +4,13 @@ FUNCTION
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 @@ No supporting OS subroutines are required.
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;
diff --git a/newlib/libc/string/wcsstr.c b/newlib/libc/string/wcsstr.c
index 0b00396ea..6e891120d 100644
--- a/newlib/libc/string/wcsstr.c
+++ b/newlib/libc/string/wcsstr.c
@@ -4,12 +4,13 @@ FUNCTION
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 @@ PORTABILITY
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;
diff --git a/newlib/libc/string/wcstok.c b/newlib/libc/string/wcstok.c
index de38d3a55..95e9af3c2 100644
--- a/newlib/libc/string/wcstok.c
+++ b/newlib/libc/string/wcstok.c
@@ -8,15 +8,16 @@ INDEX
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 @@ QUICKREF
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;
diff --git a/newlib/libc/string/wcsxfrm.c b/newlib/libc/string/wcsxfrm.c
index 439bdd036..d5a31728d 100644
--- a/newlib/libc/string/wcsxfrm.c
+++ b/newlib/libc/string/wcsxfrm.c
@@ -7,13 +7,14 @@ INDEX
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 @@ PORTABILITY
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)
{
diff --git a/newlib/libc/string/wmemcpy.c b/newlib/libc/string/wmemcpy.c
index 748e8e196..a57d6a512 100644
--- a/newlib/libc/string/wmemcpy.c
+++ b/newlib/libc/string/wmemcpy.c
@@ -4,12 +4,13 @@ FUNCTION
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 @@ No supporting OS subroutines are required.
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)
{