source: tests/coroutine/.expect/fmtLines.txt@ 588c2b0

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr no_list persistent-indexer pthread-emulation qualifiedEnum stuck-waitfor-destruct
Last change on this file since 588c2b0 was 58b6d1b, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

Fixed tests after headers change

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[58b6d1b]1//// Cfo rall Ver sion
2 1.0 .0 C opyr ight (C)
3 201 7 Un iver sity of
4Wate rloo //// The con
5tent s of thi s fi le a
6re c over ed u nder the
7 lic ence agr eeme nt i
8n th e// file "LI CENC
9E" d istr ibut ed w ith
10Cfor all. //// fmt Line
11s.cc --/ /// Auth or
12 : P eter A.
13Buhr // C reat ed O n
14 : Su n Se p 17 21:
1556:1 5 20 17// Las t Mo
16difi ed B y : Pete r A.
17 Buh r// Last Mod ifie
18d On : M on S ep 1 8 11
19:35: 57 2 017/ / Up date
20 Cou nt : 31/ /#in
21clud e <f stre am.h fa>#
22incl ude <cor outi ne.h
23fa>c orou tine For mat
24{ ch ar c h;
25 // used for com muni
26cati on i nt g , b;
27 / / gl obal bec
28ause use d in des truc
29tor} ;voi d ?{ }( F orma
30t & fmt ) { r esum
31e( f mt ) ; /
32/ st art coro utin e}vo
33id ^ ?{}( For mat & fm
34t ) { if ( fm t.g
35!= 0 || fmt. b != 0 )
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 TracBrowser for help on using the repository browser.