Annotation of gforth/engine/io.h, revision 1.15

1.1       anton       1: /* Input driver header
                      2: 
1.13      anton       3:   Copyright (C) 1995,1996,1997,1998,1999,2003,2007 Free Software Foundation, Inc.
1.1       anton       4: 
                      5:   This file is part of Gforth.
                      6: 
                      7:   Gforth is free software; you can redistribute it and/or
                      8:   modify it under the terms of the GNU General Public License
1.12      anton       9:   as published by the Free Software Foundation, either version 3
1.1       anton      10:   of the License, or (at your option) any later version.
                     11: 
                     12:   This program is distributed in the hope that it will be useful,
                     13:   but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15:   GNU General Public License for more details.
                     16: 
                     17:   You should have received a copy of the GNU General Public License
1.12      anton      18:   along with this program; if not, see http://www.gnu.org/licenses/.
1.1       anton      19: */
                     20: 
                     21: #include <setjmp.h>
                     22: 
1.15    ! pazsan     23: extern __thread jmp_buf * throw_jmp_handler;
1.1       anton      24: 
1.4       pazsan     25: #if defined(MSDOS) || defined(SHARC)
1.1       anton      26: #  define prep_terminal()
                     27: #  define deprep_terminal()
                     28: #  include <conio.h>
                     29: 
1.3       pazsan     30: #  define key(stdin)           getch()
                     31: #  define key_query(stdin)     FLAG(kbhit())
1.1       anton      32: #else
1.7       anton      33: Cell getkey(FILE *);
1.1       anton      34: long key_avail(FILE *);
1.2       pazsan     35: void prep_terminal(void);
                     36: void deprep_terminal(void);
1.1       anton      37: void get_winsize(void);
                     38: 
1.3       pazsan     39: #  define key(stdin)           getkey(stdin)
                     40: #  define key_query(stdin)     -(!!key_avail(stdin)) /* !! FLAG(...)? - anton */
1.1       anton      41:                        /* flag was originally wrong -- lennart */
                     42: #endif
                     43: 
                     44: extern UCell rows, cols;
                     45: extern int terminal_prepped;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>