stdio.h
来自「此工具是arm-linux-GCC交叉编译工具(cross-3.4.4)」· C头文件 代码 · 共 839 行 · 第 1/2 页
H
839 行
/* Read formatted input from S into argument list ARG. */extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));__END_NAMESPACE_C99#endif /* Use ISO C9x. */__BEGIN_NAMESPACE_STD/* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */extern int fgetc (FILE *__stream);extern int getc (FILE *__stream);/* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */extern int getchar (void);__END_NAMESPACE_STD/* The C standard explicitly says this is a macro, so we always do the optimization for it. */#define getc(_fp) _IO_getc (_fp)#if defined __USE_POSIX || defined __USE_MISC/* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */extern int getc_unlocked (FILE *__stream);extern int getchar_unlocked (void);#endif /* Use POSIX or MISC. */#ifdef __USE_MISC/* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */extern int fgetc_unlocked (FILE *__stream);#endif /* Use MISC. */__BEGIN_NAMESPACE_STD/* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. These functions is a possible cancellation point and therefore not marked with __THROW. */extern int fputc (int __c, FILE *__stream);extern int putc (int __c, FILE *__stream);/* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */extern int putchar (int __c);__END_NAMESPACE_STD/* The C standard explicitly says this can be a macro, so we always do the optimization for it. */#define putc(_ch, _fp) _IO_putc (_ch, _fp)#ifdef __USE_MISC/* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */extern int fputc_unlocked (int __c, FILE *__stream);#endif /* Use MISC. */#if defined __USE_POSIX || defined __USE_MISC/* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */extern int putc_unlocked (int __c, FILE *__stream);extern int putchar_unlocked (int __c);#endif /* Use POSIX or MISC. */#if defined __USE_SVID || defined __USE_MISC \ || (defined __USE_XOPEN && !defined __USE_XOPEN2K)/* Get a word (int) from STREAM. */extern int getw (FILE *__stream);/* Write a word (int) to STREAM. */extern int putw (int __w, FILE *__stream);#endif__BEGIN_NAMESPACE_STD/* Get a newline-terminated string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);/* Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. This function is a possible cancellation point and therefore not marked with __THROW. */extern char *gets (char *__s);__END_NAMESPACE_STD#ifdef __USE_GNU/* This function does the same as `fgets' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream);#endif#ifdef __USE_GNU/* Read up to (and including) a DELIMITER from STREAM into *LINEPTR (and null-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */extern _IO_ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream);extern _IO_ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream);/* Like `getdelim', but reads up to a newline. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */extern _IO_ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream);#endif__BEGIN_NAMESPACE_STD/* Write a string to STREAM. This function is a possible cancellation points and therefore not marked with __THROW. */extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);/* Write a string, followed by a newline, to stdout. This function is a possible cancellation points and therefore not marked with __THROW. */extern int puts (__const char *__s);/* Push a character back onto the input buffer of STREAM. This function is a possible cancellation points and therefore not marked with __THROW. */extern int ungetc (int __c, FILE *__stream);/* Read chunks of generic data from STREAM. This function is a possible cancellation points and therefore not marked with __THROW. */extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream);/* Write chunks of generic data to STREAM. This function is a possible cancellation points and therefore not marked with __THROW. */extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s);__END_NAMESPACE_STD#ifdef __USE_GNU/* This function does the same as `fputs' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream);#endif#ifdef __USE_MISC/* Faster versions when locking is not necessary. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream);extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream);#endif__BEGIN_NAMESPACE_STD/* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */extern int fseek (FILE *__stream, long int __off, int __whence);/* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */extern long int ftell (FILE *__stream);/* Rewind to the beginning of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */extern void rewind (FILE *__stream);__END_NAMESPACE_STD/* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with file offset. `long int' is not the right type. These definitions are originally defined in the Large File Support API. */#if defined __USE_LARGEFILE || defined __USE_XOPEN2K# ifndef __USE_FILE_OFFSET64/* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */extern int fseeko (FILE *__stream, __off_t __off, int __whence);/* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */extern __off_t ftello (FILE *__stream);# else# ifdef __REDIRECTextern int __REDIRECT (fseeko, (FILE *__stream, __off64_t __off, int __whence), fseeko64);extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64);# else# define fseeko fseeko64# define ftello ftello64# endif# endif#endif__BEGIN_NAMESPACE_STD#ifndef __USE_FILE_OFFSET64/* Get STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);/* Set STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */extern int fsetpos (FILE *__stream, __const fpos_t *__pos);#else# ifdef __REDIRECTextern int __REDIRECT (fgetpos, (FILE *__restrict __stream, fpos_t *__restrict __pos), fgetpos64);extern int __REDIRECT (fsetpos, (FILE *__stream, __const fpos_t *__pos), fsetpos64);# else# define fgetpos fgetpos64# define fsetpos fsetpos64# endif#endif__END_NAMESPACE_STD#ifdef __USE_LARGEFILE64extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);extern __off64_t ftello64 (FILE *__stream);extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);#endif__BEGIN_NAMESPACE_STD/* Clear the error and EOF indicators for STREAM. */extern void clearerr (FILE *__stream) __THROW;/* Return the EOF indicator for STREAM. */extern int feof (FILE *__stream) __THROW;/* Return the error indicator for STREAM. */extern int ferror (FILE *__stream) __THROW;__END_NAMESPACE_STD#ifdef __USE_MISC/* Faster versions when locking is not required. */extern void clearerr_unlocked (FILE *__stream) __THROW;extern int feof_unlocked (FILE *__stream) __THROW;extern int ferror_unlocked (FILE *__stream) __THROW;#endif__BEGIN_NAMESPACE_STD/* Print a message describing the meaning of the value of errno. This function is a possible cancellation point and therefore not marked with __THROW. */extern void perror (__const char *__s);__END_NAMESPACE_STD/* Provide the declarations for `sys_errlist' and `sys_nerr' if they are available on this system. Even if available, these variables should not be used directly. The `strerror' function provides all the necessary functionality. */#include <bits/sys_errlist.h>#ifdef __USE_POSIX/* Return the system file descriptor for STREAM. */extern int fileno (FILE *__stream) __THROW;#endif /* Use POSIX. */#ifdef __USE_MISC/* Faster version when locking is not required. */extern int fileno_unlocked (FILE *__stream) __THROW;#endif#if (defined __USE_POSIX2 || defined __USE_SVID || defined __USE_BSD || \ defined __USE_MISC)/* Create a new stream connected to a pipe running the given command. This function is a possible cancellation point and therefore not marked with __THROW. */extern FILE *popen (__const char *__command, __const char *__modes);/* Close a stream opened by popen and return the status of its child. This function is a possible cancellation point and therefore not marked with __THROW. */extern int pclose (FILE *__stream);#endif#ifdef __USE_POSIX/* Return the name of the controlling terminal. */extern char *ctermid (char *__s) __THROW;#endif /* Use POSIX. */#ifdef __USE_XOPEN/* Return the name of the current user. */extern char *cuserid (char *__s);#endif /* Use X/Open, but not issue 6. */#ifdef __USE_GNUstruct obstack; /* See <obstack.h>. *//* Write formatted output to an obstack. */extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3)));extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, _G_va_list __args) __THROW __attribute__ ((__format__ (__printf__, 2, 0)));#endif /* Use GNU. */#if defined __USE_POSIX || defined __USE_MISC/* These are defined in POSIX.1:1996. *//* Acquire ownership of STREAM. */extern void flockfile (FILE *__stream) __THROW;/* Try to acquire ownership of STREAM but do not block if it is not possible. */extern int ftrylockfile (FILE *__stream) __THROW;/* Relinquish the ownership granted for STREAM. */extern void funlockfile (FILE *__stream) __THROW;#endif /* POSIX || misc */#if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU/* The X/Open standard requires some functions and variables to be declared here which do not belong into this header. But we have to follow. In GNU mode we don't do this nonsense. */# define __need_getopt# include <getopt.h>#endif /* X/Open, but not issue 6 and not for GNU. *//* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */#ifdef __USE_EXTERN_INLINES# include <bits/stdio.h>#endif#if __USE_FORTIFY_LEVEL > 0 && !defined __cplusplus# include <bits/stdio2.h>#endif__END_DECLS#endif /* <stdio.h> included. */#endif /* !_STDIO_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?