Files
fx/test/core/streams.c
2026-03-16 10:35:43 +00:00

22 lines
411 B
C

#include <fx/core/bstr.h>
#include <fx/core/stream.h>
#include <stdio.h>
int main(void)
{
fx_stream_read_line_s(fx_stdin, fx_stdout);
fx_stream_write_char(fx_stdout, '\n');
char s[16];
fx_bstr str;
fx_bstr_begin(&str, s, sizeof s);
fx_stream_read_line_s(fx_stdin, (fx_stream *)&str);
fx_stream_write_char((fx_stream *)&str, '\n');
const char *e = fx_bstr_end(&str);
fputs(e, stdout);
return 0;
}