int		newx;
int waddch_nosync(WINDOW *win, const chtype c)/* the workhorse function -- add a character to the given window */{register chtype	ch = c;register int	x, y;int		newx;	x = win->_curx;	y = win->_cury;	CHECK_POSITION(win, x, y);	if (ch & A_ALTCHARSET)		goto noctrl;	switch ((int)(ch&A_CHARTEXT)) {    	case '\t':		if (win->_flags & _NEED_WRAP) {		  	x = 0;			newx = min(TABSIZE, win->_maxx+1);		} else			newx = min(x + (TABSIZE-(x%TABSIZE)), win->_maxx+1);		while (win->_curx < newx) {	    		if (waddch_literal(win, ' ' | (ch&A_ATTRIBUTES)) == ERR)				return(ERR);		}		return(OK);    	case '\n':		wclrtoeol(win);		DO_NEWLINE		break;    	case '\r':		x = 0;		win->_flags &= ~_NEED_WRAP;		break;    	case '\b':		if (win->_flags & _NEED_WRAP)			win->_flags &= ~_NEED_WRAP;		else if (--x < 0)			x = 0;		break;    	default:		if (is7bits(ch & A_CHARTEXT) && iscntrl(ch & A_CHARTEXT))		    	return(waddstr(win, unctrl((unsigned char)ch)));		/* FALLTHRU */        noctrl:		waddch_literal(win, ch);		return(OK);	}	win->_curx = x;	win->_cury = y;	return(OK);}