]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_refresh.c
ncurses 6.2 - patch 20200531
[ncurses.git] / ncurses / base / lib_refresh.c
index 8c02086a707d34302e3d96182974436ba7b1859c..d8444289c1528efc5ea2934b9a3c127c34e320f7 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 1998-2010,2011 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +43,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_refresh.c,v 1.44 2010/12/19 01:22:58 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.46 2020/02/02 23:34:34 tom Exp $")
 
 NCURSES_EXPORT(int)
 wrefresh(WINDOW *win)
 
 NCURSES_EXPORT(int)
 wrefresh(WINDOW *win)
@@ -90,12 +91,6 @@ wnoutrefresh(WINDOW *win)
 #endif
 
     T((T_CALLED("wnoutrefresh(%p)"), (void *) win));
 #endif
 
     T((T_CALLED("wnoutrefresh(%p)"), (void *) win));
-#ifdef TRACE
-    if (USE_TRACEF(TRACE_UPDATE)) {
-       _tracedump("...win", win);
-       _nc_unlock_global(tracef);
-    }
-#endif /* TRACE */
 
     /*
      * This function will break badly if we try to refresh a pad.
 
     /*
      * This function will break badly if we try to refresh a pad.
@@ -104,6 +99,13 @@ wnoutrefresh(WINDOW *win)
        || (win->_flags & _ISPAD))
        returnCode(ERR);
 
        || (win->_flags & _ISPAD))
        returnCode(ERR);
 
+#ifdef TRACE
+    if (USE_TRACEF(TRACE_UPDATE)) {
+       _tracedump("...win", win);
+       _nc_unlock_global(tracef);
+    }
+#endif /* TRACE */
+
     /* put them here so "win == 0" won't break our code */
     begx = win->_begx;
     begy = win->_begy;
     /* put them here so "win == 0" won't break our code */
     begx = win->_begx;
     begy = win->_begy;