d053f6be55
Fixes linking an --enable-build-with-cxx build on mingw: ../readline/terminal.c:278: undefined reference to `tgetnum' ../readline/terminal.c:297: undefined reference to `tgetnum' ../readline/libreadline.a(terminal.o): In function `get_term_capabilities': ../readline/terminal.c:427: undefined reference to `tgetstr' ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': [etc.] gdb/ChangeLog: 2015-03-16 Yuanhui Zhang <asmwarrior@gmail.com> Pedro Alves <palves@redhat.com> * gdb_curses.h (tgetnum): Mark with EXTERN_C. * stub-termcap.c (tgetent, tgetnum, tgetflag, tgetstr, tputs) (tgoto): Wrap with extern "C".
84 lines
1.8 KiB
C
84 lines
1.8 KiB
C
/* A very minimal do-nothing termcap emulation stub.
|
|
|
|
Copyright (C) 2005-2015 Free Software Foundation, Inc.
|
|
|
|
Contributed by CodeSourcery, LLC.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* -Wmissing-prototypes */
|
|
extern int tgetent (char *buffer, char *termtype);
|
|
extern int tgetnum (char *name);
|
|
extern int tgetflag (char *name);
|
|
extern char* tgetstr (char *name, char **area);
|
|
extern int tputs (char *string, int nlines, int (*outfun) (int));
|
|
extern char *tgoto (const char *cap, int col, int row);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
/* Each of the files below is a minimal implementation of the standard
|
|
termcap function with the same name, suitable for use in a Windows
|
|
console window. */
|
|
|
|
int
|
|
tgetent (char *buffer, char *termtype)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
int
|
|
tgetnum (char *name)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
int
|
|
tgetflag (char *name)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
char *
|
|
tgetstr (char *name, char **area)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
int
|
|
tputs (char *string, int nlines, int (*outfun) (int))
|
|
{
|
|
while (*string)
|
|
outfun (*string++);
|
|
|
|
return 0;
|
|
}
|
|
|
|
char *
|
|
tgoto (const char *cap, int col, int row)
|
|
{
|
|
return NULL;
|
|
}
|