# HG changeset patch # User Pascal Bellard # Date 1543679305 -3600 # Node ID cb4579b9835b9da0ce5d59ee870ba85cbc0a8df1 # Parent cbf4455443d392017c663158aca4f88e683855d6 linld: fix open_image diff -r cbf4455443d3 -r cb4579b9835b linld/stuff/src/CRTL.ASM --- a/linld/stuff/src/CRTL.ASM Sat Dec 01 13:00:11 2018 +0100 +++ b/linld/stuff/src/CRTL.ASM Sat Dec 01 16:48:25 2018 +0100 @@ -279,11 +279,11 @@ endp @read$qipvi ;*************************************************************** -;_fastcall long lseekset(int fd, unsigned sz); -;_fastcall long lseekcur(int fd, int while); +;_fastcall long lseekset(int fd, unsigned whence); +;_fastcall long lseekcur(int fd, int whence); ;*************************************************************** - global @lseekcur$qii:near + global @lseekcur$qii:near ; fd=ax whence=dx proc @lseekcur$qii near xchg ax,bx @@ -311,7 +311,7 @@ lseekx: xchg ax,bx lseek: - mov ah,42h + mov ah,42h ; bx=fd cx:dx=offset al=whence jmp dos endp @lseekcur$qii @@ -342,7 +342,7 @@ mov dx,[bx] mov cx,[bx+2] extrn _isostate:isostate - mov bx,[_isostate.fd] + mov ax,[_isostate.fd] jmp lseekset endp @isolseek$qpxul @@ -502,9 +502,9 @@ @@die: mov bx,[(image_himem di).errmsg] jc die - mov bx,[(image_himem di).fd] ifndef NO386 push eax + mov ax,[(image_himem di).fd] call rewind pop eax @@end: @@ -512,6 +512,7 @@ else push ax push dx + mov ax,[(image_himem di).fd] call rewind pop dx pop ax diff -r cbf4455443d3 -r cb4579b9835b linld/stuff/src/CRTL.H --- a/linld/stuff/src/CRTL.H Sat Dec 01 13:00:11 2018 +0100 +++ b/linld/stuff/src/CRTL.H Sat Dec 01 16:48:25 2018 +0100 @@ -35,7 +35,7 @@ extern _fastcall int open(const char* name); extern _fastcall int close(int fd); extern _fastcall int read(int fd, void* data, int sz); -extern _fastcall long lseekcur(int fd, int where); +extern _fastcall long lseekcur(int fd, int whence); extern _fastcall int puts(const char* s); extern pascal unsigned long strtol(const char *s); diff -r cbf4455443d3 -r cb4579b9835b linld/stuff/src/CRTLX.H --- a/linld/stuff/src/CRTLX.H Sat Dec 01 13:00:11 2018 +0100 +++ b/linld/stuff/src/CRTLX.H Sat Dec 01 16:48:25 2018 +0100 @@ -1,6 +1,6 @@ // This file is distributed under GPL // -extern _fastcall long lseekset(int fd, unsigned sz); +extern _fastcall long lseekset(int fd, unsigned whence); extern _fastcall void strcpy(const char* a,const char* b); extern _fastcall void strcat(const char* a,const char* b); extern _fastcall int strcmp(const char* a,const char* b);