📄 stdio.h
字号:
/* stdio.h
Definitions for stream input/output.
*/
/*
* C/C++ Run Time Library - Version 10.0
*
* Copyright (c) 1987, 2000 by Inprise Corporation
* All Rights Reserved.
*
*/
/* $Revision: 9.10 $ */
#ifndef __STDIO_H
#define __STDIO_H
#define _INC_STDIO /* MSC Guard name */
#ifndef ___STDDEF_H
#include <_stddef.h>
#endif
#if !defined(___NFILE_H)
#include <_nfile.h>
#endif
#ifdef __cplusplus
namespace std {
#endif /* __cplusplus */
#if !defined(RC_INVOKED)
#if defined(__STDC__)
#pragma warn -nak
#endif
#pragma pack(push, 1)
#endif /* !RC_INVOKED */
/* Definition of the file position type
*/
typedef long fpos_t;
/* An external reference to _floatconvert (using #pragma extref _floatconvert)
* forces floating point format conversions to be linked.
*/
extern int _floatconvert;
/* Bufferisation type to be used as 3rd argument for "setvbuf" function
*/
#define _IOFBF 0
#define _IOLBF 1
#define _IONBF 2
/* "flags" bits definitions
*/
#define _F_RDWR 0x0003 /* Read/write flag */
#define _F_READ 0x0001 /* Read only file */
#define _F_WRIT 0x0002 /* Write only file */
#define _F_BUF 0x0004 /* Malloc'ed Buffer data */
#define _F_LBUF 0x0008 /* line-buffered file */
#define _F_ERR 0x0010 /* Error indicator */
#define _F_EOF 0x0020 /* EOF indicator */
#define _F_BIN 0x0040 /* Binary file indicator */
#define _F_IN 0x0080 /* Data is incoming */
#define _F_OUT 0x0100 /* Data is outgoing */
#define _F_TERM 0x0200 /* File is a terminal */
/* End-of-file constant definition
*/
#define EOF (-1) /* End of file indicator */
#define WEOF (_WINT_T)(0xFFFF) /* wide-character end of file indicator */
/* Default buffer size use by "setbuf" function
*/
#define BUFSIZ 512 /* Buffer size for stdio */
/* Size of an arry large enough to hold a temporary file name string
*/
#define L_ctermid 5 /* CON: plus null byte */
#define P_tmpdir "" /* temporary directory */
#define L_tmpnam 13 /* tmpnam buffer size */
/* Constants to be used as 3rd argument for "fseek" function
*/
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
/* Number of unique file names that shall be generated by "tmpnam" function
*/
#define TMP_MAX 0xFFFF
/* Definition of the control structure for streams
*/
typedef struct
{
unsigned char *curp; /* Current active pointer */
unsigned char *buffer; /* Data transfer buffer */
int level; /* fill/empty level of buffer */
int bsize; /* Buffer size */
unsigned short istemp; /* Temporary file indicator */
unsigned short flags; /* File status flags */
wchar_t hold; /* Ungetc char if no buffer */
char fd; /* File descriptor */
unsigned char token; /* Used for validity checking */
} FILE; /* This is the FILE object */
/* Number of files that can be open simultaneously
*/
#if defined(__STDC__)
#define FOPEN_MAX (_NFILE_)
#else
#define FOPEN_MAX (_NFILE_)
#define SYS_OPEN (_NFILE_)
#endif
#define FILENAME_MAX 260
#ifdef __cplusplus
extern "C" {
#endif
/* Standard I/O predefined streams
*/
extern FILE _RTLENTRY _EXPDATA _streams[];
extern unsigned _RTLENTRY _EXPDATA _nfile;
#define stdin (&_streams[0])
#define stdout (&_streams[1])
#define stderr (&_streams[2])
/* __getStream() is used internally with CG only, but prototyped here for
consistancy with the 16-bit version.
*/
FILE * _RTLENTRY _EXPFUNC __getStream( int );
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
void _RTLENTRY _EXPFUNC clearerr(FILE * __stream);
int _RTLENTRY _EXPFUNC fclose(FILE * __stream);
int _RTLENTRY _EXPFUNC fflush(FILE * __stream);
int _RTLENTRY _EXPFUNC fgetc(FILE * __stream);
_WINT_T _RTLENTRY _EXPFUNC fgetwc(FILE * __stream);
int _RTLENTRY _EXPFUNC fgetpos(FILE * __stream, fpos_t*__pos);
char * _RTLENTRY _EXPFUNC fgets(char * __s, int __n, FILE * __stream);
wchar_t* _RTLENTRY _EXPFUNC fgetws(wchar_t * __s, int __n, FILE * __stream);
FILE * _RTLENTRY _EXPFUNC fopen(const char * __path, const char * __mode);
FILE * _RTLENTRY _EXPFUNC _wfopen(const wchar_t * __path,
const wchar_t * __mode);
int _RTLENTRY _EXPFUNC fprintf(FILE * __stream, const char * __format, ...);
int _RTLENTRY _EXPFUNC fwprintf(FILE * __stream, const wchar_t *__format, ...);
int _RTLENTRY _EXPFUNC fputc(int __c, FILE * __stream);
_WINT_T _RTLENTRY _EXPFUNC fputwc(_WINT_T __c, FILE * __stream);
int _RTLENTRY _EXPFUNC fputs(const char * __s, FILE * __stream);
int _RTLENTRY _EXPFUNC fputws(const wchar_t * __s, FILE * __stream);
_SIZE_T _RTLENTRY _EXPFUNC fread(void * __ptr, _SIZE_T __size, _SIZE_T __n,
FILE * __stream);
FILE * _RTLENTRY _EXPFUNC freopen(const char * __path, const char * __mode,
FILE * __stream);
FILE * _RTLENTRY _EXPFUNC _wfreopen(const wchar_t * __path, const wchar_t * __mode,
FILE * __stream);
int _RTLENTRY _EXPFUNC fscanf(FILE * __stream, const char * __format, ...);
int _RTLENTRY _EXPFUNC fwscanf(FILE *__stream, const wchar_t *__format, ...);
int _RTLENTRY _EXPFUNC fseek(FILE * __stream, long __offset, int __whence);
int _RTLENTRY _EXPFUNC fsetpos(FILE * __stream, const fpos_t*__pos);
long _RTLENTRY _EXPFUNC ftell(FILE * __stream);
_SIZE_T _RTLENTRY _EXPFUNC fwrite(const void * __ptr, _SIZE_T __size, _SIZE_T __n,
FILE * __stream);
char * _RTLENTRY _EXPFUNC gets(char * __s);
wchar_t* _RTLENTRY _EXPFUNC _getws(wchar_t * __s);
int _RTLENTRY _EXPFUNC _pclose(FILE *__stream);
void _RTLENTRY _EXPFUNC perror(const char * __s);
void _RTLENTRY _EXPFUNC _wperror(const wchar_t * __s);
FILE * _RTLENTRY _EXPFUNC _popen(const char * __command, const char * __mode);
FILE * _RTLENTRY _EXPFUNC _wpopen(const wchar_t * __command,
const wchar_t * __mode);
int _RTLENTRY _EXPFUNC printf(const char * __format, ...);
int _RTLENTRY _EXPFUNC wprintf(const wchar_t * __format, ...);
int _RTLENTRY _EXPFUNC puts(const char * __s);
int _RTLENTRY _EXPFUNC _putws(const wchar_t * __s);
int _RTLENTRY _EXPFUNC remove(const char * __path);
int _RTLENTRY _EXPFUNC _wremove(const wchar_t * __path);
int _RTLENTRY _EXPFUNC rename(const char * __oldname,const char * __newname);
int _RTLENTRY _EXPFUNC _wrename(const wchar_t * __oldname,const wchar_t * __newname);
void _RTLENTRY _EXPFUNC rewind(FILE * __stream);
int _RTLENTRY _EXPFUNC scanf(const char * __format, ...);
int _RTLENTRY _EXPFUNC wscanf(const wchar_t * __format, ...);
void _RTLENTRY _EXPFUNC setbuf(FILE * __stream, char * __buf);
int _RTLENTRY _EXPFUNC setvbuf(FILE * __stream, char * __buf,
int __type, _SIZE_T __size);
int _RTLENTRY _EXPFUNC sprintf(char * __buffer, const char * __format, ...);
int _RTLENTRY _EXPFUNC swprintf(wchar_t * __buffer, const wchar_t * __format, ...);
int _RTLENTRY _EXPFUNC snprintf(char * __buffer, _SIZE_T __nsize,
const char * __format, ...);
int _RTLENTRY _EXPFUNC snwprintf(wchar_t * __buffer, _SIZE_T __nsize,
const wchar_t * __format, ...);
#ifndef __STDC__
int _RTLENTRY _EXPFUNC _snprintf(char * __buffer, _SIZE_T __nsize,
const char * __format, ...);
int _RTLENTRY _EXPFUNC _snwprintf(wchar_t * __buffer, _SIZE_T __nsize,
const wchar_t * __format, ...);
#endif
int _RTLENTRY _EXPFUNC sscanf(const char * __buffer,
const char * __format, ...);
int _RTLENTRY _EXPFUNC swscanf(const wchar_t * __buffer,
const wchar_t * __format, ...);
char * _RTLENTRY _EXPFUNC strerror(int __errnum);
FILE * _RTLENTRY _EXPFUNC tmpfile(void);
char * _RTLENTRY _EXPFUNC tmpnam(char * __s);
wchar_t * _RTLENTRY _EXPFUNC _wtmpnam(wchar_t * __s);
int _RTLENTRY _EXPFUNC ungetc(int __c, FILE * __stream);
_WINT_T _RTLENTRY _EXPFUNC ungetwc(_WINT_T __c, FILE * __stream);
int _RTLENTRY _EXPFUNC vfprintf(FILE * __stream, const char * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vfscanf(FILE * __stream, const char * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vprintf(const char * __format, void * __arglist);
int _RTLENTRY _EXPFUNC vscanf(const char * __format, void * __arglist);
int _RTLENTRY _EXPFUNC vsprintf(char * __buffer, const char * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vsnprintf(char * __buffer, _SIZE_T __nsize, const char * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vsscanf(const char * __buffer, const char * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vfwprintf(FILE * __stream, const wchar_t * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vfwscanf(FILE * __stream, const wchar_t * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vwprintf(const wchar_t * __format, void * __arglist);
int _RTLENTRY _EXPFUNC vwscanf(const wchar_t * __format, void * __arglist);
int _RTLENTRY _EXPFUNC vswprintf(wchar_t * __buffer, const wchar_t * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vsnwprintf(wchar_t * __buffer, _SIZE_T __nsize, const wchar_t * __format,
void * __arglist);
int _RTLENTRY _EXPFUNC vswscanf(const wchar_t * __buffer, const wchar_t * __format,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -