Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!metro!usage.csd.unsw.oz.au!usage.csd!lambert From: lambert@spectrum.cs.unsw.oz.au (Tim Lambert) Newsgroups: comp.sys.apollo Subject: Re: Configuring X on an Apollo Message-ID: Date: 8 Aug 90 12:29:19 GMT References: <1990Aug6.223445.32172@eagle.wesleyan.edu> <1990Aug7.142135.19679@ncsuvx.ncsu.edu> <1990Aug7.191049.15920@terminator.cc.umich.edu> Sender: news@usage.csd.unsw.oz.au Organization: EE & CS, Uni of NSW, Australia Lines: 60 In-reply-to: rees@pisa.ifs.umich.edu's message of 7 Aug 90 19:10:49 GMT >>>>> On 7 Aug 90 19:10:49 GMT, rees@pisa.ifs.umich.edu (Jim Rees) said: > You still have to logout the DM way. Again, I don't think this is a > terribly big burden. You could even fix this with a strategically places > "xdmc LO", but note that xdmc needs to run in a pad (what a lose). I use this program instead of /usr/apollo/bin/xdmc -------------cut here--------------------- program xdmc; {xdmc that works if stdout is not a pad} {Tim Lambert lambert@spectrum.cs.unsw.oz.au} {You can do whatever you want with this program} %include '/sys/ins/base.ins.pas'; %include '/sys/ins/pad.ins.pas'; %include '/sys/ins/error.ins.pas'; %include '/sys/ins/pgm.ins.pas'; const longest_command=1024; type name_t = varying[longest_command] of char; var win:pad_$window_desc_t :=[0,0,1,1]; {where to put the window} stream:stream_$id_t; status : status_$t; an_arg : varying[128]of char; dm_cmd : name_t; no_of_args,argno : integer; {no of arguments (counting argument 0) & a counter for going through args} arg_pointer : pgm_$argv_ptr; {pointer to the arguments - not used} PROCEDURE check(IN messagex : name_t); BEGIN; if status.all <> status_$ok then begin; error_$print (status); writeln('error occurred while doing',messagex); pgm_$set_severity(pgm_$error); pgm_$exit; end; END; {check} BEGIN; pgm_$get_args(no_of_args,arg_pointer); if no_of_args = 1 then begin writeln('xdmc: DM command expected'); pgm_$set_severity(pgm_$error); pgm_$exit; end;{if} dm_cmd.length := pgm_$get_arg( 1, dm_cmd.body, status, sizeof(dm_cmd.body)); for argno := 2 to no_of_args-1 do begin; {for each argument} an_arg.length := pgm_$get_arg( argno, an_arg.body, status, sizeof(an_arg.body)); append(dm_cmd,' ',an_arg); end; {for} pad_$isa_dm_pad(stream_$stdout,status); if status.all = status_$ok then begin stream := stream_$stdout; end else begin pad_$create_window('',0,pad_$transcript,1,win,stream,status); check('create_window'); pad_$set_auto_close(stream,1,true,status); check('set_auto_close'); pad_$make_invisible(stream,1,status); check('make_invisisble'); end; {for} pad_$dm_cmd(stream,dm_cmd.body,dm_cmd.length,status); check(dm_cmd); END.