/****************************************************************************
- * Copyright (c) 1998-2000,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>
-MODULE_ID("$Id: hardscroll.c,v 1.38 2006/12/30 22:19:34 tom Exp $")
+MODULE_ID("$Id: hardscroll.c,v 1.41 2007/09/29 21:48:36 tom Exp $")
#if defined(SCROLLDEBUG) || defined(HASHDEBUG)
# undef TR
# define TR(n, a) if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
+extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+
#else /* no debug */
/* OLDNUM(n) indicates which line will be shifted to the position n.
int i;
int start, end, shift;
- TR(TRACE_ICALLS, ("_nc_scroll_optimize() begins"));
+ TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize")));
#if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
#if USE_HASHMAP
#endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
#ifdef TRACE
- if (_nc_tracing & (TRACE_UPDATE | TRACE_MOVE))
+ if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) {
_nc_linedump();
+ _nc_unlock_global(tracef);
+ }
#endif /* TRACE */
/* pass 1 - from top to bottom scrolling up */
}
#endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
}
+ TR(TRACE_ICALLS, (T_RETURN("")));
}
#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)