File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1111#include "version.h"
1212
1313#include <stdio.h>
14+ #include <unistd.h>
1415#include <pixrect/pixrect_hs.h>
1516
1617#define FALSE 0
@@ -132,7 +133,7 @@ int position_rasterfile(RASTERFILE_INFO *fileinfo, int n)
132133
133134 if (n > 0 ) {
134135 position = sizeof (struct rasterfile ) + (n - 1 ) * fileinfo -> rh .ras_length ;
135- if ((status = fseek (fileinfo -> file , position , ( int ) 0 )) == 0 ) {
136+ if ((status = fseek (fileinfo -> file , position , SEEK_SET )) == 0 ) {
136137 /* normal return */
137138 return (TRUE);
138139 } /* end if( status ) */
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ int sysout_loader(char * sysout_file_name, int sys_size)
109109 }
110110
111111 /* seek to IFPAGE */
112- if (lseek (sysout , IFPAGE_ADDRESS , 0 ) == -1 ) {
112+ if (lseek (sysout , IFPAGE_ADDRESS , SEEK_SET ) == -1 ) {
113113 perror ("sysout_loader: can't seek to IFPAGE" );
114114 exit (-1 );
115115 }
@@ -248,7 +248,7 @@ int sysout_loader(char * sysout_file_name, int sys_size)
248248#else
249249 fptovp_offset = (fptovp_offset - 1 ) * BYTESPER_PAGE + 2 ;
250250#endif
251- if (lseek (sysout , fptovp_offset , 0 ) == -1 ) {
251+ if (lseek (sysout , fptovp_offset , SEEK_SET ) == -1 ) {
252252 perror ("sysout_loader: can't seek to FPTOVP" );
253253 exit (-1 );
254254 }
@@ -310,7 +310,7 @@ int sysout_loader(char * sysout_file_name, int sys_size)
310310 }
311311#endif /* DOS */
312312 if (GETPAGEOK (fptovp , i ) != 0177777 ) {
313- if (lseek (sysout , i * BYTESPER_PAGE , 0 ) == -1 ) {
313+ if (lseek (sysout , i * BYTESPER_PAGE , SEEK_SET ) == -1 ) {
314314 perror ("sysout_loader: can't seek sysout file" );
315315 exit (-1 );
316316 };
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ void set_sysout(int version, char *sysout_file_name) {
6060 exit (-1 );
6161 }
6262 /* seek to IFPAGE */
63- if (lseek (sysout , IFPAGE_ADDRESS , 0 ) == -1 ) {
63+ if (lseek (sysout , IFPAGE_ADDRESS , SEEK_SET ) == -1 ) {
6464 perror ("sysout_loader: can't seek to IFPAGE" );
6565 exit (-1 );
6666 }
@@ -78,7 +78,7 @@ void set_sysout(int version, char *sysout_file_name) {
7878 ifpage .minbversion = version ;
7979
8080 /* seek to IFPAGE */
81- if (lseek (sysout , IFPAGE_ADDRESS , 0 ) == -1 ) {
81+ if (lseek (sysout , IFPAGE_ADDRESS , SEEK_SET ) == -1 ) {
8282 perror ("sysout_loader: can't seek to IFPAGE" );
8383 exit (-1 );
8484 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ void check_sysout(char *sysout_file_name, int verbose) {
5555 exit (-1 );
5656 }
5757 /* seek to IFPAGE */
58- if (lseek (sysout , IFPAGE_ADDRESS , 0 ) == -1 ) {
58+ if (lseek (sysout , IFPAGE_ADDRESS , SEEK_SET ) == -1 ) {
5959 perror ("sysout_loader: can't seek to IFPAGE" );
6060 exit (-1 );
6161 }
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ LispPTR vmem_save(char *sysout_file_name)
421421 int contig_pages = 0 ;
422422 register char * base_addr ;
423423
424- TIMEOUT (rval = lseek (sysout , i * BYTESPER_PAGE , 0 ));
424+ TIMEOUT (rval = lseek (sysout , i * BYTESPER_PAGE , SEEK_SET ));
425425 if (rval == -1 ) {
426426 err_mess ("lseek" , errno );
427427 return (FILECANNOTSEEK );
@@ -472,7 +472,7 @@ LispPTR vmem_save(char *sysout_file_name)
472472 }
473473
474474 /* seek to IFPAGE */
475- TIMEOUT (rval = lseek (sysout , (long )FP_IFPAGE , 0 ));
475+ TIMEOUT (rval = lseek (sysout , (long )FP_IFPAGE , SEEK_SET ));
476476 if (rval == -1 ) {
477477 err_mess ("lseek" , errno );
478478 return (FILECANNOTSEEK );
You can’t perform that action at this time.
0 commit comments