Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 939046 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/blocks.c (-6 / +1 lines)
Lines 160-171 static gboolean on_new_input ( GIOChannel *source, GIOCondition UNUSED(condition Link Here
160
160
161
    GError * error = NULL;
161
    GError * error = NULL;
162
    gunichar unichar;
162
    gunichar unichar;
163
    GIOStatus status;
164
165
    status = g_io_channel_read_unichar(source, &unichar, &error);
166
163
167
    //when there is nothing to read, status is G_IO_STATUS_AGAIN
164
    //when there is nothing to read, status is G_IO_STATUS_AGAIN
168
    while(status == G_IO_STATUS_NORMAL) {
165
    while (g_io_channel_read_unichar(source, &unichar, &error) == G_IO_STATUS_NORMAL) {
169
        g_string_append_unichar(buffer, unichar);
166
        g_string_append_unichar(buffer, unichar);
170
        if( unichar == '\n' ){
167
        if( unichar == '\n' ){
171
            if(buffer->len > 1){ //input is not an empty line
168
            if(buffer->len > 1){ //input is not an empty line
Lines 178-184 static gboolean on_new_input ( GIOChannel *source, GIOCondition UNUSED(condition Link Here
178
            }
175
            }
179
            g_string_set_size(buffer, 0);
176
            g_string_set_size(buffer, 0);
180
        }
177
        }
181
        status = g_io_channel_read_unichar(source, &unichar, &error);
182
    }
178
    }
183
179
184
    if(newline){
180
    if(newline){
185
- 

Return to bug 939046