Changeset 371bd7d in mainline for uspace/lib/c/include/stdio.h


Ignore:
Timestamp:
2010-03-27T09:22:17Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36a75a2
Parents:
cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

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

    rcd82bb1 r371bd7d  
    3838#include <sys/types.h>
    3939#include <stdarg.h>
    40 #include <string.h>
     40#include <str.h>
    4141#include <adt/list.h>
    4242
     
    4646#define BUFSIZ  4096
    4747
    48 #define DEBUG(fmt, ...) \
     48#define DEBUG(fmt, ...)se\
    4949        { \
    5050                char _buf[256]; \
     
    5656#ifndef SEEK_SET
    5757        #define SEEK_SET  0
     58#endif
     59
     60#ifndef SEEK_CUR
    5861        #define SEEK_CUR  1
     62#endif
     63
     64#ifndef SEEK_END
    5965        #define SEEK_END  2
    6066#endif
     
    6773        /** Full buffering */
    6874        _IOFBF
     75};
     76
     77enum _buffer_state {
     78        /** Buffer is empty */
     79        _bs_empty,
     80
     81        /** Buffer contains data to be written */
     82        _bs_write,
     83
     84        /** Buffer contains prefetched data for reading */
     85        _bs_read
    6986};
    7087
     
    88105        int phone;
    89106
     107        /**
     108         * Non-zero if the stream needs sync on fflush(). XXX change
     109         * console semantics so that sync is not needed.
     110         */
     111        int need_sync;
     112
    90113        /** Buffering type */
    91114        enum _buffer_type btype;
     115
    92116        /** Buffer */
    93117        uint8_t *buf;
     118
    94119        /** Buffer size */
    95120        size_t buf_size;
     121
     122        /** Buffer state */
     123        enum _buffer_state buf_state;
     124
    96125        /** Buffer I/O pointer */
    97126        uint8_t *buf_head;
     127
     128        /** Points to end of occupied space when in read mode. */
     129        uint8_t *buf_tail;
    98130} FILE;
    99131
     
    104136/* Character and string input functions */
    105137extern int fgetc(FILE *);
    106 extern char *fgets(char *, size_t, FILE *);
     138extern char *fgets(char *, int, FILE *);
    107139
    108140extern int getchar(void);
     
    135167extern size_t fwrite(const void *, size_t, size_t, FILE *);
    136168
    137 extern int fseek(FILE *, long, int);
     169extern int fseek(FILE *, off64_t, int);
    138170extern void rewind(FILE *);
    139 extern int ftell(FILE *);
     171extern off64_t ftell(FILE *);
    140172extern int feof(FILE *);
    141173
Note: See TracChangeset for help on using the changeset viewer.