From 81a4046807370603be08c934665d691d951f5a9e Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 1 Nov 2016 12:50:21 -0500 Subject: [PATCH] polishment w --- MEMINFO.16W | 0 PROFILE.16W | 0 src/lib/16_ca.c | 100 ++++++++++++++++++++++----------------------- src/lib/doslib | 2 +- src/lib/typdefst.h | 2 + 5 files changed, 53 insertions(+), 51 deletions(-) delete mode 100755 MEMINFO.16W delete mode 100755 PROFILE.16W diff --git a/MEMINFO.16W b/MEMINFO.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/PROFILE.16W b/PROFILE.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index bf89531f..cd472474 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -239,45 +239,45 @@ boolean CA_FarRead(int handle, byte huge *dest, dword length, global_game_variab //if(!fat&&!segm) //{ - __asm { - push ds - mov bx,[handle] - mov cx,[WORD PTR length] - mov dx,[WORD PTR dest] - mov ds,[WORD PTR dest+2] - mov ah,0x3f // READ w/handle - int 21h - pop ds - jnc good - mov errno,ax - mov flag,0 - jmp End + __asm { + push ds + mov bx,[handle] + mov cx,[WORD PTR length] + mov dx,[WORD PTR dest] + mov ds,[WORD PTR dest+2] + mov ah,0x3f // READ w/handle + int 21h + pop ds + jnc good + mov errno,ax + mov flag,0 + jmp End #ifdef __BORLANDC__ - } + } #endif good: #ifdef __BORLANDC__ - __asm { + __asm { #endif - cmp ax,[WORD PTR length] - je done -// errno = EINVFMT; // user manager knows this is bad read - mov flag,0 - jmp End + cmp ax,[WORD PTR length] + je done +// errno = EINVFMT; // user manager knows this is bad read + mov flag,0 + jmp End #ifdef __BORLANDC__ - } + } #endif done: #ifdef __BORLANDC__ - __asm { + __asm { #endif - mov flag,1 + mov flag,1 #ifdef __BORLANDC__ - } + } #endif End: #ifdef __WATCOMC__ - } + } #endif return flag; } @@ -311,45 +311,45 @@ boolean CA_FarWrite(int handle, byte huge *source, dword length, global_game_var //if(!fat&&!segm) //{ - __asm { - push ds - mov bx,[handle] - mov cx,[WORD PTR length] - mov dx,[WORD PTR source] - mov ds,[WORD PTR source+2] - mov ah,0x40 // WRITE w/handle - int 21h - pop ds - jnc good - mov errno,ax - mov flag,0 - jmp End + __asm { + push ds + mov bx,[handle] + mov cx,[WORD PTR length] + mov dx,[WORD PTR source] + mov ds,[WORD PTR source+2] + mov ah,0x40 // WRITE w/handle + int 21h + pop ds + jnc good + mov errno,ax + mov flag,0 + jmp End #ifdef __BORLANDC__ - } + } #endif good: #ifdef __BORLANDC__ - __asm { + __asm { #endif - cmp ax,[WORD PTR length] - je done - //errno = ENOMEM; // user manager knows this is bad write - mov flag,0 - jmp End + cmp ax,[WORD PTR length] + je done +// errno = ENOMEM; // user manager knows this is bad write + mov flag,0 + jmp End #ifdef __BORLANDC__ - } + } #endif done: #ifdef __BORLANDC__ - __asm { + __asm { #endif - mov flag,1 + mov flag,1 #ifdef __BORLANDC__ - } + } #endif End: #ifdef __WATCOMC__ - } + } #endif return flag; } diff --git a/src/lib/doslib b/src/lib/doslib index 2b41d62d..5f204b4c 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 2b41d62d2c725cf906bddd170cc89410bd4f7015 +Subproject commit 5f204b4c63596375fe4c04c6ea6220fab7116f82 diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index d6cc2b9a..7571ffd9 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -341,4 +341,6 @@ typedef struct extern char global_temp_status_text[512]; +#define EINVFMT EMFILE + #endif /* _TYPEDEFSTRUCT_H_ */ -- 2.39.5