Mercurial > audlegacy-plugins
comparison src/curl/curl.c @ 938:31089767a3e3 trunk
[svn] - use unsigned char instead of gpointer for arithmetic to ensure that writes are 8-bit aligned.
author | nenolod |
---|---|
date | Thu, 12 Apr 2007 11:07:04 -0700 |
parents | c11425915fcb |
children | 0e40e86fe338 |
comparison
equal
deleted
inserted
replaced
937:c11425915fcb | 938:31089767a3e3 |
---|---|
91 gint curl_vfs_truncate_impl(VFSFile * file, glong size); | 91 gint curl_vfs_truncate_impl(VFSFile * file, glong size); |
92 gchar *curl_vfs_metadata_impl(VFSFile * file, const gchar * field); | 92 gchar *curl_vfs_metadata_impl(VFSFile * file, const gchar * field); |
93 size_t curl_vfs_fwrite_impl(gconstpointer ptr, size_t size, | 93 size_t curl_vfs_fwrite_impl(gconstpointer ptr, size_t size, |
94 size_t nmemb, | 94 size_t nmemb, |
95 VFSFile * file); | 95 VFSFile * file); |
96 size_t curl_vfs_fread_impl(gpointer ptr, size_t size, | 96 size_t curl_vfs_fread_impl(unsigned char *ptr, size_t size, |
97 size_t nmemb, | 97 size_t nmemb, |
98 VFSFile * file); | 98 VFSFile * file); |
99 gint curl_vfs_fclose_impl(VFSFile * file); | 99 gint curl_vfs_fclose_impl(VFSFile * file); |
100 gint curl_vfs_getc_impl(VFSFile *stream); | 100 gint curl_vfs_getc_impl(VFSFile *stream); |
101 gint curl_vfs_ungetc_impl(gint c, VFSFile *stream); | 101 gint curl_vfs_ungetc_impl(gint c, VFSFile *stream); |
297 g_print("Title: '%s'\n", handle->title); | 297 g_print("Title: '%s'\n", handle->title); |
298 } | 298 } |
299 handle->meta_abs = handle->wr_abs; | 299 handle->meta_abs = handle->wr_abs; |
300 } | 300 } |
301 | 301 |
302 static size_t curl_writecb(void *ptr, size_t size, size_t nmemb, void *stream) | 302 static size_t curl_writecb(unsigned char *ptr, size_t size, size_t nmemb, void *stream) |
303 { | 303 { |
304 CurlHandle *handle = stream; | 304 CurlHandle *handle = stream; |
305 gint sz = size * nmemb; | 305 gint sz = size * nmemb; |
306 gint ret = 0; | 306 gint ret = 0; |
307 gint trans; | 307 gint trans; |
682 } | 682 } |
683 return ret; | 683 return ret; |
684 } | 684 } |
685 | 685 |
686 size_t | 686 size_t |
687 curl_vfs_fread_impl(gpointer ptr, | 687 curl_vfs_fread_impl(unsigned char *ptr, |
688 size_t size, | 688 size_t size, |
689 size_t nmemb, | 689 size_t nmemb, |
690 VFSFile * file) | 690 VFSFile * file) |
691 { | 691 { |
692 CurlHandle *handle = file->handle; | 692 CurlHandle *handle = file->handle; |