"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/write-buffer.c" between
irssi-1.2.2.tar.gz and irssi-1.2.3.tar.gz

About: irssi is a terminal based IRC client that also supports SILC and ICB protocols via plugins.

write-buffer.c  (irssi-1.2.2):write-buffer.c  (irssi-1.2.3)
skipping to change at line 66 skipping to change at line 66
rec->active_block_pos = 0; rec->active_block_pos = 0;
rec->blocks = g_slist_append(rec->blocks, block); rec->blocks = g_slist_append(rec->blocks, block);
} }
int write_buffer(int handle, const void *data, int size) int write_buffer(int handle, const void *data, int size)
{ {
BUFFER_REC *rec; BUFFER_REC *rec;
const char *cdata = data; const char *cdata = data;
int next_size; int next_size;
if (size <= 0)
return size;
if (write_buffer_max_blocks <= 0) { if (write_buffer_max_blocks <= 0) {
/* no write buffer */ /* no write buffer */
return write(handle, data, size); return write(handle, data, size);
} }
if (size <= 0)
return size;
rec = g_hash_table_lookup(buffers, GINT_TO_POINTER(handle)); rec = g_hash_table_lookup(buffers, GINT_TO_POINTER(handle));
if (rec == NULL) { if (rec == NULL) {
rec = g_new0(BUFFER_REC, 1); rec = g_new0(BUFFER_REC, 1);
write_buffer_new_block(rec); write_buffer_new_block(rec);
g_hash_table_insert(buffers, GINT_TO_POINTER(handle), rec); g_hash_table_insert(buffers, GINT_TO_POINTER(handle), rec);
} }
while (size > 0) { while (size > 0) {
if (rec->active_block_pos == BUFFER_BLOCK_SIZE) if (rec->active_block_pos == BUFFER_BLOCK_SIZE)
write_buffer_new_block(rec); write_buffer_new_block(rec);
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)