home *** CD-ROM | disk | FTP | other *** search
- \ SEDCHARS.SEQ Extended character set insertion for SED
-
- forth definitions
-
- defer charbutton ' noop is charbutton
-
- 59 value charcol
- 01 value charline
- 0 value chcol
- 0 value chrow
-
- XHERE PARAGRAPH + DUP XDPSEG ! XSEG @ - XDP OFF
- value extcharseg ( --- seg-rel )
- 0 x," " 1+
- xdp @ x," " 10 extcharseg +xseg rot 6 + c!L 1+
- x," " 1+
- x," " 1+
- x," Ç ü é â ä à å ç " 1+
- x," ê ë è ï î ì Ä Å " 1+
- x," É æ Æ ô ö ò û ù " 1+
- x," ÿ Ö Ü ¢ £ ¥ ₧ ƒ " 1+
- x," á í ó ú ñ Ñ ª º " 1+
- x," ¿ ⌐ ¬ ½ ¼ ¡ « » " 1+
- x," ░ ▒ ▓ │ ┤ ╡ ╢ ╖ " 1+
- x," ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐ " 1+
- x," └ ┴ ┬ ├ ─ ┼ ╞ ╟ " 1+
- x," ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ " 1+
- x," ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ " 1+
- x," ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ " 1+
- x," α ß Γ π Σ σ µ τ " 1+
- x," Φ Θ Ω δ ∞ φ ε ∩ " 1+
- x," ≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ " 1+
- x," ° ∙ · √ ⁿ ² ■ " 1+
- constant extrows
-
- : extchar@ ( --- c1 )
- extcharseg +xseg 0 chrow 0
- ?do 2dup c@L + 1+
- loop 1+ chcol 2* + 1+ c@L ;
-
- headerless
-
- \ f1 is true if operation was not canceled
- : graphicchar ( --- <c1> f1 ) \ c1 present if f1 is true
- get-cursor >r
- ?doingmac 0= \ if we are performing a macro, don't show
- \ the character box in screen, we don't
- \ want to see it anyway, and it slows things
- \ down too much.
- dup>r
- if savescr
- big-cursor
- save> attrib >norm
- charcol charline
- charcol extcharseg +xseg 0 c@L
- + 1+ charline extrows 2+ + box
- tx 1+ ty extrows 1+ + at ." ESC=Cancel "
- extcharseg +xseg 0 extrows 1+ 1
- do tx 1+ ty i + at
- 2dup c@L 1 0 d+ 3dup typeL +
- loop 2drop
- restore> attrib
- then
- ['] charbutton save!> dobutton
- begin r@ \ if not doing a macro display value
- if tx 1+ ty extrows 1+ + at extchar@ 4 .r
- tx 2+ chcol 2* + ty 1+ chrow + at
- then
- key dup 13 <> over 27 <> and
- while ( c1 --- )
- case
- ( Up Arrow ) 200 of chrow 1- 0max =: chrow endof
- ( Dn Arrow ) 208 of chrow 1+ extrows 1- min =: chrow endof
- ( Rt Arrow ) 205 of chcol 1+ 7 min =: chcol endof
- ( Lt Arrow ) 203 of chcol 1- 0max =: chcol endof
- ( PgDn ) 209 of chrow 5 + extrows 1- min =: chrow endof
- ( PgUp ) 201 of chrow 5 - 0max =: chrow endof
- ( Home ) 199 of 0 =: chcol endof
- ( End ) 207 of 7 =: chcol endof
- drop
- endcase
- repeat
- restore> dobutton
- r> \ doing macro flag
- if restscr
- then 13 = dup
- if extchar@ swap
- then r> set-cursor ;
-
- ' graphicchar is graphchar
-
- \ Link the graphics character selector into editor assuming the editor
- \ has been loaded, otherwise we are done.
-
- headers
-
- defined editor nip #if \ load only if EDITOR exists
-
- : sedchar ( --- )
- ?browse ?exit
- graphicchar
- if schr
- then scrshow ?cursor ;
-
- ' sedchar is insany
-
- #endif
-
- forth definitions
-
-
-