Example #1
0
NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
{
    int res = ERR;

    T((T_CALLED("beep(%p)"), (void *) SP_PARM));

#ifdef USE_TERM_DRIVER
    if (SP_PARM != 0)
	res = CallDriver_1(SP_PARM, doBeepOrFlash, TRUE);
#else
    /* FIXME: should make sure that we are not in altchar mode */
    if (cur_term == 0) {
	res = ERR;
    } else if (bell) {
	TPUTS_TRACE("bell");
	res = putp(bell);
	_nc_flush();
    } else if (flash_screen) {
	TPUTS_TRACE("flash_screen");
	res = putp(flash_screen);
	_nc_flush();
    }
#endif

    returnCode(res);
}
Example #2
0
flash(void)
{
    int res = ERR;

    T((T_CALLED("flash()")));

    /* FIXME: should make sure that we are not in altchar mode */
    if (flash_screen) {
	TPUTS_TRACE("flash_screen");
	res = putp(flash_screen);
	_nc_flush();
    } else if (bell) {
	TPUTS_TRACE("bell");
	res = putp(bell);
	_nc_flush();
    }

    returnCode(res);
}
Example #3
0
delay_output(int ms)
{
    T((T_CALLED("delay_output(%d)"), ms));

    if (no_pad_char) {
	_nc_flush();
	napms(ms);
    } else {
	register int nullcount;

	nullcount = (ms * _nc_baudrate(ospeed)) / 10000;
	for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--)
	    my_outch(PC);
	if (my_outch == _nc_outch)
	    _nc_flush();
    }

    returnCode(OK);
}
Example #4
0
NCURSES_SP_NAME(nonl) (NCURSES_SP_DCL0)
{
    T((T_CALLED("nonl(%p)"), (void *) SP_PARM));
    if (0 == SP_PARM)
	returnCode(ERR);
    SP_PARM->_nl = FALSE;
#ifdef __EMX__
    _nc_flush();
    _fsetmode(NC_OUTPUT(SP_PARM), "b");
#endif
    returnCode(OK);
}
Example #5
0
nonl(void)
{
    T((T_CALLED("nonl()")));

    SP->_nl = FALSE;

#ifdef __EMX__
    _nc_flush();
    _fsetmode(NC_OUTPUT, "b");
#endif

    returnCode(OK);
}
Example #6
0
reset_shell_mode(void)
{
    T((T_CALLED("reset_shell_mode()")));

    if (cur_term != 0) {
	if (SP) {
	    _nc_keypad(FALSE);
	    _nc_flush();
	    NC_BUFFERED(FALSE);
	}
	returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
    }
    returnCode(ERR);
}
Example #7
0
NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_DCL0)
{
    int rc = ERR;
    TERMINAL *termp = TerminalOf(SP_PARM);

    T((T_CALLED("reset_shell_mode(%p)"), (void *) SP_PARM));

    if (termp != 0) {
#ifdef USE_TERM_DRIVER
	rc = CallDriver_2(SP_PARM, mode, FALSE, FALSE);
#else
	if (SP_PARM) {
	    _nc_keypad(SP_PARM, FALSE);
	    _nc_flush();
	    NC_BUFFERED(SP_PARM, FALSE);
	}
	rc = _nc_set_tty_mode(&termp->Ottyb);
#endif
    }
    returnCode(rc);
}