Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/imagefile2.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "version.h"

#include <stdio.h>
#include <unistd.h>
#include <pixrect/pixrect_hs.h>

#define FALSE 0
Expand Down Expand Up @@ -132,7 +133,7 @@ int position_rasterfile(RASTERFILE_INFO *fileinfo, int n)

if (n > 0) {
position = sizeof(struct rasterfile) + (n - 1) * fileinfo->rh.ras_length;
if ((status = fseek(fileinfo->file, position, (int)0)) == 0) {
if ((status = fseek(fileinfo->file, position, SEEK_SET)) == 0) {
/* normal return */
return (TRUE);
} /* end if( status ) */
Expand Down
6 changes: 3 additions & 3 deletions src/ldsout.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int sysout_loader(char * sysout_file_name, int sys_size)
}

/* seek to IFPAGE */
if (lseek(sysout, IFPAGE_ADDRESS, 0) == -1) {
if (lseek(sysout, IFPAGE_ADDRESS, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to IFPAGE");
exit(-1);
}
Expand Down Expand Up @@ -249,7 +249,7 @@ int sysout_loader(char * sysout_file_name, int sys_size)
#else
fptovp_offset = (fptovp_offset - 1) * BYTESPER_PAGE + 2;
#endif
if (lseek(sysout, fptovp_offset, 0) == -1) {
if (lseek(sysout, fptovp_offset, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to FPTOVP");
exit(-1);
}
Expand Down Expand Up @@ -311,7 +311,7 @@ int sysout_loader(char * sysout_file_name, int sys_size)
}
#endif /* DOS */
if (GETPAGEOK(fptovp, i) != 0177777) {
if (lseek(sysout, i * BYTESPER_PAGE, 0) == -1) {
if (lseek(sysout, i * BYTESPER_PAGE, SEEK_SET) == -1) {
perror("sysout_loader: can't seek sysout file");
exit(-1);
};
Expand Down
4 changes: 2 additions & 2 deletions src/setsout.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void set_sysout(int version, char *sysout_file_name) {
exit(-1);
}
/* seek to IFPAGE */
if (lseek(sysout, IFPAGE_ADDRESS, 0) == -1) {
if (lseek(sysout, IFPAGE_ADDRESS, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to IFPAGE");
exit(-1);
}
Expand All @@ -78,7 +78,7 @@ void set_sysout(int version, char *sysout_file_name) {
ifpage.minbversion = version;

/* seek to IFPAGE */
if (lseek(sysout, IFPAGE_ADDRESS, 0) == -1) {
if (lseek(sysout, IFPAGE_ADDRESS, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to IFPAGE");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/tstsout.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void check_sysout(char *sysout_file_name, int verbose) {
exit(-1);
}
/* seek to IFPAGE */
if (lseek(sysout, IFPAGE_ADDRESS, 0) == -1) {
if (lseek(sysout, IFPAGE_ADDRESS, SEEK_SET) == -1) {
perror("sysout_loader: can't seek to IFPAGE");
exit(-1);
}
Expand Down
4 changes: 2 additions & 2 deletions src/vmemsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ LispPTR vmem_save(char *sysout_file_name)
int contig_pages = 0;
register char *base_addr;

TIMEOUT(rval = lseek(sysout, i * BYTESPER_PAGE, 0));
TIMEOUT(rval = lseek(sysout, i * BYTESPER_PAGE, SEEK_SET));
if (rval == -1) {
err_mess("lseek", errno);
return (FILECANNOTSEEK);
Expand Down Expand Up @@ -472,7 +472,7 @@ LispPTR vmem_save(char *sysout_file_name)
}

/* seek to IFPAGE */
TIMEOUT(rval = lseek(sysout, (long)FP_IFPAGE, 0));
TIMEOUT(rval = lseek(sysout, (long)FP_IFPAGE, SEEK_SET));
if (rval == -1) {
err_mess("lseek", errno);
return (FILECANNOTSEEK);
Expand Down