Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/stdio.h

    rbc56f30 r4805495  
    3737#define _LIBC_STDIO_H_
    3838
     39#ifdef __cplusplus
     40extern "C" {
     41#endif
     42
     43#include <offset.h>
    3944#include <stdarg.h>
    4045#include <io/verify.h>
     
    4348#include <_bits/wchar_t.h>
    4449#include <_bits/wint_t.h>
    45 #include <_bits/decls.h>
     50
     51/** Forward declaration */
     52struct _IO_FILE;
     53typedef struct _IO_FILE FILE;
     54
     55/** File position */
     56typedef struct {
     57        off64_t pos;
     58} fpos_t;
    4659
    4760#ifndef _HELENOS_SOURCE
     
    5770
    5871/** Max number of files that is guaranteed to be able to open at the same time */
    59 #define FOPEN_MAX 16
     72#define FOPEN_MAX VFS_MAX_OPEN_FILES
    6073
    6174/** Recommended size of fixed-size array for holding file names. */
     
    7992/** Minimum number of unique temporary file names */
    8093#define TMP_MAX 1000000
    81 
    82 __C_DECLS_BEGIN;
    83 
    84 /** Forward declaration */
    85 struct _IO_FILE;
    86 typedef struct _IO_FILE FILE;
    87 
    88 /** File position */
    89 typedef struct {
    90         long long pos;
    91 } fpos_t;
    9294
    9395extern FILE *stdin;
     
    9698
    9799/* Character and string input functions */
     100#define getc fgetc
    98101extern int fgetc(FILE *);
    99102extern char *fgets(char *, int, FILE *);
    100103extern char *gets(char *, size_t) __attribute__((deprecated));
    101104
    102 static inline int getc(FILE *f)
    103 {
    104         return fgetc(f);
    105 }
    106 
    107105extern int getchar(void);
    108106
    109107/* Character and string output functions */
     108#define putc fputc
    110109extern int fputc(int, FILE *);
    111110extern int fputs(const char *, FILE *);
    112 
    113 static inline int putc(int i, FILE *f)
    114 {
    115         return fputc(i, f);
    116 }
    117111
    118112extern int putchar(int);
     
    186180extern char *tmpnam(char *s);
    187181
    188 __C_DECLS_END;
    189 
    190182#ifdef _HELENOS_SOURCE
    191183
    192 #include <_bits/off64_t.h>
    193 
    194 __HELENOS_DECLS_BEGIN;
    195 
    196184/* Nonstandard extensions. */
    197185
    198 enum __buffer_type {
     186enum _buffer_type {
    199187        /** No buffering */
    200188        _IONBF,
     
    205193};
    206194
     195enum _buffer_state {
     196        /** Buffer is empty */
     197        _bs_empty,
     198
     199        /** Buffer contains data to be written */
     200        _bs_write,
     201
     202        /** Buffer contains prefetched data for reading */
     203        _bs_read
     204};
     205
    207206extern int vprintf_length(const char *, va_list);
    208207extern int printf_length(const char *, ...)
     
    211210extern int fileno(FILE *);
    212211
     212#include <offset.h>
     213
    213214extern int fseek64(FILE *, off64_t, int);
    214215extern off64_t ftell64(FILE *);
    215216
    216 __HELENOS_DECLS_END;
     217#endif
     218
     219#ifdef __cplusplus
     220}
    217221#endif
    218222
Note: See TracChangeset for help on using the changeset viewer.