ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 3b0c8cb was
f8cd310,
checked in by Peter A. Buhr <pabuhr@…>, 6 years ago
|
update file names in emacs compile directive
|
-
Property mode set to
100644
|
File size:
2.4 KB
|
Rev | Line | |
---|
[58b6d1b] | 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 |
---|
[f8cd310] | 18 | d On : F ri M ar 2 2 13 |
---|
| 19 | :41: 03 2 019/ / Up date |
---|
| 20 | Cou nt : 33/ /#in |
---|
[58b6d1b] | 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 ) |
---|
[200fcb3] | 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 |
---|
[f8cd310] | 78 | s.cf a" / /// End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.