/****************************************************************************
- * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,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 <termcap.h> /* ospeed */
#include <tic.h>
-MODULE_ID("$Id: lib_tputs.c,v 1.60 2002/08/17 23:44:08 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.64 2007/09/29 20:37:13 tom Exp $")
-NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
-NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
+NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
+NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
-NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */
+NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */
static int (*my_outch) (int c) = _nc_outch;
} else {
register int nullcount;
- nullcount = (ms * _nc_baudrate(ospeed)) / 10000;
+ nullcount = (ms * _nc_baudrate(ospeed)) / (BAUDBYTE * 1000);
for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--)
my_outch(PC);
if (my_outch == _nc_outch)
NCURSES_EXPORT(int)
_nc_outch(int ch)
{
-#ifdef TRACE
- _nc_outchars++;
-#endif /* TRACE */
+ COUNT_OUTCHARS(1);
if (SP != 0
&& SP->_cleanup) {
#ifdef TRACE
char addrbuf[32];
- if (_nc_tracing & TRACE_TPUTS) {
+ if (USE_TRACEF(TRACE_TPUTS)) {
if (outc == _nc_outch)
(void) strcpy(addrbuf, "_nc_outch");
else
} else {
_tracef("tputs(%s, %d, %s) called", _nc_visbuf(string), affcnt, addrbuf);
}
- _nc_tputs_trace = (char *) NULL;
+ TPUTS_TRACE(NULL);
+ _nc_unlock_global(tracef);
}
#endif /* TRACE */