TAP_Hdd_Fseek

Topfield Documentation

dword TAP_Hdd_Fseek( TYPE_File *fp, long pos, long where )

It changes the read/write position of the file specified by fp. This position defines the character that will be read or written on the next I/O operation on the file.

  • pos : offset from the file location given by 'where'
  • where : file location. The value are as follows.
    • SEEK_SET : File beginning
    • SEEK_CUR : Current file pointer position
    • SEEK_END : End of file

Additional Documentation

SEEK_END works incorrectly in the same manner as TAP_Hdd_Flen with files

if ( where != SEEK_END || (file && (file->size == 0 || (file->size % 512))) )
	return TAP_Hdd_Fseek( file, pos, where );
return TAP_Hdd_Fseek( file, pos+512, SEEK_END );

libutils? contains a fixit module. Simply include tapapifix.h and calls TAP_Hdd_Fseek will be replaced with a version that includes the above code.

In order to use SEEK_SET, SEEK_CUR and SEEK_END constants you need to include stdio.h -file.