/[emacs]/emacs/lisp/gnus/rfc2231.el
ViewVC logotype

Diff of /emacs/lisp/gnus/rfc2231.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by lute, Mon Jul 4 17:55:17 2005 UTC revision 1.9 by miles, Fri Jul 29 01:44:40 2005 UTC
# Line 1  Line 1 
1  ;;; rfc2231.el --- Functions for decoding rfc2231 headers  ;;; rfc2231.el --- Functions for decoding rfc2231 headers
2    
3  ;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004  ;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005
4  ;;        Free Software Foundation, Inc.  ;;        Free Software Foundation, Inc.
5    
6  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
# Line 52  The list will be on the form Line 52  The list will be on the form
52            (prev-value "")            (prev-value "")
53            display-name mailbox c display-string parameters            display-name mailbox c display-string parameters
54            attribute value type subtype number encoded            attribute value type subtype number encoded
55            prev-attribute)            prev-attribute prev-encoded)
56        (ietf-drums-init (mail-header-remove-whitespace        (ietf-drums-init (mail-header-remove-whitespace
57                          (mail-header-remove-comments string)))                          (mail-header-remove-comments string)))
58        (let ((table (copy-syntax-table ietf-drums-syntax-table)))        (let ((table (copy-syntax-table ietf-drums-syntax-table)))
# Line 106  The list will be on the form Line 106  The list will be on the form
106              ;; See if we have any previous continuations.              ;; See if we have any previous continuations.
107              (when (and prev-attribute              (when (and prev-attribute
108                         (not (eq prev-attribute attribute)))                         (not (eq prev-attribute attribute)))
109                (push (cons prev-attribute prev-value) parameters)                (push (cons prev-attribute
110                              (if prev-encoded
111                                  (rfc2231-decode-encoded-string prev-value)
112                                prev-value))
113                        parameters)
114                (setq prev-attribute nil                (setq prev-attribute nil
115                      prev-value ""))                      prev-value ""
116                        prev-encoded nil))
117              (unless (eq c ?=)              (unless (eq c ?=)
118                (error "Invalid header: %s" string))                (error "Invalid header: %s" string))
119              (forward-char 1)              (forward-char 1)
# Line 127  The list will be on the form Line 132  The list will be on the form
132                (error "Invalid header: %s" string)))                (error "Invalid header: %s" string)))
133              (if number              (if number
134                  (setq prev-attribute attribute                  (setq prev-attribute attribute
135                        prev-value (concat prev-value value))                        prev-value (concat prev-value value)
136                          prev-encoded encoded)
137                (push (cons attribute                (push (cons attribute
138                            (if encoded                            (if encoded
139                                (rfc2231-decode-encoded-string value)                                (rfc2231-decode-encoded-string value)
# Line 137  The list will be on the form Line 143  The list will be on the form
143          ;; Take care of any final continuations.          ;; Take care of any final continuations.
144          (when prev-attribute          (when prev-attribute
145            (push (cons prev-attribute            (push (cons prev-attribute
146                        (if encoded                        (if prev-encoded
147                            (rfc2231-decode-encoded-string prev-value)                            (rfc2231-decode-encoded-string prev-value)
148                          prev-value))                          prev-value))
149                  parameters))                  parameters))

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26