count++;
}
}
- if (count == 0) /* No lines to send, cancel the event. */
- {
- _ecore_exe_event_exe_data_free(NULL, e);
- e = NULL;
- }
- else /* NULL terminate the array, so that people know where the end is. */
- {
- e->lines[count].line = NULL;
- e->lines[count].size = 0;
- }
if (i > last) /* Partial line left over, save it for next time. */
{
- if (e) e->size = last;
+ if (count != 0) e->size = last;
if (flags & ECORE_EXE_PIPE_READ)
{
exe->read_data_size = i - last;
memcpy(exe->error_data_buf, c, exe->error_data_size);
}
}
+ if (count == 0) /* No lines to send, cancel the event. */
+ {
+ _ecore_exe_event_exe_data_free(NULL, e);
+ e = NULL;
+ }
+ else /* NULL terminate the array, so that people know where the end is. */
+ {
+ e->lines[count].line = NULL;
+ e->lines[count].size = 0;
+ }
}
}