1; 2; SMAPI; Modified Squish MSGAPI 3; 4; Squish MSGAPI0 is copyright 1991 by Scott J. Dudley. All rights reserved. 5; Modifications released to the public domain. 6; 7; Use of this file is subject to the restrictions contain in the Squish 8; MSGAPI0 licence agreement. Please refer to licence.txt for complete 9; details of the licencing restrictions. If you do not find the text 10; of this agreement in licence.txt, or if you do not have this file, 11; you should contact Scott Dudley at FidoNet node 1:249/106 or Internet 12; e-mail Scott.Dudley@f106.n249.z1.fidonet.org. 13; 14; In no event should you proceed to use any of the source files in this 15; archive without having accepted the terms of the MSGAPI0 licensing 16; agreement, or such other agreement as you are able to reach with the 17; author. 18; 19 20; Truly flush a file handle to disk 21 22ifndef __FLAT__ 23 24.model large, pascal 25 26else 27 28.386p 29.model small, pascal 30 31endif 32 33.code 34 35public FLUSH_HANDLE2 36 37ifndef __FLAT__ 38 39; duplicate file handle, then close the duplicate. 40 41FLUSH_HANDLE2 proc 42 push bp 43 mov bp,sp 44 mov ah,45h 45 mov bx,[bp+6] 46 int 21h 47 jc err 48 mov bx,ax 49 mov ah,3eh 50 int 21h 51err: 52 pop bp 53 ret 2 54FLUSH_HANDLE2 endp 55 56else 57 58FLUSH_HANDLE2 proc 59 mov ah,45h 60 mov ebx,[esp+4] 61 int 21h 62 jc err 63 mov ebx,eax 64 mov ah,3eh 65 int 21h 66err: 67 ret 4 68FLUSH_HANDLE2 endp 69 70endif 71 72end 73