- ;; ok, we're done parsing the required parts,
- ;; what comes now is one
- ;; of three things:
- ;;
- ;; envelope (then we're parsing
- ;; body-type-msg)
- ;; body-fld-lines (then we're parsing
- ;; body-type-text)
- ;; body-ext-1part (then we're parsing
- ;; body-type-basic)
- ;;
- ;; the problem is that the two first are in
- ;; turn optionally followed
- ;; by the third. So we parse the first two here
- ;; (if there are any)...
+ (push (imap-parse-string) body) ;; media-type
+ (imap-forward)
+ (push (imap-parse-string) body) ;; media-subtype
+ (imap-forward)
+ ;; next line for Sun SIMS bug
+ (and (eq (char-after) ? ) (imap-forward))
+ (if (eq (char-after) ?\() ;; body-fld-param
+ (push (imap-parse-string-list) body)
+ (push (and (imap-parse-nil) nil) body))
+ (imap-forward)
+ (push (imap-parse-nstring) body) ;; body-fld-id
+ (imap-forward)
+ (push (imap-parse-nstring) body) ;; body-fld-desc
+ (imap-forward)
+ ;; next `or' for Sun SIMS bug, it regards body-fld-enc as a nstring
+ ;; and return nil instead of defaulting back to 7BIT as the standard
+ ;; says.
+ (push (or (imap-parse-nstring) "7BIT") body) ;; body-fld-enc
+ (imap-forward)
+ (push (imap-parse-number) body) ;; body-fld-octets