patch-libcdcx_c 1.1 KB

123456789101112131415161718192021222324252627282930
  1. $OpenBSD: patch-libcdcx_c,v 1.1 2002/08/29 01:57:15 wcobb Exp $
  2. --- libcdcx.c.orig Wed Aug 28 00:14:32 2002
  3. +++ libcdcx.c Wed Aug 28 00:16:45 2002
  4. @@ -31,6 +31,7 @@
  5. */
  6. +#include <err.h>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <string.h>
  10. @@ -164,7 +165,7 @@ u_long *vals, *colors, backcolor;
  11. colwidth = barwidth / cols;
  12. for (lcv = 0 ; lcv < n ; lcv++) {
  13. - snprintf(buf, sizeof(buf), "%s = %d", names[lcv], vals[lcv]);
  14. + snprintf(buf, sizeof(buf), "%s = %ld", names[lcv], vals[lcv]);
  15. XSetForeground(xdpy->dpy, gc, colors[lcv]);
  16. XDrawImageString(xdpy->dpy, win, gc, x, get_fontheight(font) + y,
  17. buf, strlen(buf));
  18. @@ -252,7 +253,7 @@ u_long *vals, *colors, backcolor;
  19. colwidth = barwidth / cols;
  20. for (lcv = 0 ; lcv < n ; lcv++) {
  21. - snprintf(buf, sizeof(buf), "%s = %d", names[lcv], vals[lcv]);
  22. + snprintf(buf, sizeof(buf), "%s = %ld", names[lcv], vals[lcv]);
  23. XSetForeground(xdpy->dpy, gc, colors[lcv]);
  24. XDrawImageString(xdpy->dpy, win, gc, x, get_fontheight(font) + y,
  25. buf, strlen(buf));