13 fd
= fopen( "seek.txt", "wb" );
16 fprintf( stderr
, "Could not write test file seek.txt\n" );
19 fprintf( fd
, "() does not work!\n" );
23 fd
= fopen( "seek.txt", "rb" );
26 fprintf( stderr
, "Could not open test file seek.txt\n" );
29 i
= fread( buffer
, 1, 1, fd
);
30 //printf("pos=%ld\n",ftell(fd));
31 i
+= fread( &buffer
[1], 1, 6, fd
);
34 fprintf( stderr
, "Wanted to fread() %d chars, but could only get %d!\n", 6, i
-1 );
37 fseek( fd
, 4, SEEK_CUR
);
38 i
= fread( &buffer
[7], 1, 11, fd
);
40 printf( "fseek%s", buffer
);
44 file
= Open( "seek.txt", MODE_OLDFILE
);
45 i
= Read( file
, buffer
, 7 );
46 Seek( file
, 4, OFFSET_CURRENT
);
47 i
+= Read( file
, &buffer
[7], 11 );
49 printf( "\nSeek%s", buffer
);