- Introduce the 'restrict' qualifier to function prototypes and
definitions to comply with IEEE Std 1003.1-2001. - Update the manual pages.
This commit is contained in:
parent
5618f72405
commit
71a00a449f
@ -221,7 +221,7 @@ int fgetc(FILE *);
|
|||||||
int fgetpos(FILE *, fpos_t *);
|
int fgetpos(FILE *, fpos_t *);
|
||||||
char *fgets(char *, int, FILE *);
|
char *fgets(char *, int, FILE *);
|
||||||
FILE *fopen(const char *, const char *);
|
FILE *fopen(const char *, const char *);
|
||||||
int fprintf(FILE *, const char *, ...);
|
int fprintf(FILE *__restrict, const char *__restrict, ...);
|
||||||
int fputc(int, FILE *);
|
int fputc(int, FILE *);
|
||||||
int fputs(const char *, FILE *);
|
int fputs(const char *, FILE *);
|
||||||
size_t fread(void *, size_t, size_t, FILE *);
|
size_t fread(void *, size_t, size_t, FILE *);
|
||||||
@ -235,7 +235,7 @@ int getc(FILE *);
|
|||||||
int getchar(void);
|
int getchar(void);
|
||||||
char *gets(char *);
|
char *gets(char *);
|
||||||
void perror(const char *);
|
void perror(const char *);
|
||||||
int printf(const char *, ...);
|
int printf(const char *__restrict, ...);
|
||||||
int putc(int, FILE *);
|
int putc(int, FILE *);
|
||||||
int putchar(int);
|
int putchar(int);
|
||||||
int puts(const char *);
|
int puts(const char *);
|
||||||
@ -245,7 +245,7 @@ void rewind(FILE *);
|
|||||||
int scanf(const char *, ...);
|
int scanf(const char *, ...);
|
||||||
void setbuf(FILE *__restrict, char *__restrict);
|
void setbuf(FILE *__restrict, char *__restrict);
|
||||||
int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
|
int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
|
||||||
int sprintf(char *, const char *, ...);
|
int sprintf(char *__restrict, const char *__restrict, ...);
|
||||||
int sscanf(const char *, const char *, ...);
|
int sscanf(const char *, const char *, ...);
|
||||||
FILE *tmpfile(void);
|
FILE *tmpfile(void);
|
||||||
char *tmpnam(char *);
|
char *tmpnam(char *);
|
||||||
@ -255,7 +255,7 @@ int vprintf(const char *, _BSD_VA_LIST_);
|
|||||||
int vsprintf(char *, const char *, _BSD_VA_LIST_);
|
int vsprintf(char *, const char *, _BSD_VA_LIST_);
|
||||||
|
|
||||||
#if __ISO_C_VISIBLE >= 1999
|
#if __ISO_C_VISIBLE >= 1999
|
||||||
int snprintf(char *, size_t, const char *, ...) __printflike(3, 4);
|
int snprintf(char *__restrict, size_t, const char *__restrict, ...) __printflike(3, 4);
|
||||||
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_)
|
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_)
|
||||||
__printflike(3, 0);
|
__printflike(3, 0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
fprintf(FILE *fp, const char *fmt, ...)
|
fprintf(FILE *__restrict fp, const char *__restrict fmt, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -48,13 +48,13 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In stdio.h
|
.In stdio.h
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn printf "const char *format" ...
|
.Fn printf "const char *restrict format" ...
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn fprintf "FILE *stream" "const char *format" ...
|
.Fn fprintf "FILE *restrict stream" "const char *restrict format" ...
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn sprintf "char *str" "const char *format" ...
|
.Fn sprintf "char *restrict str" "const char *restrict format" ...
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn snprintf "char *str" "size_t size" "const char *format" ...
|
.Fn snprintf "char *restrict str" "size_t size" "const char *restrict format" ...
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn asprintf "char **ret" "const char *format" ...
|
.Fn asprintf "char **ret" "const char *format" ...
|
||||||
.In stdarg.h
|
.In stdarg.h
|
||||||
|
@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
printf(char const *fmt, ...)
|
printf(char const *__restrict fmt, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
snprintf(char *str, size_t n, char const *fmt, ...)
|
snprintf(char *__restrict str, size_t n, char const *__restrict fmt, ...)
|
||||||
{
|
{
|
||||||
size_t on;
|
size_t on;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
sprintf(char *str, char const *fmt, ...)
|
sprintf(char *__restrict str, char const *__restrict fmt, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user