]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_cur_term.c
ncurses 6.2 - patch 20200404
[ncurses.git] / ncurses / tinfo / lib_cur_term.c
index a61a65561bbf83fb62dc29067636842291b7abdf..4a90335d5e333ecdd5a820f1fe40162e1aeaa2a5 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 1998-2016,2017 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            *
@@ -39,7 +40,7 @@
 #include <curses.priv.h>
 #include <termcap.h>           /* ospeed */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.40 2017/04/15 21:35:08 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.42 2020/02/02 23:34:34 tom Exp $")
 
 #undef CUR
 #define CUR TerminalType(termp).
@@ -108,9 +109,7 @@ NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL *termp)
        }
 #endif
 #if !USE_REENTRANT
-#define MY_SIZE (size_t) (NAMESIZE - 1)
-       _nc_STRNCPY(ttytype, TerminalType(termp).term_names, MY_SIZE);
-       ttytype[MY_SIZE] = '\0';
+       save_ttytype(termp);
 #endif
     }
     _nc_unlock_global(curses);