[w3m-dev 02955] compression_decoders error message
* file.c (uncompress_stream): redirect stderr * inflate.c (main): print error message From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2002-01-31 Fumitoshi UKAI <ukai@debian.or.jp>
|
||||||
|
|
||||||
|
* [w3m-dev 02955] compression_decoders error message
|
||||||
|
* file.c (uncompress_stream): redirect stderr
|
||||||
|
* inflate.c (main): print error message
|
||||||
|
|
||||||
2002-01-31 Fumitoshi UKAI <ukai@debian.or.jp>
|
2002-01-31 Fumitoshi UKAI <ukai@debian.or.jp>
|
||||||
|
|
||||||
* [w3m-dev 02949] fix for #undef USE_MIGEMO
|
* [w3m-dev 02949] fix for #undef USE_MIGEMO
|
||||||
@@ -2462,4 +2468,4 @@
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.281 2002/01/31 04:49:42 ukai Exp $
|
$Id: ChangeLog,v 1.282 2002/01/31 09:43:14 ukai Exp $
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: file.c,v 1.53 2002/01/30 17:48:49 ukai Exp $ */
|
/* $Id: file.c,v 1.54 2002/01/31 09:43:14 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -6618,6 +6618,7 @@ uncompress_stream(URLFile *uf)
|
|||||||
dup2(fd2[0], 0);
|
dup2(fd2[0], 0);
|
||||||
}
|
}
|
||||||
dup2(fd1[1], 1);
|
dup2(fd1[1], 1);
|
||||||
|
dup2(fd1[1], 2);
|
||||||
execlp(expand_cmd, expand_name, NULL);
|
execlp(expand_cmd, expand_name, NULL);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: inflate.c,v 1.3 2001/11/24 02:01:26 ukai Exp $ */
|
/* $Id: inflate.c,v 1.4 2002/01/31 09:43:15 ukai Exp $ */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
@@ -16,8 +16,10 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
f = fopen(argv[1], "rb");
|
f = fopen(argv[1], "rb");
|
||||||
if (!f)
|
if (!f) {
|
||||||
|
fprintf(stderr, "%s: cannot open %s\n", argv[0], argv[1]);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
f = stdin;
|
f = stdin;
|
||||||
@@ -26,8 +28,10 @@ main(int argc, char **argv)
|
|||||||
s.zfree = Z_NULL;
|
s.zfree = Z_NULL;
|
||||||
s.opaque = Z_NULL;
|
s.opaque = Z_NULL;
|
||||||
status = inflateInit(&s);
|
status = inflateInit(&s);
|
||||||
if (status != Z_OK)
|
if (status != Z_OK) {
|
||||||
|
fprintf(stderr, "%s: inflateInit() %s\n", argv[0], zError(status));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
s.avail_in = 0;
|
s.avail_in = 0;
|
||||||
s.next_out = (Bytef *) outbuf;
|
s.next_out = (Bytef *) outbuf;
|
||||||
s.avail_out = sizeof(outbuf);
|
s.avail_out = sizeof(outbuf);
|
||||||
@@ -43,8 +47,10 @@ main(int argc, char **argv)
|
|||||||
fwrite(outbuf, 1, sizeof(outbuf) - s.avail_out, stdout);
|
fwrite(outbuf, 1, sizeof(outbuf) - s.avail_out, stdout);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (status != Z_OK)
|
if (status != Z_OK) {
|
||||||
|
fprintf(stderr, "%s: inflate() %s\n", argv[0], zError(status));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
if (s.avail_out == 0) {
|
if (s.avail_out == 0) {
|
||||||
fwrite(outbuf, 1, sizeof(outbuf), stdout);
|
fwrite(outbuf, 1, sizeof(outbuf), stdout);
|
||||||
s.next_out = (Bytef *) outbuf;
|
s.next_out = (Bytef *) outbuf;
|
||||||
|
|||||||
Reference in New Issue
Block a user