Files
Arquivotheca.SunOS-4.1.4/usr.lib/libcurses/screen/outch.c
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

38 lines
876 B
C

/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef lint
static char sccsid[] = "@(#)outch.c 1.1 94/10/31 SMI"; /* from S5R3.1 1.1 */
#endif
#include "curses_inc.h"
int outchcount;
/* Write out one character to the tty and increment outchcount. */
_outch(c)
chtype c;
{
#ifdef DEBUG
#ifndef LONGDEBUG
if (outf)
if (c < ' ' || c == 0177)
fprintf(outf, "^%c", c^0100);
else
fprintf(outf, "%c", c&0177);
#else /* LONGDEBUG */
if (outf)
fprintf(outf, "_outch: char '%s' term %x file %x=%d\n",
unctrl(c&0177), SP, cur_term->Filedes, fileno(SP->term_file));
#endif /* LONGDEBUG */
#endif /* DEBUG */
outchcount++;
(void) putc((int) c, SP->term_file);
}