X-NEWS: cerritos.edu vmsnet.sources: 352 Relay-Version: VMS News - V6.0-1 14/11/90 VAX/VMS V5.3; site cerritos.edu Path: cerritos.edu!usc!rutgers!maverick.ksu.ksu.edu!deimos.cis.ksu.edu!mccall!miclon!ibmpcug!ctssuk!VERKADE Newsgroups: vmsnet.sources Subject: DWUTILS V1.0 part 6 of 6 Message-ID: <901223133615.00000F02@MARVIN.CTSS.CO.UK> From: VERKADE@CTSS.CO.UK (Herman Verkade) Date: 23 Dec 90 13:36:15 GMT Followup-To: vmsnet.sources.d Organization: CompuThoughts Software Solutions (UK) Ltd. Keywords: DECwindows utilities Lines: 218 -+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+ X$ cc /list/mach /obj=DWstart_DECterm52/define=v52 DWstart_DECterm X$ link/share=DWstart_Share52/notrace /map DWstart_Share.obj,- XDWstart_Application,DWstart_Misc,DWstart_DECterm52,DWstart_Remote,- XDWstart_Display,Resignal,DWstart_Commands,DWstart_Message,- XDWstart_Share.opt/options,DWutils/opt X$ cc /list/mach DWstart_Main X$ link /map DWstart_Main,sys$input/opt,DWutils/opt XDWstart_Share/share X$ cc /list/mach DWstart_Server.c X$ link/notrace /map DWstart_Server,sys$input/opt,DWutils/opt XDWstart_Share/share X$ cc /list/mach /object=DWstart_Server52/define=v52 DWstart_Server.c X$ link/notrace /map DWstart_Server52,sys$input/opt,DWutils/opt XDWstart_Share/share X$ cc /list/mach ShowDisplay X$ link /map ShowDisplay,sys$input/opt XDWstart_Share/share X$tidy: xver = 'f$verify(0) X$ ver = f$verify(ver) $ CALL UNPACK MAKEFILE.COM;18 51326088 $ create 'f' X/* X * Module:`09NAMDEF.H X * Description:`09System include file X * X * (c) 1990 CompuThoughts Software Solutions (UK) Ltd, Glasgow, Scotland, UK X * All rights reserved. X * X * Revision history: X * X * 002 17-jul-1990 - Modifed nam$w_fid to struct FID X * 001 22-jan-1990 - Edited to put in variants X * 000 22-jan-1990 - Generated by MAR_TO_H T1.0-007 on VMS V5.2 `20 X */ X X#ifndef __NAMDEF_LOADED X#define __NAMDEF_LOADED 1 X X#include "datatypes.h" X#include "fiddef.h" X X#define NAM$C_BID 2 X#define NAM$C_MAXRSS 255 X#define NAM$C_MAXRSSLCL 255 X#define NAM$C_UFS 0 X#define NAM$C_NO_RFS 0 X#define NAM$C_RMS11 1 X#define NAM$C_RMS20 2 X#define NAM$C_RMS32 3 X#define NAM$C_FCS11 4 X#define NAM$C_RT11FS 5 X#define NAM$C_TOPS20FS 7 X#define NAM$C_TOPS10FS 8 X#define NAM$C_RMS32S 10 X#define NAM$C_CPMFS 11 X#define NAM$C_MS_DOSFS 12 X#define NAM$C_ULTRIX32_FS 13 X#define NAM$C_ULTRIX11_FS 14 X#define DAP$K_SNADTF_FS 15 X#define NAM$C_DVI 16 X#define NAM$K_BLN_V2 56 X#define NAM$C_BLN_V2 56 X#define NAM$K_BLN_DIRWC 96 X#define NAM$C_BLN_DIRWC 96 X#define NAM$K_BLN 96 X#define NAM$C_BLN 96 X Xstruct NAM `7B X BYTE nam$b_bid;`09`09`09`09`09/* 0 */ X BYTE nam$b_bln;`09`09`09`09`09/* 1 */ X BYTE nam$b_rss;`09`09`09`09`09/* 2 */ X BYTE nam$b_rsl;`09`09`09`09`09/* 3 */ X BYTE *nam$l_rsa;`09`09`09`09`09/* 4 */ X variant_union `7B X`09struct `7B X`09 unsigned nam$v_pwd : 1;`09`09`09`09/* 0 */ X`09 unsigned nam$v_fill_1 : 1;`09`09`09`09/* 1 */ X`09 unsigned nam$v_fill_2 : 1;`09`09`09`09/* 2 */ X`09 unsigned nam$v_synchk : 1;`09`09`09`09/* 3 */ X`09 unsigned nam$v_noconceal : 1;`09`09`09/* 4 */ X`09 unsigned nam$v_slparse : 1;`09`09`09`09/* 5 */ X`09 unsigned nam$v_srchxabs : 1;`09`09`09/* 6 */ X`09 unsigned : 1;`09`09`09`09`09/* 7 */ X`09`7D nam$r_nop_bits;`09`09`09`09 /* 8 */ X`09BYTE nam$b_nop;`09`09`09`09`09 /* 8 */ X `7D nam$r_nop_overlay;`09`09`09`09/* 8 */ X BYTE nam$b_rfs;`09`09`09`09`09/* 9 */ X BYTE nam$b_ess;`09`09`09`09`09/* 10 */ X BYTE nam$b_esl;`09`09`09`09`09/* 11 */ X BYTE *nam$l_esa;`09`09`09`09`09/* 12 */ X LONGWORD nam$l_rlf;`09`09`09`09`09/* 16 */ X#define NAM$S_DVI 16 X char nam$t_dvi`5BNAM$S_DVI`5D;`09`09`09`09/* 20 */ X struct FID nam$w_fid;`09`09`09`09/* 36 */ X struct FID nam$w_did;`09`09`09`09/* 42 */ X variant_union `7B X`09struct `7B X`09 unsigned : 16;`09`09`09`09`09/* 0 */ X`09 unsigned nam$v_ifi : 1;`09`09`09`09/* 16 */ X`09 unsigned : 13;`09`09`09`09`09/* 17 */ X`09 unsigned nam$v_srchnmf : 1;`09`09`09`09/* 30 */ X`09 unsigned nam$v_svctx : 1;`09`09`09`09/* 31 */ X`09`7D nam$r_wcc_bits;`09`09`09`09 /* 48 */ X`09LONGWORD nam$l_wcc;`09`09`09`09 /* 48 */ X `7D nam$r_wcc_overlay;`09`09`09`09/* 48 */ X variant_union `7B X`09struct `7B X`09 unsigned nam$v_exp_ver : 1;`09`09`09`09/* 0 */ X`09 unsigned nam$v_exp_type : 1;`09`09`09/* 1 */ X`09 unsigned nam$v_exp_name : 1;`09`09`09/* 2 */ X`09 unsigned nam$v_wild_ver : 1;`09`09`09/* 3 */ X`09 unsigned nam$v_wild_type : 1;`09`09`09/* 4 */ X`09 unsigned nam$v_wild_name : 1;`09`09`09/* 5 */ X`09 unsigned nam$v_exp_dir : 1;`09`09`09`09/* 6 */ X`09 unsigned nam$v_exp_dev : 1;`09`09`09`09/* 7 */ X`09 unsigned nam$v_wildcard : 1;`09`09`09/* 8 */ X`09 unsigned : 2;`09`09`09`09`09/* 9 */ X`09 unsigned nam$v_search_list : 1;`09`09`09/* 11 */ X`09 unsigned nam$v_cncl_dev : 1;`09`09`09/* 12 */ X`09 unsigned nam$v_root_dir : 1;`09`09`09/* 13 */ X`09 unsigned nam$v_lowver : 1;`09`09`09`09/* 14 */ X`09 unsigned nam$v_highver : 1;`09`09`09`09/* 15 */ X`09 unsigned nam$v_ppf : 1;`09`09`09`09/* 16 */ X`09 unsigned nam$v_node : 1;`09`09`09`09/* 17 */ X`09 unsigned nam$v_quoted : 1;`09`09`09`09/* 18 */ X`09 unsigned nam$v_grp_mbr : 1;`09`09`09`09/* 19 */ X`09 unsigned nam$v_wild_dir : 1;`09`09`09/* 20 */ X#define NAM$S_DIR_LVLS 3 X`09 unsigned nam$v_dir_lvls : 3;`09`09`09/* 21 */ X`09 unsigned nam$v_wild_grp : 1;`09`09`09/* 24 */ X/*`09 unsigned nam$v_wild_ufd : 1;`09`09`09/* 24 */ X`09 unsigned nam$v_wild_sfd1 : 1;`09`09`09/* 25 */ X/*`09 unsigned nam$v_wild_mbr : 1;`09`09`09/* 25 */ X`09 unsigned nam$v_wild_sfd2 : 1;`09`09`09/* 26 */ X`09 unsigned nam$v_wild_sfd3 : 1;`09`09`09/* 27 */ X`09 unsigned nam$v_wild_sfd4 : 1;`09`09`09/* 28 */ X`09 unsigned nam$v_wild_sfd5 : 1;`09`09`09/* 29 */ X`09 unsigned nam$v_wild_sfd6 : 1;`09`09`09/* 30 */ X`09 unsigned nam$v_wild_sfd7 : 1;`09`09`09/* 31 */ X`09`7D nam$r_fnb_bits;`09`09`09`09 /* 52 */ X`09LONGWORD nam$l_fnb;`09`09`09`09 /* 52 */ X `7D nam$r_fnb_overlay;`09`09`09`09/* 52 */ X BYTE nam$b_node;`09`09`09`09`09/* 56 */ X BYTE nam$b_dev;`09`09`09`09`09/* 57 */ X BYTE nam$b_dir;`09`09`09`09`09/* 58 */ X BYTE nam$b_name;`09`09`09`09`09/* 59 */ X BYTE nam$b_type;`09`09`09`09`09/* 60 */ X BYTE nam$b_ver;`09`09`09`09`09/* 61 */ X WORD nam$w_unused_1;`09`09`09`09/* 62 */ X BYTE *nam$l_node;`09`09`09`09`09/* 64 */ X BYTE *nam$l_dev;`09`09`09`09`09/* 68 */ X BYTE *nam$l_dir;`09`09`09`09`09/* 72 */ X BYTE *nam$l_name;`09`09`09`09`09/* 76 */ X BYTE *nam$l_type;`09`09`09`09`09/* 80 */ X BYTE *nam$l_ver;`09`09`09`09`09/* 84 */ X`7D ; X Xglobalref struct NAM cc$rms_nam;`09/* Declare initialized prototype data str Vucture */ X#endif $ CALL UNPACK NAMDEF.H;8 1161380887 $ create 'f' X; X;`09Module:`09`09RESIGNAL.MAR X;`09Description:`09Routine to resignal an error with addiotional messages X;`09Author:`09`09Herman Verkade X; X;`09Synopsys:`09Resignal(Status, Count, args..., SigArr) X;`09 X;`09This routine can be called from an error handler to resignal the X;`09signal array with an extra message at the beginning. X; X;`09Revision History: X; X;`09001`0923-dec-1990`09- Changed PSECT name to $CODE X;`09000`09 6-mar-1990`09- Initial version X; X`09.TITLE`09RESIGNAL - Macro code for Username modules X`09.IDENT`09`09/V01-001/ X; X`09.psect`09$CODE, long, pic, shr, nowrt X; X`09.entry`09ReSignal,`5Em X`09mull3`09#4,(ap),r2`09; Number of arguments * 4 bytes X`09addl3`09r2,ap,r3`09; plus ap = address of pointer to SigArr X`09movl`09(r3),r4`09`09; Address of SigArr X`09mull3`09#4,(r4),r2`09; Number of elements * 4 bytes X`09addl3`09r2,r4,r5`09; plus address = pointer to PSL value X`09subl2`09#4,r5`09`09; now pointer to PC value X`09clrl`09r6`09`09; Reset counter X10$: X`09subl2`09#4,r5`09`09; Longword before X`09cmpl`09r5,r4`09`09; Back at the base ? X`09beql`0920$`09`09; Do next array X`09pushl`09(r5)`09`09; Push the value here X`09incl`09r6`09`09; And keep count X`09brb`0910$`09`09; Next one X20$: X`09subl2`09#4,r3`09`09; Same as above but on new values X`09cmpl`09r3,ap X`09beql`0930$ X`09pushl`09(r3) X`09incl`09r6 X`09brb`0920$ X30$: X`09calls`09r6,g`5Elib$signal`09; And do the resignal X`09ret X`09.end $ CALL UNPACK RESIGNAL.MAR;9 494669613 $ create 'f' Xmain() X`7B X printf("Display is <%s>\n", DWS_Get_DisplayName()); X`7D $ CALL UNPACK SHOWDISPLAY.C;3 74984551 $ v=f$verify(v) $ EXIT