View previous topic :: View next topic |
Author |
Message |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri Oct 09, 2020 11:05 am Post subject: fseek for 64 bit scc and 64 bit offsets??? |
|
|
Some of our Fortran 64 bit applications make use C/C++ function fseek to position the file pointer. function fseek operates on offsets of type long which is of size 4 bytes. Now I would like to position file pointers to offsets which are of size 8 byte, as well, in order to process big files.
I know that Microsoft C++ supports funtion _fseeki64 which operates on offsets of type __int64 (which is of size 8 byte).
The current implementation of scc (for SALFORD fnt95 version 8.63) does not support _fseeki64. What would I have to do in order to call Microsoft's _fseeki64 from Salford's scc?
Would it be possible to support function _fseeki64 in a future release?
Any help/hint is appreciated.
Regards,
Dietmar |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Fri Oct 09, 2020 3:55 pm Post subject: |
|
|
Dietmar
fseek for 64 bit SCC is located in salflibc64.dll and calls upon the Microsoft function SetFilePointerEx. This in turn takes a 64 bit offset. So it should be a simple matter to add fseek64 to the SCC library. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Mon Oct 12, 2020 7:41 am Post subject: |
|
|
Dietmar
This function has been added to the library and a new set of DLL is available from http://forums.silverfrost.com/viewtopic.php?p=29221#29221.
The interface for the new function is
Quote: | extern "C" int _fseeki64(FILE *stream, long long int offset, int mode);
|
|
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon Oct 12, 2020 4:10 pm Post subject: |
|
|
Thanks Paul,
I will give it a try as soon as possible.
Regards
Dietmar |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 12, 2020 4:38 pm Post subject: |
|
|
Paul, the interface line you give above - in which file should it be inserted (whee are all the 'C' interfaces located ?
Ta _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
|