|
@ -733,12 +733,12 @@ xloadcols(void) |
|
|
static int loaded; |
|
|
static int loaded; |
|
|
Color *cp; |
|
|
Color *cp; |
|
|
|
|
|
|
|
|
dc.collen = MAX(LEN(colorname), 256); |
|
|
|
|
|
dc.col = xmalloc(dc.collen * sizeof(Color)); |
|
|
|
|
|
|
|
|
|
|
|
if (loaded) { |
|
|
if (loaded) { |
|
|
for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp) |
|
|
for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp) |
|
|
XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); |
|
|
XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); |
|
|
|
|
|
} else { |
|
|
|
|
|
dc.collen = MAX(LEN(colorname), 256); |
|
|
|
|
|
dc.col = xmalloc(dc.collen * sizeof(Color)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (i = 0; i < dc.collen; i++) |
|
|
for (i = 0; i < dc.collen; i++) |
|
|