Description: – A sample substitution file, named mailing-list. Each addressee begins with a line
that says “NEW”.
– A template letter (template). Each substitution rule will contain a colon if it
doesn’t, ignore it.
– Two sample letters, the results of applying the substitution rules to the template
letter (sample1 and sample2).
Mail Generation Steps
• Step 1: Convert all tags in the template to their plaintext equivalent, according to the
substitution rules in the mailing-list. Tags will be nonempty strings of characters
surrounded by a pair of ^ characters. Tags that do not match any substitution should
be removed, i.e., replaced by the empty string. If you encounter the string “^^”, it is
not a tag, but should be replaced by a single ^. A ^ which is unmatched on the same
line should be reported as an error, and the program terminated.
• Step 2: Eliminate all extraneous spaces. Specifically:
– spaces at the beginning of a line should be removed
– spaces at the end of
To Search:
File list (Check if you may need any files):
maillist
........\mailing-list
........\maillist.c
........\maillist.c.bak
........\maillist.h
........\makefile
........\template