source: src/libcfa/fstream @ a4943d8c

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since a4943d8c was 9ebd778, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

code formatting

  • Property mode set to 100644
File size: 1.9 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// fstream --
8//
9// Author           : Peter A. Buhr
10// Created On       : Wed May 27 17:56:53 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Mon May 15 18:11:09 2017
13// Update Count     : 104
14//
15
16#ifndef __FSTREAM_H__
17#define __FSTREAM_H__
18
19#include "iostream"
20
21enum { separateSize = 16 };
22struct ofstream {
23        void * file;
24        _Bool sepDefault;
25        _Bool sepOnOff;
26        const char * sepCur;
27        char separator[separateSize];
28        char tupleSeparator[separateSize];
29}; // ofstream
30
31// private
32_Bool sepPrt( ofstream * );
33void sepReset( ofstream * );
34void sepReset( ofstream *, _Bool );
35const char * sepGetCur( ofstream * );
36void sepSetCur( ofstream *, const char * );
37
38// public
39void sepOn( ofstream * );
40void sepOff( ofstream * );
41_Bool sepDisable( ofstream * );
42_Bool sepEnable( ofstream * );
43
44const char * sepGet( ofstream * );
45void sepSet( ofstream *, const char * );
46const char * sepGetTuple( ofstream * );
47void sepSetTuple( ofstream *, const char * );
48
49int fail( ofstream * );
50int flush( ofstream * );
51void open( ofstream *, const char * name, const char * mode );
52void close( ofstream * );
53ofstream * write( ofstream *, const char * data, unsigned long int size );
54int fmt( ofstream *, const char fmt[], ... );
55
56void ?{}( ofstream * );
57
58extern ofstream * sout, * serr;
59
60// implement context istream
61struct ifstream {
62        void * file;
63}; // ifstream
64
65int fail( ifstream * is );
66int eof( ifstream * is );
67void open( ifstream * is, const char * name, const char * mode );
68void close( ifstream * is );
69ifstream * read( ifstream * is, char * data, unsigned long int size );
70ifstream * ungetc( ifstream * is, char c );
71int fmt( ifstream *, const char fmt[], ... );
72
73extern ifstream * sin;
74
75#endif // __FSTREAM_H__
76
77// Local Variables: //
78// mode: c //
79// tab-width: 4 //
80// End: //
Note: See TracBrowser for help on using the repository browser.