Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/fmtLines.c

    r6545adff re06be49  
    1010// Created On       : Sun Sep 17 21:56:15 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Oct  1 11:57:19 2017
    13 // Update Count     : 34
     12// Last Modified On : Mon Sep 18 11:35:57 2017
     13// Update Count     : 31
    1414//
    1515
     
    2323
    2424void ?{}( Format & fmt ) {
    25         resume( fmt );                                                                          // prime (start) coroutine
     25    resume( fmt );                                                                              // start coroutine
    2626}
    2727
    2828void ^?{}( Format & fmt ) {
    29         if ( fmt.g != 0 || fmt.b != 0 ) sout | endl;
     29    if ( fmt.g != 0 || fmt.b != 0 ) sout | endl;
    3030}
    3131
     
    4747
    4848void prt( Format & fmt, char ch ) {
    49         fmt.ch = ch;
    50         resume( fmt );
     49    fmt.ch = ch;
     50    resume( fmt );
    5151} // prt
    5252
    5353int main() {
    54         Format fmt;                                                                                     // format characters into blocks of 4 and groups of 5 blocks per line
     54        Format fmt;
    5555        char ch;
    5656
    57         Eof: for ( ;; ) {                                                                       // read until end of file
     57        for ( ;; ) {
    5858                sin | ch;                                                                               // read one character
    59           if ( eof( sin ) ) break Eof;                                          // eof ?
    60                 prt( fmt, ch );                                                                 // push character for formatting
     59          if ( eof( sin ) ) break;                                                      // eof ?
     60                prt( fmt, ch );
    6161        } // for
    6262} // main
Note: See TracChangeset for help on using the changeset viewer.