1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/w3m/istream-file_handle-clash.patch
5 # Copyright (C) 2021 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
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
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
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);
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;
38 stream->file.handle->close = closep;
43 -file_close(struct file_handle *handle)
44 +file_close(struct w3m_file_handle *handle)
46 handle->close(handle->f);
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
59 typedef struct stream_buffer *StreamBuffer;
62 +struct w3m_file_handle {
69 struct stream_buffer stream;
70 - struct file_handle *handle;
71 + struct w3m_file_handle *handle;