|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 615 (0x267)
Types: TextFile
Names: »saxer3.c«
└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21E/saxer/saxer3.c«
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/saxer/saxer3.c«
/* Program #3 John Saxer
write bench */
#include <stdio.h>
#ifndef BSIZE
# define BSIZE BUFSIZ
#endif
#ifndef NBLOCKS
# define NBLOCKS 2000
#endif
main()
{
register int fd, i;
char buf[BSIZE];
#ifdef CREATE
*buf='1';
if ( ( fd=creat("saxer.dat",0640) ) == -1 )
#else
*buf='2';
if ( ( fd=open("saxer.dat",2) ) == -1 || lseek(fd,0L,0) == -1 )
#endif
{
perror("saxer.dat");
exit(1);
}
for ( i=0; i<NBLOCKS; i++ )
write(fd,buf,BSIZE);
close(fd);
}