+ osize = cell_size;
+
+ s = get_string_resource (st->dpy, "memThrottle", "MemThrottle");
+ if (s)
+ {
+ int n;
+ char c;
+ if (1 == sscanf (s, " %d M %c", &n, &c) ||
+ 1 == sscanf (s, " %d m %c", &n, &c))
+ mem_throttle = n * (1 << 20);
+ else if (1 == sscanf (s, " %d K %c", &n, &c) ||
+ 1 == sscanf (s, " %d k %c", &n, &c))
+ mem_throttle = n * (1 << 10);
+ else if (1 == sscanf (s, " %d %c", &n, &c))
+ mem_throttle = n;
+ else
+ {
+ fprintf (stderr, "%s: invalid memThrottle \"%s\" (try \"10M\")\n",
+ progname, s);
+ exit (1);
+ }
+
+ free (s);
+ }
+
+ XGetWindowAttributes (st->dpy, st->window, &xgwa);
+
+ st->originalcolors = get_boolean_resource (st->dpy, "originalcolors", "Boolean");
+
+ st->count = get_integer_resource (st->dpy, "count", "Integer");
+ if (st->count < 2) st->count = 2;
+
+ /* number of colors can't be greater than the half depth of the screen. */
+ if (st->count > (unsigned int) (1L << (xgwa.depth-1)))
+ st->count = (unsigned int) (1L << (xgwa.depth-1));