ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since a42a654 was
58b6d1b,
checked in by Thierry Delisle <tdelisle@…>, 6 years ago
|
Fixed tests after headers change
|
-
Property mode set to
100644
|
File size:
2.4 KB
|
Line | |
---|
1 | //// Cfo rall Ver sion |
---|
2 | 1.0 .0 C opyr ight (C) |
---|
3 | 201 7 Un iver sity of |
---|
4 | Wate rloo //// The con |
---|
5 | tent s of thi s fi le a |
---|
6 | re c over ed u nder the |
---|
7 | lic ence agr eeme nt i |
---|
8 | n th e// file "LI CENC |
---|
9 | E" d istr ibut ed w ith |
---|
10 | Cfor all. //// fmt Line |
---|
11 | s.cc --/ /// Auth or |
---|
12 | : P eter A. |
---|
13 | Buhr // C reat ed O n |
---|
14 | : Su n Se p 17 21: |
---|
15 | 56:1 5 20 17// Las t Mo |
---|
16 | difi ed B y : Pete r A. |
---|
17 | 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 |
---|
21 | clud e <f stre am.h fa># |
---|
22 | incl ude <cor outi ne.h |
---|
23 | fa>c orou tine For mat |
---|
24 | { ch ar c h; |
---|
25 | // used for com muni |
---|
26 | cati on i nt g , b; |
---|
27 | / / gl obal bec |
---|
28 | ause use d in des truc |
---|
29 | tor} ;voi d ?{ }( F orma |
---|
30 | t & fmt ) { r esum |
---|
31 | e( f mt ) ; / |
---|
32 | / st art coro utin e}vo |
---|
33 | id ^ ?{}( For mat & fm |
---|
34 | t ) { if ( fm t.g |
---|
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 | / |
---|
Note: See
TracBrowser
for help on using the repository browser.