patch-istream_c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- w3m-0.5.3.orig/istream.c 2011-01-04 10:22:22.000000000 +0100
  2. +++ w3m-0.5.3/istream.c 2014-04-08 19:58:01.000000000 +0200
  3. @@ -22,8 +22,8 @@
  4. static void basic_close(int *handle);
  5. static int basic_read(int *handle, char *buf, int len);
  6. -static void file_close(struct file_handle *handle);
  7. -static int file_read(struct file_handle *handle, char *buf, int len);
  8. +static void file_close(struct wfile_handle *handle);
  9. +static int file_read(struct wfile_handle *handle, char *buf, int len);
  10. static int str_read(Str handle, char *buf, int len);
  11. @@ -114,7 +114,7 @@ newFileStream(FILE * f, void (*closep) (
  12. stream = New(union input_stream);
  13. init_base_stream(&stream->base, STREAM_BUF_SIZE);
  14. stream->file.type = IST_FILE;
  15. - stream->file.handle = New(struct file_handle);
  16. + stream->file.handle = New(struct wfile_handle);
  17. stream->file.handle->f = f;
  18. if (closep)
  19. stream->file.handle->close = closep;
  20. @@ -658,13 +658,13 @@ basic_read(int *handle, char *buf, int l
  21. }
  22. static void
  23. -file_close(struct file_handle *handle)
  24. +file_close(struct wfile_handle *handle)
  25. {
  26. handle->close(handle->f);
  27. }
  28. static int
  29. -file_read(struct file_handle *handle, char *buf, int len)
  30. +file_read(struct wfile_handle *handle, char *buf, int len)
  31. {
  32. return fread(buf, 1, len, handle->f);
  33. }