core: stream: b_stream_read_line_s now includes linefeed in output and correctly reports EOF condition
This commit is contained in:
@@ -386,14 +386,19 @@ enum b_status b_stream_read_line_s(struct b_stream *src, b_stream *dest)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
b_stream_write_char(dest, c);
|
||||||
|
i++;
|
||||||
|
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
b_stream_write_char(dest, c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_SUCCESS;
|
if (status == B_ERR_NO_DATA && i > 0) {
|
||||||
|
status = B_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum b_status b_stream_read_all_bytes(
|
enum b_status b_stream_read_all_bytes(
|
||||||
|
|||||||
Reference in New Issue
Block a user