aboutsummaryrefslogtreecommitdiff
path: root/ncurses/tinfo/lib_termname.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-02-28 19:18:07 +0000
committerXin LI <delphij@FreeBSD.org>2014-02-28 19:18:07 +0000
commita0044ffc69cfe39a3b0b2d208e0952254555afc6 (patch)
tree7b2d708d03277cdd2560e9ce6572bdafc2e58bab /ncurses/tinfo/lib_termname.c
parent4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a (diff)
downloadsrc-a0044ffc69cfe39a3b0b2d208e0952254555afc6.tar.gz
src-a0044ffc69cfe39a3b0b2d208e0952254555afc6.zip
Redo import of ncurses 5.9 (stripped).vendor/ncurses/5.9-20110404_stripped
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262617 svn path=/vendor/ncurses/5.9-20110404_stripped/; revision=262631; tag=vendor/ncurses/5.9-20110404_stripped
Diffstat (limited to 'ncurses/tinfo/lib_termname.c')
-rw-r--r--ncurses/tinfo/lib_termname.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/ncurses/tinfo/lib_termname.c b/ncurses/tinfo/lib_termname.c
index 713d0be8c360..e3f6827ee018 100644
--- a/ncurses/tinfo/lib_termname.c
+++ b/ncurses/tinfo/lib_termname.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,17 +28,31 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_termname.c,v 1.8 2003/12/27 18:23:01 tom Exp $")
+MODULE_ID("$Id: lib_termname.c,v 1.12 2009/10/24 21:56:58 tom Exp $")
NCURSES_EXPORT(char *)
-termname(void)
+NCURSES_SP_NAME(termname) (NCURSES_SP_DCL0)
{
char *name = 0;
- T((T_CALLED("termname()")));
+ T((T_CALLED("termname(%p)"), (void *) SP_PARM));
+#if NCURSES_SP_FUNCS
+ if (TerminalOf(SP_PARM) != 0) {
+ name = TerminalOf(SP_PARM)->_termname;
+ }
+#else
if (cur_term != 0)
name = cur_term->_termname;
+#endif
returnPtr(name);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+termname(void)
+{
+ return NCURSES_SP_NAME(termname) (CURRENT_SCREEN);
+}
+#endif