chiark / gitweb /
remove debugging and cruft; size window more sensibly
authorianmdlvl <ianmdlvl>
Sat, 11 Dec 2004 13:26:52 +0000 (13:26 +0000)
committerianmdlvl <ianmdlvl>
Sat, 11 Dec 2004 13:26:52 +0000 (13:26 +0000)
cprogs/xacpi-simple.c

index 96ba105..bb5cb65 100644 (file)
@@ -50,9 +50,6 @@ static void show(double fill_norm, double ratepersec_norm, int ac) {
       then >= 1.0 ? width :
       width * then;
 
-fprintf(stderr," width=%d height=%d i=%d elap=%f then=%f leftmost_lit=%d\n",
-       (unsigned long)w,
-       width,height,i,then,leftmost_lit);
     if (leftmost_lit >= 0)
       XDrawLine(d, w, ac ? gc_blue : gc_green, 0,i, leftmost_lit,i);
     if (leftmost_lit < width)
@@ -80,8 +77,6 @@ static void colour(GC *gc_r, const char *name) {
 }
 
 int main(int argc, const char *const *argv) {
-  const char *windowid_string;
-  char *ep;
   XEvent ev;
   
   d= XOpenDisplay(0); if (!d) fail("could not open display");
@@ -89,20 +84,14 @@ int main(int argc, const char *const *argv) {
   if (!argv[0] || argv[1])
     badusage();
 
-  /*  if (!(windowid_string= getenv("WINDOWID")))
-    badusage();  w= strtoul(windowid_string,&ep,0);
-  if (*ep) badusage();
-
-*/
-
   screen= DefaultScreen(d);
 
-  w= XCreateSimpleWindow(d,DefaultRootWindow(d),0,0,50,50,0,0,0);
+  w= XCreateSimpleWindow(d,DefaultRootWindow(d),0,0,100,20,0,0,0);
 
   cmap= DefaultColormap(d,screen);
   
   colour(&gc_green,  "green");
-  colour(&gc_red,    "darkred");
+  colour(&gc_red,    "red");
   colour(&gc_yellow, "yellow");
   colour(&gc_blue,   "blue");