/****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <termcap.h> /* ospeed */
#include <tic.h>
-MODULE_ID("$Id: lib_tputs.c,v 1.108 2021/05/08 23:27:40 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.111 2023/09/16 16:05:15 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(int) _nc_nulls_sent = 0; /* used by 'tack' program */
+NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0;
#if NCURSES_NO_PADDING
NCURSES_EXPORT(void)
{
T((T_CALLED("delay_output(%p,%d)"), (void *) SP_PARM, ms));
+ if (ms > MAX_DELAY_MSECS)
+ ms = MAX_DELAY_MSECS;
+
if (!HasTInfoTerminal(SP_PARM))
returnCode(ERR);
SP_PARM->out_buffer));
if (SP_PARM->out_inuse) {
char *buf = SP_PARM->out_buffer;
- size_t amount = SP->out_inuse;
+ size_t amount = SP_PARM->out_inuse;
- SP->out_inuse = 0;
TR(TRACE_CHARPUT, ("flushing %ld/%ld bytes",
(unsigned long) amount, _nc_outchars));
while (amount) {
TR(TRACE_CHARPUT, ("flushing stdout"));
fflush(stdout);
}
+ if (SP_PARM != 0)
+ SP_PARM->out_inuse = 0;
returnVoid;
}