Ignore:
Timestamp:
Dec 12, 2018, 9:16:12 AM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
5ebb1368
Parents:
3d99498
Message:

add auto newline to sout, change endl to nl

File:
1 edited

Legend:

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

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