Changes in / [224e52f:8a34677]
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/rational.c
r224e52f r8a34677 11 11 // Created On : Mon Mar 28 08:43:12 2016 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Thu Apr 7 17:25:44201614 // Update Count : 2013 // Last Modified On : Wed Apr 6 18:02:02 2016 14 // Update Count : 19 15 15 // 16 16 17 17 #include <limits> 18 18 #include <rational> 19 #include <fstream>20 19 21 20 int main() { -
src/libcfa/limits.c
r224e52f r8a34677 10 10 // Created On : Wed Apr 6 18:06:52 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Apr 7 17:18:45201613 // Update Count : 1 112 // Last Modified On : Wed Apr 6 21:12:17 2016 13 // Update Count : 10 14 14 // 15 15 16 #include "limits"16 #include <limits> 17 17 18 18 // Integral Constants -
src/libcfa/rational
r224e52f r8a34677 10 10 // Created On : Wed Apr 6 17:56:25 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Apr 7 17:23:36201613 // Update Count : 912 // Last Modified On : Wed Apr 6 21:51:42 2016 13 // Update Count : 8 14 14 // 15 15 16 #include "iostream"16 #include <fstream> 17 17 18 18 struct Rational { … … 44 44 double widen( Rational r ); 45 45 Rational narrow( double f, long int md ); 46 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, Rational *);47 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, Rational);46 ifstream * ?|?( ifstream *is, Rational *r ); 47 ofstream * ?|?( ofstream *os, Rational r ); 48 48 49 49 // Local Variables: // -
src/libcfa/rational.c
r224e52f r8a34677 11 11 // Created On : Wed Apr 6 17:54:28 2016 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Thu Apr 7 17:28:03201614 // Update Count : 1213 // Last Modified On : Wed Apr 6 21:52:16 2016 14 // Update Count : 7 15 15 // 16 16 17 17 #include "rational" 18 #include "fstream"19 #include "stdlib"18 #include <fstream> 19 #include <stdlib> 20 20 21 21 extern "C" { … … 188 188 } // narrow 189 189 190 forall( dtype istype | istream( istype ) ) 191 istype * ?|?( istype *is, Rational *r ) { 190 ifstream * ?|?( ifstream *is, Rational *r ) { 192 191 long int t; 193 192 is | &(r->numerator) | &(r->denominator); … … 198 197 } // ?|? 199 198 200 forall( dtype ostype | ostream( ostype ) ) 201 ostype * ?|?( ostype *os, Rational r ) { 199 ofstream * ?|?( ofstream *os, Rational r ) { 202 200 return os | r.numerator | '/' | r.denominator; 203 201 } // ?|?
Note: See TracChangeset
for help on using the changeset viewer.