3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License (LGPL) as published by the Free Software Foundation.
7 Please refer to the COPYING file for more information.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 Copyright (c) 2007 Ryo Dairiki
24 #include "roteprivate.h"
26 void rote_utf8_erase_character(RoteTerm
*rt
, size_t row
, size_t col
) {
27 if (row
< rt
->rows
|| col
< rt
->cols
) return;
29 const size_t fcount
= rt
->cells
[row
][col
].fcount
;
30 const size_t findex
= rt
->cells
[row
][col
].findex
;
33 for (i
= rt
->ccol
- findex
; i
< rt
->cols
&& i
< rt
->ccol
+ fcount
- findex
; ++i
) {
34 rt
->cells
[row
][i
].empty
= true;
35 rt
->cells
[row
][i
].fcount
= 1;
36 rt
->cells
[row
][i
].findex
= 0;
37 rt
->cells
[row
][i
].ch
= 0x20;
38 rt
->cells
[row
][i
].attr
= rt
->curattr
;