Convert next batch of remote_ functions (with one far pointer argument) --

network_redirector() can be a wrapper in C.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@891 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-04-20 20:25:26 +00:00
parent c4e65eb689
commit ebbd6b8336
4 changed files with 15 additions and 37 deletions

View File

@ -733,7 +733,7 @@ COUNT DosCloseSft(int sft_idx, BOOL commitonly)
if (sftp->sft_flags & SFT_FSHARED)
{
/* printf("closing SFT %d = %p\n",sft_idx,sftp); */
return (commitonly ? remote_commit(sftp) : remote_close(sftp));
return network_redirector_fp(commitonly ? REM_FLUSH: REM_CLOSE, sftp);
}
/* now just drop the count if a device, else */
@ -1058,7 +1058,7 @@ COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name)
memset(&sda_tmp_dm, 0, sizeof(dmatch)+sizeof(struct dirent));
if (rc & IS_NETWORK)
rc = remote_findfirst(current_ldt);
rc = network_redirector_fp(REM_FINDFIRST, current_ldt);
else if (rc & IS_DEVICE)
{
const char *p;
@ -1120,7 +1120,7 @@ COUNT DosFindNext(void)
memset(&SearchDir, 0, sizeof(struct dirent));
dta = &sda_tmp_dm;
rc = (sda_tmp_dm.dm_drive & 0x80) ?
remote_findnext(&sda_tmp_dm) : dos_findnext();
network_redirector_fp(REM_FINDNEXT, &sda_tmp_dm) : dos_findnext();
dta = dmp;
if (rc == SUCCESS)

View File

@ -273,24 +273,14 @@ SHARE_LOCK_UNLOCK:
; sumtimes return data *ptr is the push stack word
;
global NETWORK_REDIRECTOR
NETWORK_REDIRECTOR:
global NETWORK_REDIRECTOR_FP
NETWORK_REDIRECTOR_FP:
push bp
mov bp, sp
mov al, [bp+4]
mov al, [bp+8]
pop bp
call call_int2f
ret 2
global _remote_close
_remote_close:
mov al, 06h
jmp short call_int2f
global _remote_commit
_remote_commit:
mov al, 07h
jmp short call_int2f
ret 6
global _remote_read
_remote_read: mov al, 08h
@ -320,16 +310,6 @@ _remote_creat:
mov al, 17h
jmp short call_int2f
global _remote_findfirst
_remote_findfirst:
mov al, 1bh
jmp short call_int2f
global _remote_findnext
_remote_findnext:
mov al, 1ch
jmp short call_int2f
global _remote_doredirect
_remote_doredirect:
mov al, 1eh

View File

@ -51,3 +51,8 @@ VOID set_machine_name(BYTE FAR * netname, UWORD name_num)
net_set_count++;
}
int network_redirector(unsigned cmd)
{
return network_redirector_fp(cmd, NULL);
}

View File

@ -379,14 +379,13 @@ int DosMkTmp(BYTE FAR * pathname, UWORD attr);
COUNT truename(const char FAR * src, char * dest, COUNT t);
/* network.c */
COUNT ASMPASCAL network_redirector(unsigned cmd);
int network_redirector(unsigned cmd);
int ASMPASCAL network_redirector_fp(unsigned cmd, void far *s);
COUNT ASMCFUNC remote_doredirect(UWORD b, UCOUNT n, UWORD d, VOID FAR * s,
UWORD i, VOID FAR * data);
COUNT ASMCFUNC remote_printset(UWORD b, UCOUNT n, UWORD d, VOID FAR * s,
UWORD i, VOID FAR * data);
COUNT ASMCFUNC remote_process_end(VOID);
COUNT ASMCFUNC remote_findfirst(VOID FAR * s);
COUNT ASMCFUNC remote_findnext(VOID FAR * s);
COUNT ASMCFUNC remote_getfree(VOID FAR * s, VOID * d);
COUNT ASMCFUNC remote_open(sft FAR * s, COUNT mode);
int ASMCFUNC remote_extopen(sft FAR * s, unsigned attr);
@ -396,8 +395,6 @@ UCOUNT ASMCFUNC remote_write(sft FAR * s, UCOUNT n, COUNT * err);
COUNT ASMCFUNC remote_creat(sft FAR * s, COUNT attr);
COUNT ASMCFUNC remote_setfattr(COUNT attr);
COUNT ASMCFUNC remote_printredir(UCOUNT dx, UCOUNT ax);
COUNT ASMCFUNC remote_commit(sft FAR * s);
COUNT ASMCFUNC remote_close(sft FAR * s);
COUNT ASMCFUNC QRemote_Fn(char FAR * d, const char FAR * s);
#ifdef __WATCOMC__
/* bx, cx, and es not used or clobbered for all remote functions,
@ -405,8 +402,6 @@ COUNT ASMCFUNC QRemote_Fn(char FAR * d, const char FAR * s);
#pragma aux cdecl_axdx "_*" parm caller [] modify exact [ax dx]
#pragma aux (cdecl_axdx) remote_doredirect
#pragma aux (cdecl_axdx) remote_printset
#pragma aux (cdecl_axdx) remote_findfirst
#pragma aux (cdecl_axdx) remote_findnext
#pragma aux (cdecl_axdx) remote_getfree
#pragma aux (cdecl_axdx) remote_open
#pragma aux (cdecl_axdx) remote_extopen
@ -416,10 +411,8 @@ COUNT ASMCFUNC QRemote_Fn(char FAR * d, const char FAR * s);
#pragma aux (cdecl_axdx) remote_creat
#pragma aux (cdecl_axdx) remote_setfattr
#pragma aux (cdecl_axdx) remote_printredir
#pragma aux (cdecl_axdx) remote_commit
#pragma aux (cdecl_axdx) remote_close
#pragma aux (cdecl_axdx) QRemote_Fn
#pragma aux (pascal) network_redirector modify exact [ax dx]
#pragma aux (pascal) network_redirector_fp modify exact [ax dx]
#endif
UWORD get_machine_name(BYTE FAR * netname);