.OPEN EDTINICLS.SAM
.ENABLE SUBSTITUTION
;
;	Creating file '<FILSPC>'
;
.DISABLE SUBSTITUTION
.ENABLE DATA
!	Standard Initializer File	V01.3	14-Dec-82
!									 
!******************************************************************************
!
! This software is provided on an "as is" basis only. Caterpillar Tractor Co.,
! disclaims  all  warranties on the program, including without limitation, all
! implied warranties of merchantablity and fitness.
!
! Full  permission  and  consent  is  hereby  given  to DECUS and to the DECUS
! special interest groups to reproduce,  distribute,  and  publish  and permit
! others to reproduce in whole or in part, in any form and without restriction
! this program and any information relating thereto
!
!******************************************************************************
!
! This initializer file is a modification of the one described by
! David Spencer of Infinity Software Corp., in the Nov. 1982 issue
! of the DEC Professional Magazine.
! 
! Modified by:
!	
!	Rick Webster, Process Control Applications, MSDGO, Caterpillar
!	Tractor Co. 
!	1) Add support for PF2 displaying a HELP screen on the additional
!	   commands provided by this initializer file
!	2) Add "GOLD R" command to delete all carriage returns, line feeds
!	   and form feeds from a file.
!	
!+
!	Word Delimiter Macros
!-
DEF M DELIMITERS_PROGRAMMING
F=DELIMITERS_PROGRAMMING
I
DEF K GOLD CONT D AS "EXT DELIMITERS_WORD_PROCESSING."
^Z
C; ISE EN WO '^Z 9ASC 10ASC 11ASC 12ASC 13ASC 27ASC I ()[],-+/='^Z EX
^Z
!
DEF M DELIMITERS_WORD_PROCESSING
F=DELIMITERS_WORD_PROCESSING
I
DEF K GOLD CONT D AS "EXT DELIMITERS_PROGRAMMING."
^Z
C; ISE EN WO '^Z 9ASC 10ASC 11ASC 12ASC 13ASC 27ASC I ,'^Z EX
^Z
!+
!	Screen Width Macros
!-
DEF M WIDTH_132
I=WIDTH_132
DEF K GOLD CONT W AS "EXT WIDTH_80."
SE SC 132
SE WR 130
^Z
!
DEF M WIDTH_80
I=WIDTH_80
DEF K GOLD CONT W AS "EXT WIDTH_132."
SE SC 80
SE WR 78
^Z
DEF M EDTINI_HELP
I=EDTINI_HELP
DEF K 10 AS "EXT EDTINI_RESTORE."
CO =HELP_EDTINI TO =HELP_EDTINI_DISPLAY
F L
F=HELP_EDTINI_DISPLAY
^Z
DEF M EDTINI_RESTORE
I=EDTINI_RESTORE
DEF K 10 AS "EXT EDTINI_HELP."
F L
D =HELP_EDTINI_DISPLAY
F L
^Z
!+
!	Key Definitions
!-
DEF K 10     AS "EXT EDTINI_HELP."
DEF K CONT B AS "-W."
DEF K CONT F AS "+W."
DEF K CONT G AS "Paste=?'Put buffer: '."
DEF K CONT P AS "PAR."
DEF K CONT X AS "CUTSR=?'Cut buffer: '."
!
DEF K GOLD DEL    AS "EXT CL ?'Clear what buffer: '."
DEF K GOLD 12     AS "(-22V)."
DEF K GOLD 13     AS "(+22V)."
DEF K GOLD CONT B AS "BSEN."
DEF K GOLD CONT D AS "EXT DELIMITERS_WORD_PROCESSING"
DEF K GOLD CONT G AS "CUTSR=DELETE PASTE=?'Replace with buffer: '."
DEF K GOLD CONT F AS "ESEN."
DEF K GOLD CONT H AS "(-C D-C +C UNDC)."
DEF K GOLD CONT I AS "(8C)."
DEF K GOLD CONT T AS "TOP."
DEF K GOLD CONT W AS "EXT WIDTH_132."
DEF K GOLD CONT X AS "EXT CO SELECT TO=?'Copy to buffer: ' ; F L."
DEF K GOLD CONT Z AS "EXT EX."
!
DEF K GOLD . AS "I~~/\~~^Z -6C."
DEF K GOLD / AS "S%~~/\~~%%."
DEF K GOLD B AS "EXT F=?'Buffer: '.."
DEF K GOLD C AS "(C SEL W CHGCSR)."
DEF K GOLD F AS "(SEL PAR FILLSR)."
DEF K GOLD I AS "EXT INC ?'Input file: ' =?' Buffer: '."
DEF K GOLD L AS "EXT F L."
DEF K GOLD M AS "EXT F=MAIN.."
DEF K GOLD O AS "EXT WR ?Output file: ' =?' Buffer: '."
DEF K GOLD Q AS "EXT QUIT/SAVE."
.DISABLE DATA
.SETN NCR 15
.SETN NLF 12
.SETN NFF 14
.ENABLE SUBSTITUTION
.DATA DEF K GOLD R AS "EXT S/'NCR%V'//WH ; S/'NLF%V'//WH ; S/'NFF%V'//WH."
.DISABLE SUBSTITUTION
.ENABLE DATA
DEF K GOLD S AS "EXT SH BU."
!+
!	Set terminal characteristics
!-
SE WR 78
SE TR
SE K
SE M C
DELIMITERS_PROGRAMMING
!+
!	Define help screen
!-
F=HELP_EDTINI
I
	The following additional commands are available:

GOLD UP-ARROW - Back up 22 lines	GOLD Down-arrow - Forward 22 lines
CONT B        - Back 1 word		CONT F		- Forward 1 word
CONT P	      - Next paragraph		CONT G		- Insert from buffer
CONT X	      - Cut to named buffer	GOLD CONT B	- Beginning of sentence
GOLD CONT D   - Toggle word delimeters	GOLD CONT F	- End of next sentence
GOLD CONT G   - Replace region		GOLD CONT H	- Swap prev. 2 chars
GOLD CONT I   - Forward 8 chars		GOLD CONT T	- Cur. line to top
GOLD CONT W   - Toggle 132/80 char mode	GOLD CONT X	- Copy region to buffer
GOLD CONT Z   - EXit EDT		GOLD DELETE	- Delete buffer
GOLD .	      - Mark position		GOLD /		- Find marked position
GOLD B	      - Switch buffer		GOLD C		- Chg case ex. 1st char
GOLD F	      - Fill paragraph		GOLD I		- Include file
GOLD L	      - %L command		GOLD M		- Switch to MAIN buffer
GOLD O	      - Output buf. to file	GOLD Q		- QUIT/SAVE
GOLD R        - Remove <CR>,<LF>,<FF>   GOLD S	        - SHOW BUFFERS command

Enter PF2 to return to edit session
Enter GOLD PF2 to get usual EDT help screen

^Z
!+
!	Set Buffer to MAIN, and Start
!-
F=MAIN
.DISABLE DATA
.CLOSE
.ENABLE SUBSTITUTION
;
;	Creation of '<FILSPC>' completed
;
