/****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 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 *
#include <curses.priv.h>
#include <term.h>
-MODULE_ID("$Id: resizeterm.c,v 1.19 2006/12/30 17:12:29 tom Exp $")
+MODULE_ID("$Id: resizeterm.c,v 1.22 2007/09/29 20:37:13 tom Exp $")
#define stolen_lines (screen_lines - SP->_lines_avail)
/*
* If we're trying to be reentrant, do not want any local statics.
*/
-#ifdef _REENTRANT
+#if USE_REENTRANT
#define EXTRA_ARGS , CurLines, CurCols
#define EXTRA_DCLS , int CurLines, int CurCols
#else
int myCols = CurCols = screen_columns;
#ifdef TRACE
- if (_nc_tracing & TRACE_UPDATE)
+ if (USE_TRACEF(TRACE_UPDATE)) {
show_window_sizes("before");
+ _nc_unlock_global(tracef);
+ }
#endif
if (ToLines > screen_lines) {
increase_size(myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
FreeAndNull(SP->newhash);
}
#ifdef TRACE
- if (_nc_tracing & TRACE_UPDATE) {
- LINES = ToLines - was_stolen;
- COLS = ToCols;
+ if (USE_TRACEF(TRACE_UPDATE)) {
+ SET_LINES(ToLines - was_stolen);
+ SET_COLS(ToCols);
show_window_sizes("after");
+ _nc_unlock_global(tracef);
}
#endif
}
* Always update LINES, to allow for call from lib_doupdate.c which
* needs to have the count adjusted by the stolen (ripped off) lines.
*/
- LINES = ToLines - was_stolen;
- COLS = ToCols;
+ SET_LINES(ToLines - was_stolen);
+ SET_COLS(ToCols);
returnCode(result);
}