source: src/tests/coroutine/.expect/fmtLines.txt@ 4084928e

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

Moved expected files for concurrent:

  • Property mode set to 100644
File size: 2.4 KB
Line 
1// / / Cf oral l Ve rsio
2n 1. 0.0 Copy righ t (C
3) 20 17 U nive rsit y of
4 Wat erlo o/// / Th e co
5nten ts o f th is f ile
6are cove red unde r th
7e li cenc e ag reem ent
8in t he// fil e "L ICEN
9CE" dist ribu ted with
10 Cfo rall .// // f mtLi
11nes. cc - - // // Auth
12or : P eter
13 A. Buhr // C reat ed O
14n : Su n Se p 17
15 21: 56:1 5 20 17// Las
16t Mo difi ed B y : Pete
17r A. Buh r// Last Mod
18ifie d On : M on S ep 1
198 11 :35: 57 2 017/ / Up
20date Cou nt : 31/
21/ #i nclu de < fstr eam>
22#inc lude <co rout ine>
23coro utin e Fo rmat { c
24har ch; //
25 use d fo r co mmun icat
26ion int g, b ;
27 // g loba l be caus
28e us ed i n de stru ctor
29};vo id ? {}( Form at &
30 fmt ) { resu me(
31fmt ); // s
32tart cor outi ne}v oid
33^?{} ( Fo rmat & f mt )
34 { if ( f mt.g !=
350 || fmt .b ! = 0 ) so
36ut | end l;}v oid main
37( Fo rmat & f mt ) { f
38or ( ;; ) {
39 // for as m any char
40acte rs for ( fm t.g
41= 0; fmt .g < 5; fmt.
42g += 1 ) { // g roup
43s of 5 b lock s for
44( fm t.b = 0; fmt .b <
45 4; fmt. b += 1 ) { /
46/ bl ocks of 4 ch arac
47ters for ( ;; ) {
48 / / fo r ne wlin
49e ch arac ters sus
50pend (); if ( fmt
51.ch != ' \n' ) br eak;
52 // ign ore newl ine
53 } // for s out
54| fm t.ch ; // p
55rint cha ract er } /
56/ fo r sout | " ";
57 // p rint blo
58ck s epar ator } // f
59or sout | e ndl;
60 // prin t gr oup
61sepa rato r } // f or}
62// m ainv oid prt( For
63mat & fm t, c har ch )
64 { fm t.ch = c h;
65 re sume ( fm t ); } //
66 prt int main () { For
67mat fmt; cha r ch ; fo
68r ( ;; ) { sin | ch
69; / / re ad o
70ne c hara cter i f (
71eof( sin ) ) bre ak;
72 // eof ? prt(
73 fmt , ch ); } // for
74} // mai n// Loca l Va
75riab les: /// / ta b-wi
76dth: 4 / /// comp ile-
77comm and: "cf a fm tLin
78es.c " // // E nd: //
Note: See TracBrowser for help on using the repository browser.