Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdio.h

    r221afc9e r59f799b  
    3939#include "libc/stdio.h"
    4040#include "sys/types.h"
    41 #include "libc/stdarg.h"
    42 #include "limits.h"
    4341
    44 /* Identifying the Terminal */
    45 #undef L_ctermid
    46 #define L_ctermid PATH_MAX
    47 extern char *posix_ctermid(char *s);
    48 
    49 /* Error Recovery */
    50 extern void posix_clearerr(FILE *stream);
    51 
    52 /* Input/Output */
    53 #undef putc
     42/* Character Input/Output */
    5443#define putc fputc
    55 extern int posix_fputs(const char *restrict s, FILE *restrict stream);
    56 #undef getc
    5744#define getc fgetc
    5845extern int posix_ungetc(int c, FILE *stream);
    59 extern ssize_t posix_getdelim(char **restrict lineptr, size_t *restrict n,
    60     int delimiter, FILE *restrict stream);
    61 extern ssize_t posix_getline(char **restrict lineptr, size_t *restrict n,
    62     FILE *restrict stream);
    6346
    6447/* Opening Streams */
    65 extern FILE *posix_freopen(const char *restrict filename,
    66     const char *restrict mode, FILE *restrict stream);
    67 extern FILE *posix_fmemopen(void *restrict buf, size_t size,
    68     const char *restrict mode);
    69 extern FILE *posix_open_memstream(char **bufp, size_t *sizep);
     48extern FILE *posix_freopen(
     49   const char *restrict filename,
     50   const char *restrict mode,
     51   FILE *restrict stream);
    7052
    7153/* Error Messages */
     
    7355
    7456/* File Positioning */
    75 typedef struct _posix_fpos posix_fpos_t;
    76 extern int posix_fsetpos(FILE *stream, const posix_fpos_t *pos);
    77 extern int posix_fgetpos(FILE *restrict stream, posix_fpos_t *restrict pos);
    78 extern int posix_fseek(FILE *stream, long offset, int whence);
    7957extern int posix_fseeko(FILE *stream, posix_off_t offset, int whence);
    80 extern long posix_ftell(FILE *stream);
    8158extern posix_off_t posix_ftello(FILE *stream);
    8259
    83 /* Flushing Buffers */
    84 extern int posix_fflush(FILE *stream);
    85 
    86 /* Formatted Output */
    87 extern int posix_dprintf(int fildes, const char *restrict format, ...)
    88     PRINTF_ATTRIBUTE(2, 3);
    89 extern int posix_vdprintf(int fildes, const char *restrict format, va_list ap);
    90 extern int posix_sprintf(char *restrict s, const char *restrict format, ...)
    91     PRINTF_ATTRIBUTE(2, 3);
    92 extern int posix_vsprintf(char *restrict s, const char *restrict format, va_list ap);
    93 
    94 /* Formatted Input */
    95 extern int posix_fscanf(
    96     FILE *restrict stream, const char *restrict format, ...);
    97 extern int posix_vfscanf(
    98     FILE *restrict stream, const char *restrict format, va_list arg);
    99 extern int posix_scanf(const char *restrict format, ...);
    100 extern int posix_vscanf(const char *restrict format, va_list arg);
    101 extern int posix_sscanf(
    102     const char *restrict s, const char *restrict format, ...);
    103 extern int posix_vsscanf(
    104     const char *restrict s, const char *restrict format, va_list arg);
    105 
    106 /* File Locking */
    107 extern void posix_flockfile(FILE *file);
    108 extern int posix_ftrylockfile(FILE *file);
    109 extern void posix_funlockfile(FILE *file);
    110 extern int posix_getc_unlocked(FILE *stream);
    111 extern int posix_getchar_unlocked(void);
    112 extern int posix_putc_unlocked(int c, FILE *stream);
    113 extern int posix_putchar_unlocked(int c);
    114 
    115 /* Deleting Files */
    116 extern int posix_remove(const char *path);
    117 
    118 /* Temporary Files */
    119 #undef L_tmpnam
    120 #define L_tmpnam PATH_MAX
    121 extern char *posix_tmpnam(char *s);
     60/* Formatted Input/Output */
     61extern int posix_sprintf(char *restrict s, const char *restrict format, ...);
     62extern int posix_sscanf(const char *restrict s, const char *restrict format, ...);
    12263
    12364#ifndef LIBPOSIX_INTERNAL
    124         #define ctermid posix_ctermid
    125 
    126         #define clearerr posix_clearerr
    127 
    128         #define fputs posix_fputs
    12965        #define ungetc posix_ungetc
    130         #define getdelim posix_getdelim
    131         #define getline posix_getline
    13266
    13367        #define freopen posix_freopen
    134         #define fmemopen posix_fmemopen
    135         #define open_memstream posix_open_memstream
    13668
    13769        #define perror posix_perror
    13870
    139         #define fpos_t posix_fpos_t
    140         #define fsetpos posix_fsetpos
    141         #define fgetpos posix_fgetpos
    142         #define fseek posix_fseek
    14371        #define fseeko posix_fseeko
    144         #define ftell posix_ftell
    14572        #define ftello posix_ftello
    14673
    147         #define fflush posix_fflush
    148 
    149         #define dprintf posix_dprintf
    150         #define vdprintf posix_vdprintf
    15174        #define sprintf posix_sprintf
    152         #define vsprintf posix_vsprintf
    153 
    154         #define fscanf posix_fscanf
    155         #define vfscanf posix_vfscanf
    156         #define vscanf posix_vscanf
    157         #define scanf posix_scanf
    15875        #define sscanf posix_sscanf
    159         #define vsscanf posix_vsscanf
    160 
    161         #define flockfile posix_flockfile
    162         #define ftrylockfile posix_ftrylockfile
    163         #define funlockfile posix_funlockfile
    164 
    165         #define getc_unlocked posix_getc_unlocked
    166         #define getchar_unlocked posix_getchar_unlocked
    167         #define putc_unlocked posix_putc_unlocked
    168         #define putchar_unlocked posix_putchar_unlocked
    169 
    170         #define remove posix_remove
    171 
    172         #define tmpnam posix_tmpnam
    17376#endif
    17477
Note: See TracChangeset for help on using the changeset viewer.