Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/coroutine/.expect/fmtLines.txt

    r200fcb3 r58b6d1b  
    1616difi  ed B  y :   Pete  r A. 
    1717 Buh  r//   Last   Mod  ifie 
    18 d On   : T  ue D  ec 1  1 23 
    19 :31:  12 2  018/  / Up  date 
    20  Cou  nt       :   32/  /#in 
     18d On   : M  on S  ep 1  8 11 
     19:35:  57 2  017/  / Up  date 
     20 Cou  nt       :   31/  /#in 
    2121clud  e <f  stre  am.h  fa># 
    2222incl  ude   <cor  outi  ne.h 
     
    3434t )   {      if   ( fm  t.g   
    3535!= 0   ||   fmt.  b !=   0 ) 
    36  sou  t |   nl;}  void   mai 
    37 n( F  orma  t &   fmt   ) {       
    38 for   ( ;;   ) {                                                                 
    39                 //   for   as   many   cha 
    40 ract  ers               for   ( f  mt.g 
    41  = 0  ; fm  t.g   < 5;   fmt 
    42 .g +  = 1   ) {         //   grou 
    43 ps o  f 5   bloc  ks                    for 
    44  ( f  mt.b   = 0  ; fm  t.b   
    45 < 4;   fmt  .b +  = 1   ) {       
    46 // b  lock  s of   4 c  hara 
    47 cter  s                         for   ( ;  ; )   
    48 {                                                         // f  or n  ewli 
    49 ne c  hara  cter  s                                     su 
    50 spen  d();                                      if   ( fm 
    51 t.ch   !=   '\n'   ) b  reak 
    52 ;               /  / ig  nore   new  line 
    53                                   } //   for                              sout 
    54  | f  mt.c  h;                                                  //   
    55 prin  t ch  arac  ter                   }   
    56 // f  or                        sou  t |   "  " 
    57 ;                                                               //   prin  t bl 
    58 ock   sepa  rato  r             }   //   
    59 for             sou  t |   nl;                                   
    60                                   // p  rint   gro  up s 
    61 epar  ator      } /  / fo  r} / 
    62 / ma  invo  id p  rt(   Form 
    63 at &   fmt  , ch  ar c  h )   
    64 {      fmt  .ch   = ch  ;     
    65  res  ume(   fmt   );}   //   
    66 prti  nt m  ain(  ) {     Form 
    67 at f  mt;         char   ch;    for 
    68  ( ;  ; )   {           s  in |   ch; 
    69                                                                                 //   rea  d on 
    70 e ch  arac  ter     if   ( e 
    71 of(   sin   ) )   brea  k;               
    72                                         //   eof   ?            p  rt(   
    73 fmt,   ch   );  }   //   for} 
    74  //   main  // L  ocal   Var 
    75 iabl  es:   ////   tab  -wid 
    76 th:   4 //  // c  ompi  le-c 
    77 omma  nd:   "cfa   fmt  Line 
    78 s.c"   ///  / En  d: /  /
     36 sou  t |   endl  ;}vo  id m 
     37ain(   For  mat   & fm  t )   
     38{       fo  r (   ;; )   {                                               
     39                                  // f  or a  s ma  ny c 
     40hara  cter  s           f  or (   fmt 
     41.g =   0;   fmt.  g <   5; f 
     42mt.g   +=   1 )   {             /  / gr 
     43oups   of   5 bl  ocks                          f 
     44or (   fmt  .b =   0;   fmt. 
     45b <   4; f  mt.b   +=   1 )   
     46{       //   blo  cks   of 4   cha 
     47ract  ers                               f  or (   ;;   
     48) {                                                     //   for   new 
     49line   cha  ract  ers                                     
     50susp  end(  );                                  i  f (   
     51fmt.  ch !  = '\  n' )   bre 
     52ak;             //   igno  re n  ewli 
     53ne                              }   // f  or                            so 
     54ut |   fmt  .ch;                                                        / 
     55/ pr  int   char  acte  r                         
     56} //   for                      s  out   | "   
     57 ";                                                             /  / pr  int   
     58bloc  k se  para  tor           } / 
     59/ fo  r         s  out   | en  dl;       
     60                                                                  // p  rint   gro 
     61up s  epar  ator        } /  / fo 
     62r} /  / ma  invo  id p  rt(   
     63Form  at &   fmt  , ch  ar c 
     64h )   {      fmt  .ch   = ch 
     65;      res  ume(   fmt   );} 
     66 //   prti  nt m  ain(  ) {       
     67Form  at f  mt;   char   ch; 
     68        for   ( ;  ; )   {              s  in | 
     69 ch;                                                                            //   rea 
     70d on  e ch  arac  ter       if 
     71 ( e  of(   sin   ) )   brea 
     72k;                                                      //   eof   ?            p 
     73rt(   fmt,   ch   );    }   //   
     74for}   //   main  // L  ocal 
     75 Var  iabl  es:   ////   tab 
     76-wid  th:   4 //  // c  ompi 
     77le-c  omma  nd:   "cfa   fmt 
     78Line  s.c"   ///  / En  d: / 
     79/
Note: See TracChangeset for help on using the changeset viewer.