source: src/libcfa/fstream @ e464759

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 e464759 was 829c907, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

add tuple separator to sout

  • 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 : Tue Mar 21 15:57:24 2017
13// Update Count     : 102
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_Bool sepPrt( ofstream * );
32void sepOn( ofstream * );
33void sepOff( ofstream * );
34void sepReset( ofstream * );
35void sepReset( ofstream *, _Bool );
36const char * sepGetCur( ofstream * );
37void sepSetCur( ofstream *, const char * );
38const char * sepGet( ofstream * );
39void sepSet( ofstream *, const char * );
40const char * sepGetTuple( ofstream * );
41void sepSetTuple( ofstream *, const char * );
42_Bool sepDisable( ofstream * );
43_Bool sepEnable( ofstream * );
44
45int fail( ofstream * );
46int flush( ofstream * );
47void open( ofstream *, const char * name, const char * mode );
48void close( ofstream * );
49ofstream * write( ofstream *, const char * data, unsigned long int size );
50int fmt( ofstream *, const char fmt[], ... );
51
52void ?{}( ofstream * );
53
54extern ofstream * sout, * serr;
55
56// implement context istream
57struct ifstream {
58        void * file;
59}; // ifstream
60
61int fail( ifstream * is );
62int eof( ifstream * is );
63void open( ifstream * is, const char * name, const char * mode );
64void close( ifstream * is );
65ifstream * read( ifstream * is, char * data, unsigned long int size );
66ifstream * ungetc( ifstream * is, char c );
67int fmt( ifstream *, const char fmt[], ... );
68
69extern ifstream * sin;
70
71#endif // __FSTREAM_H__
72
73// Local Variables: //
74// mode: c //
75// tab-width: 4 //
76// End: //
Note: See TracBrowser for help on using the repository browser.