head 1.2; access; symbols SFIO_1999:1.1.1.2 SFIO_1998:1.1.1.2 SFIO_1997:1.1.1.1 ATT:1.1.1; locks; strict; comment @ * @; 1.2 date 99.09.11.12.42.12; author rse; state Exp; branches; next 1.1; 1.1 date 96.10.04.20.21.29; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.10.04.20.21.29; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 97.10.14.20.30.59; author rse; state Exp; branches; next ; desc @@ 1.2 log @Incorporate stuff from RSE's Sfio98 variant @ text @#include "sftest.h" int main() { int i; char wbuf[1023]; char rbuf[1023]; Sfio_t *fp; for(i = 0; i < sizeof(wbuf); ++i) wbuf[i] = (i%26)+'a'; wbuf[sizeof(wbuf)-1] = '\0'; if(!(fp = sftmp(0))) terror("Opening temp file\n"); for(i = 0; i < 256; ++i) if(sfwrite(fp,wbuf,sizeof(wbuf)) != sizeof(wbuf)) terror("Writing\n"); sfseek(fp,(Sfoff_t)0,0); sfset(fp,SF_WRITE,0); sfsetbuf(fp,NIL(char*),0); sfsetbuf(fp,NIL(char*),SF_UNBOUND); for(i = 0; i < 256; ++i) { if(sfread(fp,rbuf,sizeof(rbuf)) != sizeof(rbuf)) terror("Reading\n"); if(strcmp(rbuf,wbuf) != 0) terror("Unmatched record\n"); } return 0; } @ 1.1 log @Initial revision @ text @d4 1 a4 1 main() d18 1 a18 1 for(i = 0; i < 1024; ++i) d27 1 a27 1 for(i = 0; i < 1024; ++i) @ 1.1.1.1 log @Import of Sfio1997 @ text @@ 1.1.1.2 log @Import of Sfio1998 @ text @d18 1 a18 1 for(i = 0; i < 256; ++i) d27 1 a27 1 for(i = 0; i < 256; ++i) @