Changeset 200fcb3 for tests/coroutine/.expect
- Timestamp:
- Dec 12, 2018, 9:16:12 AM (5 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/coroutine/.expect/fmtLines.txt
r3d99498 r200fcb3 16 16 difi ed B y : Pete r A. 17 17 Buh r// Last Mod ifie 18 d On : M on S ep 1 8 1119 :3 5: 57 2 017/ / Up date20 Cou nt : 3 1/ /#in18 d On : T ue D ec 1 1 23 19 :31: 12 2 018/ / Up date 20 Cou nt : 32/ /#in 21 21 clud e <f stre am.h fa># 22 22 incl ude <cor outi ne.h … … 34 34 t ) { if ( fm t.g 35 35 != 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 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: / /
Note: See TracChangeset
for help on using the changeset viewer.