⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stdio.h

📁 KPIT GNU Tools is a set of GNU development tools for Renesas microcontrollers.
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley.  The name of the * University may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * *	@(#)stdio.h	5.3 (Berkeley) 3/15/86 *//* * NB: to fit things in six character monocase externals, the * stdio code uses the prefix `__s' for stdio objects, typically * followed by a three-character attempt at a mnemonic. */#ifndef _STDIO_H_#define	_STDIO_H_#include "_ansi.h"#define	_FSTDIO			/* ``function stdio'' */#define __need_size_t#include <stddef.h>#define __need___va_list#include <stdarg.h>/* * <sys/reent.h> defines __FILE, _fpos_t. * They must be defined there because struct _reent needs them (and we don't * want reent.h to include this file. */#include <sys/reent.h>#include <sys/types.h>_BEGIN_STD_Ctypedef __FILE FILE;#ifdef __CYGWIN__#ifdef __CYGWIN_USE_BIG_TYPES__typedef _fpos64_t fpos_t;#elsetypedef _fpos_t fpos_t;#endif#elsetypedef _fpos_t fpos_t;#ifdef __LARGE64_FILEStypedef _fpos64_t fpos64_t;#endif#endif /* !__CYGWIN__ */#include <sys/stdio.h>#define	__SLBF	0x0001		/* line buffered */#define	__SNBF	0x0002		/* unbuffered */#define	__SRD	0x0004		/* OK to read */#define	__SWR	0x0008		/* OK to write */	/* RD and WR are never simultaneously asserted */#define	__SRW	0x0010		/* open for reading & writing */#define	__SEOF	0x0020		/* found EOF */#define	__SERR	0x0040		/* found error */#define	__SMBF	0x0080		/* _buf is from malloc */#define	__SAPP	0x0100		/* fdopen()ed in append mode - so must  write to end */#define	__SSTR	0x0200		/* this is an sprintf/snprintf string */#define	__SOPT	0x0400		/* do fseek() optimisation */#define	__SNPT	0x0800		/* do not do fseek() optimisation */#define	__SOFF	0x1000		/* set iff _offset is in fact correct */#define	__SMOD	0x2000		/* true => fgetline modified _p text */#if defined(__CYGWIN__)#  define __SCLE  0x4000        /* convert line endings CR/LF <-> NL */#endif#define	__SL64	0x8000		/* is 64-bit offset large file *//* * The following three definitions are for ANSI C, which took them * from System V, which stupidly took internal interface macros and * made them official arguments to setvbuf(), without renaming them. * Hence, these ugly _IOxxx names are *supposed* to appear in user code. * * Although these happen to match their counterparts above, the * implementation does not rely on that (so these could be renumbered). */#define	_IOFBF	0		/* setvbuf should set fully buffered */#define	_IOLBF	1		/* setvbuf should set line buffered */#define	_IONBF	2		/* setvbuf should set unbuffered */#ifndef NULL#define	NULL	0#endif#define	EOF	(-1)#ifdef __BUFSIZ__#define	BUFSIZ		__BUFSIZ__#else#define	BUFSIZ		1024#endif#ifdef __FOPEN_MAX__#define FOPEN_MAX	__FOPEN_MAX__#else#define	FOPEN_MAX	20#endif#ifdef __FILENAME_MAX__#define FILENAME_MAX    __FILENAME_MAX__#else#define	FILENAME_MAX	1024#endif#ifdef __L_tmpnam__#define L_tmpnam	__L_tmpnam__#else#define	L_tmpnam	FILENAME_MAX#endif#ifndef __STRICT_ANSI__#define P_tmpdir        "/tmp"#endif#ifndef SEEK_SET#define	SEEK_SET	0	/* set file offset to offset */#endif#ifndef SEEK_CUR#define	SEEK_CUR	1	/* set file offset to current plus offset */#endif#ifndef SEEK_END#define	SEEK_END	2	/* set file offset to EOF plus offset */#endif#define	TMP_MAX		26#ifndef _REENT_ONLY#define	stdin	(_REENT->_stdin)#define	stdout	(_REENT->_stdout)#define	stderr	(_REENT->_stderr)#else /* _REENT_ONLY */#define	stdin	(_impure_ptr->_stdin)#define	stdout	(_impure_ptr->_stdout)#define	stderr	(_impure_ptr->_stderr)#endif /* _REENT_ONLY */#define _stdin_r(x)	((x)->_stdin)#define _stdout_r(x)	((x)->_stdout)#define _stderr_r(x)	((x)->_stderr)/* * Functions defined in ANSI C standard. */#ifdef __GNUC__#define __VALIST __gnuc_va_list#else#define __VALIST char*#endifFILE *	_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 *, ...));int	_EXFUN(fscanf, (FILE *, const char *, ...));int	_EXFUN(printf, (const char *, ...));int	_EXFUN(scanf, (const char *, ...));int	_EXFUN(sscanf, (const char *, const char *, ...));int	_EXFUN(vfprintf, (FILE *, const char *, __VALIST));int	_EXFUN(vprintf, (const char *, __VALIST));int	_EXFUN(vsprintf, (char *, const char *, __VALIST));int	_EXFUN(fgetc, (FILE *));char *  _EXFUN(fgets, (char *, int, FILE *));int	_EXFUN(fputc, (int, FILE *));int	_EXFUN(fputs, (const char *, FILE *));int	_EXFUN(getc, (FILE *));int	_EXFUN(getchar, (void));char *  _EXFUN(gets, (char *));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 *));#ifdef _COMPILING_NEWLIBint	_EXFUN(fgetpos, (FILE *, _fpos_t *));#elseint	_EXFUN(fgetpos, (FILE *, fpos_t *));#endifint	_EXFUN(fseek, (FILE *, long, int));#ifdef _COMPILING_NEWLIBint	_EXFUN(fsetpos, (FILE *, const _fpos_t *));#elseint	_EXFUN(fsetpos, (FILE *, const fpos_t *));#endiflong	_EXFUN(ftell, ( FILE *));void	_EXFUN(rewind, (FILE *));void	_EXFUN(clearerr, (FILE *));int	_EXFUN(feof, (FILE *));int	_EXFUN(ferror, (FILE *));void    _EXFUN(perror, (const char *));#ifndef _REENT_ONLYFILE *	_EXFUN(fopen, (const char *_name, const char *_type));int	_EXFUN(sprintf, (char *, const char *, ...));int	_EXFUN(remove, (const char *));int	_EXFUN(rename, (const char *, const char *));#endif#ifndef __STRICT_ANSI__#ifdef _COMPILING_NEWLIBint	_EXFUN(fseeko, (FILE *, _off_t, int));_off_t	_EXFUN(ftello, ( FILE *));#elseint	_EXFUN(fseeko, (FILE *, off_t, int));off_t	_EXFUN(ftello, ( FILE *));#endif#ifndef _REENT_ONLYint	_EXFUN(asiprintf, (char **, const char *, ...));int	_EXFUN(asprintf, (char **, const char *, ...));#ifndef dprintfint	_EXFUN(dprintf, (int, const char *, ...));#endifint	_EXFUN(fcloseall, (_VOID));int	_EXFUN(fiprintf, (FILE *, const char *, ...));int	_EXFUN(fiscanf, (FILE *, const char *, ...));int	_EXFUN(iprintf, (const char *, ...));int	_EXFUN(iscanf, (const char *, ...));int	_EXFUN(siprintf, (char *, const char *, ...));int	_EXFUN(siscanf, (const char *, const char *, ...));int	_EXFUN(snprintf, (char *, size_t, const char *, ...));int	_EXFUN(sniprintf, (char *, size_t, const char *, ...));char *	_EXFUN(tempnam, (const char *, const char *));int	_EXFUN(vasiprintf, (char **, const char *, __VALIST));int	_EXFUN(vasprintf, (char **, const char *, __VALIST));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -