gdb/windows-termcap.c - gdb

Functions defined

Source code

  1. /* Win32 termcap emulation.

  2.    Copyright (C) 2005-2015 Free Software Foundation, Inc.

  3.    Contributed by CodeSourcery, LLC.

  4.    This file is part of GDB.

  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 3 of the License, or
  8.    (at your option) any later version.

  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.

  13.    You should have received a copy of the GNU General Public License
  14.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  15. #include <stdlib.h>

  16. /* -Wmissing-prototypes */
  17. extern int tgetent (char *buffer, char *termtype);
  18. extern int tgetnum (char *name);
  19. extern int tgetflag (char *name);
  20. extern char* tgetstr (char *name, char **area);
  21. extern int tputs (char *string, int nlines, int (*outfun) ());
  22. extern char *tgoto (const char *cap, int col, int row);

  23. /* Each of the files below is a minimal implementation of the standard
  24.    termcap function with the same name, suitable for use in a Windows
  25.    console window.  */

  26. int
  27. tgetent (char *buffer, char *termtype)
  28. {
  29.   return -1;
  30. }

  31. int
  32. tgetnum (char *name)
  33. {
  34.   return -1;
  35. }

  36. int
  37. tgetflag (char *name)
  38. {
  39.   return -1;
  40. }

  41. char *
  42. tgetstr (char *name, char **area)
  43. {
  44.   return NULL;
  45. }

  46. int
  47. tputs (char *string, int nlines, int (*outfun) ())
  48. {
  49.   while (*string)
  50.     outfun (*string++);

  51.   return 0;
  52. }

  53. char *
  54. tgoto (const char *cap, int col, int row)
  55. {
  56.   return NULL;
  57. }