(setq heads nil)))))
gnus-newsgroup-dependencies)))
-;; The following macros and functions were written by Felix Lee
-;; <flee@cse.psu.edu>.
-
-(defmacro gnus-nov-read-integer ()
- '(prog1
- (if (eq (char-after) ?\t)
- 0
- (let ((num (ignore-errors (read buffer))))
- (if (numberp num) num 0)))
- (unless (eobp)
- (search-forward "\t" eol 'move))))
-
-(defmacro gnus-nov-skip-field ()
- '(search-forward "\t" eol 'move))
-
-(defmacro gnus-nov-field ()
- '(buffer-substring (point) (if (gnus-nov-skip-field) (1- (point)) eol)))
-
;; This function has to be called with point after the article number
;; on the beginning of the line.
(defsubst gnus-nov-parse-line (number dependencies &optional force-new)
(setq header
(make-full-mail-header
- number ; number
- (gnus-nov-field) ; subject
- (gnus-nov-field) ; from
- (gnus-nov-field) ; date
- (or (gnus-nov-field)
- (nnheader-generate-fake-message-id)) ; id
- (gnus-nov-field) ; refs
- (gnus-nov-read-integer) ; chars
- (gnus-nov-read-integer) ; lines
- (unless (= (following-char) ?\n)
- (gnus-nov-field))))) ; misc
+ number ; number
+ (nnheader-nov-field) ; subject
+ (nnheader-nov-field) ; from
+ (nnheader-nov-field) ; date
+ (nnheader-nov-read-message-id) ; id
+ (nnheader-nov-field) ; refs
+ (nnheader-nov-read-integer) ; chars
+ (nnheader-nov-read-integer) ; lines
+ (unless (eobp)
+ (nnheader-nov-field))))) ; misc
(widen))
(defconst gnus-product-name "Semi-gnus"
"Product name of this version of gnus.")
-(defconst gnus-version-number "6.10.3"
+(defconst gnus-version-number "6.10.4"
"Version number for this version of gnus.")
(defconst gnus-version
(goto-char (point-min))
(delete-char 1)))))
-(defmacro nnheader-nov-skip-field ()
- '(search-forward "\t" eol 'move))
+(defmacro nnheader-nov-next-field ()
+ ;; Go to the beginning of the next field and returns a point of
+ ;; the end of the current field.
+ '(if (search-forward "\t" eol t)
+ (1- (point))
+ eol))
(defmacro nnheader-nov-field ()
- '(buffer-substring (point) (if (nnheader-nov-skip-field) (1- (point)) eol)))
+ '(buffer-substring (point) (nnheader-nov-next-field)))
(defmacro nnheader-nov-read-integer ()
- '(prog1
- (if (eq (char-after) ?\t)
- 0
- (let ((num (ignore-errors (read (current-buffer)))))
- (if (numberp num) num 0)))
- (unless (eobp)
- (search-forward "\t" eol 'move))))
+ '(let ((field (buffer-substring (point) (nnheader-nov-next-field))))
+ (if (string-match "^[0-9]+$" field)
+ (string-to-number field)
+ 0)))
+
+(defmacro nnheader-nov-read-message-id ()
+ '(let ((id (buffer-substring (point) (nnheader-nov-next-field))))
+ (if (string-match "^<[^>]+>$" id)
+ id
+ (nnheader-generate-fake-message-id))))
(defun nnheader-parse-nov ()
(let ((eol (gnus-point-at-eol)))
(nnheader-nov-field) ; subject
(nnheader-nov-field) ; from
(nnheader-nov-field) ; date
- (or (nnheader-nov-field)
- (nnheader-generate-fake-message-id)) ; id
+ (nnheader-nov-read-message-id) ; id
(nnheader-nov-field) ; refs
(nnheader-nov-read-integer) ; chars
(nnheader-nov-read-integer) ; lines