2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
18 fd
= fopen( "seek.txt", "wb" );
21 fprintf( stderr
, "Could not write test file seek.txt\n" );
24 fprintf( fd
, "() does not work!\n" );
28 fd
= fopen( "seek.txt", "rb" );
31 fprintf( stderr
, "Could not open test file seek.txt\n" );
34 i
= fread( buffer
, 1, 1, fd
);
35 //printf("pos=%ld\n",ftell(fd));
36 i
+= fread( &buffer
[1], 1, 6, fd
);
39 fprintf( stderr
, "Wanted to fread() %d chars, but could only get %d!\n", 6, i
-1 );
42 fseek( fd
, 4, SEEK_CUR
);
43 i
= fread( &buffer
[7], 1, 11, fd
);
45 printf( "fseek%s", buffer
);
49 file
= Open( "seek.txt", MODE_OLDFILE
);
50 i
= Read( file
, buffer
, 7 );
51 Seek( file
, 4, OFFSET_CURRENT
);
52 i
+= Read( file
, &buffer
[7], 11 );
54 printf( "\nSeek%s", buffer
);