文件名称:maillist
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 5kb
- 下载次数:
- 0次
- 提 供 者:
- 徐**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
用三个线程,第一个线程负责mailing-list和template的处理,就是把mailing-list里人的邮箱地址和人名之类的按照要求填进template里的模板里,
第二个是负责处理template里的空格的,多于一个的连续空格要变成一个,每行最后的空格要去掉,每行开头不能有空格
第三个就是处理?,。等标点符号后要有两个空格,,而且命令行输入一个X,每行超过X个字节后就要自动换行
输出就是要把mailing-list里的人的信息填入tempate后输出到文件mail00001,mail00002,·····等有几个人就要有几个文件-– 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
第二个是负责处理template里的空格的,多于一个的连续空格要变成一个,每行最后的空格要去掉,每行开头不能有空格
第三个就是处理?,。等标点符号后要有两个空格,,而且命令行输入一个X,每行超过X个字节后就要自动换行
输出就是要把mailing-list里的人的信息填入tempate后输出到文件mail00001,mail00002,·····等有几个人就要有几个文件-– 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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
maillist
........\mailing-list
........\maillist.c
........\maillist.c.bak
........\maillist.h
........\makefile
........\template
........\mailing-list
........\maillist.c
........\maillist.c.bak
........\maillist.h
........\makefile
........\template