forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

fseek for 64 bit scc and 64 bit offsets???

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Fri Oct 09, 2020 11:05 am    Post subject: fseek for 64 bit scc and 64 bit offsets??? Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Oct 09, 2020 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Oct 12, 2020 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Mon Oct 12, 2020 4:10 pm    Post subject: Reply with quote

Thanks Paul,

I will give it a try as soon as possible.

Regards
Dietmar
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Oct 12, 2020 4:38 pm    Post subject: Reply with quote

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 ... Smile "
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group