* This routine adds the character to the current position
* %G% (Berkeley) @(#)addch.c 1.3
fprintf(outf
, "ADDCH('%c') at (%d, %d)\n", c
, y
, x
);
if (y
>= win
->_maxy
|| x
>= win
->_maxx
|| y
< 0 || x
< 0)
for (newx
= x
+ (8 - (x
& 07)); x
< newx
; x
++)
if (waddch(win
, ' ') == ERR
)
fprintf(outf
, "ADDCH: 1: y = %d, x = %d, firstch = %d, lastch = %d\n", y
, x
, win
->_firstch
[y
], win
->_lastch
[y
]);
if (win
->_flags
& _STANDOUT
)
if (win
->_y
[y
][x
] != c
) {
if (win
->_firstch
[y
] == _NOCHANGE
)
win
->_firstch
[y
] = win
->_lastch
[y
] = x
;
else if (x
< win
->_firstch
[y
])
else if (x
> win
->_lastch
[y
])
fprintf(outf
, "ADDCH: 2: y = %d, x = %d, firstch = %d, lastch = %d\n", y
, x
, win
->_firstch
[y
], win
->_lastch
[y
]);