This commit is contained in:
Mario Fetka
2026-05-22 12:46:01 +02:00
parent 3b8664cb77
commit b2da728f4b
3 changed files with 39 additions and 34 deletions

20
kern.h
View File

@@ -1,12 +1,20 @@
/* kern.h Assembler Routinen 20-Nov-93 */
extern int IPXinit(void);
extern int IPXopen_socket(UI sock, int live);
extern void IPXclose_socket(UI sock);
extern int IPXlisten(ECB *ecb);
#if defined(__WATCOMC__)
#define KERN_CALL _Cdecl
#else
#define KERN_CALL
#endif
extern int KERN_CALL IPXinit(void);
extern int KERN_CALL IPXopen_socket(UI sock, int live);
extern void KERN_CALL IPXclose_socket(UI sock);
extern int KERN_CALL IPXlisten(ECB *ecb);
extern void asm_esr_routine(void);
extern void esr_routine(ECB *ecb);
extern void xmemmove(void *ziel, void *quelle, UI anz);
extern int Net_Call(UI func, void *req, void *repl);
extern void KERN_CALL xmemmove(void *ziel, void *quelle, UI anz);
extern int KERN_CALL Net_Call(UI func, void *req, void *repl);
#undef KERN_CALL

View File

@@ -14,14 +14,14 @@ enterIPX dd 0
.code
public IPXinit_
public IPXopen_socket_
public IPXclose_socket_
public IPXlisten_
public xmemmove_
public Net_Call_
public _IPXinit
public _IPXopen_socket
public _IPXclose_socket
public _IPXlisten
public _xmemmove
public _Net_Call
IPXinit_ proc far
_IPXinit proc far
push bp
mov bp, sp
push ds
@@ -48,9 +48,9 @@ ipxinit_done:
pop ds
pop bp
ret
IPXinit_ endp
_IPXinit endp
xmemmove_ proc far
_xmemmove proc far
push bp
mov bp, sp
@@ -101,9 +101,9 @@ xmem_done:
pop bp
sti
ret
xmemmove_ endp
_xmemmove endp
IPXopen_socket_ proc far
_IPXopen_socket proc far
push bp
mov bp, sp
push ds
@@ -138,9 +138,9 @@ ipxopen_done:
pop ds
pop bp
ret
IPXopen_socket_ endp
_IPXopen_socket endp
IPXclose_socket_ proc far
_IPXclose_socket proc far
push bp
mov bp, sp
push ds
@@ -159,9 +159,9 @@ IPXclose_socket_ proc far
pop ds
pop bp
ret
IPXclose_socket_ endp
_IPXclose_socket endp
IPXlisten_ proc far
_IPXlisten proc far
push bp
mov bp, sp
push ds
@@ -181,9 +181,9 @@ IPXlisten_ proc far
pop bp
mov ah, 0
ret
IPXlisten_ endp
_IPXlisten endp
Net_Call_ proc far
_Net_Call proc far
push bp
mov bp, sp
@@ -211,6 +211,6 @@ Net_Call_ proc far
pop bp
mov ah, 0
ret
Net_Call_ endp
_Net_Call endp
end

17
login.c
View File

@@ -103,6 +103,7 @@ static int get_raw_str(uint8 *s, int maxlen, int doecho)
static void getstr(char *what, char *str, int rsize, int doecho)
{
fprintf(stdout, "%s: ", what);
fflush(stdout);
get_raw_str(str, rsize, doecho);
fprintf(stdout, "\n");
}
@@ -121,7 +122,6 @@ int func_login(int argc, char *argv[], int mode)
uint8 uname[200];
uint8 upasswd[200];
SEARCH_VECTOR save_drives;
int password_given = 0;
if (argc > 1) {
if (argv[1][0] == '-') {
@@ -135,26 +135,23 @@ int func_login(int argc, char *argv[], int mode)
remove_nwpathes();
if (argc > 1) strmaxcpy(uname, argv[1], sizeof(uname) -1);
else uname[0]='\0';
if (argc > 2) {
strmaxcpy(upasswd, argv[2], sizeof(upasswd) -1);
password_given = 1;
} else upasswd[0]='\0';
if (argc > 2) strmaxcpy(upasswd, argv[2], sizeof(upasswd) -1);
else upasswd[0]='\0';
while (result) {
if (!uname[0]) getstr("Login", uname, sizeof(uname)-1, 1);
if (uname[0]) {
upstr(uname);
if (!password_given) {
upstr(upasswd);
if ((result = do_object_login(uname, 0x1, upasswd, option)) < 0 && !*upasswd) {
getstr("Password", upasswd, sizeof(upasswd)-1, 0);
upstr(upasswd);
password_given = 1;
} else upstr(upasswd);
result = do_object_login(uname, 0x1, upasswd, option);
result = do_object_login(uname, 0x1, upasswd, option);
}
if (result < 0) {
fprintf(stdout, "Login incorrect\n\n");
uname[0] = '\0';
upasswd[0] = '\0';
password_given = 0;
}
} else break;
}