14 |
|
#include "copyright.h" |
15 |
|
|
16 |
|
#include <stdio.h> |
17 |
– |
|
17 |
|
#include <stdlib.h> |
18 |
< |
|
18 |
> |
#include <string.h> |
19 |
|
#include <X11/Xlib.h> |
20 |
|
|
21 |
|
#include "x11twind.h" |
22 |
|
|
24 |
– |
#ifndef BSD |
25 |
– |
#define bzero(d,n) (void)memset(d,0,n) |
26 |
– |
#endif |
27 |
– |
|
23 |
|
#define checkcurs(t) if ((t)->cursor) togglecurs(t) |
24 |
|
|
25 |
|
#define restorecurs checkcurs |
157 |
|
XClearArea(t->dpy, t->w, LEFTMAR, (t->nr-1)*Height(t->f), |
158 |
|
t->nc*Width(t->f), Height(t->f),(Bool) 0); |
159 |
|
|
160 |
< |
bzero(cp, t->nc); |
160 |
> |
memset(cp, '\0', t->nc); |
161 |
|
restorecurs(t); /* should we reposition cursor? */ |
162 |
|
} |
163 |
|
|
184 |
|
/* clear new line */ |
185 |
|
XClearArea(t->dpy, t->w, LEFTMAR, r*Height(t->f), |
186 |
|
t->nc*Width(t->f), Height(t->f), (Bool) 0); |
187 |
< |
bzero(cp, t->nc); |
187 |
> |
memset(cp, '\0', t->nc); |
188 |
|
restorecurs(t); /* should we reposition cursor? */ |
189 |
|
} |
190 |
|
|
213 |
|
|
214 |
|
XClearWindow(t->dpy, t->w); |
215 |
|
for (i = 0; i < t->nr; i++) |
216 |
< |
bzero(t->lp[i], t->nc); |
216 |
> |
memset(t->lp[i], '\0', t->nc); |
217 |
|
t->r = t->c = 0; |
218 |
|
restorecurs(t); |
219 |
|
} |