From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  7-MAY-1991 23:31:43.10
To:	ARISIA::EVERHART
CC:	
Subj:	DECwindows Cookbook 1 of 8

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.97)
	 id AA19306; Tue, 7 May 91 23:06:49 EDT
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Tue,  7 MAY 91 17:30:52 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA11300; Tue, 7 May 91 17:16:40 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 6 May 91 01:21:59 GMT
From: wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!convex!mic!montagar!fallout!system@louie.udel.edu  (T-H-E John Wisniewski?!?)
Organization: DECUS DFWLug BBS - Dallas, TX
Subject: DECwindows Cookbook 1 of 8
Message-Id: <5117@fallout.uucp>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

$! ...................... Cut between dotted lines and save. .....................
$!.............................................................................
$! VAX/VMS archive file created by VMS_SHARE V06.03 20-Oct-1988.
$!
$! VMS_SHARE was written by James Gray (Gray:OSBUSouth@Xerox.COM) from
$! VMS_SHAR by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au).
$!
$! To unpack, simply save, concatinate all parts into one file and
$! execute (@) that file.
$!
$! This archive was created by user SYSTEM
$! on 28-APR-1991 14:55:07.08.
$!
$! ATTENTION: To keep each article below 31 blocks (15872 bytes), this
$!            program has been transmitted in 8 parts.  You should
$!            concatenate ALL parts to ONE file and execute (@) that file.
$!
$! It contains the following 1 file:
$!        DECW_COOKBOOK_V2.PS
$!
$!==============================================================================
$ SET SYMBOL/SCOPE=( NOLOCAL, NOGLOBAL )
$ VERSION = F$GETSYI( "VERSION" )
$ IF VERSION .GES "V4.4" THEN GOTO VERSION_OK
$ WRITE SYS$OUTPUT "You are running VMS ''VERSION'; ", -
    "VMS_SHARE V06.03 20-Oct-1988 requires VMS V4.4 or higher."
$ EXIT 44 
$VERSION_OK:
$ GOTO START
$
$UNPACK_FILE:
$ WRITE SYS$OUTPUT "Creating ''FILE_IS'"
$ DEFINE/USER_MODE SYS$OUTPUT NL:
$ EDIT/TPU/COMMAND=SYS$INPUT/NODISPLAY/OUTPUT='FILE_IS'/NOSECTION -
    VMS_SHARE_DUMMY.DUMMY

b_part := CREATE_BUFFER( "{Part}", GET_INFO( COMMAND_LINE, "file_name" ) );
s_file_spec := GET_INFO( COMMAND_LINE, "output_file" );SET( OUTPUT_FILE, b_part
, s_file_spec ); 
b_errors := CREATE_BUFFER( "{Errors}" );i_errors := 0; 
pat_beg_1 := ANCHOR & "-+-+-+ Beginning";
pat_beg_2 := LINE_BEGIN & "+-+-+-+ Beginning";
pat_end := ANCHOR & "+-+-+-+-+ End";
pat_trail := " " & LINE_END;POSITION( BEGINNING_OF( b_part ) ); LOOP b 
:= SEARCH( pat_trail, FORWARD); EXITIF b=0; POSITION( END_OF( b ) )
; LOOP MOVE_HORIZONTAL( -1 ); EXITIF CURRENT_CHARACTER <> ' '; ERASE_CHARACTER
( 1 ); EXITIF CURRENT_OFFSET=0; ENDLOOP; ENDLOOP; POSITION( BEGINNING_OF
( b_part ) ); i_append_line := 0; LOOP EXITIF MARK( NONE ) = END_OF( b_part )
; s_x := ERASE_CHARACTER( 1 ); 
  IF s_x = "+" THEN r_skip := SEARCH( pat_beg_1, FORWARD, EXACT ); IF r_skip <
> 0 THEN 
      s_x := ""; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ERASE_LINE; ENDIF; ENDIF; 
  IF s_x = "-" THEN r_skip := SEARCH( pat_end, FORWARD, EXACT ); IF r_skip <
> 0 THEN 
      s_x := ""; MOVE_HORIZONTAL( -CURRENT_OFFSET ); m_skip := MARK( NONE )
; r_skip := SEARCH( pat_beg_2, FORWARD, EXACT ); IF r_skip <> 0 THEN POSITION
( END_OF( r_skip ) ); MOVE_HORIZONTAL( -CURRENT_OFFSET ); MOVE_VERTICAL( 1 )
; MOVE_HORIZONTAL( -1 ); ELSE POSITION( END_OF( b_part ) ); ENDIF; ERASE
( CREATE_RANGE( m_skip, MARK( NONE ), NONE ) ); ENDIF; ENDIF; 
  IF s_x = "V" THEN 
    s_x := ""; IF i_append_line <> 0 THEN APPEND_LINE; MOVE_HORIZONTAL
( -CURRENT_OFFSET ); ENDIF; i_append_line := 1; MOVE_VERTICAL( 1 ); ENDIF; 
  IF s_x = "X" THEN 
    s_x := ""; IF i_append_line <> 0 THEN APPEND_LINE; MOVE_HORIZONTAL
( -CURRENT_OFFSET ); ENDIF; i_append_line := 0; MOVE_VERTICAL( 1 ); ENDIF; 
  IF s_x <> "" THEN i_errors := i_errors + 1; s_text := CURRENT_LINE; POSITION
( b_errors ); 
    COPY_TEXT( "The following line could not be unpacked properly:" )
; SPLIT_LINE; COPY_TEXT( s_x ); COPY_TEXT( s_text ); POSITION( b_part )
; MOVE_VERTICAL( 1 ); ENDIF; ENDLOOP; POSITION( BEGINNING_OF( b_part ) ); LOOP 
  r_x := SEARCH( "`", FORWARD, EXACT ); EXITIF r_x = 0; POSITION( r_x )
; ERASE_CHARACTER( 1 ); 
  IF CURRENT_CHARACTER = "`" THEN MOVE_HORIZONTAL( 1 ); ELSE COPY_TEXT( ASCII
( INT( ERASE_CHARACTER( 3 ) ) ) ); ENDIF; ENDLOOP; IF i_errors = 0 THEN SET
( NO_WRITE, b_errors, ON ); ELSE POSITION( BEGINNING_OF( b_errors ) ); 
  COPY_TEXT( FAO( "The following !UL errors were detected while unpacking !AS"
, i_errors, s_file_spec ) ); SPLIT_LINE; 
  SET( OUTPUT_FILE, b_errors, "SYS$COMMAND" );ENDIF; EXIT; 
$ DELETE VMS_SHARE_DUMMY.DUMMY;*
$ CHECKSUM 'FILE_IS
$ WRITE SYS$OUTPUT " CHECKSUM ", -
  F$ELEMENT( CHECKSUM_IS .EQ. CHECKSUM$CHECKSUM, ",", "failed!,passed." )
$ RETURN
$
$START:
$ FILE_IS = "DECW_COOKBOOK_V2.PS"
$ CHECKSUM_IS = 2037417380
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X%!PS-Adobe-2.1
X%%Creator: DECwrite V1.1
X%%+Copyright (c) 1990 DIGITAL EQUIPMENT CORPORATION. `032
X%%+All Rights Reserved.
X%%DocumentFonts: (atend)
X%%EndComments
X%%BeginProcSet DEC_WRITE 1.06
X/DEC_WRITE_dict 150 dict def DEC_WRITE_dict begin/$D save def/$I 0 def/$S 0
Xdef/$C matrix def/$R matrix def/$L matrix def/$E matrix def/pat1`123/px exch
Vdef/pa 8 array def 0 1 7`123/py exch def/pw 4 string def 0 1 3`123pw exch px py
X 1
Vgetinterval putinterval`125for pa py pw put`125for`125def/pat2`123/pi exch def/
Xcflag
Xexch def save cflag 1 eq`123eoclip`125`123clip`125ifelse newpath`123clippath
Vpathbbox`125stopped not`123/ph exch def/pw exch def/py exch def/px exch def/px
X px
X3072 div floor 3072 mul def/py py 3072 div floor 3072 mul def px py
Xtranslate/pw pw px sub 3072 div floor 1 add cvi def/ph ph py sub 3072 div
Xfloor 1 add cvi def pw 3072 mul ph 3072 mul scale/pw pw 32 mul def/ph ph 32
Xmul def/px 0 def/py 0 def pw ph pi[pw 0 0 ph 0 0]`123pa py get/px px 32 add
Xdef px pw ge`123/px 0 def/py py 1 add 8 mod def`125if`125pi type/booleantype
Veq`123imagemask`125`123image`125ifelse`125if restore`125def/PS`123/_op exch def
X/_np 8 string def
X0 1 7`123/_ii exch def/num _op _ii get def _np 7 _ii sub num -4 bitshift PX
Vnum 15 and 4 bitshift -4 bitshift PX 4 bitshift or put`125for _np`125def/PX`123
X[15 7
V11 3 13 5 9 1 14 6 10 2 12 4 8 0]exch get`125def/FR`1230.7200 0 $E defaultmatri
Xx
Xdtransform/yres exch def/xres exch def xres dup mul yres dup mul add
Xsqrt`125def/SU`123/_sf exch def/_sa exch def/_cs exch def/_mm $C currentmatrix
Xdef/rm _sa $R rotate def/sm _cs dup $L scale def sm rm _mm _mm concatmatrix
X_mm concatmatrix pop 1 0 _mm dtransform/y1 exch def/x1 exch def/_vl x1 dup
Xmul y1 dup mul add sqrt def/_fq FR _vl div def/_na y1 x1 atan def _mm 2 get
X_mm 1 get mul _mm 0 get _mm 3 get mul sub 0 gt`123`123neg`125/_sf load
Vconcatprocs/_sf exch def`125if _fq _na/_sf load setscreen`125def/BO`123/_yb exc
Xh
Xdef/_xb exch def/_bv _bs _yb _bw mul _xb 8 idiv add get def/_mk 1 7 _xb 8
Xmod sub bitshift def _bv _mk and 0 ne $I 1 eq xor`125def/BF`123DEC_WRITE_dict
Xbegin/_yy exch def/_xx exch def/_xi _xx 1 add 2 div _bp mul cvi def/_yi _yy
V1 add 2 div _bp mul cvi def _xi _yi BO`123/_nb _nb 1 add def 1`125`123/_fb _fb
X 1 add
Vdef 0`125ifelse end`125def/setpattern`123/_cz exch def/_bw exch def/_bp exch de
Xf/_bs
Xexch PS def/_nb 0 def/_fb 0 def _cz 0/BF load SU`123`125settransfer _fb _fb _nb
Xadd div setgray/$S 1 def`125def/invertpattern`123$S 0 eq`123`1231 exch
Vsub`125currenttransfer concatprocs settransfer`125if`125def/invertscreen`123/$I
X 1
Vdef/$S 0 def`125def/revertscreen`123/$I 0 def`125def/setrect`123/$h exch def/$w
X exch
Xdef/$y exch def/$x exch def newpath $x $y moveto $w $x add $y lineto $w $x
Xadd $h $y add lineto $x $h $y add lineto closepath`125def/concatprocs`123/_p2
Xexch cvlit def/_p1 exch cvlit def/_pn _p1 length _p2 length add array def
X_pn 0 _p1 putinterval _pn _p1 length _p2 putinterval _pn
Xcvx`125def/OF/findfont load def/findfont`123dup DEC_WRITE_dict exch
Xknown`123DEC_WRITE_dict exch get`125if DEC_WRITE_dict/OF get exec`125def
Xmark/ISOLatin1Encoding`032
X8#000 1 8#001`123StandardEncoding exch get`125for /emdash/endash
X8#004 1 8#025`123StandardEncoding exch get`125for /quotedblleft/quotedblright
X8#030 1 8#054`123StandardEncoding exch get`125for /minus 8#056 1 8#217
V`123StandardEncoding exch get`125for/dotlessi 8#301 1 8#317`123StandardEncoding
X`032
Xexch get`125for/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
X/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered
X/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph
X/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter
X/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
X/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave
X/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde
X/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
X/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
X/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
X/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave
X/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
X256 array astore def cleartomark`032
V/encodefont`123findfont dup maxlength dict begin`1231 index/FID ne`123def`125`1
X23pop
Xpop`125ifelse`125forall/Encoding exch def dup/FontName exch def currentdict
Xdefinefont end`125def/loads`123/$/ISOLatin1Encoding load def/&/encodefont load
Xdef/*/invertpattern load def/+/revertscreen load def/-/invertscreen load
Xdef/:/concatprocs load def/`094/setpattern load def/`126/pat1 load def/_/pat2
Xload def/@/setrect load def/A/arcn load def/B/ashow load def/C/curveto load
Xdef/D/def load def/E/eofill load def/F/findfont load def/G/setgray load
Xdef/H/closepath load def/I/clip load def/K/kshow load def/L/lineto load
Xdef/M/moveto load def/N/newpath load def/O/rotate load def/P/pop load
Xdef/R/grestore load def/S/gsave load def/T/translate load def/U/sub load
Xdef/V/div load def/W/widthshow load def/X/exch load def/Y/awidthshow load
Xdef/a/save load def/c/setlinecap load def/d/setdash load def/e/restore load
Xdef/f/setfont load def/g/initclip load def/h/show load def/i/setmiterlimit
Xload def/j/setlinejoin load def/k/stroke load def/l/rlineto load
Xdef/m/rmoveto load def/n/currentfont load def/o/scalefont load
Xdef/p/currentpoint load def/r/currenttransfer load def/s/scale load
Xdef/t/setmatrix load def/u/settransfer load def/w/setlinewidth load
Xdef/x/matrix load def/y/currentmatrix load def`125def
Xend
X%%EndProcSet
X%%EndProlog
X
X%%BeginSetup
X
X%%BeginFont: Terminal_DECTech
X%!PS-Adobe-1.0
X%% This prolog builds a DECTech font that has TDE (VT100 line-drawing)`032
X%%`0097-bit characters and technical 8-bit characters.
X%%
X%% Edit History`032
X%% 19-Apr-1990`009AP`009Changed Courier-Tech to DECtech.
X%% 23-Apr-1990`009AP`009Added definitions /CF, /CP, etc.
X%% 26-Apr-1990`009AP`009Removed 'save'.
X%%
X%%Title: USER6:[DONC.WPSPLUS]000496RB1.TMS;1
X%%Creator: DECpage V3.1
X%%CreationDate:  6-NOV-1989 11:29:35.18
X%%Pages: (at end)
X%%DocumentFonts: (atend)
X%%EndComments
X/CF /currentfont load def
X/CP /currentpoint load def
X/FF /findfont load def
X/GR /grestore load def`032
X/GS /gsave load def
X/LI /lineto load def
X/MF /makefont load def`032
X/MO /moveto load def
X/RL /rlineto load def
X/RM /rmoveto load def
X/RO /rotate load def
X/SC /scale load def
X/SD /setdash load def
X/SE /setfont load def
X/SF /scalefont load def
X/SH /show load def
X/ST /stroke load def
X/SW /setlinewidth load def
X/TR /translate load def
X/BD `123bind def`125 bind def
X
X
X/reencodedict 12 dict def
X/ReEncode
X  `123 reencodedict begin
X    /newencoding exch def
X    /newfontname exch def
X    /basefontname exch def
X    /basefontdict basefontname FF def
X    /newfont basefontdict maxlength dict def
X    basefontdict
X    `009`123 exch dup /FID ne`032
X    `009    `123dup /Encoding eq
X    `009`009`123exch dup length array copy`032
X    `009`009    newfont 3 1 roll put`125
X`009  `009`123 exch newfont 3 1 roll put `125
X`009     ifelse
X    `009    `125
X`009    `123 pop pop `125
X    `009    ifelse
X       `125 forall
X  newfont /FontName newfontname put
X  newencoding aload pop
X  newencoding length 2 idiv
X    `123newfont /Encoding get 3 1 roll put`125
X    repeat
X  newfontname newfont definefont pop
X  end
X `125BD
X `032
X/DPMCS [
X% DEC Supplemental side:
X160 /.notdef
X161 /exclamdown`032
X162 /cent`032
X163 /sterling`032
X164 /fraction`032
X165 /yen`032
X166 /.notdef
X167 /section`032
X168 /currency`032
X169 /copyright`032
X170 /ordfeminine`032
X171 /guillemotleft`032
X172 /.notdef
X173 /.notdef
X174 /.notdef
X175 /.notdef
X176 /.notdef  % degree
X177 /.notdef  % plus/minus
X178 /.notdef  % superscript 2
X179 /.notdef  % superscript 3
X180 /.notdef
X181 /.notdef  % micro
X182 /paragraph`032
X183 /periodcentered`032
X184 /.notdef
X185 /.notdef  % superscript 1
X186 /ordmasculine`032
X187 /guillemotright`032
X188 /.notdef  % 1/4
X189 /.notdef  % 1/2
X190 /.notdef
X191 /questiondown`032
X192 /Agrave`032
X193 /Aacute`032
X194 /Acircumflex`032
X195 /Atilde`032
X196 /Adieresis`032
X197 /Aring`032
X%198 /.notdef  % /AE`032
X198 /AE`032
X199 /Ccedilla`032
X200 /Egrave`032
X201 /Eacute`032
X202 /Ecircumflex`032
X203 /Edieresis`032
X204 /Igrave`032
X205 /Iacute`032
X206 /Icircumflex`032
X207 /Idieresis`032
X208 /.notdef
X209 /Ntilde`032
X210 /Ograve`032
X211 /Oacute`032
X212 /Ocircumflex`032
X213 /Otilde`032
X214 /Odieresis`032
X%215 /.notdef  % /OE`032
X215 /OE`032
X216 /Oslash`032
X217 /Ugrave`032
X218 /Uacute`032
X219 /Ucircumflex`032
X220 /Udieresis`032
X221 /Ydieresis`032
X222 /.notdef
X223 /germandbls`032
X224 /agrave`032
X225 /aacute`032
X226 /acircumflex`032
X227 /atilde`032
X228 /adieresis`032
X229 /aring`032
X%230 /.notdef %ae
X230 /ae
X231 /ccedilla`032
X232 /egrave`032
X233 /eacute`032
X234 /ecircumflex`032
X235 /edieresis`032
X236 /igrave`032
X237 /iacute`032
X238 /icircumflex`032
X239 /idieresis`032
X240 /.notdef
X241 /ntilde`032
X242 /ograve`032
X243 /oacute`032
X244 /ocircumflex`032
X245 /otilde`032
X246 /odieresis`032
X%247 /.notdef %oe
X247 /oe`032
X248 /oslash`032
X249 /ugrave`032
X250 /uacute`032
X251 /ucircumflex`032
X252 /udieresis`032
X253 /ydieresis`032
X254 /.notdef`032
X `032
X129 /grave`032
X130 /acute`032
X131 /circumflex`032
X132 /tilde`032
X133 /dieresis`032
X134 /ring`032
X135 /cedilla`032
X136 /dotlessi`032
X137 /macron
X138 /breve
X139 /dotaccent
X140 /hungarumlaut
X141 /ogonek
X142 /caron
X143 /endash
X144 /emdash
X145 /dagger
X146 /daggerdbl
X147 /bullet
X148 /fi
X149 /fl
X150 /quotedblleft
X151 /quotedblright
X152 /registered
X153 /trademark
X154 /quotedblbase
X] def
X `032
X/cvc
X`123`032
X( )
Xdup
X0`032
X4 -1 roll
Xput
X`125BD
X `032
X/Courier /CourierExtended DPMCS ReEncode
X/ExtendedEncoding /CourierExtended FF /Encoding get def
X/SymbolEncoding /Symbol FF /Encoding get def
X `032
X/ExtendedDecoding ExtendedEncoding length dict def
XExtendedDecoding begin
X0 1 ExtendedEncoding length 1 sub
X`123`032
Xdup
XExtendedEncoding exch get
Xexch def
X`125for
Xend
X/SymbolDecoding SymbolEncoding length dict def
XSymbolDecoding begin
X0 1 SymbolEncoding length 1 sub
X`123`032
Xdup
XSymbolEncoding exch get
Xexch def
X`125for
Xend
X `032
X/BBox [0 -.25 .6 .75] def
X `032
X/superscript
X`123/CourierExtended FF SE
X.6667 .6667 SC
X0 .2667 MO
XSH
X`125BD
X `032
X/diphthong
X`123`032
X`123/CourierExtended FF [.6667 0 .1786 1 0 0] MF SE`125
X`123/CourierExtended FF [.66666667 0 0 1 0 0] MF SE`125
Xifelse
X0 0 MO
XCP TR
XSH
X/CourierExtended FF
X[.6667 0 0 1 0 0] MF SE
X.26 0 MO
XSH
X`125BD
X `032
X/ctrl
X`123/CourierExtended FF SE
X.8333 .8333 SC
X0 .3 MO
XSH
X.1371 -.3 MO
XSH
X`125BD
X `032
X/fraction
-+-+-+-+-+ End of part 1 +-+-+-+-+-

