5 static long int ham
= 0xdeadbeefdeadbeef;
6 struct thread_master
*master
;
9 print_stream (struct stream
*s
)
11 size_t getp
= stream_get_getp (s
);
13 printf ("endp: %ld, readable: %ld, writeable: %ld\n",
16 STREAM_WRITEABLE (s
));
18 while (STREAM_READABLE (s
))
20 printf ("0x%x ", *stream_pnt (s
));
21 stream_forward_getp (s
, 1);
26 /* put getp back to where it was */
27 stream_set_getp (s
, getp
);
35 s
= stream_new (1024);
44 stream_resize (s
, stream_get_endp (s
));
48 printf ("c: 0x%hhx\n", stream_getc (s
));
49 printf ("w: 0x%hx\n", stream_getw (s
));
50 printf ("l: 0x%x\n", stream_getl (s
));
51 printf ("q: 0x%lx\n", stream_getq (s
));