* updated krdc (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / www / w3m / istream-file_handle-clash.patch
blobb036a64cd6fceacc5cf406be03907149a8ad8dd9
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/*/w3m/istream-file_handle-clash.patch
5 # Copyright (C) 2021 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- w3m-0.5.3/istream.c.vanilla 2020-10-04 20:56:56.833182568 +0200
18 +++ w3m-0.5.3/istream.c 2020-10-04 20:57:22.200863653 +0200
19 @@ -22,8 +22,8 @@
20 static void basic_close(int *handle);
21 static int basic_read(int *handle, char *buf, int len);
23 -static void file_close(struct file_handle *handle);
24 -static int file_read(struct file_handle *handle, char *buf, int len);
25 +static void file_close(struct w3m_file_handle *handle);
26 +static int file_read(struct w3m_file_handle *handle, char *buf, int len);
28 static int str_read(Str handle, char *buf, int len);
30 @@ -114,7 +114,7 @@
31 stream = New(union input_stream);
32 init_base_stream(&stream->base, STREAM_BUF_SIZE);
33 stream->file.type = IST_FILE;
34 - stream->file.handle = New(struct file_handle);
35 + stream->file.handle = New(struct w3m_file_handle);
36 stream->file.handle->f = f;
37 if (closep)
38 stream->file.handle->close = closep;
39 @@ -658,13 +658,13 @@
42 static void
43 -file_close(struct file_handle *handle)
44 +file_close(struct w3m_file_handle *handle)
46 handle->close(handle->f);
49 static int
50 -file_read(struct file_handle *handle, char *buf, int len)
51 +file_read(struct w3m_file_handle *handle, char *buf, int len)
53 return fread(buf, 1, len, handle->f);
55 --- w3m-0.5.3/istream.h.vanilla 2020-10-04 20:56:36.809434301 +0200
56 +++ w3m-0.5.3/istream.h 2020-10-04 20:56:54.905206806 +0200
57 @@ -20,7 +20,7 @@
59 typedef struct stream_buffer *StreamBuffer;
61 -struct file_handle {
62 +struct w3m_file_handle {
63 FILE *f;
64 void (*close) ();
66 @@ -53,7 +53,7 @@
68 struct file_stream {
69 struct stream_buffer stream;
70 - struct file_handle *handle;
71 + struct w3m_file_handle *handle;
72 char type;
73 char iseos;
74 int (*read) ();