OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [tui/] [tuiIO.h] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
/* TUI support I/O functions.
2
   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3
   Contributed by Hewlett-Packard Company.
4
 
5
   This file is part of GDB.
6
 
7
   This program is free software; you can redistribute it and/or modify
8
   it under the terms of the GNU General Public License as published by
9
   the Free Software Foundation; either version 2 of the License, or
10
   (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
18
   along with this program; if not, write to the Free Software
19
   Foundation, Inc., 59 Temple Place - Suite 330,
20
   Boston, MA 02111-1307, USA.  */
21
 
22
#ifndef _TUI_IO_H
23
#define _TUI_IO_H
24
 
25
#include <stdio.h>
26
 
27
/* Print the string in the curses command window.  */
28
extern void tui_puts (const char *);
29
 
30
/* Setup the IO for curses or non-curses mode.  */
31
extern void tui_setup_io (int mode);
32
 
33
/* Initialize the IO for gdb in curses mode.  */
34
extern void tui_initialize_io (void);
35
 
36
/* Get a character from the command window.  */
37
extern int tui_getc (FILE*);
38
 
39
/* Readline callback.
40
   Redisplay the command line with its prompt after readline has
41
   changed the edited text.  */
42
extern void tui_redisplay_readline (void);
43
 
44
extern struct ui_out *tui_out;
45
extern struct ui_out *tui_old_uiout;
46
 
47
#define m_tuiStartNewLine       tuiStartNewLines(1)
48
#define m_isStartSequence(ch)   (ch == 27)
49
#define m_isEndSequence(ch)     (ch == 126)
50
#define m_isBackspace(ch)       (ch == 8)
51
#define m_isDeleteChar(ch)      (ch == KEY_DC)
52
#define m_isDeleteLine(ch)      (ch == KEY_DL)
53
#define m_isDeleteToEol(ch)     (ch == KEY_EOL)
54
#define m_isNextPage(ch)        (ch == KEY_NPAGE)
55
#define m_isPrevPage(ch)        (ch == KEY_PPAGE)
56
#define m_isLeftArrow(ch)       (ch == KEY_LEFT)
57
#define m_isRightArrow(ch)      (ch == KEY_RIGHT)
58
 
59
#define m_isCommandChar(ch)     (m_isNextPage(ch) || m_isPrevPage(ch) || \
60
                                m_isLeftArrow(ch) || m_isRightArrow(ch) || \
61
                                (ch == KEY_UP) || (ch == KEY_DOWN) || \
62
                                (ch == KEY_SF) || (ch == KEY_SR) || \
63
                                (ch == (int)'\f') || m_isStartSequence(ch))
64
 
65
#define m_isXdbStyleCommandChar(ch)     (m_isNextPage(ch) || m_isPrevPage(ch))
66
 
67
 
68
#endif
69
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.