blob: accc723d3190fb1da18bc14d0a7bbd52b01f910a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <bu/queuebuf.h>
#include <bu/sio.h>
using namespace Bu;
int main()
{
static const char *src = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789%#";
QueueBuf qb;
for( int j = 0; j < 8; j++ )
{
qb.write( src, 60 );
}
char buf[11];
while( !qb.isEos() )
{
buf[qb.read( buf, 9 )] = '\0';
sio << "Read: >>" << buf << "<<" << sio.nl;
}
}
|