67 #ifndef __INCLUDE_STDIO_H 68 #define __INCLUDE_STDIO_H 74 #include <tinyara/config.h> 76 #include <sys/types.h> 82 #include <tinyara/fs/fs.h> 90 #define FILENAME_MAX _POSIX_NAME_MAX 98 #define stdin (&sched_getstreams()->sl_streams[0]) 99 #define stdout (&sched_getstreams()->sl_streams[1]) 100 #define stderr (&sched_getstreams()->sl_streams[2]) 110 #define putc(c, s) fputc((c), (s)) 115 #define putchar(c) fputc(c, stdout) 120 #define getc(s) fgetc(s) 125 #define getchar() fgetc(stdin) 130 #define rewind(s) ((void)fseek((s), 0, SEEK_SET)) 137 #ifndef CONFIG_LIBC_TMPDIR 138 #define CONFIG_LIBC_TMPDIR "/tmp" 141 #define P_tmpdir CONFIG_LIBC_TMPDIR 145 #ifndef CONFIG_LIBC_MAX_TMPFILE 146 #define CONFIG_LIBC_MAX_TMPFILE 32 149 #define L_tmpnam CONFIG_LIBC_MAX_TMPFILE 153 #define TMP_MAX 56800235584ull 161 typedef struct file_struct
FILE;
168 #if defined(__cplusplus) 169 #define EXTERN extern "C" 172 #define EXTERN extern 186 void clearerr(
register FILE *stream);
229 char *
fgets(FAR
char *s,
int n, FAR
FILE *stream);
234 FAR
FILE *
fopen(FAR
const char *path, FAR
const char *type);
239 int fprintf(FAR
FILE *stream, FAR
const char *format, ...);
249 int fputs(FAR
const char *s, FAR
FILE *stream);
254 size_t fread(FAR
void *ptr,
size_t size,
size_t n_items, FAR
FILE *stream);
259 int fseek(FAR
FILE *stream,
long int offset,
int whence);
274 size_t fwrite(FAR
const void *ptr,
size_t size,
size_t n_items, FAR
FILE *stream);
279 FAR
char *
gets(FAR
char *s);
304 FAR
char *
gets_s(FAR
char *s, rsize_t n);
317 int printf(FAR
const char *format, ...);
322 int puts(FAR
const char *s);
327 int rename(FAR
const char *oldpath, FAR
const char *newpath);
335 int sprintf(FAR
char *buf, FAR
const char *format, ...);
340 int asprintf(FAR
char **ptr, FAR
const char *fmt, ...);
345 int snprintf(FAR
char *buf,
size_t size, FAR
const char *format, ...);
350 int sscanf(FAR
const char *buf, FAR
const char *fmt, ...);
355 void perror(FAR
const char *s);
361 int vprintf(FAR
const char *format, va_list ap);
366 int vfprintf(FAR
FILE *stream,
const char *format, va_list ap);
371 int vsprintf(FAR
char *buf,
const char *format, va_list ap);
376 int avsprintf(FAR
char **ptr,
const char *fmt, va_list ap);
384 int vsnprintf(FAR
char *buf,
size_t size,
const char *format, va_list ap);
389 int vsscanf(FAR
const char *buf, FAR
const char *s, va_list ap);
401 FAR
FILE *
fdopen(
int fd, FAR
const char *type);
406 int dprintf(
int fd, FAR
const char *fmt, ...);
410 int vdprintf(
int fd, FAR
const char *fmt, va_list ap);
416 int statfs(FAR
const char *path, FAR
struct statfs *buf);
420 FAR
char *tmpnam(FAR
char *s);
424 FAR
char *tempnam(FAR
const char *dir, FAR
const char *pfx);
430 #if defined(__cplusplus) size_t fread(FAR void *ptr, size_t size, size_t n_items, FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int ungetc(int c, FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sscanf(FAR const char *buf, FAR const char *fmt,...)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR char * gets_s(FAR char *s, rsize_t n)
reads a line from stdin into the buffer
int vprintf(FAR const char *format, va_list ap)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fflush(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int ferror(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fclose(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fseek(FAR FILE *stream, long int offset, int whence)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vsnprintf(FAR char *buf, size_t size, const char *format, va_list ap)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void perror(FAR const char *s)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int puts(FAR const char *s)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fprintf(FAR FILE *stream, FAR const char *format,...)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int asprintf(FAR char **ptr, FAR const char *fmt,...)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int printf(FAR const char *format,...)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fgetc(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR FILE * fdopen(int fd, FAR const char *type)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fputc(int c, FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vfprintf(FAR FILE *stream, const char *format, va_list ap)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
long ftell(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vsscanf(FAR const char *buf, FAR const char *s, va_list ap)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int snprintf(FAR char *buf, size_t size, FAR const char *format,...)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR FILE * fopen(FAR const char *path, FAR const char *type)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fsetpos(FAR FILE *stream, FAR fpos_t *pos)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fileno(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR char * gets(FAR char *s)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fgetpos(FAR FILE *stream, FAR fpos_t *pos)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sprintf(FAR char *buf, FAR const char *format,...)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
size_t fwrite(FAR const void *ptr, size_t size, size_t n_items, FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
char * fgets(FAR char *s, int n, FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int feof(FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int fputs(FAR const char *s, FAR FILE *stream)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int vsprintf(FAR char *buf, const char *format, va_list ap)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)