* This file implements the API used in the PC version.
name_resolve(regs
, sregs
)
* Session Information Services.
query_session_id(regs
, sregs
)
query_session_parameters(regs
, sregs
)
query_session_cursor(regs
, sregs
)
connect_to_keyboard(regs
, sregs
)
disable_input(regs
, sregs
)
write_keystroke(regs
, sregs
)
enable_input(regs
, sregs
)
disconnect_from_keyboard(regs
, sregs
)
* Operator Information Area Services.
read_oia_group(regs
, sregs
)
if (regs
->h
.ah
== NAME_RESOLUTION
) {
name_resolution(regs
, sregs
);
query_session_id(regs
, sregs
);
case QUERY_SESSION_PARMS
:
query_session_parms(regs
, sregs
);
case QUERY_SESSION_CURSOR
:
query_session_cursor(regs
, sregs
);
case CONNECT_TO_KEYBOARD
:
connect_to_keyboard(regs
, sregs
);
disable_input(regs
, sregs
);
write_keystroke(regs
, sregs
);
enable_input(regs
, sregs
);
case DISCONNECT_FROM_KEYBOARD
:
disconnect_from_keyboard(regs
, sregs
);
copy_string(regs
, sregs
);
read_oia_group(regs
, sregs
);
* Called from telnet.c to fork a lower command.com. We
* use the spint... routines so that we can pick up
* interrupts generated by application programs.
static char command
[256];
spinted
.int_no
= API_INTERRUPT_NUMBER
;
cmdptr
= command
+strlen(command
);
if ((cmdptr
+strlen(*argv
)) >= (command
+sizeof command
)) {
fprintf(stderr
, "Argument list too long at argument *%s*.\n",
*cmdptr
++ = ' '; /* Blank separators */
cmdptr
+= strlen(cmdptr
);
length
= strlen(command
)-1;
* spint_start() returns when either the command has finished, or when
* the required interrupt comes in. In the latter case, the appropriate
* thing to do is to process the interrupt, and then return to
* the interrupt issuer by calling spint_continue().
spint_start(command
, &spinted
);
while (spinted
.done
== 0) {
handle_api(&spinted
.regs
, &spinted
.sregs
);
spint_continue(&spinted
);
fprintf(stderr
, "Process generated a return code of 0x%x.\n",