2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
* libc/include/stdio.h, libc/machine/powerpc/vfscanf.c, libc/machine/spu/fgetpos.c, libc/machine/spu/fgets.c, libc/machine/spu/fopen.c, libc/machine/spu/fputs.c, libc/machine/spu/fread.c, libc/machine/spu/freopen.c, libc/machine/spu/fwrite.c, libc/machine/spu/setbuf.c, libc/machine/spu/vfprintf.c, libc/machine/spu/vfscanf.c, libc/machine/spu/vsnprintf.c, libc/machine/spu/vsprintf.c, libc/machine/spu/vsscanf.c, libc/stdio/asnprintf.c, libc/stdio/asprintf.c, libc/stdio/dprintf.c, libc/stdio/fgetpos.c, libc/stdio/fgets.c, libc/stdio/fmemopen.c, libc/stdio/fopen.c, libc/stdio/fprintf.c, libc/stdio/fputs.c, libc/stdio/fread.c, libc/stdio/freopen.c, libc/stdio/fscanf.c, libc/stdio/fwrite.c, libc/stdio/printf.c, libc/stdio/scanf.c, libc/stdio/setbuf.c, libc/stdio/snprintf.c, libc/stdio/sprintf.c, libc/stdio/sscanf.c, libc/stdio/vdprintf.c, libc/stdio/vprintf.c, libc/stdio/vscanf.c, libc/stdio/vsnprintf.c, libc/stdio/vsprintf.c, libc/stdio/vsscanf.c: Add restrict keyword.
This commit is contained in:
		
							parent
							
								
									8ab08406da
								
							
						
					
					
						commit
						481cb456a4
					
				|  | @ -1,3 +1,26 @@ | |||
| 2013-11-18  Sahil Patnayakuni  <sahilp@oarcorp.com> | ||||
| 
 | ||||
| 	* libc/include/stdio.h, libc/machine/powerpc/vfscanf.c, | ||||
| 	libc/machine/spu/fgetpos.c, libc/machine/spu/fgets.c, | ||||
| 	libc/machine/spu/fopen.c, libc/machine/spu/fputs.c, | ||||
| 	libc/machine/spu/fread.c, libc/machine/spu/freopen.c, | ||||
| 	libc/machine/spu/fwrite.c, libc/machine/spu/setbuf.c, | ||||
| 	libc/machine/spu/vfprintf.c, libc/machine/spu/vfscanf.c, | ||||
| 	libc/machine/spu/vsnprintf.c, libc/machine/spu/vsprintf.c, | ||||
| 	libc/machine/spu/vsscanf.c, libc/stdio/asnprintf.c, | ||||
| 	libc/stdio/asprintf.c, libc/stdio/dprintf.c, | ||||
| 	libc/stdio/fgetpos.c, libc/stdio/fgets.c, | ||||
| 	libc/stdio/fmemopen.c, libc/stdio/fopen.c, | ||||
| 	libc/stdio/fprintf.c, libc/stdio/fputs.c, | ||||
| 	libc/stdio/fread.c, libc/stdio/freopen.c, | ||||
| 	libc/stdio/fscanf.c, libc/stdio/fwrite.c, | ||||
| 	libc/stdio/printf.c, libc/stdio/scanf.c, | ||||
| 	libc/stdio/setbuf.c, libc/stdio/snprintf.c, | ||||
| 	libc/stdio/sprintf.c, libc/stdio/sscanf.c, | ||||
| 	libc/stdio/vdprintf.c, libc/stdio/vprintf.c, | ||||
| 	libc/stdio/vscanf.c, libc/stdio/vsnprintf.c, | ||||
| 	libc/stdio/vsprintf.c, libc/stdio/vsscanf.c: Add restrict keyword. | ||||
| 
 | ||||
| 2013-11-18  Sahil Patnayakuni  <sahilp@oarcorp.com> | ||||
| 
 | ||||
| 	* libc/include/stdlib.h, libc/stdlib/mbstowcs.c, | ||||
|  |  | |||
|  | @ -163,29 +163,29 @@ FILE *	_EXFUN(tmpfile, (void)); | |||
| char *	_EXFUN(tmpnam, (char *)); | ||||
| int	_EXFUN(fclose, (FILE *)); | ||||
| int	_EXFUN(fflush, (FILE *)); | ||||
| FILE *	_EXFUN(freopen, (const char *, const char *, FILE *)); | ||||
| void	_EXFUN(setbuf, (FILE *, char *)); | ||||
| int	_EXFUN(setvbuf, (FILE *, char *, int, size_t)); | ||||
| int	_EXFUN(fprintf, (FILE *, const char *, ...) | ||||
| FILE *	_EXFUN(freopen, (const char *__restrict, const char *__restrict, FILE *__restrict)); | ||||
| void	_EXFUN(setbuf, (FILE *__restrict, char *__restrict)); | ||||
| int	_EXFUN(setvbuf, (FILE *__restrict, char *__restrict, int, size_t)); | ||||
| int	_EXFUN(fprintf, (FILE *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| int	_EXFUN(fscanf, (FILE *, const char *, ...) | ||||
| int	_EXFUN(fscanf, (FILE *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); | ||||
| int	_EXFUN(printf, (const char *, ...) | ||||
| int	_EXFUN(printf, (const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 1, 2)))); | ||||
| int	_EXFUN(scanf, (const char *, ...) | ||||
| int	_EXFUN(scanf, (const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); | ||||
| int	_EXFUN(sscanf, (const char *, const char *, ...) | ||||
| int	_EXFUN(sscanf, (const char *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); | ||||
| int	_EXFUN(vfprintf, (FILE *, const char *, __VALIST) | ||||
| int	_EXFUN(vfprintf, (FILE *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); | ||||
| int	_EXFUN(vprintf, (const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); | ||||
| int	_EXFUN(vsprintf, (char *, const char *, __VALIST) | ||||
| int	_EXFUN(vsprintf, (char *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); | ||||
| int	_EXFUN(fgetc, (FILE *)); | ||||
| char *  _EXFUN(fgets, (char *, int, FILE *)); | ||||
| char *  _EXFUN(fgets, (char *__restrict, int, FILE *__restrict)); | ||||
| int	_EXFUN(fputc, (int, FILE *)); | ||||
| int	_EXFUN(fputs, (const char *, FILE *)); | ||||
| int	_EXFUN(fputs, (const char *__restrict, FILE *__restrict)); | ||||
| int	_EXFUN(getc, (FILE *)); | ||||
| int	_EXFUN(getchar, (void)); | ||||
| char *  _EXFUN(gets, (char *)); | ||||
|  | @ -193,12 +193,12 @@ int	_EXFUN(putc, (int, FILE *)); | |||
| int	_EXFUN(putchar, (int)); | ||||
| int	_EXFUN(puts, (const char *)); | ||||
| int	_EXFUN(ungetc, (int, FILE *)); | ||||
| size_t	_EXFUN(fread, (_PTR, size_t _size, size_t _n, FILE *)); | ||||
| size_t	_EXFUN(fwrite, (const _PTR , size_t _size, size_t _n, FILE *)); | ||||
| size_t	_EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); | ||||
| size_t	_EXFUN(fwrite, (const _PTR __restrict , size_t _size, size_t _n, FILE *)); | ||||
| #ifdef _COMPILING_NEWLIB | ||||
| int	_EXFUN(fgetpos, (FILE *, _fpos_t *)); | ||||
| #else | ||||
| int	_EXFUN(fgetpos, (FILE *, fpos_t *)); | ||||
| int	_EXFUN(fgetpos, (FILE *__restrict, fpos_t *__restrict)); | ||||
| #endif | ||||
| int	_EXFUN(fseek, (FILE *, long, int)); | ||||
| #ifdef _COMPILING_NEWLIB | ||||
|  | @ -213,8 +213,8 @@ int	_EXFUN(feof, (FILE *)); | |||
| int	_EXFUN(ferror, (FILE *)); | ||||
| void    _EXFUN(perror, (const char *)); | ||||
| #ifndef _REENT_ONLY | ||||
| FILE *	_EXFUN(fopen, (const char *_name, const char *_type)); | ||||
| int	_EXFUN(sprintf, (char *, const char *, ...) | ||||
| FILE *	_EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type)); | ||||
| int	_EXFUN(sprintf, (char *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| int	_EXFUN(remove, (const char *)); | ||||
| int	_EXFUN(rename, (const char *, const char *)); | ||||
|  | @ -237,9 +237,9 @@ int	_EXFUN(asiprintf, (char **, const char *, ...) | |||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| char *	_EXFUN(asniprintf, (char *, size_t *, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| char *	_EXFUN(asnprintf, (char *, size_t *, const char *, ...) | ||||
| char *	_EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(asprintf, (char **, const char *, ...) | ||||
| int	_EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| #ifndef diprintf | ||||
| int	_EXFUN(diprintf, (int, const char *, ...) | ||||
|  | @ -258,7 +258,7 @@ int	_EXFUN(siprintf, (char *, const char *, ...) | |||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| int	_EXFUN(siscanf, (const char *, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); | ||||
| int	_EXFUN(snprintf, (char *, size_t, const char *, ...) | ||||
| int	_EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(sniprintf, (char *, size_t, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
|  | @ -277,7 +277,7 @@ int	_EXFUN(vfiprintf, (FILE *, const char *, __VALIST) | |||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); | ||||
| int	_EXFUN(vfiscanf, (FILE *, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); | ||||
| int	_EXFUN(vfscanf, (FILE *, const char *, __VALIST) | ||||
| int	_EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); | ||||
| int	_EXFUN(viprintf, (const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); | ||||
|  | @ -291,9 +291,9 @@ int	_EXFUN(vsiscanf, (const char *, const char *, __VALIST) | |||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); | ||||
| int	_EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(vsnprintf, (char *, size_t, const char *, __VALIST) | ||||
| int	_EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(vsscanf, (const char *, const char *, __VALIST) | ||||
| int	_EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); | ||||
| #endif /* !_REENT_ONLY */ | ||||
| #endif /* !__STRICT_ANSI__ */ | ||||
|  | @ -329,17 +329,17 @@ int	_EXFUN(putchar_unlocked, (int)); | |||
| #ifndef __STRICT_ANSI__ | ||||
| # ifndef _REENT_ONLY | ||||
| #  ifndef dprintf | ||||
| int	_EXFUN(dprintf, (int, const char *, ...) | ||||
| int	_EXFUN(dprintf, (int, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| #  endif | ||||
| FILE *	_EXFUN(fmemopen, (void *, size_t, const char *)); | ||||
| FILE *	_EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict)); | ||||
| /* getdelim - see __getdelim for now */ | ||||
| /* getline - see __getline for now */ | ||||
| FILE *	_EXFUN(open_memstream, (char **, size_t *)); | ||||
| #if defined (__CYGWIN__) | ||||
| int	_EXFUN(renameat, (int, const char *, int, const char *)); | ||||
| #endif | ||||
| int	_EXFUN(vdprintf, (int, const char *, __VALIST) | ||||
| int	_EXFUN(vdprintf, (int, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); | ||||
| # endif | ||||
| #endif | ||||
|  | @ -352,22 +352,22 @@ int	_EXFUN(_asiprintf_r, (struct _reent *, char **, const char *, ...) | |||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| char *	_EXFUN(_asniprintf_r, (struct _reent *, char *, size_t *, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); | ||||
| char *	_EXFUN(_asnprintf_r, (struct _reent *, char *, size_t *, const char *, ...) | ||||
| char *	_EXFUN(_asnprintf_r, (struct _reent *, char *__restrict, size_t *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); | ||||
| int	_EXFUN(_asprintf_r, (struct _reent *, char **, const char *, ...) | ||||
| int	_EXFUN(_asprintf_r, (struct _reent *, char **__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(_diprintf_r, (struct _reent *, int, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(_dprintf_r, (struct _reent *, int, const char *, ...) | ||||
| int	_EXFUN(_dprintf_r, (struct _reent *, int, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(_fclose_r, (struct _reent *, FILE *)); | ||||
| int	_EXFUN(_fcloseall_r, (struct _reent *)); | ||||
| FILE *	_EXFUN(_fdopen_r, (struct _reent *, int, const char *)); | ||||
| int	_EXFUN(_fflush_r, (struct _reent *, FILE *)); | ||||
| int	_EXFUN(_fgetc_r, (struct _reent *, FILE *)); | ||||
| char *  _EXFUN(_fgets_r, (struct _reent *, char *, int, FILE *)); | ||||
| char *  _EXFUN(_fgets_r, (struct _reent *, char *__restrict, int, FILE *__restrict)); | ||||
| #ifdef _COMPILING_NEWLIB | ||||
| int	_EXFUN(_fgetpos_r, (struct _reent *, FILE *, _fpos_t *)); | ||||
| int	_EXFUN(_fgetpos_r, (struct _reent *, FILE *__restrict, _fpos_t *__restrict)); | ||||
| int	_EXFUN(_fsetpos_r, (struct _reent *, FILE *, const _fpos_t *)); | ||||
| #else | ||||
| int	_EXFUN(_fgetpos_r, (struct _reent *, FILE *, fpos_t *)); | ||||
|  | @ -377,23 +377,23 @@ int	_EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...) | |||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); | ||||
| FILE *	_EXFUN(_fmemopen_r, (struct _reent *, void *, size_t, const char *)); | ||||
| FILE *	_EXFUN(_fopen_r, (struct _reent *, const char *, const char *)); | ||||
| FILE *	_EXFUN(_freopen_r, (struct _reent *, const char *, const char *, FILE *)); | ||||
| int	_EXFUN(_fprintf_r, (struct _reent *, FILE *, const char *, ...) | ||||
| FILE *	_EXFUN(_fmemopen_r, (struct _reent *, void *__restrict, size_t, const char *__restrict)); | ||||
| FILE *	_EXFUN(_fopen_r, (struct _reent *, const char *__restrict, const char *__restrict)); | ||||
| FILE *	_EXFUN(_freopen_r, (struct _reent *, const char *__restrict, const char *__restrict, FILE *__restrict)); | ||||
| int	_EXFUN(_fprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(_fpurge_r, (struct _reent *, FILE *)); | ||||
| int	_EXFUN(_fputc_r, (struct _reent *, int, FILE *)); | ||||
| int	_EXFUN(_fputs_r, (struct _reent *, const char *, FILE *)); | ||||
| size_t	_EXFUN(_fread_r, (struct _reent *, _PTR, size_t _size, size_t _n, FILE *)); | ||||
| int	_EXFUN(_fscanf_r, (struct _reent *, FILE *, const char *, ...) | ||||
| int	_EXFUN(_fputs_r, (struct _reent *, const char *__restrict, FILE *__restrict)); | ||||
| size_t	_EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); | ||||
| int	_EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); | ||||
| int	_EXFUN(_fseek_r, (struct _reent *, FILE *, long, int)); | ||||
| int	_EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int)); | ||||
| long	_EXFUN(_ftell_r, (struct _reent *, FILE *)); | ||||
| _off_t	_EXFUN(_ftello_r,(struct _reent *, FILE *)); | ||||
| void	_EXFUN(_rewind_r, (struct _reent *, FILE *)); | ||||
| size_t	_EXFUN(_fwrite_r, (struct _reent *, const _PTR , size_t _size, size_t _n, FILE *)); | ||||
| size_t	_EXFUN(_fwrite_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); | ||||
| int	_EXFUN(_getc_r, (struct _reent *, FILE *)); | ||||
| int	_EXFUN(_getc_unlocked_r, (struct _reent *, FILE *)); | ||||
| int	_EXFUN(_getchar_r, (struct _reent *)); | ||||
|  | @ -405,7 +405,7 @@ int	_EXFUN(_iscanf_r, (struct _reent *, const char *, ...) | |||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); | ||||
| FILE *	_EXFUN(_open_memstream_r, (struct _reent *, char **, size_t *)); | ||||
| void	_EXFUN(_perror_r, (struct _reent *, const char *)); | ||||
| int	_EXFUN(_printf_r, (struct _reent *, const char *, ...) | ||||
| int	_EXFUN(_printf_r, (struct _reent *, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); | ||||
| int	_EXFUN(_putc_r, (struct _reent *, int, FILE *)); | ||||
| int	_EXFUN(_putc_unlocked_r, (struct _reent *, int, FILE *)); | ||||
|  | @ -415,7 +415,7 @@ int	_EXFUN(_puts_r, (struct _reent *, const char *)); | |||
| int	_EXFUN(_remove_r, (struct _reent *, const char *)); | ||||
| int	_EXFUN(_rename_r, (struct _reent *, | ||||
| 			   const char *_old, const char *_new)); | ||||
| int	_EXFUN(_scanf_r, (struct _reent *, const char *, ...) | ||||
| int	_EXFUN(_scanf_r, (struct _reent *, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); | ||||
| int	_EXFUN(_siprintf_r, (struct _reent *, char *, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
|  | @ -423,11 +423,11 @@ int	_EXFUN(_siscanf_r, (struct _reent *, const char *, const char *, ...) | |||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); | ||||
| int	_EXFUN(_sniprintf_r, (struct _reent *, char *, size_t, const char *, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); | ||||
| int	_EXFUN(_snprintf_r, (struct _reent *, char *, size_t, const char *, ...) | ||||
| int	_EXFUN(_snprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); | ||||
| int	_EXFUN(_sprintf_r, (struct _reent *, char *, const char *, ...) | ||||
| int	_EXFUN(_sprintf_r, (struct _reent *, char *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); | ||||
| int	_EXFUN(_sscanf_r, (struct _reent *, const char *, const char *, ...) | ||||
| int	_EXFUN(_sscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, ...) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); | ||||
| char *	_EXFUN(_tempnam_r, (struct _reent *, const char *, const char *)); | ||||
| FILE *	_EXFUN(_tmpfile_r, (struct _reent *)); | ||||
|  | @ -443,23 +443,23 @@ int	_EXFUN(_vasprintf_r, (struct _reent *, char **, const char *, __VALIST) | |||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(_vdiprintf_r, (struct _reent *, int, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(_vdprintf_r, (struct _reent *, int, const char *, __VALIST) | ||||
| int	_EXFUN(_vdprintf_r, (struct _reent *, int, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(_vfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(_vfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); | ||||
| int	_EXFUN(_vfprintf_r, (struct _reent *, FILE *, const char *, __VALIST) | ||||
| int	_EXFUN(_vfprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(_vfscanf_r, (struct _reent *, FILE *, const char *, __VALIST) | ||||
| int	_EXFUN(_vfscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); | ||||
| int	_EXFUN(_viprintf_r, (struct _reent *, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); | ||||
| int	_EXFUN(_viscanf_r, (struct _reent *, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); | ||||
| int	_EXFUN(_vprintf_r, (struct _reent *, const char *, __VALIST) | ||||
| int	_EXFUN(_vprintf_r, (struct _reent *, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); | ||||
| int	_EXFUN(_vscanf_r, (struct _reent *, const char *, __VALIST) | ||||
| int	_EXFUN(_vscanf_r, (struct _reent *, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); | ||||
| int	_EXFUN(_vsiprintf_r, (struct _reent *, char *, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
|  | @ -467,11 +467,11 @@ int	_EXFUN(_vsiscanf_r, (struct _reent *, const char *, const char *, __VALIST) | |||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); | ||||
| int	_EXFUN(_vsniprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 4, 0)))); | ||||
| int	_EXFUN(_vsnprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST) | ||||
| int	_EXFUN(_vsnprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 4, 0)))); | ||||
| int	_EXFUN(_vsprintf_r, (struct _reent *, char *, const char *, __VALIST) | ||||
| int	_EXFUN(_vsprintf_r, (struct _reent *, char *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); | ||||
| int	_EXFUN(_vsscanf_r, (struct _reent *, const char *, const char *, __VALIST) | ||||
| int	_EXFUN(_vsscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, __VALIST) | ||||
|                _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); | ||||
| 
 | ||||
| /* Other extensions.  */ | ||||
|  |  | |||
|  | @ -12,15 +12,15 @@ INDEX | |||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	#include <stdarg.h> | ||||
| 	int vscanf(const char *<[fmt]>, va_list <[list]>); | ||||
| 	int vfscanf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>); | ||||
| 	int vsscanf(const char *<[str]>, const char *<[fmt]>, va_list <[list]>); | ||||
| 	int vscanf(const char *restrict <[fmt]>, va_list <[list]>); | ||||
| 	int vfscanf(FILE *restrict <[fp]>, const char *restrict <[fmt]>, va_list <[list]>); | ||||
| 	int vsscanf(const char *restrict <[str]>, const char *restrict <[fmt]>, va_list <[list]>); | ||||
| 
 | ||||
| 	int _vscanf_r(void *<[reent]>, const char *<[fmt]>,  | ||||
| 	int _vscanf_r(void *<[reent]>, const char *restrict <[fmt]>,  | ||||
|                        va_list <[list]>); | ||||
| 	int _vfscanf_r(void *<[reent]>, FILE *<[fp]>, const char *<[fmt]>,  | ||||
| 	int _vfscanf_r(void *<[reent]>, FILE *restrict <[fp]>, const char *restrict <[fmt]>,  | ||||
|                        va_list <[list]>); | ||||
| 	int _vsscanf_r(void *<[reent]>, const char *<[str]>, const char *<[fmt]>,  | ||||
| 	int _vsscanf_r(void *<[reent]>, const char *restrict <[str]>, const char *restrict <[fmt]>,  | ||||
|                        va_list <[list]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
|  | @ -218,8 +218,8 @@ typedef union | |||
| 
 | ||||
| int | ||||
| _DEFUN (vfscanf, (fp, fmt, ap),  | ||||
|     register FILE *fp _AND  | ||||
|     _CONST char *fmt _AND  | ||||
|     register FILE *__restrict fp _AND  | ||||
|     _CONST char *__restrict fmt _AND  | ||||
|     va_list ap) | ||||
| { | ||||
|   CHECK_INIT(_REENT, fp); | ||||
|  | @ -240,8 +240,8 @@ __svfscanf (fp, fmt0, ap) | |||
| int | ||||
| _DEFUN (_vfscanf_r, (data, fp, fmt, ap), | ||||
|     struct _reent *data _AND  | ||||
|     register FILE *fp _AND  | ||||
|     _CONST char *fmt _AND  | ||||
|     register FILE *__restrict fp _AND  | ||||
|     _CONST char *__restrict fmt _AND  | ||||
|     va_list ap) | ||||
| { | ||||
|   return __svfscanf_r (data, fp, fmt, ap); | ||||
|  |  | |||
|  | @ -45,8 +45,8 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (fgetpos, (fp, pos), | ||||
| 	FILE * fp _AND | ||||
| 	_fpos_t * pos) | ||||
| 	FILE *__restrict fp _AND | ||||
| 	_fpos_t *__restrict pos) | ||||
| { | ||||
|   c99_fgetpos_t arg; | ||||
| 
 | ||||
|  |  | |||
|  | @ -47,9 +47,9 @@ typedef struct | |||
| 
 | ||||
| char * | ||||
| _DEFUN (fgets, (buf, n, fp), | ||||
| 	char *buf _AND | ||||
| 	char *__restrict buf _AND | ||||
| 	int n _AND | ||||
| 	FILE * fp) | ||||
| 	FILE *__restrict fp) | ||||
| { | ||||
|   c99_fgets_t args; | ||||
| 
 | ||||
|  |  | |||
|  | @ -46,8 +46,8 @@ typedef struct | |||
| #ifndef _REENT_ONLY | ||||
| FILE * | ||||
| _DEFUN (fopen, (file, mode), | ||||
| 	_CONST char *file _AND | ||||
| 	_CONST char *mode) | ||||
| 	_CONST char *__restrict file _AND | ||||
| 	_CONST char *__restrict mode) | ||||
| { | ||||
|   int ret; | ||||
|   c99_fopen_t args; | ||||
|  |  | |||
|  | @ -47,8 +47,8 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (fputs, (s, fp), | ||||
| 	char _CONST * s _AND | ||||
| 	FILE * fp) | ||||
| 	char _CONST *__restrict s _AND | ||||
| 	FILE *__restrict fp) | ||||
| { | ||||
|   c99_fputs_t args; | ||||
| 
 | ||||
|  |  | |||
|  | @ -50,10 +50,10 @@ typedef struct | |||
| 
 | ||||
| size_t | ||||
| _DEFUN (fread, (buf, size, count, fp), | ||||
| 	_PTR buf _AND | ||||
| 	_PTR __restrict  buf _AND | ||||
| 	size_t size _AND | ||||
| 	size_t count _AND | ||||
| 	FILE * fp) | ||||
| 	FILE *__restrict fp) | ||||
| { | ||||
|   c99_fread_t args; | ||||
| 
 | ||||
|  |  | |||
|  | @ -48,9 +48,9 @@ typedef struct | |||
| 
 | ||||
| FILE * | ||||
| _DEFUN (freopen, (file, mode, fp), | ||||
| 	const char *file _AND | ||||
| 	const char *mode _AND | ||||
| 	FILE *fp) | ||||
| 	const char *__restrict file _AND | ||||
| 	const char *__restrict mode _AND | ||||
| 	FILE *__restrict fp) | ||||
| { | ||||
|   int ret; | ||||
|   c99_freopen_t args; | ||||
|  |  | |||
|  | @ -50,7 +50,7 @@ typedef struct | |||
| 
 | ||||
| size_t | ||||
| _DEFUN (fwrite, (buf, size, count, fp), | ||||
| 	_CONST _PTR buf _AND | ||||
| 	_CONST _PTR __restrict buf _AND | ||||
| 	size_t size _AND | ||||
| 	size_t count _AND | ||||
| 	FILE * fp) | ||||
|  |  | |||
|  | @ -47,8 +47,8 @@ typedef struct | |||
| 
 | ||||
| void | ||||
| _DEFUN (setbuf, (fp, buf), | ||||
| 	FILE * fp _AND | ||||
| 	char *buf) | ||||
| 	FILE *__restrict fp _AND | ||||
| 	char *__restrict buf) | ||||
| { | ||||
|   c99_setbuf_t args; | ||||
| 
 | ||||
|  |  | |||
|  | @ -58,8 +58,8 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (vfprintf, (fp, fmt0, ap), | ||||
| 	FILE * fp _AND | ||||
| 	_CONST char *fmt0 _AND | ||||
| 	FILE *__restrict fp _AND | ||||
| 	_CONST char *__restrict fmt0 _AND | ||||
| 	va_list ap) | ||||
| { | ||||
|   c99_vfprintf_t args; | ||||
|  |  | |||
|  | @ -58,8 +58,8 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (vfscanf, (fp, fmt, ap), | ||||
|     FILE *fp _AND | ||||
|     _CONST char *fmt _AND | ||||
|     FILE *__restrict fp _AND | ||||
|     _CONST char *__restrict fmt _AND | ||||
|     va_list ap) | ||||
| { | ||||
|   c99_vfscanf_t args; | ||||
|  |  | |||
|  | @ -28,9 +28,9 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (vsnprintf, (str, size, fmt, ap), | ||||
|      char *str _AND | ||||
|      char *__restrict str _AND | ||||
|      size_t size _AND | ||||
|      _CONST char *fmt _AND | ||||
|      _CONST char *__restrict fmt _AND | ||||
|      va_list ap) | ||||
| { | ||||
|   c99_vsnprintf_t args; | ||||
|  |  | |||
|  | @ -27,8 +27,8 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (vsprintf, (str, fmt, ap), | ||||
|      char *str _AND | ||||
|      _CONST char *fmt _AND | ||||
|      char *__restrict str _AND | ||||
|      _CONST char *__restrict fmt _AND | ||||
|      va_list ap) | ||||
| { | ||||
|   c99_vsprintf_t args; | ||||
|  |  | |||
|  | @ -58,8 +58,8 @@ typedef struct | |||
| 
 | ||||
| int | ||||
| _DEFUN (vsscanf, (str, fmt, ap), | ||||
|     _CONST char *str _AND | ||||
|     _CONST char *fmt _AND | ||||
|     _CONST char *__restrict str _AND | ||||
|     _CONST char *__restrict fmt _AND | ||||
|     va_list ap) | ||||
| { | ||||
|   c99_vsscanf_t args; | ||||
|  |  | |||
|  | @ -15,10 +15,10 @@ | |||
| 
 | ||||
| char * | ||||
| _DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt), | ||||
|        struct _reent *ptr _AND | ||||
|        struct _reent *__restrict ptr _AND | ||||
|        char *buf _AND | ||||
|        size_t *lenp _AND | ||||
|        const char *fmt _DOTS) | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  | @ -62,9 +62,9 @@ _DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt), | |||
| 
 | ||||
| char * | ||||
| _DEFUN(asnprintf, (buf, lenp, fmt), | ||||
|        char *buf _AND | ||||
|        size_t *lenp _AND | ||||
|        const char *fmt _DOTS) | ||||
|        char *__restrict buf _AND | ||||
|        size_t *__restrict lenp _AND | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  |  | |||
|  | @ -27,8 +27,8 @@ | |||
| int | ||||
| _DEFUN(_asprintf_r, (ptr, strp, fmt), | ||||
|        struct _reent *ptr _AND | ||||
|        char **strp        _AND | ||||
|        const char *fmt _DOTS) | ||||
|        char **__restrict strp        _AND | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  | @ -54,8 +54,8 @@ _DEFUN(_asprintf_r, (ptr, strp, fmt), | |||
| 
 | ||||
| int | ||||
| _DEFUN(asprintf, (strp, fmt), | ||||
|        char **strp _AND | ||||
|        const char *fmt _DOTS) | ||||
|        char **__restrict strp _AND | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  |  | |||
|  | @ -19,12 +19,13 @@ INDEX | |||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	#include <stdarg.h> | ||||
| 	int dprintf(int <[fd]>, const char *<[format]>, ...); | ||||
| 	int vdprintf(int <[fd]>, const char *<[format]>, va_list <[ap]>); | ||||
| 	int dprintf(int <[fd]>, const char *restrict <[format]>, ...); | ||||
| 	int vdprintf(int <[fd]>, const char *restrict <[format]>, | ||||
| 			va_list <[ap]>); | ||||
| 	int _dprintf_r(struct _reent *<[ptr]>, int <[fd]>, | ||||
| 			const char *<[format]>, ...); | ||||
| 			const char *restrict <[format]>, ...); | ||||
| 	int _vdprintf_r(struct _reent *<[ptr]>, int <[fd]>, | ||||
| 			const char *<[format]>, va_list <[ap]>); | ||||
| 			const char *restrict <[format]>, va_list <[ap]>); | ||||
| 
 | ||||
| DESCRIPTION | ||||
| <<dprintf>> and <<vdprintf>> allow printing a format, similarly to | ||||
|  | @ -55,7 +56,7 @@ int | |||
| _DEFUN(_dprintf_r, (ptr, fd, format), | ||||
|        struct _reent *ptr _AND | ||||
|        int fd _AND | ||||
|        const char *format _DOTS) | ||||
|        const char *__restrict format _DOTS) | ||||
| { | ||||
| 	va_list ap; | ||||
| 	int n; | ||||
|  | @ -71,7 +72,7 @@ _DEFUN(_dprintf_r, (ptr, fd, format), | |||
| int | ||||
| _DEFUN(dprintf, (fd, format), | ||||
|        int fd _AND | ||||
|        const char *format _DOTS) | ||||
|        const char *__restrict format _DOTS) | ||||
| { | ||||
|   va_list ap; | ||||
|   int n; | ||||
|  |  | |||
|  | @ -26,8 +26,8 @@ INDEX | |||
| 
 | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	int fgetpos(FILE *<[fp]>, fpos_t *<[pos]>); | ||||
| 	int _fgetpos_r(struct _reent *<[ptr]>, FILE *<[fp]>, fpos_t *<[pos]>); | ||||
| 	int fgetpos(FILE *restrict <[fp]>, fpos_t *restrict <[pos]>); | ||||
| 	int _fgetpos_r(struct _reent *<[ptr]>, FILE *restrict <[fp]>, fpos_t *restrict <[pos]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
|  | @ -78,8 +78,8 @@ No supporting OS subroutines are required. | |||
| int | ||||
| _DEFUN(_fgetpos_r, (ptr, fp, pos), | ||||
|        struct _reent * ptr _AND | ||||
|        FILE * fp           _AND | ||||
|        _fpos_t * pos) | ||||
|        FILE *__restrict fp           _AND | ||||
|        _fpos_t *__restrict pos) | ||||
| { | ||||
|   *pos = _ftell_r (ptr, fp); | ||||
| 
 | ||||
|  | @ -94,8 +94,8 @@ _DEFUN(_fgetpos_r, (ptr, fp, pos), | |||
| 
 | ||||
| int | ||||
| _DEFUN(fgetpos, (fp, pos), | ||||
|        FILE * fp _AND | ||||
|        _fpos_t * pos) | ||||
|        FILE *__restrict fp _AND | ||||
|        _fpos_t *__restrict pos) | ||||
| { | ||||
|   return _fgetpos_r (_REENT, fp, pos); | ||||
| } | ||||
|  |  | |||
|  | @ -26,10 +26,10 @@ INDEX | |||
| 
 | ||||
| ANSI_SYNOPSIS | ||||
|         #include <stdio.h> | ||||
| 	char *fgets(char *<[buf]>, int <[n]>, FILE *<[fp]>); | ||||
| 	char *fgets(char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
|         #include <stdio.h> | ||||
| 	char *_fgets_r(struct _reent *<[ptr]>, char *<[buf]>, int <[n]>, FILE *<[fp]>); | ||||
| 	char *_fgets_r(struct _reent *<[ptr]>, char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
|  | @ -83,9 +83,9 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, | |||
| char * | ||||
| _DEFUN(_fgets_r, (ptr, buf, n, fp), | ||||
|        struct _reent * ptr _AND | ||||
|        char *buf _AND | ||||
|        char *__restrict buf _AND | ||||
|        int n     _AND | ||||
|        FILE * fp) | ||||
|        FILE *__restrict fp) | ||||
| { | ||||
|   size_t len; | ||||
|   char *s; | ||||
|  | @ -177,9 +177,9 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp), | |||
| 
 | ||||
| char * | ||||
| _DEFUN(fgets, (buf, n, fp), | ||||
|        char *buf _AND | ||||
|        char *__restrict buf _AND | ||||
|        int n     _AND | ||||
|        FILE * fp) | ||||
|        FILE *__restrict fp) | ||||
| { | ||||
|   return _fgets_r (_REENT, buf, n, fp); | ||||
| } | ||||
|  |  | |||
|  | @ -270,9 +270,9 @@ _DEFUN(fmemcloser, (ptr, cookie), | |||
| FILE * | ||||
| _DEFUN(_fmemopen_r, (ptr, buf, size, mode), | ||||
|        struct _reent *ptr _AND | ||||
|        void *buf _AND | ||||
|        void *__restrict buf _AND | ||||
|        size_t size _AND | ||||
|        const char *mode) | ||||
|        const char *__restrict mode) | ||||
| { | ||||
|   FILE *fp; | ||||
|   fmemcookie *c; | ||||
|  | @ -362,9 +362,9 @@ _DEFUN(_fmemopen_r, (ptr, buf, size, mode), | |||
| #ifndef _REENT_ONLY | ||||
| FILE * | ||||
| _DEFUN(fmemopen, (buf, size, mode), | ||||
|        void *buf _AND | ||||
|        void *__restrict buf _AND | ||||
|        size_t size _AND | ||||
|        const char *mode) | ||||
|        const char *__restrict mode) | ||||
| { | ||||
|   return _fmemopen_r (_REENT, buf, size, mode); | ||||
| } | ||||
|  |  | |||
|  | @ -126,8 +126,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; | |||
| FILE * | ||||
| _DEFUN(_fopen_r, (ptr, file, mode), | ||||
|        struct _reent *ptr _AND | ||||
|        _CONST char *file _AND | ||||
|        _CONST char *mode) | ||||
|        _CONST char *__restrict file _AND | ||||
|        _CONST char *__restrict mode) | ||||
| { | ||||
|   register FILE *fp; | ||||
|   register int f; | ||||
|  |  | |||
|  | @ -24,8 +24,8 @@ | |||
| int | ||||
| _DEFUN(_fprintf_r, (ptr, fp, fmt), | ||||
|        struct _reent *ptr _AND | ||||
|        FILE *fp _AND | ||||
|        const char *fmt _DOTS) | ||||
|        FILE *__restrict fp _AND | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  | @ -40,8 +40,8 @@ _DEFUN(_fprintf_r, (ptr, fp, fmt), | |||
| 
 | ||||
| int | ||||
| _DEFUN(fprintf, (fp, fmt), | ||||
|        FILE *fp _AND | ||||
|        const char *fmt _DOTS) | ||||
|        FILE *__restrict fp _AND | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  |  | |||
|  | @ -26,10 +26,10 @@ INDEX | |||
| 
 | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	int fputs(const char *<[s]>, FILE *<[fp]>); | ||||
| 	int fputs(const char *restrict <[s]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| 	#include <stdio.h> | ||||
| 	int _fputs_r(struct _reent *<[ptr]>, const char *<[s]>, FILE *<[fp]>); | ||||
| 	int _fputs_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
|  | @ -74,8 +74,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, | |||
| int | ||||
| _DEFUN(_fputs_r, (ptr, s, fp), | ||||
|        struct _reent * ptr _AND | ||||
|        char _CONST * s _AND | ||||
|        FILE * fp) | ||||
|        char _CONST *__restrict s _AND | ||||
|        FILE *__restrict fp) | ||||
| { | ||||
| #ifdef _FVWRITE_IN_STREAMIO | ||||
|   int result; | ||||
|  | @ -122,8 +122,8 @@ error: | |||
| #ifndef _REENT_ONLY | ||||
| int | ||||
| _DEFUN(fputs, (s, fp), | ||||
|        char _CONST * s _AND | ||||
|        FILE * fp) | ||||
|        char _CONST *__restrict s _AND | ||||
|        FILE *__restrict fp) | ||||
| { | ||||
|   return _fputs_r (_REENT, s, fp); | ||||
| } | ||||
|  |  | |||
|  | @ -26,12 +26,12 @@ INDEX | |||
| 
 | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	size_t fread(void *<[buf]>, size_t <[size]>, size_t <[count]>, | ||||
| 		     FILE *<[fp]>); | ||||
| 	size_t fread(void *restrict <[buf]>, size_t <[size]>, size_t <[count]>, | ||||
| 		     FILE *restrict <[fp]>); | ||||
| 
 | ||||
| 	#include <stdio.h> | ||||
| 	size_t _fread_r(struct _reent *<[ptr]>, void *<[buf]>, | ||||
| 	                size_t <[size]>, size_t <[count]>, FILE *<[fp]>); | ||||
| 	size_t _fread_r(struct _reent *<[ptr]>, void *restrict <[buf]>, | ||||
| 	                size_t <[size]>, size_t <[count]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
|  | @ -131,10 +131,10 @@ _DEFUN(crlf_r, (ptr, fp, buf, count, eof), | |||
| size_t | ||||
| _DEFUN(_fread_r, (ptr, buf, size, count, fp), | ||||
|        struct _reent * ptr _AND | ||||
|        _PTR buf _AND | ||||
|        _PTR __restrict buf _AND | ||||
|        size_t size _AND | ||||
|        size_t count _AND | ||||
|        FILE * fp) | ||||
|        FILE * __restrict fp) | ||||
| { | ||||
|   register size_t resid; | ||||
|   register char *p; | ||||
|  | @ -248,10 +248,10 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp), | |||
| #ifndef _REENT_ONLY | ||||
| size_t | ||||
| _DEFUN(fread, (buf, size, count, fp), | ||||
|        _PTR buf _AND | ||||
|        _PTR __restrict  buf _AND | ||||
|        size_t size _AND | ||||
|        size_t count _AND | ||||
|        FILE * fp) | ||||
|        FILE *__restrict fp) | ||||
| { | ||||
|    return _fread_r (_REENT, buf, size, count, fp); | ||||
| } | ||||
|  |  | |||
|  | @ -26,10 +26,10 @@ INDEX | |||
| 
 | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	FILE *freopen(const char *<[file]>, const char *<[mode]>, | ||||
| 		      FILE *<[fp]>); | ||||
| 	FILE *_freopen_r(struct _reent *<[ptr]>, const char *<[file]>, | ||||
| 		      const char *<[mode]>, FILE *<[fp]>); | ||||
| 	FILE *freopen(const char *restrict <[file]>, const char *restrict <[mode]>, | ||||
| 		      FILE *restrict <[fp]>); | ||||
| 	FILE *_freopen_r(struct _reent *<[ptr]>, const char *restrict <[file]>, | ||||
| 		      const char *restrict <[mode]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
|  | @ -90,9 +90,9 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, | |||
| FILE * | ||||
| _DEFUN(_freopen_r, (ptr, file, mode, fp), | ||||
|        struct _reent *ptr _AND | ||||
|        const char *file _AND | ||||
|        const char *mode _AND | ||||
|        register FILE *fp) | ||||
|        const char *__restrict file _AND | ||||
|        const char *__restrict mode _AND | ||||
|        register FILE *__restrict fp) | ||||
| { | ||||
|   register int f; | ||||
|   int flags, oflags; | ||||
|  | @ -252,9 +252,9 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp), | |||
| 
 | ||||
| FILE * | ||||
| _DEFUN(freopen, (file, mode, fp), | ||||
|        _CONST char *file _AND | ||||
|        _CONST char *mode _AND | ||||
|        register FILE *fp) | ||||
|        _CONST char *__restrict file _AND | ||||
|        _CONST char *__restrict mode _AND | ||||
|        register FILE *__restrict fp) | ||||
| { | ||||
|   return _freopen_r (_REENT, file, mode, fp); | ||||
| } | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ | |||
| 
 | ||||
| int | ||||
| #ifdef _HAVE_STDC | ||||
| fscanf(FILE *fp, _CONST char *fmt, ...) | ||||
| fscanf(FILE *__restrict fp, _CONST char *__restrict fmt, ...) | ||||
| #else | ||||
| fscanf(FILE *fp, fmt, va_alist) | ||||
|        FILE *fp; | ||||
|  | @ -54,7 +54,7 @@ fscanf(FILE *fp, fmt, va_alist) | |||
| 
 | ||||
| int | ||||
| #ifdef _HAVE_STDC | ||||
| _fscanf_r(struct _reent *ptr, FILE *fp, _CONST char *fmt, ...) | ||||
| _fscanf_r(struct _reent *ptr, FILE *__restrict fp, _CONST char *__restrict fmt, ...) | ||||
| #else | ||||
| _fscanf_r(ptr, FILE *fp, fmt, va_alist) | ||||
|           struct _reent *ptr; | ||||
|  |  | |||
|  | @ -26,12 +26,12 @@ INDEX | |||
| 
 | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
| 	size_t fwrite(const void *<[buf]>, size_t <[size]>, | ||||
| 		      size_t <[count]>, FILE *<[fp]>); | ||||
| 	size_t fwrite(const void *restrict <[buf]>, size_t <[size]>, | ||||
| 		      size_t <[count]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| 	#include <stdio.h> | ||||
| 	size_t _fwrite_r(struct _reent *<[ptr]>, const void *<[buf]>, size_t <[size]>, | ||||
| 		      size_t <[count]>, FILE *<[fp]>); | ||||
| 	size_t _fwrite_r(struct _reent *<[ptr]>, const void *restrict <[buf]>, size_t <[size]>, | ||||
| 		      size_t <[count]>, FILE *restrict <[fp]>); | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <stdio.h> | ||||
|  | @ -97,10 +97,10 @@ static char sccsid[] = "%W% (Berkeley) %G%"; | |||
| size_t | ||||
| _DEFUN(_fwrite_r, (ptr, buf, size, count, fp), | ||||
|        struct _reent * ptr _AND | ||||
|        _CONST _PTR buf _AND | ||||
|        _CONST _PTR __restrict buf _AND | ||||
|        size_t size     _AND | ||||
|        size_t count    _AND | ||||
|        FILE * fp) | ||||
|        FILE * __restrict fp) | ||||
| { | ||||
|   size_t n; | ||||
| #ifdef _FVWRITE_IN_STREAMIO | ||||
|  | @ -158,7 +158,7 @@ ret: | |||
| #ifndef _REENT_ONLY | ||||
| size_t | ||||
| _DEFUN(fwrite, (buf, size, count, fp), | ||||
|        _CONST _PTR buf _AND | ||||
|        _CONST _PTR __restrict buf _AND | ||||
|        size_t size     _AND | ||||
|        size_t count    _AND | ||||
|        FILE * fp) | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ | |||
| int | ||||
| _DEFUN(_printf_r, (ptr, fmt), | ||||
|        struct _reent *ptr _AND | ||||
|        const char *fmt _DOTS) | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  | @ -41,7 +41,7 @@ _DEFUN(_printf_r, (ptr, fmt), | |||
| 
 | ||||
| int | ||||
| _DEFUN(printf, (fmt), | ||||
|        const char *fmt _DOTS) | ||||
|        const char *__restrict fmt _DOTS) | ||||
| { | ||||
|   int ret; | ||||
|   va_list ap; | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ | |||
| 
 | ||||
| int | ||||
| #ifdef _HAVE_STDC | ||||
| scanf(_CONST char *fmt, ...) | ||||
| scanf(_CONST char *__restrict fmt, ...) | ||||
| #else | ||||
| scanf(fmt, va_alist) | ||||
|       char *fmt; | ||||
|  | @ -55,7 +55,7 @@ scanf(fmt, va_alist) | |||
| 
 | ||||
| int | ||||
| #ifdef _HAVE_STDC | ||||
| _scanf_r(struct _reent *ptr, _CONST char *fmt, ...) | ||||
| _scanf_r(struct _reent *ptr, _CONST char *__restrict fmt, ...) | ||||
| #else | ||||
| _scanf_r(ptr, fmt, va_alist) | ||||
|          struct _reent *ptr; | ||||
|  |  | |||
|  | @ -72,8 +72,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, | |||
| 
 | ||||
| _VOID | ||||
| _DEFUN(setbuf, (fp, buf), | ||||
|        FILE * fp _AND | ||||
|        char *buf) | ||||
|        FILE *__restrict fp _AND | ||||
|        char *__restrict buf) | ||||
| { | ||||
|   _CAST_VOID setvbuf (fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ); | ||||
| } | ||||
|  |  | |||
|  | @ -33,9 +33,9 @@ int | |||
| #ifdef _HAVE_STDC | ||||
| _DEFUN(_snprintf_r, (ptr, str, size, fmt), | ||||
|        struct _reent *ptr _AND | ||||
|        char *str          _AND | ||||
|        char *__restrict str          _AND | ||||
|        size_t size        _AND | ||||
|        _CONST char *fmt _DOTS) | ||||
|        _CONST char *__restrict fmt _DOTS) | ||||
| #else | ||||
| _snprintf_r(ptr, str, size, fmt, va_alist) | ||||
|             struct _reent *ptr; | ||||
|  | @ -77,9 +77,9 @@ _snprintf_r(ptr, str, size, fmt, va_alist) | |||
| int | ||||
| #ifdef _HAVE_STDC | ||||
| _DEFUN(snprintf, (str, size, fmt), | ||||
|        char *str   _AND | ||||
|        char *__restrict str _AND | ||||
|        size_t size _AND | ||||
|        _CONST char *fmt _DOTS) | ||||
|        _CONST char *__restrict fmt _DOTS) | ||||
| #else | ||||
| snprintf(str, size, fmt, va_alist) | ||||
|          char *str; | ||||
|  |  | |||
|  | @ -47,26 +47,26 @@ INDEX | |||
| ANSI_SYNOPSIS | ||||
|         #include <stdio.h> | ||||
| 
 | ||||
|         int printf(const char *<[format]>, ...); | ||||
|         int fprintf(FILE *<[fd]>, const char *<[format]>, ...); | ||||
|         int sprintf(char *<[str]>, const char *<[format]>, ...); | ||||
|         int snprintf(char *<[str]>, size_t <[size]>, const char *<[format]>, | ||||
|         int printf(const char *restrict <[format]>, ...); | ||||
|         int fprintf(FILE *restrict <[fd]>, const char *restrict <[format]>, ...); | ||||
|         int sprintf(char *restrict <[str]>, const char *restrict <[format]>, ...); | ||||
|         int snprintf(char *restrict <[str]>, size_t <[size]>, const char *restrict <[format]>, | ||||
|                      ...); | ||||
|         int asprintf(char **<[strp]>, const char *<[format]>, ...); | ||||
|         char *asnprintf(char *<[str]>, size_t *<[size]>, const char *<[format]>, | ||||
|         int asprintf(char **restrict <[strp]>, const char *restrict <[format]>, ...); | ||||
|         char *asnprintf(char *restrict <[str]>, size_t *restrict <[size]>, const char *restrict <[format]>, | ||||
|                         ...); | ||||
| 
 | ||||
|         int _printf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); | ||||
|         int _fprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>, | ||||
|                        const char *<[format]>, ...); | ||||
|         int _sprintf_r(struct _reent *<[ptr]>, char *<[str]>, | ||||
|                        const char *<[format]>, ...); | ||||
|         int _snprintf_r(struct _reent *<[ptr]>, char *<[str]>, size_t <[size]>, | ||||
|                         const char *<[format]>, ...); | ||||
|         int _asprintf_r(struct _reent *<[ptr]>, char **<[strp]>, | ||||
|                         const char *<[format]>, ...); | ||||
|         char *_asnprintf_r(struct _reent *<[ptr]>, char *<[str]>, | ||||
|                            size_t *<[size]>, const char *<[format]>, ...); | ||||
|         int _printf_r(struct _reent *<[ptr]>, const char *restrict <[format]>, ...); | ||||
|         int _fprintf_r(struct _reent *<[ptr]>, FILE *restrict <[fd]>, | ||||
|                        const char *restrict <[format]>, ...); | ||||
|         int _sprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>, | ||||
|                        const char *restrict <[format]>, ...); | ||||
|         int _snprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>, size_t <[size]>, | ||||
|                         const char *restrict <[format]>, ...); | ||||
|         int _asprintf_r(struct _reent *<[ptr]>, char **restrict <[strp]>, | ||||
|                         const char *restrict <[format]>, ...); | ||||
|         char *_asnprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>, | ||||
|                            size_t *restrict <[size]>, const char *restrict <[format]>, ...); | ||||
| 
 | ||||
| DESCRIPTION | ||||
|         <<printf>> accepts a series of arguments, applies to each a | ||||
|  | @ -579,13 +579,13 @@ int | |||
| #ifdef _HAVE_STDC | ||||
| _DEFUN(_sprintf_r, (ptr, str, fmt), | ||||
|        struct _reent *ptr _AND | ||||
|        char *str          _AND | ||||
|        _CONST char *fmt _DOTS) | ||||
|        char *__restrict str          _AND | ||||
|        _CONST char *__restrict fmt _DOTS) | ||||
| #else | ||||
| _sprintf_r(ptr, str, fmt, va_alist) | ||||
|            struct _reent *ptr; | ||||
|            char *str; | ||||
|            _CONST char *fmt; | ||||
|            char *__restrict str; | ||||
|            _CONST char *__restrict fmt; | ||||
|            va_dcl | ||||
| #endif | ||||
| { | ||||
|  | @ -613,8 +613,8 @@ _sprintf_r(ptr, str, fmt, va_alist) | |||
| int | ||||
| #ifdef _HAVE_STDC | ||||
| _DEFUN(sprintf, (str, fmt), | ||||
|        char *str _AND | ||||
|        _CONST char *fmt _DOTS) | ||||
|        char *__restrict str _AND | ||||
|        _CONST char *__restrict fmt _DOTS) | ||||
| #else | ||||
| sprintf(str, fmt, va_alist) | ||||
|         char *str; | ||||
|  |  | |||
|  | @ -35,15 +35,15 @@ INDEX | |||
| ANSI_SYNOPSIS | ||||
|         #include <stdio.h> | ||||
| 
 | ||||
|         int scanf(const char *<[format]>, ...); | ||||
|         int fscanf(FILE *<[fd]>, const char *<[format]>, ...); | ||||
|         int sscanf(const char *<[str]>, const char *<[format]>, ...); | ||||
|         int scanf(const char *restrict <[format]>, ...); | ||||
|         int fscanf(FILE *restrict <[fd]>, const char *restrict <[format]>, ...); | ||||
|         int sscanf(const char *restrict <[str]>, const char *restrict <[format]>, ...); | ||||
| 
 | ||||
|         int _scanf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); | ||||
|         int _fscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>,  | ||||
|                       const char *<[format]>, ...); | ||||
|         int _sscanf_r(struct _reent *<[ptr]>, const char *<[str]>, | ||||
|                       const char *<[format]>, ...); | ||||
|         int _scanf_r(struct _reent *<[ptr]>, const char *restrict <[format]>, ...); | ||||
|         int _fscanf_r(struct _reent *<[ptr]>, FILE *restrict <[fd]>,  | ||||
|                       const char *restrict <[format]>, ...); | ||||
|         int _sscanf_r(struct _reent *<[ptr]>, const char *restrict <[str]>, | ||||
|                       const char *restrict <[format]>, ...); | ||||
| 
 | ||||
| 
 | ||||
| TRAD_SYNOPSIS | ||||
|  | @ -399,8 +399,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, | |||
| #ifdef _HAVE_STDC | ||||
| int  | ||||
| _DEFUN(sscanf, (str, fmt), | ||||
|        _CONST char *str _AND | ||||
|        _CONST char *fmt _DOTS) | ||||
|        _CONST char *__restrict str _AND | ||||
|        _CONST char * fmt _DOTS) | ||||
| #else | ||||
| int  | ||||
| sscanf(str, fmt, va_alist) | ||||
|  | @ -436,14 +436,14 @@ sscanf(str, fmt, va_alist) | |||
| int  | ||||
| _DEFUN(_sscanf_r, (ptr, str, fmt),  | ||||
|        struct _reent *ptr _AND | ||||
|        _CONST char *str   _AND | ||||
|        _CONST char *fmt _DOTS) | ||||
|        _CONST char *__restrict str   _AND | ||||
|        _CONST char *__restrict fmt _DOTS) | ||||
| #else | ||||
| int  | ||||
| _sscanf_r(ptr, str, fmt, va_alist) | ||||
|           struct _reent *ptr; | ||||
|           _CONST char *str; | ||||
|           _CONST char *fmt; | ||||
|           _CONST char *__restrict str; | ||||
|           _CONST char *__restrict fmt; | ||||
|           va_dcl | ||||
| #endif | ||||
| { | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ int | |||
| _DEFUN(_vdprintf_r, (ptr, fd, format, ap), | ||||
|        struct _reent *ptr _AND | ||||
|        int fd _AND | ||||
|        const char *format _AND | ||||
|        const char *__restrict format _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   char *p; | ||||
|  | @ -38,7 +38,7 @@ _DEFUN(_vdprintf_r, (ptr, fd, format, ap), | |||
| int | ||||
| _DEFUN(vdprintf, (fd, format, ap), | ||||
|        int fd _AND | ||||
|        const char *format _AND | ||||
|        const char *__restrict format _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   return _vdprintf_r (_REENT, fd, format, ap); | ||||
|  |  | |||
|  | @ -44,7 +44,7 @@ _DEFUN(vprintf, (fmt, ap), | |||
| int | ||||
| _DEFUN(_vprintf_r, (ptr, fmt, ap), | ||||
|        struct _reent *ptr _AND | ||||
|        _CONST char *fmt   _AND | ||||
|        _CONST char *__restrict fmt   _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   _REENT_SMALL_CHECK_INIT (ptr); | ||||
|  |  | |||
|  | @ -45,7 +45,7 @@ _DEFUN(vscanf, (fmt, ap), | |||
| int | ||||
| _DEFUN(_vscanf_r, (ptr, fmt, ap), | ||||
|        struct _reent *ptr _AND  | ||||
|        _CONST char *fmt   _AND  | ||||
|        _CONST char *__restrict fmt   _AND  | ||||
|        va_list ap) | ||||
| { | ||||
|   _REENT_SMALL_CHECK_INIT (ptr); | ||||
|  |  | |||
|  | @ -33,9 +33,9 @@ static char sccsid[] = "%W% (Berkeley) %G%"; | |||
| 
 | ||||
| int | ||||
| _DEFUN(vsnprintf, (str, size, fmt, ap), | ||||
|        char *str        _AND | ||||
|        char *__restrict str        _AND | ||||
|        size_t size      _AND | ||||
|        const char *fmt _AND | ||||
|        const char *__restrict fmt _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   return _vsnprintf_r (_REENT, str, size, fmt, ap); | ||||
|  | @ -46,9 +46,9 @@ _DEFUN(vsnprintf, (str, size, fmt, ap), | |||
| int | ||||
| _DEFUN(_vsnprintf_r, (ptr, str, size, fmt, ap), | ||||
|        struct _reent *ptr _AND | ||||
|        char *str          _AND | ||||
|        char *__restrict str          _AND | ||||
|        size_t size        _AND | ||||
|        const char *fmt   _AND | ||||
|        const char *__restrict fmt   _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   int ret; | ||||
|  |  | |||
|  | @ -32,8 +32,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; | |||
| 
 | ||||
| int | ||||
| _DEFUN(vsprintf, (str, fmt, ap), | ||||
|        char *str        _AND | ||||
|        const char *fmt _AND | ||||
|        char *__restrict str        _AND | ||||
|        const char *__restrict fmt _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   return _vsprintf_r (_REENT, str, fmt, ap); | ||||
|  | @ -44,8 +44,8 @@ _DEFUN(vsprintf, (str, fmt, ap), | |||
| int | ||||
| _DEFUN(_vsprintf_r, (ptr, str, fmt, ap), | ||||
|        struct _reent *ptr _AND | ||||
|        char *str          _AND | ||||
|        const char *fmt   _AND | ||||
|        char *__restrict str          _AND | ||||
|        const char *__restrict fmt   _AND | ||||
|        va_list ap) | ||||
| { | ||||
|   int ret; | ||||
|  |  | |||
|  | @ -36,8 +36,8 @@ | |||
| 
 | ||||
| int | ||||
| _DEFUN(vsscanf, (str, fmt, ap),  | ||||
|        _CONST char *str _AND  | ||||
|        _CONST char *fmt _AND  | ||||
|        _CONST char *__restrict str _AND  | ||||
|        _CONST char *__restrict fmt _AND  | ||||
|        va_list ap) | ||||
| { | ||||
|   return _vsscanf_r (_REENT, str, fmt, ap); | ||||
|  | @ -48,8 +48,8 @@ _DEFUN(vsscanf, (str, fmt, ap), | |||
| int | ||||
| _DEFUN(_vsscanf_r, (ptr, str, fmt, ap), | ||||
|        struct _reent *ptr _AND  | ||||
|        _CONST char *str   _AND  | ||||
|        _CONST char *fmt   _AND  | ||||
|        _CONST char *__restrict str   _AND  | ||||
|        _CONST char *__restrict fmt   _AND  | ||||
|        va_list ap) | ||||
| { | ||||
|   FILE f; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue