From dsrosing@ingr.com Wed May 28 10:41:14 1997 X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] [nil "Wed" "28" "May" "1997" "12:43:56" "-0500" "David S. Rosinger" "dsrosing@ingr.com" nil "191" "ANNOUNCE: Updated patch for Crypt++" "^From:" nil nil "5" nil nil nil nil] nil) Received: from hq15.pcmail.ingr.com (hq15.pcmail.ingr.com [129.135.251.243]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id KAA23059; Wed, 28 May 1997 10:41:13 -0700 Received: by hq15.pcmail.ingr.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63) id <01BC6B64.CF89AFA0@hq15.pcmail.ingr.com>; Wed, 28 May 1997 12:43:58 -0500 Message-ID: X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63 Encoding: 192 TEXT From: "Rosinger, David S" To: "'ntemacs-users@cs.washington.edu'" Cc: "'voelker@cs.washington.edu'" Subject: ANNOUNCE: Updated patch for Crypt++ Date: Wed, 28 May 1997 12:43:56 -0500 INTRODUCTION Attached is a patch for crypt++.el to allow this package to operate on Win32. This is an update to a patch I submitted previously. Crypt++.el is a package which allows you to transparently visit compressed files such as those ending in `.gz' and `.tar.gz'. It also handles encryption if you have a suitable program such as `descrypt' (This I have not tested, but I believe encryption will work.) WHERE TO GET The most recent version of crypt++.el to which this patch can be applied can be found at: ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive /misc/crypt++.el.Z This file is dated 4/6/1994 and is version 2.82. It has not been updated recently and I have heard that it is no longer being actively maintained. VERSION WITH PATCH APPLIED For a few days, the patched version will be available by ftp at: ftp ftp.intergraph.com ftp> cd outgoing ftp> bin ftp> get crypt++.el (For security reasons, `ls' is not permitted in this directory.) Geoff, can you update the version on your site? ABOUT THIS PATCH My changes are minimal. I simply set `binary-process-input' and `binary-process-output' to `t' in `crypt-find-file-hook()' and `crypt-write-file-hook()'. (Andrew Innes suggested this to me some time ago.) I've also made changes in the header indicating that I've made patches for Win32. CAVEATS This patch will work perfectly with files containing UNIX-style text files. Unfortunately, when you visit a DOS text file within an encoded file, you'll see CRs (^Ms) in the buffer. If `binary-process-output' is set to `nil', this problem goes away, which is fine for files of type `.gz'. However, this has the disadvantage of breaking files of type `.tar.gz', since `tar' expects a binary stream. Since most `.gz' and `.tar.gz' files distributed on the Internet originate on UNIX systems, I think I can live with the issue regarding DOS text files. (Besides, the ^Ms can be removed from the buffer and the buffer can then be saved.) Also, this package won't work with files of type `.tgz'. (I believe this to be true on UNIX systems, also.) I suggest changing the file extension to `.tar.gz'. SUMMARY I am not an accomplished Emacs Lisp programmer, so I welcome anyone else to take a look at this patch. Perhaps someone with more talent than me might know how to deal with the DOS file issue. Another package, `jka-compr' is distributed with Emacs (but more limited than crypt++). I haven't tried it out, but there are no references to either of the `binary-process-*' variables or `DOS'. I suspect it will not work as is on Win32. Since this package is distributed with Emacs, perhaps it would be worth checking out and having changes submitted to the FSF if necessary. Any volunteers? :-) # # # *** orig/crypt++.el Tue Jan 17 16:52:30 1995 --- win32/crypt++.el Fri May 23 10:26:40 1997 *************** *** 3,12 **** ;; Author: Lawrence R. Dodd ;; Rod Whitby ;; Kyle E. Jones ;; Maintainer: Lawrence R. Dodd ;; Created: crypt.el in 1988, crypt++.el on 18 Jan 1993 ! ;; Version: 2.82 ! ;; Date: 1994/03/31 12:30:17 ;; Keywords: extensions ;;; Copyright (C) 1994 Lawrence R. Dodd --- 3,13 ---- ;; Author: Lawrence R. Dodd ;; Rod Whitby ;; Kyle E. Jones + ;; David S. Rosinger (minor Win32 patches only) ;; Maintainer: Lawrence R. Dodd ;; Created: crypt.el in 1988, crypt++.el on 18 Jan 1993 ! ;; Version: 2.82 (with Win32 patch) ! ;; Date: 1994/03/31 12:30:17 (Win32: 1997/05/23 10:26:00) ;; Keywords: extensions ;;; Copyright (C) 1994 Lawrence R. Dodd *************** *** 749,754 **** --- 750,759 ---- ;;; (crypt-encoded-disable-auto-save, crypt-encrypted-disable-auto-save): ;;; New user-defined variables. (crypt-encoded-mode, crypt-encrypted-mode): ;;; Use them. + ;;; 2.82 (Win32) - + ;;; dsr: Make package operational under Win32 by making calls to + ;;; `binary-process-input' and `binary-process-output'. This package will + ;;; not work with COMMAND.COM on Windows 95; you must use a 32-bit shell. ;;; Code: *************** *** 1296,1301 **** --- 1301,1308 ---- (old-buffer-file-name buffer-file-name) (old-buffer-modified-p (buffer-modified-p)) (case-fold-search nil) ; case-sensitive + (binary-process-input t) ; Win32 + (binary-process-output t) ; Win32 encrypted encoded buffer-read-only) ;; DECODE AND/OR DECRYPT *************** *** 1625,1630 **** --- 1632,1640 ---- ;; format. Terminates calls in `write-file-hooks' and should be at end of ;; list. + (let ((binary-process-input t) ; Win32 + (binary-process-output t)) ; Win32 + ;; Check file-extension for possible toggling of encoding modes. (crypt-check-extension-for-encoding) *************** *** 1751,1757 **** ;; completes normally but the value of BODYFORM is returned - ;; i.e., t is returned. ! (delete-region (point-min) (point-max)))))))) ;;;; ENCRYPTION --- 1761,1767 ---- ;; completes normally but the value of BODYFORM is returned - ;; i.e., t is returned. ! (delete-region (point-min) (point-max))))))))) ;;;; ENCRYPTION *************** *** 1881,1887 **** (not (eq args t))) ; just in case... (setq prog (concat prog " " args)))) ! (call-process-region start end shell-file-name t t nil "-c" prog)) ;; Otherwise try and eval it. (t --- 1891,1897 ---- (not (eq args t))) ; just in case... (setq prog (concat prog " " args)))) ! (call-process-region start end shell-file-name t t nil shell-command-switch prog)) ; Win32 ;; Otherwise try and eval it. (t From dsrosing@ingr.com Thu May 29 07:02:16 1997 X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] [nil "Thu" "29" "May" "1997" "09:05:31" "-0500" "David S. Rosinger" "dsrosing@ingr.com" nil "25" "Followup: Updated patch for Crypt++" "^From:" nil nil "5" nil nil nil nil] nil) Received: from hq15.pcmail.ingr.com (hq15.pcmail.ingr.com [129.135.251.243]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id HAA04570; Thu, 29 May 1997 07:02:14 -0700 Received: by hq15.pcmail.ingr.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63) id <01BC6C0F.76710980@hq15.pcmail.ingr.com>; Thu, 29 May 1997 09:05:32 -0500 Message-ID: X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63 Encoding: 26 TEXT From: "Rosinger, David S" To: "'ntemacs-users@cs.washington.edu'" Cc: "'voelker@cs.washington.edu'" Subject: Followup: Updated patch for Crypt++ Date: Thu, 29 May 1997 09:05:31 -0500 CRYPT++ FOLLOWUP In my post yesterday, I neglected to mention two other pieces of information necessary to get crypt++ to work. GZIP AND TAR On both Windows NT and Windows 95, you'll need to make sure that you have *32-bit* versions of `gzip' and `tar' in your path. The versions of these programs that Geoff offers on the Emacs home page to unpack the Emacs distribution do the job quite nicely. WINDOWS 95 On Windows 95, you cannot use the 16-bit `COMMAND.COM' as your single shell command processor. Set the environment variable `SHELL' (which Emacs uses to set `shell-file-name') to a *32-bit* shell. I happen to use `cmd32.exe' which is distributed with Perl-for-Win32. -- David S. Rosinger / Intergraph Corporation / dsrosing@ingr.com