diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:47 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:47 +0000 |
commit | a722a562112506c63c9b6519b8252d633534a35a (patch) | |
tree | 78dc4b8bbefa910007339970eaf004f012d2082f /istream.h | |
parent | Switch upstream to Debian's w3m (diff) | |
parent | New upstream version 0.5.3+git20210102 (diff) | |
download | w3m-a722a562112506c63c9b6519b8252d633534a35a.tar.gz w3m-a722a562112506c63c9b6519b8252d633534a35a.zip |
Update upstream source from tag 'upstream/0.5.3+git20210102'
Update to upstream version '0.5.3+git20210102'
with Debian dir e89c066385156d7c9ed01b0c8a1a08e01019959d
Diffstat (limited to 'istream.h')
-rw-r--r-- | istream.h | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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> @@ -20,7 +20,7 @@ struct stream_buffer { typedef struct stream_buffer *StreamBuffer; -struct file_handle { +struct io_file_handle { FILE *f; void (*close) (); }; @@ -36,7 +36,7 @@ union input_stream; struct ens_handle { union input_stream *is; - Str s; + struct growbuf gb; int pos; char encoding; }; @@ -53,7 +53,7 @@ struct base_stream { struct file_stream { struct stream_buffer stream; - struct file_handle *handle; + struct io_file_handle *handle; char type; char iseos; int (*read) (); @@ -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 |