Mercurial > emacs
comparison lisp/jka-compr.el @ 42231:054cf5ce349b
(jka-compr-partial-uncompress): Use null-device instead of a literal
/dev/null. Reported by Jens Schmidt <schmidt@mathematik.uni-kl.de>.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 21 Dec 2001 12:43:55 +0000 |
parents | f11ecb854c22 |
children | c28b5df30ea0 |
comparison
equal
deleted
inserted
replaced
42230:5c346977392d | 42231:054cf5ce349b |
---|---|
298 count (and len (1+ (/ (+ len prefix) jka-compr-dd-blocksize)))) | 298 count (and len (1+ (/ (+ len prefix) jka-compr-dd-blocksize)))) |
299 (unwind-protect | 299 (unwind-protect |
300 (or (memq (call-process | 300 (or (memq (call-process |
301 jka-compr-shell infile t nil "-c" | 301 jka-compr-shell infile t nil "-c" |
302 (format | 302 (format |
303 "%s %s 2> %s | %s bs=%d skip=%d %s 2> /dev/null" | 303 "%s %s 2> %s | %s bs=%d skip=%d %s 2> %s" |
304 prog | 304 prog |
305 (mapconcat 'identity args " ") | 305 (mapconcat 'identity args " ") |
306 err-file | 306 err-file |
307 jka-compr-dd-program | 307 jka-compr-dd-program |
308 jka-compr-dd-blocksize | 308 jka-compr-dd-blocksize |
309 skip | 309 skip |
310 ;; dd seems to be unreliable about | 310 ;; dd seems to be unreliable about |
311 ;; providing the last block. So, always | 311 ;; providing the last block. So, always |
312 ;; read one more than you think you need. | 312 ;; read one more than you think you need. |
313 (if count (format "count=%d" (1+ count)) ""))) | 313 (if count (format "count=%d" (1+ count)) "") |
314 null-device)) | |
314 jka-compr-acceptable-retval-list) | 315 jka-compr-acceptable-retval-list) |
315 (jka-compr-error prog args infile message err-file)) | 316 (jka-compr-error prog args infile message err-file)) |
316 (jka-compr-delete-temp-file err-file))) | 317 (jka-compr-delete-temp-file err-file))) |
317 ;; Run the uncompression program directly. | 318 ;; Run the uncompression program directly. |
318 ;; We get the whole file and must delete what we don't want. | 319 ;; We get the whole file and must delete what we don't want. |