Changeset 6545adff
- Timestamp:
 - Oct 7, 2017, 5:59:31 PM (8 years ago)
 - Branches:
 - ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
 - Children:
 - b8a17e2
 - Parents:
 - 6bbce58
 - File:
 - 
      
- 1 edited
 
- 
          
  src/tests/fmtLines.c (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
src/tests/fmtLines.c
r6bbce58 r6545adff 10 10 // Created On : Sun Sep 17 21:56:15 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 18 11:35:57201713 // Update Count : 3 112 // Last Modified On : Sun Oct 1 11:57:19 2017 13 // Update Count : 34 14 14 // 15 15 … … 23 23 24 24 void ?{}( Format & fmt ) { 25 resume( fmt ); // startcoroutine25 resume( fmt ); // prime (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; 54 Format fmt; // format characters into blocks of 4 and groups of 5 blocks per line 55 55 char ch; 56 56 57 for ( ;; ) {57 Eof: for ( ;; ) { // read until end of file 58 58 sin | ch; // read one character 59 if ( eof( sin ) ) break ;// eof ?60 prt( fmt, ch ); 59 if ( eof( sin ) ) break Eof; // eof ? 60 prt( fmt, ch ); // push character for formatting 61 61 } // for 62 62 } // main  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.