Use patch included in attachment.
Note that you don't have to use option stdin.
ELinks automatically reads from pipe.
<[EMAIL PROTECTED]>
--- elinks/src/protocol/file/file.c.orig 2005-08-02 16:56:08.192923496
+0200
+++ elinks/src/protocol/file/file.c 2005-08-02 16:59:18.748954576 +0200
@@ -8,6 +8,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h> /* OS/2 needs this after sys/types.h */
#ifdef HAVE_FCNTL_H
@@ -243,9 +244,12 @@
unsigned char *type = NULL;
if (get_cmd_opt_bool("anonymous")) {
- /* FIXME: Better connection_state ;-) */
- abort_connection(connection, S_BAD_URL);
- return;
+ if (strcmp(connection->uri->string, "file:///dev/stdin")
+ || isatty(STDIN_FILENO)) {
+ /* FIXME: Better connection_state ;-) */
+ abort_connection(connection, S_BAD_URL);
+ return;
+ }
}
#ifdef CONFIG_CGI
_______________________________________________
elinks-users mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-users