Changeset 90c3b1c for src/libcfa/fstream


Ignore:
Timestamp:
Mar 2, 2016, 4:59:19 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:
bdad1679
Parents:
ac1ed49
Message:

compile CFA with C++11, further update refrat with lstlisting macros, support varags, enumeration initialization, add implicit separators to output streams, update example programs that print

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/fstream

    rac1ed49 r90c3b1c  
    77// fstream --
    88//
    9 // Author           : Richard C. Bilson
     9// Author           : Peter A. Buhr
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 17 14:02:01 2016
    13 // Update Count     : 22
     12// Last Modified On : Wed Mar  2 15:08:14 2016
     13// Update Count     : 78
    1414//
    1515
     
    1919#include "iostream"
    2020
    21 // implement context ostream
    22 struct ofstream;
     21enum { separateSize = 16 };
     22struct ofstream { void *file; int separate; char separator[separateSize]; };
    2323
    24 int fail( ofstream * os );
    25 int flush( ofstream * os );
    26 void open( ofstream ** os, const char * name, const char * mode );
    27 void close( ofstream * os );
    28 ofstream * write( ofstream * os, const char * data, streamsize_type size );
     24_Bool sepPrt( ofstream * );
     25void sepOn( ofstream * );
     26void sepOff( ofstream * );
     27void sepSet( ofstream *, const char * );
     28const char * sepGet( ofstream * );
     29void sepDisable( ofstream * );
     30void sepEnable( ofstream * );
     31int fail( ofstream * );
     32int flush( ofstream * );
     33void open( ofstream *, const char * name, const char * mode );
     34void close( ofstream * );
     35ofstream * write( ofstream *, const char * data, unsigned long int size );
     36int prtfmt( ofstream *, const char fmt[], ... );
    2937
    3038extern ofstream * sout, * serr;
    3139
    3240// implement context istream
    33 struct ifstream;
     41struct ifstream { void *file; };
    3442
    3543int fail( ifstream * is );
    3644int eof( ifstream * is );
    37 void open( ifstream ** is, const char * name, const char * mode );
     45void open( ifstream * is, const char * name, const char * mode );
    3846void close( ifstream * is );
    39 ifstream * get( ifstream * is, int * data );
    40 ifstream * read( ifstream * is, char * data, streamsize_type size );
     47ifstream * read( ifstream * is, char * data, unsigned long int size );
    4148ifstream * ungetc( ifstream * is, char c );
     49int scanfmt( ifstream *, const char fmt[], ... );
    4250
    4351extern ifstream *sin;
     
    4957// tab-width: 4 //
    5058// End: //
     59
Note: See TracChangeset for help on using the changeset viewer.