FROM M2RTS IMPORT InstallTerminationProcedure ;
FROM Storage IMPORT ALLOCATE ;
-FROM SYSTEM IMPORT ADR ;
+FROM SYSTEM IMPORT ADR, COFF_T ;
IMPORT SFIO, libc, wrapc ;
FROM DynamicStrings IMPORT InitString, ConCat, ConCatChar, KillString, string ;
FROM FormatStrings IMPORT Sprintf2 ;
PROCEDURE doModeChange (VAR f: File; mode: Flag) ;
VAR
- r: INTEGER ;
+ r: COFF_T ;
BEGIN
WITH f DO
IF NOT (mode IN flags)
END ;
INCL (flags, opened) ;
r := libc.lseek (fio,
- VAL (LONGINT, lowpos) + VAL (LONGINT, highpos) * VAL (LONGINT, MAX (CARDINAL)),
+ VAL (COFF_T, lowpos) + VAL (COFF_T, highpos) * VAL (COFF_T, MAX (CARDINAL)),
SEEK_SET)
END
END
PROCEDURE SetPos (VAR f: File; high, low: CARDINAL) ;
VAR
- r: INTEGER ;
+ r: COFF_T ;
BEGIN
WITH f DO
- r := libc.lseek(fio, VAL(LONGCARD, low) +
- (VAL(LONGCARD, MAX(CARDINAL)) * VAL(LONGCARD, high)),
+ r := libc.lseek(fio, VAL(COFF_T, low) +
+ (VAL(COFF_T, MAX(CARDINAL)) * VAL(COFF_T, high)),
SEEK_SET) ;
highpos := high ;
lowpos := low ;
provides a simple buffered file input/output library.
*)
-FROM SYSTEM IMPORT ADR, TSIZE, WORD, CSSIZE_T ;
+FROM SYSTEM IMPORT ADR, TSIZE, WORD, COFF_T ;
FROM ASCII IMPORT nl, nul, tab ;
FROM StrLib IMPORT StrLen, StrConCat, StrCopy ;
FROM Storage IMPORT ALLOCATE, DEALLOCATE ;
filled := 0
END
END ;
- offset := lseek (unixfd, VAL (CSSIZE_T, pos), SeekSet ()) ;
+ offset := lseek (unixfd, VAL (COFF_T, pos), SeekSet ()) ;
IF (offset>=0) AND (pos=offset)
THEN
abspos := pos
filled := 0
END
END ;
- offset := lseek (unixfd, VAL (CSSIZE_T, pos), SeekEnd ()) ;
+ offset := lseek (unixfd, VAL (COFF_T, pos), SeekEnd ()) ;
IF offset>=0
THEN
abspos := offset ;
fd->buffer->position = 0;
fd->buffer->filled = 0;
}
- offset = static_cast<long int> (libc_lseek (fd->unixfd, (ssize_t ) (pos), wrapc_SeekSet ()));
+ offset = static_cast<long int> (libc_lseek (fd->unixfd, (off_t ) (pos), wrapc_SeekSet ()));
if ((offset >= 0) && (pos == offset))
{
fd->abspos = pos;
fd->buffer->position = 0;
fd->buffer->filled = 0;
}
- offset = static_cast<long int> (libc_lseek (fd->unixfd, (ssize_t ) (pos), wrapc_SeekEnd ()));
+ offset = static_cast<long int> (libc_lseek (fd->unixfd, (off_t ) (pos), wrapc_SeekEnd ()));
if (offset >= 0)
{
fd->abspos = offset;
off_t lseek(int fildes, off_t offset, int whence);
*/
-EXTERN ssize_t libc_lseek (int fd, ssize_t offset, int whence);
+EXTERN off_t libc_lseek (int fd, off_t offset, int whence);
/*
perror - writes errno and string. (ARRAY OF CHAR is translated onto ADDRESS).
# include "GStorage.h"
# include "Gmcrts.h"
#include <unistd.h>
-# include <sys/types.h>
#if defined(__cplusplus)
# undef NULL
# define NULL 0
fd->buffer->position = 0;
fd->buffer->filled = 0;
}
- offset = static_cast<long int> (libc_lseek (fd->unixfd, (ssize_t ) (pos), wrapc_SeekSet ()));
+ offset = static_cast<long int> (libc_lseek (fd->unixfd, (off_t ) (pos), wrapc_SeekSet ()));
if ((offset >= 0) && (pos == offset))
{
fd->abspos = pos;
fd->buffer->position = 0;
fd->buffer->filled = 0;
}
- offset = static_cast<long int> (libc_lseek (fd->unixfd, (ssize_t ) (pos), wrapc_SeekEnd ()));
+ offset = static_cast<long int> (libc_lseek (fd->unixfd, (off_t ) (pos), wrapc_SeekEnd ()));
if (offset >= 0)
{
fd->abspos = offset;
off_t lseek(int fildes, off_t offset, int whence);
*/
-EXTERN off_t libc_lseek (int fd, ssize_t offset, int whence);
+EXTERN off_t libc_lseek (int fd, off_t offset, int whence);
/*
perror - writes errno and string. (ARRAY OF CHAR is translated onto ADDRESS).