Unlike the previous dequeue assignment, this assignment can actually used lists to good effect.
This is a two part problem: add a new command toreadmboxand modifyreadmboxso it can handle a more realistic form of mailboxes.The
deleteCommandThedeletecommand deletes messages from thereadmboxmessage list. Thedeletecommand format iswhere [ a ] means a is optional. The pair field word has the same search pattern interpretation it has for the thedelete[ field word ]ordercommand.The command
delete field worddeletes from the message list all messages that match the search pattern field word;deletedoesn't otherwise change or re-order the message list. For example, suppose the current state of the message list inreadmboxis1 2* 3 4* 5* 6where each number is a message number and an asterisk (*) represents a message which matches thedeletesearch pattern. Thendeletewould reduce the message list to1 3 6The command
deleterestores all deleted messages to the message list; deleted messages are added to the end of the message list with no particular order among the deleted messages.Make sure
deleteandorderinteract properly. If messages are undeleted and then re-ordered to their original state, the resulting message list should be the same as the original message list.Folded Header Fields
A message consists of a header followed by contents. A message header consists of one or fields; a message header field is a text-line with the following formatword:text-lineBecause it starts with a word, a field cannot start with linear white space. Fields in this form are known as unfolded message header fields.RFC 822 defines a second type of message header field called a folded message header field. The form of a folded message header field is linear white space followed by a text-line; the first character of the text-line is not a linear white space character, that is, the linear white space preceding the text-line is maximal. The field
where each asterisk****rclayton@monmouth.edu*represents a white-space character, is an example of a folded field.A folded field is considered a continuation of the previous field (unfolded or not) as follows: replace the linear white space and preceding newline by a single linear white-space character (of your choice). This has the effect of joining the folded field with the previous field; for example, the combination of folded and unfolded fields
where each asteriskRecipients: bird@parker.com ***pres@young.com ***pops@armstrong.com*represents a white-space character, is interpreted as the single unfolded fieldYourRecipients: bird@parker.com pres@young.com pops@armstrong.comreadmboxprogram should be able to handle mailboxes containing messages with folded message header fields. To help make sure, a new version of the original mailbox contains folded fields.
This page last modified on 5 July 2000.