New tiny-c Programming Group "assignment!"

Write a Mail merge program in tiny-c.

Test your program using the following template file.


$1

Dear $2,

	On behalf of $3, I would like to thank you for your generous gift of
$4 dollars. The $5 is well on its way toward its goal of one-thousand
dollars.

	The support shown by all those who donated has been phenomenal. We
will be contacting you in the Spring to let you know when the dedication
ceremony will take place.

	Again, thank you very, very much.

Sincerely,

PS

$6


Here is a data file with date, name, organization, amount, fund and "PS" values.


2/28/2010,Ramblin Roger,Pretty Good Privacy,200,Awesome Algorithm Trophy fund,Keep ramblin'!
2/12/2010,Ajax Amrit,Pretty Good Privacy,100,Awesome Algorithm Trophy fund,Keep codin'!
2/12/2010,Ludicrous Lee,Pretty Good Privacy,105,Awesome Algorithm Trophy fund,Keep on keepin' on!
2/12/2010,Magical Mary,Pretty Good Privacy,105,Awesome Algorithm Trophy fund,Keep tutorin'
2/27/2010,Kingpin Ken,Pretty Good Privacy,25,Awesome Algorithm Trophy fund,Keep Perlin'!


Your program should read both the template and the data file and then
generate personalized output letter files. The letter to Kingpin Ken would
read:


2/27/2010

Dear Kingpin Ken,

	On behalf of Pretty Good Privacy, I would like to thank you for your generous gift of
25 dollars. The Awesome Algorithm Trophy fund has reached its goal of one-thousand dollars! We
actually went a little over and the excess will be added to the other
fund set up to help Eddie's family with expenses.

	The support shown by all those who donated has been phenomenal. I'll
be contacting you in the Spring to let you know when the dedication
ceremony will take place.

	Again, thank you very, very much.

Sincerely,



PS

Keep Perlin'!


As this is the first program you've been asked to write that involves
file I/O, the following links might help you.

m6069.html, m6069b.tc, M6069B.OUT, NH20KB.TXT



Spoiler. tc>.r mailmerg.tc 1386 0 47 1339 23161 tc>.mail "demo" mailmerg.tc - tct - 2/28/2010 please visit http://primepuzzle.com/tc/mail-merge.html file demo0.LTR written. file demo1.LTR written. file demo2.LTR written. file demo3.LTR written. file demo4.LTR written. tc> Source code: http://primepuzzle.com/tc/mailmerg.tc Mail data file: http://primepuzzle.com/tc/mail.dat Sample output letter: http://primepuzzle.com/tc/DEMO4.LTR