aboutsummaryrefslogtreecommitdiffstats
path: root/istream.h
diff options
context:
space:
mode:
authorAIDA Shinra <shinra@j10n.org>2013-10-14 13:31:01 +0000
committerTatsuya Kinoshita <tats@debian.org>2013-10-14 13:31:01 +0000
commitec81194f386f35b0d914e0fc5c727cd217c62c91 (patch)
tree1a64910741c607abe7d19b92bdfa34f3506507ae /istream.h
parentMerge from upstream on 2012-05-22 (diff)
downloadw3m-ec81194f386f35b0d914e0fc5c727cd217c62c91.tar.gz
w3m-ec81194f386f35b0d914e0fc5c727cd217c62c91.zip
Workaround of GC crash on Cygwin64
Patch from <http://www.j10n.org/files/w3m-cvs-1.1055-win64gc.patch>, [w3m-dev:04469] on 2013-10-14.
Diffstat (limited to 'istream.h')
-rw-r--r--istream.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/istream.h b/istream.h
index a220d8b..b430d81 100644
--- a/istream.h
+++ b/istream.h
@@ -2,13 +2,13 @@
#ifndef IO_STREAM_H
#define IO_STREAM_H
+#include "indep.h"
#include <stdio.h>
#ifdef USE_SSL
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/ssl.h>
#endif
-#include "Str.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -36,7 +36,7 @@ union input_stream;
struct ens_handle {
union input_stream *is;
- Str s;
+ struct growbuf gb;
int pos;
char encoding;
};
@@ -119,9 +119,14 @@ extern InputStream newEncodedStream(InputStream is, char encoding);
extern int ISclose(InputStream stream);
extern int ISgetc(InputStream stream);
extern int ISundogetc(InputStream stream);
-extern Str StrISgets(InputStream stream);
-extern Str StrmyISgets(InputStream stream);
+extern Str StrISgets2(InputStream stream, char crnl);
+#define StrISgets(stream) StrISgets2(stream, FALSE)
+#define StrmyISgets(stream) StrISgets2(stream, TRUE)
+void ISgets_to_growbuf(InputStream stream, struct growbuf *gb, char crnl);
+#ifdef unused
extern int ISread(InputStream stream, Str buf, int count);
+#endif
+int ISread_n(InputStream stream, char *dst, int bufsize);
extern int ISfileno(InputStream stream);
extern int ISeos(InputStream stream);
#ifdef USE_SSL