*/
#include <math.h>
+#include <time.h>
#include "screenhack.h"
/* non-user-modifiable immutable definitions */
if ((c < '0') || (c > '9'))
c = '0';
- bitmapDrawChar5x8 (b, x, y, c);
+ bitmapDrawChar5x8 (b, x, y, c);
}
/* draw a upc/ean digit at the given coordinates */
s[j] = (random() % 10) + '0';
s[j++] = '?';
s[j++] = ':';
- s[j++] = 0;
+ s[j] = 0;
}
/* change one digit in this barcode */
barcode_reshape (Display *dpy, Window window, void *closure,
unsigned int w, unsigned int h)
{
+ struct state *st = (struct state *) closure;
+ st->windowWidth = w;
+ st->windowHeight = h;
}
static void