v07i040: CRISP release 1.9 part 19/32
Brandon S. Allbery - comp.sources.misc
allbery at uunet.UU.NET
Sun Jul 23 09:26:29 AEST 1989
Posting-number: Volume 7, Issue 40
Submitted-by: fox at marlow.UUCP (Paul Fox)
Archive-name: crisp1.9/part20
#!/bin/sh
# this is part 6 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file src/crisp/wp.m continued
#
CurArch=6
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
exit 1; fi
( read Scheck
if test "$Scheck" != $CurArch
then echo "Please unpack part $Scheck next!"
exit 1;
else exit 0; fi
) < s2_seq_.tmp || exit 1
echo "x - Continuing file src/crisp/wp.m"
sed 's/^X//' << 'SHAR_EOF' >> src/crisp/wp.m
X# include "crisp.h"
X
X# define RMARGIN 63
X# define C_LMARGIN 4 ;* Left hand margin after open comment.
X# define C_RMARGIN 4 ;* Right hand margin before close comment.
X
X(macro _init
X (
X (int wp_rmargin
X wp_ragged
X wp_autowrap
X wp_quiet)
X (global wp_rmargin
X wp_ragged
X wp_autowrap
X wp_quiet)
X
X (= wp_rmargin RMARGIN)
X (= wp_ragged 0) // Justified margins.
X (= wp_autowrap FALSE)
X (= wp_quiet FALSE)
X )
X)
X(macro wp-options
X (
X (list r_list s_list)
X (string buf)
X
X (sprintf buf "%d" wp_rmargin)
X (put_nth 0 r_list buf)
X (put_nth 1 r_list wp_ragged)
X (put_nth 2 r_list wp_autowrap)
X
X (= s_list (quote_list
X "Right Hand Margin : " ""
X "Margins : " ("Justified" "Ragged")
X "Autowrap : " ("Off" "On")
X ))
X (put_nth 1 s_list buf)
X (= r_list (field_list "Document Options" r_list s_list))
X (= wp_ragged (nth 1 r_list))
X (= wp_autowrap (nth 2 r_list))
X (if wp_autowrap
X (register_macro REG_TYPED "reg_autowrap")
X ;else
X (unregister_macro REG_TYPED "reg_autowrap"))
X )
X)
X(macro reg_autowrap
X (
X (string char)
X (int line col)
X
X (if (!= (read 1) "\n") (
X (move_abs line col)
X (return)))
X
X (inq_position line col)
X (prev_char)
X (= char (read 1))
X (if (!= char " ") (
X (move_abs line col)
X (return)))
X (if (>= col wp_rmargin) (
X (drop_anchor MK_LINE)
X (= wp_quiet TRUE)
X (default-format_block)
X (= wp_quiet FALSE)
X (up)
X (end_of_line)
X (insert " ")
X (return)
X ))
X (next_char)
X )
X)
X(macro margin
X (
X (get_parm 0 wp_rmargin "Right hand margin: " NULL wp_rmargin)
X (message "")
X )
X)
X(macro c-uncomment_block
X (
X (int start_line
X start_col
X end_line
X end_col)
X (inq_marked start_line start_col end_line end_col)
X (message "Stripping existing comments.")
X (save_position)
X (translate "<[ \t]@{/}@\\*" "" ST_GLOBAL ST_REGEXP NULL ST_BLOCK)
X (translate "\\*{/}@[ \t]@$" "" ST_GLOBAL ST_REGEXP NULL ST_BLOCK)
X (restore_position)
X )
X)
X(macro h-format_block
X (c-format_block)
X)
X(macro c-format_block
X (
X (int start_line
X start_col
X end_line
X end_col)
X
X (if (== (inq_marked start_line start_col end_line end_col) 0) (
X (error "No marked block.")
X (return)))
X
X (c-uncomment_block)
X
X (if (< (default-format_block) 0)
X (return))
X (inq_position end_line)
X
X //
X // Now put comment characters around the formatted text.
X //
X (message "Adding C comments.")
X (goto_line start_line)
X (= end_col (+ (+ (+ wp_rmargin C_LMARGIN) 2) C_RMARGIN))
X (while (< start_line end_line) (
X (insert " *")
X (insert " " C_LMARGIN)
X (move_abs 0 end_col)
X (insert "*")
X (down)
X (beginning_of_line)
X (++ start_line)
X ))
X (message "Formatting complete.")
X )
X)
X//
X// Macro to format a block of text (justify left and right margins).
X// Returns -1 if no marked area; 0 if successful.
X//
X(macro default-format_block
X (
X (int start_line
X start_col
X end_line
X end_col
X space
X num_spaces
X num_to_make_up
X i j
X para_no
X line_no)
X
X (string line
X new_line
X indent
X rest1
X rest_of_line)
X
X
X (if (== (inq_marked start_line start_col end_line end_col) 0) (
X (error "No marked block.")
X (return -1)))
X //
X // Strip off any leading tabs and remember how much
X // first line was indented so we can re-indent later.
X //
X (save_position)
X (goto_line start_line)
X (= indent "")
X (while (== (read 1) "\t") (
X (+= indent "\t")
X (next_char)))
X (restore_position)
X (if (!= indent "")
X (translate (+ "<" indent) "" ST_GLOBAL ST_REGEXP NULL ST_BLOCK))
X (raise_anchor)
X
X (while (<= start_line end_line) (
X (goto_line start_line)
X (= line "")
X (= line_no start_line)
X
X (++ para_no)
X (if (! wp_quiet)
X (message "Formatting paragraph %d." para_no))
X
X (while (<= line_no end_line) (
X (= new_line (read))
X (if (< (strlen new_line) 2)
X (break))
X (+= line (+ " " new_line))
X (delete_line)
X (-- end_line)
X ))
X (= start_line line_no)
X (= line (trim (ltrim (compress line))))
X //
X // While line is too long to fit, we keep chopping
X // the line and inserting the formatted remains.
X //
X (while (> (strlen line) wp_rmargin) (
X (= rest_of_line (substr line wp_rmargin))
X (= line (substr line 1 (- wp_rmargin 1)))
X (= space (rindex line " "))
X (= rest_of_line (+ (substr line space) rest_of_line))
X (= line (substr line 1 (- space 1)))
X //
X // Insert line a word at a time, so that we can
X // space fill as we go along.
X //
X (if wp_ragged
X (= num_spaces 0)
X ;else
X (
X (= num_to_make_up (- wp_rmargin (strlen line)))
X (= num_spaces (string_count line " "))
X (= i (+ (/ num_to_make_up num_spaces) 1))
X (= j (% num_to_make_up num_spaces))
X ))
X (insert indent)
X (while num_spaces (
X (= space (index line " "))
X (if (== space 0)
X (break))
X (= rest1 (substr line (+ space 1)))
X (= line (substr line 1 (- space 1)))
X (insert line)
X (insert " " i)
X (if j (
X (-- j)
X (insert " ")))
X (-- num_spaces)
X (= line rest1)
X ))
X (insert (+ line "\n"))
X (= line (trim (ltrim (compress rest_of_line))))
X (++ end_line)
X (++ start_line)
X ))
X (if (!= line "") (
X (insert indent)
X (insert (+ line "\n"))
X (++ end_line)
X (++ start_line)
X ))
X (++ start_line)
X (refresh)
X ))
X (if (! wp_quiet)
X (message ""))
X (return 0)
X )
X)
SHAR_EOF
echo "File src/crisp/wp.m is complete"
chmod 0444 src/crisp/wp.m || echo "restore of src/crisp/wp.m fails"
mkdir src src/crisp src/crisp/kbd >/dev/null 2>&1
echo "x - extracting src/crisp/kbd/pc.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/kbd/pc.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X * This file contains the keyboard labels for all PC keyboard types*
X * *
X ********************************************************************/
X
X(macro _init
X (
X
X (= kbd_labels (quote_list
X/* 128 */ "<F1>"
X/* 129 */ "<F2>"
X/* 130 */ "<F3>"
X/* 131 */ "<F4>"
X/* 132 */ "<F5>"
X/* 133 */ "<F6>"
X/* 134 */ "<F7>"
X/* 135 */ "<F8>"
X/* 136 */ "<F9>"
X/* 137 */ "<F10>"
X/* 138 */ "<F11>"
X/* 139 */ "<F12>"
X/* 140 */ "<Shift-F1>"
X/* 141 */ "<Shift-F2>"
X/* 142 */ "<Shift-F3>"
X/* 143 */ "<Shift-F4>"
X/* 144 */ "<Shift-F5>"
X/* 145 */ "<Shift-F6>"
X/* 146 */ "<Shift-F7>"
X/* 147 */ "<Shift-F8>"
X/* 148 */ "<Shift-F9>"
X/* 149 */ "<Shift-F10>"
X/* 150 */ "<Shift-F11>"
X/* 151 */ "<Shift-F12>"
X/* 152 */ "<Ctrl-F1>"
X/* 153 */ "<Ctrl-F2>"
X/* 154 */ "<Ctrl-F3>"
X/* 155 */ "<Ctrl-F4>"
X/* 156 */ "<Ctrl-F5>"
X/* 157 */ "<Ctrl-F6>"
X/* 158 */ "<Ctrl-F7>"
X/* 159 */ "<Ctrl-F8>"
X/* 160 */ "<Ctrl-F9>"
X/* 161 */ "<Ctrl-F10>"
X/* 162 */ "<Ctrl-F11>"
X/* 163 */ "<Ctrl-F12>"
X/* 164 */ "<Alt-F1>"
X/* 165 */ "<Alt-F2>"
X/* 166 */ "<Alt-F3>"
X/* 167 */ "<Alt-F4>"
X/* 168 */ "<Alt-F5>"
X/* 169 */ "<Alt-F6>"
X/* 170 */ "<Alt-F7>"
X/* 171 */ "<Alt-F8>"
X/* 172 */ "<Alt-F9>"
X/* 173 */ "<Alt-F10>"
X/* 174 */ "<Alt-F11>"
X/* 175 */ "<Alt-F12>"
X/* 176 */ "<Alt-A>"
X/* 177 */ "<Alt-B>"
X/* 178 */ "<Alt-C>"
X/* 179 */ "<Alt-D>"
X/* 180 */ "<Alt-E>"
X/* 181 */ "<Alt-F>"
X/* 182 */ "<Alt-G>"
X/* 183 */ "<Alt-H>"
X/* 184 */ "<Alt-I>"
X/* 185 */ "<Alt-J>"
X/* 186 */ "<Alt-K>"
X/* 187 */ "<Alt-L>"
X/* 188 */ "<Alt-M>"
X/* 189 */ "<Alt-N>"
X/* 190 */ "<Alt-O>"
X/* 191 */ "<Alt-P>"
X/* 192 */ "<Alt-Q>"
X/* 193 */ "<Alt-R>"
X/* 194 */ "<Alt-S>"
X/* 195 */ "<Alt-T>"
X/* 196 */ "<Alt-U>"
X/* 197 */ "<Alt-V>"
X/* 198 */ "<Alt-W>"
X/* 199 */ "<Alt-X>"
X/* 200 */ "<Alt-Y>"
X/* 201 */ "<Alt-Z>"
X/* 202 */ "<Insert>"
X/* 203 */ "<End>"
X/* 204 */ "<Down>"
X/* 205 */ "<PgDn>"
X/* 206 */ "<Left>"
X/* 207 */ "" /* Keypad 5 */
X/* 208 */ "<Right>"
X/* 209 */ "<Home>"
X/* 210 */ "<Up>"
X/* 211 */ "<PgUp>"
X/* 212 */ "<Del>"
X/* 213 */ "<Keypad-plus>"
X/* 214 */ "<Keypad-minus>"
X/* 215 */ "<Keypad-star>"
X/* 216 */ "<Ctrl-0>"
X/* 217 */ "<Ctrl-End>"
X/* 218 */ "<Ctrl-2>"
X/* 219 */ "<Ctrl-PgDn>"
X/* 220 */ "<Ctrl-Left>"
X/* 221 */ "<Ctrl-5>"
X/* 222 */ "<Ctrl-Right>"
X/* 223 */ "<Ctrl-Home>"
X/* 224 */ "<Ctrl-8>"
X/* 225 */ "<Ctrl-PgUp>"
X/* 226 */ "<Ctrl-DEL>"
X/* 227 */ "<Ctrl-Keypad-plus>"
X/* 228 */ "<Ctrl-Keypad-minus>"
X/* 229 */ "<Ctrl-Keypad-star>"
X/* 230 */ "<Back-tab>"
X/* 231 */ "<Alt-0>"
X/* 232 */ "<Alt-1>"
X/* 233 */ "<Alt-2>"
X/* 234 */ "<Alt-3>"
X/* 235 */ "<Alt-4>"
X/* 236 */ "<Alt-5>"
X/* 237 */ "<Alt-6>"
X/* 238 */ "<Alt-7>"
X/* 239 */ "<Alt-8>"
X/* 240 */ "<Alt-9>"
X ))
X )
X)
SHAR_EOF
chmod 0644 src/crisp/kbd/pc.m || echo "restore of src/crisp/kbd/pc.m fails"
mkdir src src/crisp src/crisp/kbd >/dev/null 2>&1
echo "x - extracting src/crisp/kbd/sun3.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/kbd/sun3.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X * This file contains the keyboard labels for a Sun keyboard type3 *
X * *
X ********************************************************************/
X
X(macro _init
X (
X
X (= kbd_labels (quote_list
X/* 128 */ "<L1>"
X/* 129 */ "<L2>"
X/* 130 */ "<L3>"
X/* 131 */ "<L4>"
X/* 132 */ "<L5>"
X/* 133 */ "<L6>"
X/* 134 */ "<L7>"
X/* 135 */ "<L8>"
X/* 136 */ "<L9>"
X/* 137 */ "<L10>"
X/* 138 */ ""
X/* 139 */ ""
X/* 140 */ "<F1>"
X/* 141 */ "<F2>"
X/* 142 */ "<F3>"
X/* 143 */ "<F4>"
X/* 144 */ "<F5>"
X/* 145 */ "<F6>"
X/* 146 */ "<F7>"
X/* 147 */ "<F8>"
X/* 148 */ "<F9>"
X/* 149 */ "<F10>"
X/* 150 */ "<F11>"
X/* 151 */ "<F12>"
X/* 152 */ "<Ctrl-F1>"
X/* 153 */ "<Ctrl-F2>"
X/* 154 */ "<Ctrl-F3>"
X/* 155 */ "<Ctrl-F4>"
X/* 156 */ "<Ctrl-F5>"
X/* 157 */ "<Ctrl-F6>"
X/* 158 */ "<Ctrl-F7>"
X/* 159 */ "<Ctrl-F8>"
X/* 160 */ "<Ctrl-F9>"
X/* 161 */ "<Ctrl-F10>"
X/* 162 */ "<Ctrl-F11>"
X/* 163 */ "<Ctrl-F12>"
X/* 164 */ "<LEFT-F1>"
X/* 165 */ "<LEFT-F2>"
X/* 166 */ "<LEFT-F3>"
X/* 167 */ "<LEFT-F4>"
X/* 168 */ "<LEFT-F5>"
X/* 169 */ "<LEFT-F6>"
X/* 170 */ "<LEFT-F7>"
X/* 171 */ "<LEFT-F8>"
X/* 172 */ "<LEFT-F9>"
X/* 173 */ "<LEFT-F10>"
X/* 174 */ "<LEFT-F11>"
X/* 175 */ "<LEFT-F12>"
X/* 176 */ "<LEFT-A>"
X/* 177 */ "<LEFT-B>"
X/* 178 */ "<LEFT-C>"
X/* 179 */ "<LEFT-D>"
X/* 180 */ "<LEFT-E>"
X/* 181 */ "<LEFT-F>"
X/* 182 */ "<LEFT-G>"
X/* 183 */ "<LEFT-H>"
X/* 184 */ "<LEFT-I>"
X/* 185 */ "<LEFT-J>"
X/* 186 */ "<LEFT-K>"
X/* 187 */ "<LEFT-L>"
X/* 188 */ "<LEFT-M>"
X/* 189 */ "<LEFT-N>"
X/* 190 */ "<LEFT-O>"
X/* 191 */ "<LEFT-P>"
X/* 192 */ "<LEFT-Q>"
X/* 193 */ "<LEFT-R>"
X/* 194 */ "<LEFT-S>"
X/* 195 */ "<LEFT-T>"
X/* 196 */ "<LEFT-U>"
X/* 197 */ "<LEFT-V>"
X/* 198 */ "<LEFT-W>"
X/* 199 */ "<LEFT-X>"
X/* 200 */ "<LEFT-Y>"
X/* 201 */ "<LEFT-Z>"
X/* 202 */ "<R5>"
X/* 203 */ "<R13>"
X/* 204 */ "<Down>"
X/* 205 */ "<R15>"
X/* 206 */ "<Left>"
X/* 207 */ "" /* Keypad 5 */
X/* 208 */ "<Right>"
X/* 209 */ "<R7>"
X/* 210 */ "<Up>"
X/* 211 */ "<R9>"
X/* 212 */ "<Del>"
X/* 213 */ "<R6>"
X/* 214 */ "<R3>"
X/* 215 */ "<Keypad-star>"
X/* 216 */ "<Ctrl-0>"
X/* 217 */ "<Ctrl-End>"
X/* 218 */ "<Ctrl-2>"
X/* 219 */ "<Ctrl-PgDn>"
X/* 220 */ "<R1>"
X/* 221 */ "<Ctrl-5>"
X/* 222 */ "<R2>"
X/* 223 */ "<Ctrl-Home>"
X/* 224 */ "<Ctrl-8>"
X/* 225 */ "<Ctrl-PgUp>"
X/* 226 */ "<Ctrl-DEL>"
X/* 227 */ "<Ctrl-Keypad-plus>"
X/* 228 */ "<Ctrl-Keypad-minus>"
X/* 229 */ "<Ctrl-Keypad-star>"
X/* 230 */ "<Back-tab>"
X/* 231 */ "<LEFT-0>"
X/* 232 */ "<LEFT-1>"
X/* 233 */ "<LEFT-2>"
X/* 234 */ "<LEFT-3>"
X/* 235 */ "<LEFT-4>"
X/* 236 */ "<LEFT-5>"
X/* 237 */ "<LEFT-6>"
X/* 238 */ "<LEFT-7>"
X/* 239 */ "<LEFT-8>"
X/* 240 */ "<LEFT-9>"
X ))
X )
X)
SHAR_EOF
chmod 0644 src/crisp/kbd/sun3.m || echo "restore of src/crisp/kbd/sun3.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/at386.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/at386.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* Terminal description file for Microport System V/386 Console
X;* (Colour display)
X;*
X;* 14 Jan 89 [PDF] Added support for ESC [ n C sequence.
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X 213 ;* Top left of window.
X 184 ;* Top right of window.
X 212 ;* Bottom left of window.
X 190 ;* Bottom right of window.
X 179 ;* Vertical bar for window sides.
X 205 ;* Top and bottom horizontal bar for window.
X '+' ;* Top join.
X '+' ;* Bottom join.
X '+' ;* Window 4-way intersection.
X '+' ;* Left hand join.
X '+' ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
X ;* output.
X ;*
X (set_term_features
X "\x1B[%dX" ;* Sequence to clear 'n' spaces.
X "\x1B[11m%c\x1B[10m" ;* Sequence to print characters with top
X ;* bit set.
X "\x1B[23m" ;* Insert-mode cursor.
X "\x1B[24m" ;* Overwrite-mode cursor.
X "\x1B[28;10;13m" ;* Insert-mode cursor (on virtual space).
X "\x1B[28;1;8m" ;* Overwrite-mode cursor (on virtual space).
X "\x1B\x1B" ;* Print ESCAPE character graphically.
X "\x[%b" ;* Escape sequence to repeat last character.
X FALSE ;* ESC [0m resets color.
X TRUE ;* Terminal supports color.
X "\x1B[%dC" ;* Move cursor %d columns
X ;* (Not available in termcap).
X )
X ;*
X ;* Define keyboard layout for non-ascii characters.
X ;* (These can only be used for the console).
X ;*
X (set_term_keyboard
X F1-F12
X (quote_list "\x1BOP" "\x1BOQ" "\x1BOR" "\x1BOS" "\x1BOT"
X "\x1BOU" "\x1BOV" "\x1BOW" "\x1BOX" "\x1BOY"
X "\x1BOZ" "\x1BO[" )
X
X SHIFT-F1-F12
X (quote_list "\x1BOp" "\x1BOq" "\x1BOr" "\x1BOs" "\x1BOt"
X "\x1BOu" "\x1BOv" "\x1BOw" "\x1BOx" "\x1BOy"
X "\x1BOz" "\x1BO{" )
X CTRL-F1-F12
X (quote_list "\x1BO\x10" "\x1BO\x11" "\x1BO\x12" "\x1BO\x13" "\x1BO\x14"
X "\x1BO\x15" "\x1BO\x16" "\x1BO\x17" "\x1BO\x18" "\x1BO\x19"
X "\x1BO\x1a" "\x1BO\x1B" )
X ALT-A-Z
X (quote_list "\x1BNa" "\x1BNb" "\x1BNc" "\x1BNd" "\x1BNe"
X "\x1BNf" "\x1BNg" "\x1BNh" "\x1BNi" "\x1BNj"
X "\x1BNk" "\x1BNl" "\x1BNm" "\x1BNn" "\x1BNo"
X "\x1BNp" "\x1BNq" "\x1BNr" "\x1BNs" "\x1BNt"
X "\x1BNu" "\x1BNv" "\x1BNw" "\x1BNx" "\x1BNy"
X "\x1BNz")
X KEYPAD-0-9
X (quote_list "\x1B[@" "\x1B[Y" "\x1B[B" "\x1B[U" "\x1B[D"
X "\x1B[G" "\x1B[C" "\x1B[H" "\x1B[A" "\x1B[V")
X CTRL-KEYPAD-0-9
X (quote_list "\x1B?0" "\x1B?1" "\x1B?2" "\x1B?3" "\x1B?4"
X "\x1B?5" "\x1B?6" "\x1B?7" "\x1B?8" "\x1B?9")
X ALT-0-9
X (quote_list "\x1BN0" "\x1BN1" "\x1BN2" "\x1BN3" "\x1BN4"
X "\x1BN5" "\x1BN6" "\x1BN7" "\x1BN8" "\x1BN9")
X CUT "\x1B[S"
X COPY "\x1B[T"
X BACK-TAB "\x1B[Z"
X )
X )
X)
SHAR_EOF
chmod 0444 src/crisp/tty/at386.m || echo "restore of src/crisp/tty/at386.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/dec.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/dec.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X * This is terminal description file for VT-100/VT-200 *
X * type terminals. If you are going to use this then you will *
X * need to put the following csh commands in your .login *
X * (depending on system type): *
X * *
X * alias cr cr -medt # only if you want edt startup. *
X * setenv TERM vt200 # or vt100 as appropriate. *
X * setenv BTERM dec *
X * *
X ********************************************************************/
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X "\x1B(0l\x1B(B" ;* Top left of window.
X "\x1B(0k\x1B(B" ;* Top right of window.
X "\x1B(0m\x1B(B" ;* Bottom left of window.
X "\x1B(0j\x1B(B" ;* Bottom right of window.
X "\x1B(0x\x1B(B" ;* Vertical bar for window sides.
X "\x1B(0q\x1B(B" ;* Top and bottom horizontal bar for window.
X '+' ;* Top join.
X '+' ;* Bottom join.
X '+' ;* Window 4-way intersection.
X '+' ;* Left hand join.
X '+' ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
X ;* output.
X ;*
X (set_term_features
X NULL ;* Sequence to clear 'n' spaces.
X NULL ;* Sequence to print characters with top
X ;* bit set.
X NULL ;* Insert-mode cursor.
X NULL ;* Overwrite-mode cursor.
X NULL ;* Insert-mode cursor (on virtual space).
X NULL ;* Overwrite-mode cursor (on virtual space).
X NULL ;* Print ESCAPE character graphically.
X NULL ;* Escape sequence to repeat last character.
X FALSE ;* ESC [0m resets color.
X FALSE ;* Terminal supports color.
X "\x1B[%dC" ;* Sequence to move cursor on same line.
X )
X ;*
X ;* Define keyboard layout for non-ascii characters.
X ;* (These can only be used for the console).
X ;*
X (set_term_keyboard
X/**********************
X* Comment out these lines if you dont want Sun Function key bindings
X***********************/
X F1-F12
X (quote_list "[17~" "[18~" "[19~" "[20~" "[21~"
X "[23~" "[24~" "[25~" "[26~" "[31~"
X )
X
X ;*
X ;* These are the TOP F1 keys.
X ;*
X SHIFT-F1-F12
X (quote_list "\x1B[224z" "\x1B[225z" "\x1B[226z" "\x1B[227z"
X "\x1B[228z" "\x1B[229z" "\x1B[230z" "\x1B[231z"
X "\x1B[232z")
X/**********************
X* Uncomment these lines if you want support for xterm
X* with VT100 key bindings.
X F1-F12
X (quote_list "\x1B[23~" "\x1B[24~" "\x1B[25~" "\x1B[26~"
X "\x1B[28~" "\x1B[29~" "\x1B[31~" "\x1B[32~"
X "\x1B[33~" "\x1B[34~")
X
X ;*
X ;* These are the TOP F1 keys.
X ;*
X SHIFT-F1-F12
X (quote_list "\x1B[11~" "\x1B[12~" "\x1B[13~" "\x1B[14~"
X "\x1B[15~" "\x1B[16~" "\x1B[17~" "\x1B[18~"
X "\x1B[19~" "\x1B[20~")
X***********************/
X ;*
X ;* These are the LEFT-letter keys.
X ;*
X ALT-A-Z
X (quote_list "\x1Ba" "\x1Bb" "\x1Bc" "\x1Bd" "\x1Be"
X "\x1Bf" "\x1Bg" "\x1Bh" "\x1Bi" "\x1Bj"
X "\x1Bk" "\x1Bl" "\x1Bm" "\x1Bn" "\x1Bo"
X "\x1Bp" "\x1Bq" "\x1Br" "\x1Bs" "\x1Bt"
X "\x1Bu" "\x1Bv" "\x1Bw" "\x1Bx" "\x1By"
X "\x1Bz")
X
X KEYPAD-0-9
X (quote_list "\x1B[212z" "\x1B[220z" "\x1BOB" "[6~"
X "\x1BOD" "\x1B[??" "\x1BOC" "\x1B[214z" "\x1BOA"
X "[5~" "\x1B[??7f" "\x1B[213z" "[34~")
X ;*
X ;* F8 is top of buffer (CTRL-HOME). F9 is bottom of buffer
X ;* (CTRL-END). R1 is word left; R2 is word right
X ;*
X CTRL-KEYPAD-0-9
X (quote_list "\x1B[??" "\x1B[??" "\x1B[??" "\x1B[232z" "\x1B[208z"
X "\x1B[??" "\x1B[209z" "\x1B[??" "\x1B[??" "\x1B[231z" )
X ALT-0-9
X (quote_list "\x1B1" "\x1B2" "\x1B3" "\x1B4" "\x1B5"
X "\x1B6" "\x1B7" "\x1B8" "\x1B9" "\x1B0")
X )
X
X )
X)
X(macro xterm-arrow
X (
X (set_term_keyboard
X KEYPAD-0-9
X (quote_list "\x1B[212z" "\x1B[220z" "\x1B[B" "\x1B[222z"
X "\x1B[D" "\x1B[??" "\x1B[C" "\x1B[214z" "\x1B[A")
X )
X )
X)
SHAR_EOF
chmod 0644 src/crisp/tty/dec.m || echo "restore of src/crisp/tty/dec.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/ibm5081.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/ibm5081.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* Terminal description file for IBM 6150 Console
X;* (Colour display)
X;*
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X "\x84" ;* Top left of window.
X "\xfa" ;* Top right of window.
X "\x83" ;* Bottom left of window.
X "\xfc" ;* Bottom right of window.
X 179 ;* Vertical bar for window sides.
X 205 ;* Top and bottom horizontal bar for window.
X NULL ;* Top join.
X NULL ;* Bottom join.
X NULL ;* Window 4-way intersection.
X NULL ;* Left hand join.
X NULL ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
X ;* output.
X ;*
X (set_term_features
X "\x1B[%dX" ;* Sequence to clear 'n' spaces.
X "\x1B[11m%c\x1B[10m" ;* Sequence to print characters with top
X ;* bit set.
X "\x1B[23m" ;* Insert-mode cursor.
X "\x1B[24m" ;* Overwrite-mode cursor.
X "\x1B[28;10;13m" ;* Insert-mode cursor (on virtual space).
X "\x1B[28;1;8m" ;* Overwrite-mode cursor (on virtual space).
X "\x1B\x1B" ;* Print ESCAPE character graphically.
X "\x[%b" ;* Escape sequence to repeat last character.
X FALSE ;* ESC [0m resets color.
X TRUE ;* Terminal supports color.
X )
X ;*
X ;* Define keyboard layout for non-ascii characters.
X ;* (These can only be used for the console).
X ;*
X (set_term_keyboard
X F1-F12
X (quote_list "\x1B[001q" "\x1B[002q" "\x1B[003q" "\x1B[004q"
X "\x1B[005q" "\x1B[006q" "\x1B[007q" "\x1B[008q"
X "\x1B[009q" "\x1B[010q" "\x1B[011q" "\x1B[012q"
X )
X
X SHIFT-F1-F12
X (quote_list "\x1B[013q" "\x1B[014q" "\x1B[015q" "\x1B[016q"
X "\x1B[017q" "\x1B[018q" "\x1B[019q" "\x1B[020q"
X "\x1B[021q" "\x1B[022q" "\x1B[023q" "\x1B[024q"
X )
X CTRL-F1-F12
X (quote_list "\x1B[025q" "\x1B[026q" "\x1B[027q" "\x1B[028q"
X "\x1B[029q" "\x1B[030q" "\x1B[031q" "\x1B[032q"
X "\x1B[033q" "\x1B[034q" "\x1B[035q" "\x1B[036q"
X )
X ALT-F1-F12
X (quote_list "\x1B[037q" "\x1B[038q" "\x1B[039q" "\x1B[040q"
X "\x1B[041q" "\x1B[042q" "\x1B[043q" "\x1B[044q"
X "\x1B[045q" "\x1B[046q" "\x1B[047q" "\x1B[048q"
X )
X ALT-A-Z
X (quote_list "\x1B[087q" "\x1B[105q" "\x1B[103q" "\x1B[089q" "\x1B[076q" "\x1B[090q" "\x1B[091q"
X "\x1B[092q" "\x1B[081q" "\x1B[093q" "\x1B[094q" "\x1B[095q" "\x1B[107q" "\x1B[106q"
X "\x1B[082q" "\x1B[083q" "\x1B[074q" "\x1B[077q" "\x1B[088q" "\x1B[078q" "\x1B[080q"
X "\x1B[104q" "\x1B[075q" "\x1B[102q" "\x1B[079q" "\x1B[101q")
X KEYPAD-0-9
X (quote_list "\x1B[139q" "\x1B[146q" "\x1B[B" "\x1B[154q"
X "\x1B[D" "\x1B[??" "\x1B[C" "\x1B[H"
X "\x1B[A" "\x1B[150q" "\x1B[P" "\x1B[150q" )
X
X CTRL-KEYPAD-0-9
X (quote_list "\\x1B?0" "\\x1B?1" "\\x1B?2" "\\x1B?3" "\\x1B?4"
X "\\x1B?5" "\\x1B?6" "\\x1B?7" "\\x1B?8" "\\x1B?9")
X )
X )
X)
SHAR_EOF
chmod 0644 src/crisp/tty/ibm5081.m || echo "restore of src/crisp/tty/ibm5081.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/isc.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/isc.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* Terminal description file for Interactive Systems V.3/386 Console
X;* (Colour display)
X;*
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X 213 ;* Top left of window.
X 184 ;* Top right of window.
X 212 ;* Bottom left of window.
X 190 ;* Bottom right of window.
X 179 ;* Vertical bar for window sides.
X 205 ;* Top and bottom horizontal bar for window.
X NULL ;* Top join.
X NULL ;* Bottom join.
X NULL ;* Window 4-way intersection.
X NULL ;* Left hand join.
X NULL ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
X ;* output.
X ;*
X (set_term_features
X NULL ;* Sequence to clear 'n' spaces.
X "\x1B%c" ;* Sequence to print characters with top
X ;* bit set.
X NULL ;* Insert-mode cursor.
X NULL ;* Overwrite-mode cursor.
X NULL ;* Insert-mode cursor (on virtual space).
X NULL ;* Overwrite-mode cursor (on virtual space).
X "\x1B\x1B" ;* Print ESCAPE character graphically.
X "\x[%b" ;* Escape sequence to repeat last character.
X TRUE ;* ESC [0m resets color.
X TRUE ;* Terminal supports color.
X "\x1B[%dC" ;* Move cursor %d columns
X ;* (Not available in termcap).
X )
X ;*
X ;* Define keyboard layout for non-ascii characters.
X ;* (These can only be used for the console).
X ;*
X (set_term_keyboard
X F1-F12
X (quote_list "\x1BOP" "\x1BOQ" "\x1BOR" "\x1BOS" "\x1BOT"
X "\x1BOU" "\x1BOV" "\x1BOW" "\x1BOX" "\x1BOY"
X "\x1BOZ" "\x1BO[" )
X
X SHIFT-F1-F12
X (quote_list "\x1BOp" "\x1BOq" "\x1BOr" "\x1BOs" "\x1BOt"
X "\x1BOu" "\x1BOv" "\x1BOw" "\x1BOx" "\x1BOy"
X "\x1BOz" "\x1BO{" )
X CTRL-F1-F12
X (quote_list "\x1BO\x10" "\x1BO\x11" "\x1BO\x12" "\x1BO\x13" "\x1BO\x14"
X "\x1BO\x15" "\x1BO\x16" "\x1BO\x17" "\x1BO\x18" "\x1BO\x19"
X "\x1BO\x1a" "\x1BO\x1B" )
X ALT-A-Z
X (quote_list "\x1BNa" "\x1BNb" "\x1BNc" "\x1BNd" "\x1BNe"
X "\x1BNf" "\x1BNg" "\x1BNh" "\x1BNi" "\x1BNj"
X "\x1BNk" "\x1BNl" "\x1BNm" "\x1BNn" "\x1BNo"
X "\x1BNp" "\x1BNq" "\x1BNr" "\x1BNs" "\x1BNt"
X "\x1BNu" "\x1BNv" "\x1BNw" "\x1BNx" "\x1BNy"
X "\x1BNz")
X KEYPAD-0-9
X (quote_list "\x1B[@" "\x1B[Y" "\x1B[B" "\x1B[U" "\x1B[D"
X "\x1B[G" "\x1B[C" "\x1B[H" "\x1B[A" "\x1B[V")
X CTRL-KEYPAD-0-9
X (quote_list "\x1B?0" "\x1B?1" "\x1B?2" "\x1B?3" "\x1B?4"
X "\x1B?5" "\x1B?6" "\x1B?7" "\x1B?8" "\x1B?9")
X ALT-0-9
X (quote_list "\x1BN0" "\x1BN1" "\x1BN2" "\x1BN3" "\x1BN4"
X "\x1BN5" "\x1BN6" "\x1BN7" "\x1BN8" "\x1BN9")
X CUT "\x1B[S"
X COPY "\x1B[T"
X BACK-TAB "\x1B[Z"
X )
X )
X)
X;*
X;* Called if -mono is part of the suffix list of BTERM. Note
X;* this is called after _init above so we only change what we
X;* need.
X;*
X(macro mono
X (
X (set_term_features
X NULL
X NULL
X NULL
X NULL
X NULL
X NULL
X NULL
X NULL
X NULL
X FALSE ;* Terminal does not supports color.
X )
X )
X)
SHAR_EOF
chmod 0444 src/crisp/tty/isc.m || echo "restore of src/crisp/tty/isc.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/sun.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/sun.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* This is terminal description file for a Sun keyboard and Screen.
X;* This macro knows about the difference between the Sun-3 and
X;* Sun-4 keyboard (for the 386i). Note that we detect the
X;* distinction by looking for the system file: '/usr/bin/organizer'
X;*
X;* As of SunOS 4.0, /usr/bin/organizer is only available for the
X;* 386i, so we'll use this as the clue that we are running on
X;* the 386i. If Sun change the O/S distributions, this macro will
X;* need to be modified.
X;*
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X '+' ;* Top left of window.
X '+' ;* Top right of window.
X '+' ;* Bottom left of window.
X '+' ;* Bottom right of window.
X '|' ;* Vertical bar for window sides.
X '-' ;* Top and bottom horizontal bar for window.
X '+' ;* Top join.
X '+' ;* Bottom join.
X '+' ;* Window 4-way intersection.
X '+' ;* Left hand join.
X '+' ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
X ;* output.
X ;*
X (set_term_features
X NULL ;* Sequence to clear 'n' spaces.
X NULL ;* Sequence to print characters with top
X ;* bit set.
X NULL ;* Insert-mode cursor.
X NULL ;* Overwrite-mode cursor.
X NULL ;* Insert-mode cursor (on virtual space).
X NULL ;* Overwrite-mode cursor (on virtual space).
X NULL ;* Print ESCAPE character graphically.
X NULL ;* Escape sequence to repeat last character.
X FALSE ;* ESC [0m resets color.
X FALSE ;* Terminal supports color.
X )
X ;*
X ;* Define keyboard layout for non-ascii characters.
X ;* (These can only be used for the console).
X ;*
X (set_term_keyboard
X F1-F12
X (quote_list "\x1B[234z" "\x1B[234z" "\x1B[203z" "\x1B[235z"
X "\x1B[204z" "\x1B[236z" "\x1B[205z" "\x1B[237z"
X "\x1B[206z" "\x1B[238z" )
X
X ;*
X ;* These are the TOP F1 keys.
X ;*
X SHIFT-F1-F12
X (quote_list "\x1B[202z" "\x1B[225z" "\x1B[226z" "\x1B[227z"
X "\x1B[228z" "\x1B[229z" "\x1B[230z" "\x1B[??"
X "\x1B[??" )
X
X ;*
X ;* These are the LEFT-letter keys.
X ;*
X ALT-A-Z
X (quote_list "\xE1" "\xE2" "\xE3" "\xE4" "\xE5" ;* ALT-A..E
X "\xE6" "\xE7" "\xE8" "\xE9" "\xEa" ;* ALT-F..J
X "\xEb" "\xEc" "\xED" "\xEe" "\xEf" ;* ALT-K..O
X "\xF0" "\xF1" "\xF2" "\xF3" "\xF4" ;* ALT-P..T
X "\xF5" "\xF6" "\xF7" "\xF8" "\xF9" ;* ALT-U..Y
X "\xFa")
X KEYPAD-0-9
X (quote_list "\x1B[212z" "\x1B[220z" "\x1B[B" "\x1B[222z"
X "\x1B[D" "\x1B[??" "\x1B[C" "\x1B[214z" "\x1B[A"
X "\x1B[216z" "\x1B[P" "\x1B[213z" "\x1B[210z")
X ;*
X ;* F8 is top of buffer (CTRL-HOME). F9 is bottom of buffer
X ;* (CTRL-END). R1 is word left; R2 is word right
X ;*
X CTRL-KEYPAD-0-9
X (quote_list "\x1B[??" "\x1B[??" "\x1B[??" "\x1B[232z" "\x1B[208z"
X "\x1B[??" "\x1B[209z" "\x1B[??" "\x1B[??" "\x1B[231z")
X ALT-0-9
X (quote_list "\xB0" "\xB1" "\xB2" "\xB3" "\xB4"
X "\xB5" "\xB6" "\xB7" "\xB8" "\xB9")
X )
X
X //
X // Now test for the 386i.
X //
X (if (exist "/usr/bin/organizer")
X (tty-386i))
X )
X)
X//
X// Macro to set up keyboard layout for Sun/4 keyboard (386i)
X//
X(macro tty-386i
X (
X (set_term_keyboard
X KEYPAD-0-9
X (quote_list "\x1B[247z" "\x1B[220z" "\x1B[221z" "\x1B[222z"
X "\x1B[217z" "\x1B[218z" "\x1B[219z" "\x1B[214z"
X "\x1B[215z" "\x1B[216z" "\x1B[P" "\x1B[253z"
X "\x1B[254z" "\x1B[213z")
X )
X (assign_to_key "\x1B[250z" "insert \"\n\"")
X )
X)
SHAR_EOF
chmod 0444 src/crisp/tty/sun.m || echo "restore of src/crisp/tty/sun.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/tty.h (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/tty.h &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* (C) Paul Fox, 1988.
X;*
X;* CRISP keyboard definitions for use in the tty-*.m macros.
X;*
X# define TRUE 1
X# define FALSE 0
X
X# define CTRL-A-Z 1
X# define F1-F12 128
X# define SHIFT-F1-F12 140
X# define CTRL-F1-F12 152
X# define ALT-F1-F12 164
X# define ALT-A-Z 176
X# define KEYPAD-0-9 202
X# define DEL 212
X# define COPY 213
X# define CUT 214
X# define CTRL-KEYPAD-0-9 216
X# define BACK-TAB 230
X# define ALT-0-9 231
X
SHAR_EOF
chmod 0444 src/crisp/tty/tty.h || echo "restore of src/crisp/tty/tty.h fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/tty.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/tty.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* This is the default terminal description file. It is used if
X;* we cannot find a tty-$BTERM.m file to load.
X;*
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X '+' ;* Top left of window.
X '+' ;* Top right of window.
X '+' ;* Bottom left of window.
X '+' ;* Bottom right of window.
X '|' ;* Vertical bar for window sides.
X '-' ;* Top and bottom horizontal bar for window.
X NULL ;* Top join.
X NULL ;* Bottom join.
X NULL ;* Window 4-way intersection.
X NULL ;* Left hand join.
X NULL ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
X ;* output.
X ;*
X (set_term_features
X NULL ;* Sequence to clear 'n' spaces.
X NULL ;* Sequence to print characters with top
X ;* bit set.
X NULL ;* Insert-mode cursor.
X NULL ;* Overwrite-mode cursor.
X NULL ;* Insert-mode cursor (on virtual space).
X NULL ;* Overwrite-mode cursor (on virtual space).
X NULL ;* Print ESCAPE character graphically.
X NULL ;* Escape sequence to repeat last character.
X FALSE ;* ESC [0m resets color.
X FALSE ;* Terminal does not supports color.
X )
X ;*
X ;* Define keyboard layout for non-ascii characters.
X ;* (These can only be used for the console).
X ;*
X (set_term_keyboard
X F1-F12
X (quote_list "\x1BOP" "\x1BOQ" "\x1BOR" "\x1BOS" "\x1BOT"
X "\x1BOU" "\x1BOV" "\x1BOW" "\x1BOX" "\x1BOY"
X "\x1BOZ" "\x1BO[" )
X
X SHIFT-F1-F12
X (quote_list "\x1BOp" "\x1BOq" "\x1BOr" "\x1BOs" "\x1BOt"
X "\x1BOu" "\x1BOv" "\x1BOw" "\x1BOx" "\x1BOy"
X "\x1BOz" "\x1BO{" )
X CTRL-F1-F12
X (quote_list "\x1BO\x10" "\x1BO\x11" "\x1BO\x12" "\x1BO\x13" "\x1BO\x14"
X "\x1BO\x15" "\x1BO\x16" "\x1BO\x17" "\x1BO\x18" "\x1BO\x19"
X "\x1BO\x1a" "\x1BO\x1B" )
X
X ;*
X ;* We map the useful ALT-keys into CTRL-key equivalents,
X ;*
X ;*
X ALT-A-Z
X (quote_list "\x01" "\x02" "\x03" "\x04" "\x05" ;* ALT-A..E
X "\x06" "\x07" NULL "\x09" "\x0a" ;* ALT-F..J
X "\x0b" "\x0c" NULL "\x0e" "\x0f" ;* ALT-K..O
X "\x10" "\x11" "\x12" "\x13" "\x14" ;* ALT-P..T
X "\x15" NULL "\x17" "\x18" "\x19" ;* ALT-U..Y
X "\x1a")
X KEYPAD-0-9
X (quote_list "\x1B[@" "\x1B[Y" "\x1B[B" "\x1B[U" "\x1B[D"
X "\x1B[G" "\x1B[C" "\x1B[H" "\x1B[A" "\x1B[V")
X CTRL-KEYPAD-0-9
X (quote_list "\x1B?0" "\x1B?1" "\x1B?2" "\x1B?3" "\x1B?4"
X "\x1B?5" "\x1B?6" "\x1B?7" "\x1B?8" "\x1B?9")
X ALT-0-9
X (quote_list "\x1BN0" "\x1BN1" "\x1BN2" "\x1BN3" "\x1BN4"
X "\x1BN5" "\x1BN6" "\x1BN7" "\x1BN8" "\x1BN9")
X CUT "\x1B[S"
X COPY "\x1B[T"
X BACK-TAB "\x1B[Z"
X )
X ;*
X ;* Following are useful ways to access the BRIEF default CTRL-keys.
X ;* (We cant do these direct because we substituted the ALT-keys
X ;* above).
X (assign_to_key "^V^B" "set_bottom_of_window")
X (assign_to_key "^V^C" "set_center_of_window")
X (assign_to_key "^V^D" "page_down")
X (assign_to_key "^V^G" "objects routines")
X (assign_to_key "^V^H" "help")
X (assign_to_key "^V^J" "goto_bookmark")
X (assign_to_key "^V^K" "objects delete_word_left")
X (assign_to_key "^V^L" "objects delete_word_right")
X (assign_to_key "^V^N" "next_error")
X (assign_to_key "^V^P" "next_error 1")
X (assign_to_key "^V^R" "repeat")
X (assign_to_key "^V^T" "set_top_of_window")
X (assign_to_key "^V^U" "page_up")
X (assign_to_key "^V^V" "version")
X (assign_to_key "^V^W" "set_backup")
X )
X)
SHAR_EOF
chmod 0644 src/crisp/tty/tty.m || echo "restore of src/crisp/tty/tty.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/wyse50.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/wyse50.m &&
X/* Wyse 50 terminal setup for CRISP.
X by David MacKenzie */
X
X# include "tty.h"
X
X(macro _init
X (
X /* Set characters used for extended graphics support when
X drawing windows. */
X (set_term_characters
X "\x1BH2" ; Top left of window.
X "\x1BH3" ; Top right of window.
X "\x1BH1" ; Bottom left of window.
X "\x1BH5" ; Bottom right of window.
X "\x1BH6" ; Vertical bar for window sides.
X "\x1BH:" ; Top and bottom horizontal bar for window.
X "\x1BH0" ; Top join.
X "\x1BH=" ; Bottom join.
X "\x1BH8" ; Window 4-way intersection.
X "\x1BH4" ; Left hand join.
X "\x1BH9" ; Right hand join.
X )
X
X /* Define escape sequences used for special optimisations on output. */
X (set_term_features
X NULL ; Sequence to clear 'n' spaces.
X NULL ; Sequence to print characters with top bit set.
X NULL ; Insert-mode cursor.
X NULL ; Overwrite-mode cursor.
X NULL ; Insert-mode cursor (on virtual space).
X NULL ; Overwrite-mode cursor (on virtual space).
X NULL ; Print ESCAPE character graphically.
X NULL ; Escape sequence to repeat last character.
X FALSE ; ESC [0m resets color.
X FALSE ; Terminal does not support color.
X )
X
X /* Define keyboard layout for non-ASCII characters. */
X (set_term_keyboard
X F1-F12
X (quote_list "\x01@\x0D" "\x01A\x0D" "\x01B\x0D" "\x01C\x0D"
X "\x01D\x0D" "\x01E\x0D" "\x01F\x0D" "\x01G\x0D" "\x01H\x0D"
X "\x01I\x0D" "\x01J\x0D" "\x01K\x0D")
X
X SHIFT-F1-F12
X (quote_list "\x01`\x0D" "\x01a\x0D" "\x01b\x0D" "\x01c\x0D"
X "\x01d\x0D" "\x01e\x0D" "\x01f\x0D" "\x01g\x0D" "\x01h\x0D"
X "\x01i\x0D" "\x01j\x0D" "\x01k\x0D")
X
X ALT-A-Z
X ; Mimic alt-keys with ^v-key.
X (quote_list "\x16a" "\x16b" "\x16c" "\x16d" "\x16e" ; alt a-e
X "\x16f" "\x16g" "\x16h" "\x16i" "\x16j" ; alt f-j
X "\x16k" "\x16l" "\x16m" "\x16n" "\x16o" ; alt k-o
X "\x16p" "\x16q" "\x16r" "\x16s" "\x16t" ; alt p-t
X "\x16u" "\x16v" "\x16w" "\x16x" "\x16y" ; alt u-y
X "\x16z") ; alt-z
X
X 202 (quote_list "\x1BQ") ; Keypad 0 Ins (Wyse INS Char)
X 203 (quote_list "\x1B{") ; Keypad 1 End (Wyse shift-Home)
X 205 (quote_list "\x1BK") ; Keypad 3 PgDn (Wyse PAGE Next)
X 209 (quote_list "\x1E") ; Keypad 7 Home (Wyse Home)
X 211 (quote_list "\x1BJ") ; Keypad 9 PgUp (Wyse PAGE Prev)
X BACK-TAB (quote_list "\x1BI")
X 225 (quote_list "\x1BT") ; Ctrl-Keypad 9 PgUp (Wyse CLR Line)
X 219 (quote_list "\x1BY") ; Ctrl-Keypad 3 PgDn (Wyse CLR Scrn)
X 217 (quote_list "\x1BP") ; Ctrl-Keypad 1 End (Wyse Print)
X 223 (quote_list "\x1B7") ; Ctrl-Keypad 7 Home (Wyse Send)
X )
X
X ; Assign actions to Wyse's stupid choice of cursor keys.
X (assign_to_key "^H" "left")
X (assign_to_key "^L" "right")
X (assign_to_key "^K" "up")
X (assign_to_key "^J" "down")
X
X ; Other special Wyse keys.
X (assign_to_key "#127" "backspace")
X (assign_to_key "\x1Br" "insert_mode") ; overtype Repl key
X (assign_to_key "\x1Bq" "insert_mode 1") ; insert Ins key
X (assign_to_key "\x1BR" "delete_line") ; DEL Line key
X (assign_to_key "\x1BW" "delete_char") ; DEL Char key
X (assign_to_key "\x1Bf" "objects word_right") ; like Emacs
X (assign_to_key "\x1Bb" "objects word_left") ; like Emacs
X )
X)
X
SHAR_EOF
chmod 0644 src/crisp/tty/wyse50.m || echo "restore of src/crisp/tty/wyse50.m fails"
mkdir src src/crisp src/crisp/tty >/dev/null 2>&1
echo "x - extracting src/crisp/tty/xenix.m (Text)"
sed 's/^X//' << 'SHAR_EOF' > src/crisp/tty/xenix.m &&
X/********************************************************************
X * *
X * CRISP - Custom Reduced Instruction Set Programmers Editor *
X * *
X * (C) Paul Fox, 1989 *
X * 43, Jerome Close Tel: +44 6284 4222 *
X * Marlow *
X * Bucks. *
X * England SL7 1TX *
X * *
X * *
X * Please See COPYRIGHT notice. *
X * *
X ********************************************************************/
X;*
X;* Terminal description file for Xenix 386 & 286 Console
X;* (Colour display)
X;*
X
X# include "tty.h"
X
X(macro _init
X (
X ;*
X ;* Set characters used for extended graphics support when
X ;* drawing windows.
X ;*
X (set_term_characters
X 213 ;* Top left of window.
X 184 ;* Top right of window.
X 212 ;* Bottom left of window.
X 190 ;* Bottom right of window.
X 179 ;* Vertical bar for window sides.
X 205 ;* Top and bottom horizontal bar for window.
X NULL ;* Top join.
X NULL ;* Bottom join.
X NULL ;* Window 4-way intersection.
X NULL ;* Left hand join.
X NULL ;* Right hand join.
X )
X ;*
X ;* Define escape sequences used for special optimisations on
SHAR_EOF
echo "End of part 6"
echo "File src/crisp/tty/xenix.m is continued in part 7"
echo "7" > s2_seq_.tmp
exit 0
--
===================== Reuters Ltd PLC,
Tel: +44 628 891313 x. 212 Westthorpe House,
UUCP: fox%marlow.uucp at idec.stc.co.uk Little Marlow,
Bucks, England SL7 3RQ
More information about the Comp.sources.misc
mailing list