| Here's how loginout does it. All the loginout routine that need to
call Xlib or the toolkit have been linked into a separate shareable
image: decw$loginout.exe. This shareable is linked to decw$xlibshr
and decw$dwtlibshr. The main loginout image, however, isn't directly
linked to decw$loginout.exe. Instead it uses lib$find_image_symbol
to activate it once it realizes that it needs to use the DECwindows
routines.
So in the character cell case, the loginout image doesn't activate
decw$loginout.exe, which means that none of the DECwindows run time
libraries are image activated.
The other approach is to use lib$find_image_symbol directly on the
Xlib and toolkit routines. For loginout, there were far fewer routines
in decw$loginout than were needed in xlib and the toolkit, so it was
easier to do it the other way.
|
| RE: .3
Right. LOGINOUT calls LIB$FIND_IMAGE_SYMBOL to build a dispatch table
(DECW$CALLOUT) which contains all of the routine addresses which it needs.
This is all done at the beginning of LOGINOUT (once it determines that it's
looking at a workstation device). Once it has built this table, it's just
a matter of a general routine call to execute the code:
; 0893 1 EXTERNAL
; 0908 1 decw$callout: VECTOR, ! DECwindows routines
; 1468 2 !
; 1469 2 ! If interactive job initiated by unsolicited input from a terminal,
; 1470 2 ! prompt the terminal for job parameters, and check for job quotas.
; 1471 2 !
; 1472 2 ! LOGIN of the DECwindows session manager (SM) requires a little special
; 1473 2 ! action to ensure that errors are logged to the appropriate place.
; 1474 2 !
; 1475 2 [.ctl$gl_creprc_flags[prc$v_inter]
; 1476 2 and not .ctl$gl_creprc_flags[prc$v_nopassword]]:
; 1477 3 BEGIN
; 1478 3 IF .decwindows
; 1479 3 THEN
; 1480 4 BEGIN
; 1481 4 LOCAL
; 1482 4 arglist: VECTOR [3]; ! Argument list for close_output
; 1483 4
; 1484 4 !
; 1485 4 ! Before opening the display, set SYS$OUTPUT to _OPA0: so that errors
; 1486 4 ! are logged somewhere.
; 1487 4 !
; 1488 4 arglist[0] = 2;
; 1489 4 arglist[1] = exit_process;
; 1490 4 arglist[2] = logging_output;
; P 1491 4 $CMEXEC(ROUTIN = (.decw$callout[decw$setup_operator]),
; 1492 4 ARGLST = arglist);
; 1493 4
; 1494 4 IF .logging_output
; 1495 4 THEN $CMEXEC(ROUTIN = open_output);
; 1496 4
; 1497 4 !
; 1498 4 ! Give DECwindows a chance to open the display and create an error
; 1499 4 ! window.
; 1500 4 !
; 1501 4 (.decw$callout[decw$init]) (decw$data,
; 1502 4 lgi$authenticate_user,
; 1503 4 lgi$get_authentication_info,
; 1504 4 set$password,
; 1505 4 generate_passwords);
; 1506 3 END;
; 1507 3
; 1508 3 $CMKRNL(ROUTIN = clear_creator_cli);
; P 1509 3 $CMKRNL(ROUTIN = set_account,
; 1510 3 ARGLST = %ASCID %STRING(%CHAR(0), '<login>'));
; 1511 3 init_interactive();
; 1512 3 check_connection();
; 1513 3 check_job_quotas();
; 1514 2 END;
|