wok diff w3m/stuff/file_handle.patch @ rev 25370
updated tmux (3.0a -> 3.3a)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jul 29 14:23:40 2022 +0100 (2022-07-29) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/w3m/stuff/file_handle.patch Fri Jul 29 14:23:40 2022 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +diff -Naur old/istream.c new/istream.c 1.5 +--- istream.c 2011-01-04 20:22:22.000000000 +1100 1.6 ++++ istream.c 2012-07-04 21:50:51.529661517 +1000 1.7 +@@ -22,8 +22,8 @@ 1.8 + static void basic_close(int *handle); 1.9 + static int basic_read(int *handle, char *buf, int len); 1.10 + 1.11 +-static void file_close(struct file_handle *handle); 1.12 +-static int file_read(struct file_handle *handle, char *buf, int len); 1.13 ++static void file_close(struct file_handle_rofl *handle); 1.14 ++static int file_read(struct file_handle_rofl *handle, char *buf, int len); 1.15 + 1.16 + static int str_read(Str handle, char *buf, int len); 1.17 + 1.18 +@@ -114,7 +114,7 @@ 1.19 + stream = New(union input_stream); 1.20 + init_base_stream(&stream->base, STREAM_BUF_SIZE); 1.21 + stream->file.type = IST_FILE; 1.22 +- stream->file.handle = New(struct file_handle); 1.23 ++ stream->file.handle = New(struct file_handle_rofl); 1.24 + stream->file.handle->f = f; 1.25 + if (closep) 1.26 + stream->file.handle->close = closep; 1.27 +@@ -658,13 +658,13 @@ 1.28 + } 1.29 + 1.30 + static void 1.31 +-file_close(struct file_handle *handle) 1.32 ++file_close(struct file_handle_rofl *handle) 1.33 + { 1.34 + handle->close(handle->f); 1.35 + } 1.36 + 1.37 + static int 1.38 +-file_read(struct file_handle *handle, char *buf, int len) 1.39 ++file_read(struct file_handle_rofl *handle, char *buf, int len) 1.40 + { 1.41 + return fread(buf, 1, len, handle->f); 1.42 + } 1.43 +diff -Naur old/istream.h new/istream.h 1.44 +--- istream.h 2003-10-21 02:41:56.000000000 +1000 1.45 ++++ istream.h 2012-07-04 21:50:51.529661517 +1000 1.46 +@@ -20,7 +20,7 @@ 1.47 + 1.48 + typedef struct stream_buffer *StreamBuffer; 1.49 + 1.50 +-struct file_handle { 1.51 ++struct file_handle_rofl { 1.52 + FILE *f; 1.53 + void (*close) (); 1.54 + }; 1.55 +@@ -53,7 +53,7 @@ 1.56 + 1.57 + struct file_stream { 1.58 + struct stream_buffer stream; 1.59 +- struct file_handle *handle; 1.60 ++ struct file_handle_rofl *handle; 1.61 + char type; 1.62 + char iseos; 1.63 + int (*read) ();