Changeset 6ba0659 for src/libcfa/fstream


Ignore:
Timestamp:
Feb 17, 2016, 2:22:22 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
658f6de0
Parents:
52f85e0
Message:

major rewrite of I/O library and update example programs to use new I/O

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/fstream

    r52f85e0 r6ba0659  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 27 23:47:41 2016
    13 // Update Count     : 3
     12// Last Modified On : Wed Feb 17 14:02:01 2016
     13// Update Count     : 22
    1414//
    1515
     
    1919#include "iostream"
    2020
    21 typedef struct ofstream ofstream;
     21// implement context ostream
     22struct ofstream;
    2223
    23 // implement context ostream
    24 ofstream *write( ofstream *, const char *, streamsize_type );
    25 int fail( ofstream * );
     24int fail( ofstream * os );
     25int flush( ofstream * os );
     26void open( ofstream ** os, const char * name, const char * mode );
     27void close( ofstream * os );
     28ofstream * write( ofstream * os, const char * data, streamsize_type size );
    2629
    27 ofstream *ofstream_stdout();
    28 ofstream *ofstream_stderr();
    29 ofstream *ofstream_fromfile( const char *name );
    30 void ofstream_close( ofstream *os );
    31 
    32 typedef struct ifstream ifstream;
     30extern ofstream * sout, * serr;
    3331
    3432// implement context istream
    35 ifstream *read( ifstream *, char *, streamsize_type );
    36 ifstream *unread( ifstream *, char );
    37 int fail( ifstream * );
    38 int eof( ifstream * );
     33struct ifstream;
    3934
    40 ifstream *ifstream_stdin();
    41 ifstream *ifstream_fromfile( const char *name );
     35int fail( ifstream * is );
     36int eof( ifstream * is );
     37void open( ifstream ** is, const char * name, const char * mode );
     38void close( ifstream * is );
     39ifstream * get( ifstream * is, int * data );
     40ifstream * read( ifstream * is, char * data, streamsize_type size );
     41ifstream * ungetc( ifstream * is, char c );
     42
     43extern ifstream *sin;
    4244
    4345#endif // __FSTREAM_H__
Note: See TracChangeset for help on using the changeset viewer.