aboutsummaryrefslogtreecommitdiffstats
path: root/src/yawa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/yawa.c')
-rw-r--r--src/yawa.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/yawa.c b/src/yawa.c
index 4d783a5..d585465 100644
--- a/src/yawa.c
+++ b/src/yawa.c
@@ -199,52 +199,6 @@ set_root_atoms (Pixmap pixmap)
return 1;
}
-bool
-parse_color (char *hex, Color *c, int a)
-{
- if ((strlen(hex) != 7) && (strlen(hex) != 9))
- return false;
-
- int len;
- if (strlen(hex) == 9) {
- len = 4;
- } else {
- len = 3;
- }
-
- hex++;
- int colors[4];
- for (int i = 0; i < len; hex += 2, i++) {
- char color[3];
- strlcpy(color, hex, 3);
-
- char *endptr;
- errno = 0;
- long val = strtol(color, &endptr, 16);
- if (errno != 0) {
- perror("strtol");
- exit(-2);
- }
- if (endptr == color) {
- fprintf(stderr, "No valid hex color found\n");
- exit(-2);
- }
-
- colors[i] = (int)val;
- }
-
- c->r = colors[0];
- c->g = colors[1];
- c->b = colors[2];
- if (len == 4) {
- c->a = colors[3];
- } else {
- c->a = a;
- }
-
- return true;
-}
-
int
load_image (ImageMode mode, const char *arg, int rootW, int rootH,
int alpha, Imlib_Image rootimg)