windows-nat: Don't change current_event.dwThreadId in handle_output_debug_string()
[deliverable/binutils-gdb.git] / gdb / stub-termcap.c
1 /* A very minimal do-nothing termcap emulation stub.
2
3 Copyright (C) 2005-2015 Free Software Foundation, Inc.
4
5 Contributed by CodeSourcery, LLC.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22
23 #include "defs.h"
24
25 #include <stdlib.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /* -Wmissing-prototypes */
32 extern int tgetent (char *buffer, char *termtype);
33 extern int tgetnum (char *name);
34 extern int tgetflag (char *name);
35 extern char* tgetstr (char *name, char **area);
36 extern int tputs (char *string, int nlines, int (*outfun) (int));
37 extern char *tgoto (const char *cap, int col, int row);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 /* These globals below are global termcap variables that readline
44 references.
45
46 Actually, depending on preprocessor conditions that we don't want
47 to mirror here (as they may change depending on readline versions),
48 readline may define these globals as well, relying on the linker
49 merging them if needed (-fcommon). That doesn't work with
50 -fno-common or C++, so instead we define the symbols as weak.
51 Don't do this on Windows though, as MinGW gcc 3.4.2 doesn't support
52 weak (later versions, e.g., 4.8, do support it). Given this stub
53 file originally was Windows only, and we only needed this when we
54 made it work on other hosts, it should be OK. */
55 #ifndef __MINGW32__
56 char PC __attribute__((weak));
57 char *BC __attribute__((weak));
58 char *UP __attribute__((weak));
59 #endif
60
61 /* Each of the files below is a minimal implementation of the standard
62 termcap function with the same name, suitable for use in a Windows
63 console window, or when a real termcap/curses library isn't
64 available. */
65
66 int
67 tgetent (char *buffer, char *termtype)
68 {
69 return -1;
70 }
71
72 int
73 tgetnum (char *name)
74 {
75 return -1;
76 }
77
78 int
79 tgetflag (char *name)
80 {
81 return -1;
82 }
83
84 char *
85 tgetstr (char *name, char **area)
86 {
87 return NULL;
88 }
89
90 int
91 tputs (char *string, int nlines, int (*outfun) (int))
92 {
93 while (*string)
94 outfun (*string++);
95
96 return 0;
97 }
98
99 char *
100 tgoto (const char *cap, int col, int row)
101 {
102 return NULL;
103 }
This page took 0.032718 seconds and 4 git commands to generate.