Use std::string in dwarf2read.c
[deliverable/binutils-gdb.git] / gdb / stub-termcap.c
CommitLineData
532f44ed 1/* A very minimal do-nothing termcap emulation stub.
7ef34f2c 2
b811d2c2 3 Copyright (C) 2005-2020 Free Software Foundation, Inc.
7ef34f2c
MM
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
a9762ec7 11 the Free Software Foundation; either version 3 of the License, or
7ef34f2c
MM
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
a9762ec7 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
7ef34f2c
MM
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
a9762ec7 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
7ef34f2c 21
63413d85
EZ
22
23#include "defs.h"
24
d053f6be 25extern "C" {
d053f6be 26
a95babbf
YQ
27/* -Wmissing-prototypes */
28extern int tgetent (char *buffer, char *termtype);
29extern int tgetnum (char *name);
30extern int tgetflag (char *name);
31extern char* tgetstr (char *name, char **area);
b1a921c8 32extern int tputs (char *string, int nlines, int (*outfun) (int));
a95babbf
YQ
33extern char *tgoto (const char *cap, int col, int row);
34
d053f6be 35}
d053f6be 36
7a85168d
PA
37/* These globals below are global termcap variables that readline
38 references.
39
40 Actually, depending on preprocessor conditions that we don't want
41 to mirror here (as they may change depending on readline versions),
42 readline may define these globals as well, relying on the linker
43 merging them if needed (-fcommon). That doesn't work with
44 -fno-common or C++, so instead we define the symbols as weak.
45 Don't do this on Windows though, as MinGW gcc 3.4.2 doesn't support
46 weak (later versions, e.g., 4.8, do support it). Given this stub
47 file originally was Windows only, and we only needed this when we
48 made it work on other hosts, it should be OK. */
49#ifndef __MINGW32__
50char PC __attribute__((weak));
51char *BC __attribute__((weak));
52char *UP __attribute__((weak));
53#endif
54
7ef34f2c
MM
55/* Each of the files below is a minimal implementation of the standard
56 termcap function with the same name, suitable for use in a Windows
7a85168d
PA
57 console window, or when a real termcap/curses library isn't
58 available. */
7ef34f2c
MM
59
60int
61tgetent (char *buffer, char *termtype)
62{
63 return -1;
64}
65
66int
67tgetnum (char *name)
68{
69 return -1;
70}
71
72int
73tgetflag (char *name)
74{
75 return -1;
76}
77
78char *
79tgetstr (char *name, char **area)
80{
81 return NULL;
82}
83
84int
b1a921c8 85tputs (char *string, int nlines, int (*outfun) (int))
7ef34f2c
MM
86{
87 while (*string)
88 outfun (*string++);
1e0600be
DJ
89
90 return 0;
7ef34f2c
MM
91}
92
93char *
94tgoto (const char *cap, int col, int row)
95{
96 return NULL;
97}
This page took 1.683642 seconds and 4 git commands to generate.