gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (07/10/84)
Void data is uniquely suited to putting in WOM (Write-Only Memory);
since sizeof(void) is 0, one can pack a lot of data into the WOM.
/* Example of void data -- inspired by UNIX code */
/*ARGSUSED*/
main( argc, argv )
int argc;
char *argv[];
{
char c; /* I/O character buffer */
void status; /* system call return status */
for ( ; ; )
{
status = (void)read( 0, &c, 1 );
if ( (int)c == '\n' )
break;
status = (void)write( 1, &c, 1 );
}
exit( 0 ); /* nothing can possibly go wrong */
}