+ expandedDigits[0] = '\0';
+
+ expandToUpcADigits (b->code, expandedDigits);
+ if (expandedDigits[0] != '\0')
+ b->code[7] = expandedDigits[11];
+
+ bitmapClear (st->theBitmap);
+ drawUpcEBars (st, st->theBitmap, b->code, 6, 9, 59, 65);
+ for (i = 0; i < 6; i++)
+ {
+ int off = (i < 2 ? 0 :
+ i < 4 ? 4 :
+ 8);
+ drawDigitChar (st, st->theBitmap, 11 + i*7 + off, hh - 16, b->code[i+1]);
+ }
+
+ if (!st->button_down_p)
+ {
+#if 0
+ char *days[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
+ char *s = days[tm->tm_wday];
+ bitmapDrawString5x8 (st->theBitmap, (BW - strlen (s)*5) / 2, 0, s);
+#endif
+ drawDigitChar (st, st->theBitmap, 0, hh - 23, (tm->tm_hour < 12 ? 'A' : 'P'));
+ drawDigitChar (st, st->theBitmap, 68, hh - 23, 'M');
+ }
+ else
+ {
+ char s[20];
+ sprintf (s, "%03d", tm->tm_yday);
+ bitmapDrawString5x8 (st->theBitmap, (BW - strlen (s)*5) / 2, 0, s);
+ }
+ }
+
+ bitmapScale (b->bitmap, st->theBitmap, b->mag);
+
+ if (ow != st->windowWidth || oh != st->windowHeight)
+ XClearWindow (st->dpy, st->window);
+}
+
+
+
+/* render and dpy the current model */
+static void renderFrame (struct state *st)