Changes in src/tests/fmtLines.c [6545adff:e06be49]
- File:
-
- 1 edited
-
src/tests/fmtLines.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/fmtLines.c
r6545adff re06be49 10 10 // Created On : Sun Sep 17 21:56:15 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Oct 1 11:57:19201713 // Update Count : 3 412 // Last Modified On : Mon Sep 18 11:35:57 2017 13 // Update Count : 31 14 14 // 15 15 … … 23 23 24 24 void ?{}( Format & fmt ) { 25 resume( fmt ); // prime (start)coroutine25 resume( fmt ); // start coroutine 26 26 } 27 27 28 28 void ^?{}( Format & fmt ) { 29 if ( fmt.g != 0 || fmt.b != 0 ) sout | endl;29 if ( fmt.g != 0 || fmt.b != 0 ) sout | endl; 30 30 } 31 31 … … 47 47 48 48 void prt( Format & fmt, char ch ) { 49 fmt.ch = ch;50 resume( fmt );49 fmt.ch = ch; 50 resume( fmt ); 51 51 } // prt 52 52 53 53 int main() { 54 Format fmt; // format characters into blocks of 4 and groups of 5 blocks per line54 Format fmt; 55 55 char ch; 56 56 57 Eof: for ( ;; ) { // read until end of file57 for ( ;; ) { 58 58 sin | ch; // read one character 59 if ( eof( sin ) ) break Eof;// eof ?60 prt( fmt, ch ); // push character for formatting59 if ( eof( sin ) ) break; // eof ? 60 prt( fmt, ch ); 61 61 } // for 62 62 } // main
Note:
See TracChangeset
for help on using the changeset viewer.