Changeset 666
- Timestamp:
- 07/31/06 11:59:07
- Files:
-
- trunk/libtinymail-camel/tny-camel-stream.c (modified) (4 diffs)
- trunk/libtinymail-camel/tny-camel-stream.h (modified) (1 diff)
- trunk/libtinymail-camel/tny-stream-camel.c (modified) (5 diffs)
- trunk/libtinymail-gnomevfs/tny-vfs-stream.c (modified) (4 diffs)
- trunk/libtinymail/tny-fs-stream.c (modified) (4 diffs)
- trunk/libtinymail/tny-stream-iface.c (modified) (3 diffs)
- trunk/libtinymail/tny-stream-iface.h (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-text-buffer-stream.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-camel-stream.c
r477 r666 35 35 * error along with setting errno. 36 36 **/ 37 ssize_t37 gssize 38 38 tny_camel_stream_write_to_stream (TnyCamelStream *self, TnyStreamIface *output) 39 39 { 40 40 CamelStream *stream = CAMEL_STREAM (self); 41 41 char tmp_buf[4096]; 42 ssize_ttotal = 0;43 ssize_tnb_read;44 ssize_tnb_written;42 gssize total = 0; 43 gssize nb_read; 44 gssize nb_written; 45 45 g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1); 46 46 g_return_val_if_fail (TNY_IS_STREAM_IFACE (output), -1); … … 57 57 while (G_LIKELY (nb_written < nb_read)) 58 58 { 59 ssize_tlen = tny_stream_iface_write (output, tmp_buf + nb_written,59 gssize len = tny_stream_iface_write (output, tmp_buf + nb_written, 60 60 nb_read - nb_written); 61 61 if (G_UNLIKELY (len < 0)) … … 70 70 71 71 72 static ssize_t73 tny_camel_stream_read (CamelStream *stream, char *buffer, size_tn)72 static gssize 73 tny_camel_stream_read (CamelStream *stream, char *buffer, gsize n) 74 74 { 75 75 TnyCamelStream *self = (TnyCamelStream *)stream; … … 77 77 } 78 78 79 static ssize_t80 tny_camel_stream_write (CamelStream *stream, const char *buffer, size_tn)79 static gssize 80 tny_camel_stream_write (CamelStream *stream, const char *buffer, gsize n) 81 81 { 82 82 TnyCamelStream *self = (TnyCamelStream *)stream; trunk/libtinymail-camel/tny-camel-stream.h
r385 r666 53 53 void tny_camel_stream_set_stream (TnyCamelStream *self, TnyStreamIface *stream); 54 54 55 ssize_ttny_camel_stream_write_to_stream (TnyCamelStream *self, TnyStreamIface *output);55 gssize tny_camel_stream_write_to_stream (TnyCamelStream *self, TnyStreamIface *output); 56 56 57 57 G_END_DECLS trunk/libtinymail-camel/tny-stream-camel.c
r477 r666 54 54 (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_STREAM_CAMEL, TnyStreamCamelPriv)) 55 55 56 static ssize_t56 static gssize 57 57 tny_stream_camel_write_to_stream (TnyStreamIface *self, TnyStreamIface *output) 58 58 { … … 60 60 CamelStream *stream = priv->stream; 61 61 char tmp_buf[4096]; 62 ssize_ttotal = 0;63 ssize_tnb_read;64 ssize_tnb_written;62 gssize total = 0; 63 gssize nb_read; 64 gssize nb_written; 65 65 66 66 g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1); … … 78 78 while (G_UNLIKELY (nb_written < nb_read)) 79 79 { 80 ssize_tlen = tny_stream_iface_write (output, tmp_buf + nb_written,80 gssize len = tny_stream_iface_write (output, tmp_buf + nb_written, 81 81 nb_read - nb_written); 82 82 if (G_UNLIKELY (len < 0)) … … 90 90 } 91 91 92 static ssize_t93 tny_stream_camel_read (TnyStreamIface *self, char *buffer, size_tn)92 static gssize 93 tny_stream_camel_read (TnyStreamIface *self, char *buffer, gsize n) 94 94 { 95 95 TnyStreamCamelPriv *priv = TNY_STREAM_CAMEL_GET_PRIVATE (self); … … 98 98 } 99 99 100 static ssize_t101 tny_stream_camel_write (TnyStreamIface *self, const char *buffer, size_tn)100 static gssize 101 tny_stream_camel_write (TnyStreamIface *self, const char *buffer, gsize n) 102 102 { 103 103 TnyStreamCamelPriv *priv = TNY_STREAM_CAMEL_GET_PRIVATE (self); trunk/libtinymail-gnomevfs/tny-vfs-stream.c
r316 r666 153 153 } 154 154 155 static ssize_t155 static gssize 156 156 tny_vfs_stream_write_to_stream (TnyStreamIface *self, TnyStreamIface *output) 157 157 { 158 158 char tmp_buf[4096]; 159 ssize_ttotal = 0;160 ssize_tnb_read;161 ssize_tnb_written;159 gssize total = 0; 160 gssize nb_read; 161 gssize nb_written; 162 162 163 163 while (G_UNLIKELY (!tny_stream_iface_eos (self))) { … … 170 170 while (G_LIKELY (nb_written < nb_read)) 171 171 { 172 ssize_tlen = tny_stream_iface_write (output, tmp_buf + nb_written,172 gssize len = tny_stream_iface_write (output, tmp_buf + nb_written, 173 173 nb_read - nb_written); 174 174 if (G_UNLIKELY (len < 0)) … … 182 182 } 183 183 184 static ssize_t185 tny_vfs_stream_read (TnyStreamIface *self, char *buffer, size_tn)184 static gssize 185 tny_vfs_stream_read (TnyStreamIface *self, char *buffer, gsize n) 186 186 { 187 187 TnyVfsStreamPriv *priv = TNY_VFS_STREAM_GET_PRIVATE (self); … … 213 213 } 214 214 215 static ssize_t216 tny_vfs_stream_write (TnyStreamIface *self, const char *buffer, size_tn)215 static gssize 216 tny_vfs_stream_write (TnyStreamIface *self, const char *buffer, gsize n) 217 217 { 218 218 TnyVfsStreamPriv *priv = TNY_VFS_STREAM_GET_PRIVATE (self); trunk/libtinymail/tny-fs-stream.c
r398 r666 64 64 65 65 66 static ssize_t66 static gssize 67 67 tny_fs_stream_write_to_stream (TnyStreamIface *self, TnyStreamIface *output) 68 68 { 69 69 char tmp_buf[4096]; 70 ssize_ttotal = 0;71 ssize_tnb_read;72 ssize_tnb_written;70 gssize total = 0; 71 gssize nb_read; 72 gssize nb_written; 73 73 74 74 while (G_UNLIKELY (!tny_stream_iface_eos (self))) { … … 81 81 while (G_LIKELY (nb_written < nb_read)) 82 82 { 83 ssize_tlen = tny_stream_iface_write (output, tmp_buf + nb_written,83 gssize len = tny_stream_iface_write (output, tmp_buf + nb_written, 84 84 nb_read - nb_written); 85 85 if (G_UNLIKELY (len < 0)) … … 93 93 } 94 94 95 static ssize_t96 tny_fs_stream_read (TnyStreamIface *self, char *buffer, size_tn)97 { 98 TnyFsStreamPriv *priv = TNY_FS_STREAM_GET_PRIVATE (self); 99 ssize_tnread;95 static gssize 96 tny_fs_stream_read (TnyStreamIface *self, char *buffer, gsize n) 97 { 98 TnyFsStreamPriv *priv = TNY_FS_STREAM_GET_PRIVATE (self); 99 gssize nread; 100 100 101 101 if ((nread = read (priv->fd, buffer, n)) > 0) … … 108 108 } 109 109 110 static ssize_t111 tny_fs_stream_write (TnyStreamIface *self, const char *buffer, size_tn)112 { 113 TnyFsStreamPriv *priv = TNY_FS_STREAM_GET_PRIVATE (self); 114 ssize_tnwritten;110 static gssize 111 tny_fs_stream_write (TnyStreamIface *self, const char *buffer, gsize n) 112 { 113 TnyFsStreamPriv *priv = TNY_FS_STREAM_GET_PRIVATE (self); 114 gssize nwritten; 115 115 116 116 if ((nwritten = write (priv->fd, buffer, n)) > 0) trunk/libtinymail/tny-stream-iface.c
r522 r666 33 33 * error along with setting errno. 34 34 **/ 35 ssize_t 35 gssize 36 36 tny_stream_iface_write_to_stream (TnyStreamIface *self, TnyStreamIface *output) 37 37 { … … 55 55 * set errno. 56 56 **/ 57 ssize_t 58 tny_stream_iface_read (TnyStreamIface *self, char *buffer, size_tn)57 gssize 58 tny_stream_iface_read (TnyStreamIface *self, char *buffer, gsize n) 59 59 { 60 60 #ifdef DEBUG … … 77 77 * along with setting errno. 78 78 **/ 79 ssize_t 80 tny_stream_iface_write (TnyStreamIface *self, const char *buffer, size_tn)79 gssize 80 tny_stream_iface_write (TnyStreamIface *self, const char *buffer, gsize n) 81 81 { 82 82 #ifdef DEBUG trunk/libtinymail/tny-stream-iface.h
r637 r666 40 40 GTypeInterface parent; 41 41 42 ssize_t (*read_func) (TnyStreamIface *self, char *buffer, size_tn);43 ssize_t (*write_func) (TnyStreamIface *self, const char *buffer, size_tn);42 gssize (*read_func) (TnyStreamIface *self, char *buffer, gsize n); 43 gssize (*write_func) (TnyStreamIface *self, const char *buffer, gsize n); 44 44 gint (*flush_func) (TnyStreamIface *self); 45 45 gint (*close_func) (TnyStreamIface *self); 46 46 gboolean (*eos_func) (TnyStreamIface *self); 47 47 gint (*reset_func) (TnyStreamIface *self); 48 ssize_t(*write_to_stream_func) (TnyStreamIface *self, TnyStreamIface *output);48 gssize (*write_to_stream_func) (TnyStreamIface *self, TnyStreamIface *output); 49 49 }; 50 50 51 51 GType tny_stream_iface_get_type (void); 52 52 53 ssize_t tny_stream_iface_read (TnyStreamIface *self, char *buffer, size_tn);54 ssize_t tny_stream_iface_write (TnyStreamIface *self, const char *buffer, size_tn);53 gssize tny_stream_iface_read (TnyStreamIface *self, char *buffer, gsize n); 54 gssize tny_stream_iface_write (TnyStreamIface *self, const char *buffer, gsize n); 55 55 gint tny_stream_iface_flush (TnyStreamIface *self); 56 56 gint tny_stream_iface_close (TnyStreamIface *self); 57 57 gboolean tny_stream_iface_eos (TnyStreamIface *self); 58 58 gint tny_stream_iface_reset (TnyStreamIface *self); 59 ssize_ttny_stream_iface_write_to_stream (TnyStreamIface *self, TnyStreamIface *output);59 gssize tny_stream_iface_write_to_stream (TnyStreamIface *self, TnyStreamIface *output); 60 60 61 61 G_END_DECLS trunk/libtinymailui-gtk/tny-text-buffer-stream.c
r478 r666 42 42 43 43 44 static ssize_t44 static gssize 45 45 tny_text_buffer_write_to_stream (TnyStreamIface *self, TnyStreamIface *output) 46 46 { 47 47 char tmp_buf[4096]; 48 ssize_ttotal = 0;49 ssize_tnb_read;50 ssize_tnb_written;48 gssize total = 0; 49 gssize nb_read; 50 gssize nb_written; 51 51 52 52 while (G_LIKELY (!tny_stream_iface_eos (self))) … … 60 60 while (G_LIKELY (nb_written < nb_read)) 61 61 { 62 ssize_tlen = tny_stream_iface_write (output, tmp_buf + nb_written,62 gssize len = tny_stream_iface_write (output, tmp_buf + nb_written, 63 63 nb_read - nb_written); 64 64 if (G_UNLIKELY (len < 0)) … … 72 72 } 73 73 74 static ssize_t75 tny_text_buffer_stream_read (TnyStreamIface *self, char *buffer, size_tn)74 static gssize 75 tny_text_buffer_stream_read (TnyStreamIface *self, char *buffer, gsize n) 76 76 { 77 77 TnyTextBufferStreamPriv *priv = TNY_TEXT_BUFFER_STREAM_GET_PRIVATE (self); … … 92 92 buffer = gtk_text_buffer_get_text (priv->buffer, &(priv->cur), &dest, TRUE); 93 93 94 return ( ssize_t) rlength;95 } 96 97 static ssize_t98 tny_text_buffer_stream_write (TnyStreamIface *self, const char *buffer, size_tn)94 return (gssize) rlength; 95 } 96 97 static gssize 98 tny_text_buffer_stream_write (TnyStreamIface *self, const char *buffer, gsize n) 99 99 { 100 100 TnyTextBufferStreamPriv *priv = TNY_TEXT_BUFFER_STREAM_GET_PRIVATE (self); … … 102 102 gtk_text_buffer_insert (priv->buffer, &(priv->cur), buffer, (gint)n); 103 103 104 return ( ssize_t) n;104 return (gssize) n; 105 105 } 106 106
