source: src/libcfa/fstream @ 168c007

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 168c007 was 6152c81, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

fix type of sepDefault

  • Property mode set to 100644
File size: 1.7 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  7 14:48:08 2017
13// Update Count     : 91
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        char separator[separateSize];
27}; // ofstream
28
29_Bool sepPrt( ofstream * );
30void sepOn( ofstream * );
31void sepOff( ofstream * );
32void sepReset( ofstream * );
33void sepReset( ofstream *, _Bool );
34const char * sepGet( ofstream * );
35void sepSet( ofstream *, const char * );
36_Bool sepDisable( ofstream * );
37_Bool sepEnable( ofstream * );
38
39int fail( ofstream * );
40int flush( ofstream * );
41void open( ofstream *, const char * name, const char * mode );
42void close( ofstream * );
43ofstream * write( ofstream *, const char * data, unsigned long int size );
44int prtfmt( ofstream *, const char fmt[], ... );
45
46extern ofstream * sout, * serr;
47
48// implement context istream
49struct ifstream {
50        void *file;
51}; // ifstream
52
53int fail( ifstream * is );
54int eof( ifstream * is );
55void open( ifstream * is, const char * name, const char * mode );
56void close( ifstream * is );
57ifstream * read( ifstream * is, char * data, unsigned long int size );
58ifstream * ungetc( ifstream * is, char c );
59int scanfmt( ifstream *, const char fmt[], ... );
60
61extern ifstream *sin;
62
63#endif // __FSTREAM_H__
64
65// Local Variables: //
66// mode: c //
67// tab-width: 4 //
68// End: //
Note: See TracBrowser for help on using the repository browser.