* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)addch.c 5.1 (Berkeley) %G%";
* This routine adds the character to the current position
fprintf(outf
, "ADDCH('%c') at (%d, %d)\n", c
, y
, x
);
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
)
fprintf(outf
, "ADDCH: 2: y = %d, x = %d, firstch = %d, lastch = %d\n", y
, x
, win
->_firstch
[y
], win
->_lastch
[y
]);
* Set the first and last change flags for this window.
fprintf(outf
, "SET_CH(%0.2o, %d, %d)\n", win
, y
, x
);
if (win
->_y
[y
][x
] != ch
) {
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
, "SET_CH: change gives f/l: %d/%d [%d/%d]\n",
win
->_firstch
[y
], win
->_lastch
[y
],
win
->_firstch
[y
] - win
->_ch_off
,
win
->_lastch
[y
] - win
->_ch_off
);