?? stdio.h
字號:
#define putchar(__c) fputc(__c, stdout)
/**
The function \c printf performs formatted output to stream
\c stderr. See \c vfprintf() for details.
*/
extern int printf(const char *__fmt, ...);
/**
Variant of \c printf() that uses a \c fmt string that resides
in program memory.
*/
extern int printf_P(const char *__fmt, ...);
/**
The function \c vprintf performs formatted output to stream
\c stdout, taking a variable argument list as in vfprintf().
See vfprintf() for details.
*/
extern int vprintf(const char *__fmt, va_list __ap);
/**
Variant of \c printf() that sends the formatted characters
to string \c s.
*/
extern int sprintf(char *__s, const char *__fmt, ...);
/**
Variant of \c sprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int sprintf_P(char *__s, const char *__fmt, ...);
/**
Like \c sprintf(), but instead of assuming \c s to be of infinite
size, no more than \c n characters (including the trailing NUL
character) will be converted to \c s.
Returns the number of characters that would have been written to
\c s if there were enough space.
*/
extern int snprintf(char *__s, size_t __n, const char *__fmt, ...);
/**
Variant of \c snprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int snprintf_P(char *__s, size_t __n, const char *__fmt, ...);
/**
Like \c sprintf() but takes a variable argument list for the
arguments.
*/
extern int vsprintf(char *__s, const char *__fmt, va_list ap);
/**
Variant of \c vsprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int vsprintf_P(char *__s, const char *__fmt, va_list ap);
/**
Like \c vsprintf(), but instead of assuming \c s to be of infinite
size, no more than \c n characters (including the trailing NUL
character) will be converted to \c s.
Returns the number of characters that would have been written to
\c s if there were enough space.
*/
extern int vsnprintf(char *__s, size_t __n, const char *__fmt, va_list ap);
/**
Variant of \c vsnprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int vsnprintf_P(char *__s, size_t __n, const char *__fmt, va_list ap);
/**
The function \c fprintf performs formatted output to \c stream.
See \c vfprintf() for details.
*/
extern int fprintf(FILE *__stream, const char *__fmt, ...);
/**
Variant of \c fprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int fprintf_P(FILE *__stream, const char *__fmt, ...);
/**
Write the string pointed to by \c str to stream \c stream.
Returns 0 on success and EOF on error.
*/
extern int fputs(const char *__str, FILE *__stream);
/**
Variant of fputs() where \c str resides in program memory.
*/
extern int fputs_P(const char *__str, FILE *__stream);
/**
Write the string pointed to by \c str, and a trailing newline
character, to \c stdout.
*/
extern int puts(const char *__str);
/**
Variant of puts() where \c str resides in program memory.
*/
extern int puts_P(const char *__str);
/**
Write \c nmemb objects, \c size bytes each, to \c stream.
The first byte of the first object is referenced by \c ptr.
Returns the number of objects successfully written, i. e.
\c nmemb unless an output error occured.
*/
extern size_t fwrite(const void *__ptr, size_t __size, size_t __nmemb,
FILE *__stream);
/**
The function \c fgetc reads a character from \c stream. It returns
the character, or \c EOF in case end-of-file was encountered or an
error occurred. The routines feof() or ferror() must be used to
distinguish between both situations.
*/
extern int fgetc(FILE *__stream);
#if !defined(__DOXYGEN__)
/* getc() function implementation, required by standard */
extern int getc(FILE *__stream);
/* getchar() function implementation, required by standard */
extern int getchar(void);
#endif /* not __DOXYGEN__ */
/**
The macro \c getc used to be a "fast" macro implementation with a
functionality identical to fgetc(). For space constraints, in
\c avr-libc, it is just an alias for \c fgetc.
*/
#define getc(__stream) fgetc(__stream)
/**
The macro \c getchar reads a character from \c stdin. Return
values and error handling is identical to fgetc().
*/
#define getchar() fgetc(stdin)
/**
The ungetc() function pushes the character \c c (converted to an
unsigned char) back onto the input stream pointed to by \c stream.
The pushed-back character will be returned by a subsequent read on
the stream.
Currently, only a single character can be pushed back onto the
stream.
The ungetc() function returns the character pushed back after the
conversion, or \c EOF if the operation fails. If the value of the
argument \c c character equals \c EOF, the operation will fail and
the stream will remain unchanged.
*/
extern int ungetc(int __c, FILE *__stream);
/**
Read at most <tt>size - 1</tt> bytes from \c stream, until a
newline character was encountered, and store the characters in the
buffer pointed to by \c str. Unless an error was encountered while
reading, the string will then be terminated with a \c NUL
character.
If an error was encountered, the function returns NULL and sets the
error flag of \c stream, which can be tested using ferror().
Otherwise, a pointer to the string will be returned. */
extern char *fgets(char *__str, int __size, FILE *__stream);
/**
Similar to fgets() except that it will operate on stream \c stdin,
and the trailing newline (if any) will not be stored in the string.
It is the caller's responsibility to provide enough storage to hold
the characters read. */
extern char *gets(char *__str);
/**
Read \c nmemb objects, \c size bytes each, from \c stream,
to the buffer pointed to by \c ptr.
Returns the number of objects successfully read, i. e.
\c nmemb unless an input error occured or end-of-file was
encountered. feof() and ferror() must be used to distinguish
between these two conditions.
*/
extern size_t fread(void *__ptr, size_t __size, size_t __nmemb,
FILE *__stream);
/**
Clear the error and end-of-file flags of \c stream.
*/
extern void clearerr(FILE *__stream);
#if !defined(__DOXYGEN__)
/* fast inlined version of clearerr() */
#define clearerror(s) do { (s)->flags &= ~(__SERR | __SEOF); } while(0)
#endif /* !defined(__DOXYGEN__) */
/**
Test the end-of-file flag of \c stream. This flag can only be cleared
by a call to clearerr().
*/
extern int feof(FILE *__stream);
#if !defined(__DOXYGEN__)
/* fast inlined version of feof() */
#define feof(s) ((s)->flags & __SEOF)
#endif /* !defined(__DOXYGEN__) */
/**
Test the error flag of \c stream. This flag can only be cleared
by a call to clearerr().
*/
extern int ferror(FILE *__stream);
#if !defined(__DOXYGEN__)
/* fast inlined version of ferror() */
#define ferror(s) ((s)->flags & __SERR)
#endif /* !defined(__DOXYGEN__) */
extern int vfscanf(FILE *__stream, const char *__fmt, va_list __ap);
/**
Variant of vfscanf() using a \c fmt string in program memory.
*/
extern int vfscanf_P(FILE *__stream, const char *__fmt, va_list __ap);
/**
The function \c fscanf performs formatted input, reading the
input data from \c stream.
See vfscanf() for details.
*/
extern int fscanf(FILE *__stream, const char *__fmt, ...);
/**
Variant of fscanf() using a \c fmt string in program memory.
*/
extern int fscanf_P(FILE *__stream, const char *__fmt, ...);
/**
The function \c scanf performs formatted input from stream \c stdin.
See vfscanf() for details.
*/
extern int scanf(const char *__fmt, ...);
/**
Variant of scanf() where \c fmt resides in program memory.
*/
extern int scanf_P(const char *__fmt, ...);
/**
The function \c vscanf performs formatted input from stream
\c stdin, taking a variable argument list as in vfscanf().
See vfscanf() for details.
*/
extern int vscanf(const char *__fmt, va_list __ap);
/**
The function \c sscanf performs formatted input, reading the
input data from the buffer pointed to by \c buf.
See vfscanf() for details.
*/
extern int sscanf(const char *__buf, const char *__fmt, ...);
/**
Variant of sscanf() using a \c fmt string in program memory.
*/
extern int sscanf_P(const char *__buf, const char *__fmt, ...);
#if defined(__DOXYGEN__)
/**
Flush \c stream.
This is a null operation provided for source-code compatibility
only, as the standard IO implementation currently does not perform
any buffering.
*/
extern int fflush(FILE *stream);
#else
static __inline__ int fflush(FILE *stream __attribute__((unused)))
{
return 0;
}
#endif
#ifdef __cplusplus
}
#endif
/*@}*/
/*
* The following constants are currently not used by avr-libc's
* stdio subsystem. They are defined here since the gcc build
* environment expects them to be here.
*/
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#endif /* __ASSEMBLER */
#endif /* _STDLIB_H_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -