X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lisp%2Fbinhex.el;h=0228ac576f241f3af4fe0d9af986f3789f773247;hb=e81909bba6d3f0df9aad905f2906f4880a935372;hp=76228810bbf90334723fb0695527e9167175ba64;hpb=49d38b41c190eaab2cb34294fac7302a9c9ea353;p=elisp%2Fgnus.git- diff --git a/lisp/binhex.el b/lisp/binhex.el index 7622881..0228ac5 100644 --- a/lisp/binhex.el +++ b/lisp/binhex.el @@ -1,5 +1,7 @@ ;;; binhex.el --- elisp native binhex decode -;; Copyright (c) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: binhex news @@ -18,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -50,6 +52,7 @@ input and write the converted data to its standard output." (defcustom binhex-use-external (exec-installed-p binhex-decoder-program) "*Use external binhex program." + :version "22.1" :group 'gnus-extract :type 'boolean) @@ -243,14 +246,13 @@ If HEADER-ONLY is non-nil only decode header and return filename." (setq file-name-length (char-after (point-min)) data-fork-start (+ (point-min) file-name-length 22)))) - (if (and (null header) - (with-current-buffer work-buffer - (>= (buffer-size) data-fork-start))) - (progn - (binhex-verify-crc work-buffer - (point-min) data-fork-start) - (setq header (binhex-header work-buffer)) - (if header-only (setq tmp nil counter 0)))) + (when (and (null header) + (with-current-buffer work-buffer + (>= (buffer-size) data-fork-start))) + (binhex-verify-crc work-buffer + (point-min) data-fork-start) + (setq header (binhex-header work-buffer)) + (when header-only (setq tmp nil counter 0))) (setq tmp (and tmp (not (eq inputpos end))))) (cond ((= counter 3)