[gforth] / gforth / ekey.fs  

gforth: gforth/ekey.fs

Diff for /gforth/ekey.fs between version 1.1 and 1.3

version 1.1, Sun Aug 29 15:45:19 1999 UTC version 1.3, Sat Sep 23 15:46:52 2000 UTC
Line 16 
Line 16 
   
 \ You should have received a copy of the GNU General Public License  \ You should have received a copy of the GNU General Public License
 \ along with this program; if not, write to the Free Software  \ along with this program; if not, write to the Free Software
 \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   
   
 \ this implementation of EKEY just translates VT100/ANSI escape  \ this implementation of EKEY just translates VT100/ANSI escape
Line 142 
Line 142 
     then ( xt addr u )      then ( xt addr u )
     nextname alias ;      nextname alias ;
   
   \ nac02dec1999 exclude the escape sequences if we are using crossdoc.fs to generate
   \ a documentation file. Do this because key sequences [ and OR here clash with
   \ standard names and so prevent them appearing in the documentation.
   [IFUNDEF] put-doc-entry
 get-current esc-sequences set-current  get-current esc-sequences set-current
   
 \ esc sequences (derived by using key-sequence in an xterm)  \ esc sequences (derived by using key-sequence in an xterm)
Line 170 
Line 174 
 ' k12   s" [24~" esc-sequence  ' k12   s" [24~" esc-sequence
   
 set-current  set-current
   [ENDIF]
   
 : clear-ekey-buffer ( -- )  : clear-ekey-buffer ( -- )
       ekey-buffer 0 ekey-buffered 2! ;        ekey-buffer 0 ekey-buffered 2! ;
   
 : ekey ( -- u )  : ekey ( -- u ) \ facility-ext e-key
     key dup #esc =      key dup #esc =
     if      if
         drop clear-ekey-buffer          drop clear-ekey-buffer
         esc-prefix          esc-prefix
     then ;      then ;
   
 : ekey>char ( u -- u false | c true )  : ekey>char ( u -- u false | c true ) \ facility-ext e-key-to-char
     dup 256 u< ;      dup 256 u< ;
   
 : esc? ( -- flag ) recursive  : esc? ( -- flag ) recursive
Line 199 
Line 204 
     then      then
     true ;      true ;
   
 : ekey? ( -- flag )  : ekey? ( -- flag ) \ facility-ext e-key-question
       \G Return @code{true} if a keyboard event is available (use
       \G @code{ekey} to receive the event), @code{false} otherwise.
     key?      key?
     if      if
         key dup #esc =          key dup #esc =


Generate output suitable for use with a patch program
Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help