- For compliance with IEEE Std 1003.1-2001, add the 'restrict'
qualifier to function prototypes and definitions where appropriate using the '__restrict' macro. - Update the manual page.
This commit is contained in:
parent
71a00a449f
commit
f8418db73e
@ -250,14 +250,17 @@ int sscanf(const char *, const char *, ...);
|
||||
FILE *tmpfile(void);
|
||||
char *tmpnam(char *);
|
||||
int ungetc(int, FILE *);
|
||||
int vfprintf(FILE *, const char *, _BSD_VA_LIST_);
|
||||
int vprintf(const char *, _BSD_VA_LIST_);
|
||||
int vsprintf(char *, const char *, _BSD_VA_LIST_);
|
||||
int vfprintf(FILE *__restrict, const char *__restrict,
|
||||
_BSD_VA_LIST_);
|
||||
int vprintf(const char *__restrict, _BSD_VA_LIST_);
|
||||
int vsprintf(char *__restrict, const char *__restrict,
|
||||
_BSD_VA_LIST_);
|
||||
|
||||
#if __ISO_C_VISIBLE >= 1999
|
||||
int snprintf(char *__restrict, size_t, const char *__restrict, ...) __printflike(3, 4);
|
||||
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_)
|
||||
__printflike(3, 0);
|
||||
int snprintf(char *__restrict, size_t, const char *__restrict,
|
||||
...) __printflike(3, 4);
|
||||
int vsnprintf(char *__restrict, size_t, const char *__restrict,
|
||||
_BSD_VA_LIST_) __printflike(3, 0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -59,13 +59,13 @@
|
||||
.Fn asprintf "char **ret" "const char *format" ...
|
||||
.In stdarg.h
|
||||
.Ft int
|
||||
.Fn vprintf "const char *format" "va_list ap"
|
||||
.Fn vprintf "const char *restrict format" "va_list ap"
|
||||
.Ft int
|
||||
.Fn vfprintf "FILE *stream" "const char *format" "va_list ap"
|
||||
.Fn vfprintf "FILE *restrict stream" "const char *restrict format" "va_list ap"
|
||||
.Ft int
|
||||
.Fn vsprintf "char *str" "const char *format" "va_list ap"
|
||||
.Fn vsprintf "char *restrict str" "const char *restrict format" "va_list ap"
|
||||
.Ft int
|
||||
.Fn vsnprintf "char *str" "size_t size" "const char *format" "va_list ap"
|
||||
.Fn vsnprintf "char *restrict str" "size_t size" "const char *restrict format" "va_list ap"
|
||||
.Ft int
|
||||
.Fn vasprintf "char **ret" "const char *format" "va_list ap"
|
||||
.Sh DESCRIPTION
|
||||
|
@ -332,7 +332,8 @@ __ujtoa(uintmax_t val, char *endp, int base, int octzero, char *xdigs,
|
||||
* MT-safe version
|
||||
*/
|
||||
int
|
||||
vfprintf(FILE *fp, const char *fmt0, va_list ap)
|
||||
vfprintf(FILE *__restrict fp, const char *__restrict fmt0, va_list ap)
|
||||
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -43,9 +43,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
vprintf(fmt, ap)
|
||||
char const *fmt;
|
||||
_BSD_VA_LIST_ ap;
|
||||
vprintf(const char *__restrict fmt, _BSD_VA_LIST_ ap)
|
||||
{
|
||||
|
||||
return (vfprintf(stdout, fmt, ap));
|
||||
}
|
||||
|
@ -45,11 +45,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "local.h"
|
||||
|
||||
int
|
||||
vsnprintf(str, n, fmt, ap)
|
||||
char *str;
|
||||
size_t n;
|
||||
const char *fmt;
|
||||
_BSD_VA_LIST_ ap;
|
||||
vsnprintf(char *__restrict str, size_t n, const char *__restrict fmt,
|
||||
_BSD_VA_LIST_ ap)
|
||||
{
|
||||
size_t on;
|
||||
int ret;
|
||||
|
@ -45,10 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "local.h"
|
||||
|
||||
int
|
||||
vsprintf(str, fmt, ap)
|
||||
char *str;
|
||||
const char *fmt;
|
||||
_BSD_VA_LIST_ ap;
|
||||
vsprintf(char *__restrict str, const char *__restrict fmt, _BSD_VA_LIST_ ap)
|
||||
{
|
||||
int ret;
|
||||
FILE f;
|
||||
|
Loading…
Reference in New Issue
Block a user