diff options
author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-09-01 07:08:22 +0000 |
---|---|---|
committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-09-01 07:08:22 +0000 |
commit | 9771f1e24e2aadcee0298a295f5b1c3882b34fb0 (patch) | |
tree | 2b9a13bd73596a27de10f1bd7015dd2fa5693281 | |
parent | efc8456c2e9301c306cb1a120e81420152ad3173 (diff) |
Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
wcstombs().
Notes
Notes:
svn path=/head/; revision=102762
-rw-r--r-- | include/stdlib.h | 6 | ||||
-rw-r--r-- | lib/libc/locale/mbstowcs.c | 4 | ||||
-rw-r--r-- | lib/libc/locale/mbtowc.c | 4 | ||||
-rw-r--r-- | lib/libc/locale/multibyte.3 | 6 | ||||
-rw-r--r-- | lib/libc/locale/wcstombs.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index c3d9d136aa25..33cd6e4dd7d9 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -120,10 +120,10 @@ unsigned long int system(const char *); int mblen(const char *, size_t); -size_t mbstowcs(wchar_t *, const char *, size_t); +size_t mbstowcs(wchar_t *__restrict , const char *__restrict, size_t); int wctomb(char *, wchar_t); -int mbtowc(wchar_t *, const char *, size_t); -size_t wcstombs(char *, const wchar_t *, size_t); +int mbtowc(wchar_t *__restrict, const char *__restrict, size_t); +size_t wcstombs(char *__restrict, const wchar_t *__restrict, size_t); #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) extern const char *_malloc_options; diff --git a/lib/libc/locale/mbstowcs.c b/lib/libc/locale/mbstowcs.c index b473f89d33b7..f27f8978ba3a 100644 --- a/lib/libc/locale/mbstowcs.c +++ b/lib/libc/locale/mbstowcs.c @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); size_t mbstowcs(pwcs, s, n) - wchar_t *pwcs; - const char *s; + wchar_t *__restrict pwcs; + const char *__restrict s; size_t n; { char const *e; diff --git a/lib/libc/locale/mbtowc.c b/lib/libc/locale/mbtowc.c index 166ea7991c12..67771a095665 100644 --- a/lib/libc/locale/mbtowc.c +++ b/lib/libc/locale/mbtowc.c @@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$"); int mbtowc(pwc, s, n) - wchar_t *pwc; - const char *s; + wchar_t *__restrict pwc; + const char *__restrict s; size_t n; { char const *e; diff --git a/lib/libc/locale/multibyte.3 b/lib/libc/locale/multibyte.3 index 6cfaa7a6f8fa..7069b7ce9963 100644 --- a/lib/libc/locale/multibyte.3 +++ b/lib/libc/locale/multibyte.3 @@ -52,11 +52,11 @@ .Ft int .Fn mblen "const char *mbchar" "size_t nbytes" .Ft size_t -.Fn mbstowcs "wchar_t *wcstring" "const char *mbstring" "size_t nwchars" +.Fn mbstowcs "wchar_t *restrict wcstring" "const char *restrict mbstring" "size_t nwchars" .Ft int -.Fn mbtowc "wchar_t *wcharp" "const char *mbchar" "size_t nbytes" +.Fn mbtowc "wchar_t *restrict wcharp" "const char *restrict mbchar" "size_t nbytes" .Ft size_t -.Fn wcstombs "char *mbstring" "const wchar_t *wcstring" "size_t nbytes" +.Fn wcstombs "char *restrict mbstring" "const wchar_t *restrict wcstring" "size_t nbytes" .Ft int .Fn wctomb "char *mbchar" "wchar_t wchar" .Sh DESCRIPTION diff --git a/lib/libc/locale/wcstombs.c b/lib/libc/locale/wcstombs.c index ed9397ab90c1..208aac868738 100644 --- a/lib/libc/locale/wcstombs.c +++ b/lib/libc/locale/wcstombs.c @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); size_t wcstombs(s, pwcs, n) - char *s; - const wchar_t *pwcs; + char *__restrict s; + const wchar_t *__restrict pwcs; size_t n; { char buf[MB_LEN_MAX]; |