chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove debugging and cruft; size window more sensibly
[chiark-utils.git]
/
cprogs
/
xacpi-simple.c
diff --git
a/cprogs/xacpi-simple.c
b/cprogs/xacpi-simple.c
index 96ba1051a6097b746e4fe8a60d58488868d09454..bb5cb651c16ff2861eac2990ae62b2c367ac29eb 100644
(file)
--- a/
cprogs/xacpi-simple.c
+++ b/
cprogs/xacpi-simple.c
@@
-50,9
+50,6
@@
static void show(double fill_norm, double ratepersec_norm, int ac) {
then >= 1.0 ? width :
width * then;
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)
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) {
}
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");
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 (!argv[0] || argv[1])
badusage();
- /* if (!(windowid_string= getenv("WINDOWID")))
- badusage(); w= strtoul(windowid_string,&ep,0);
- if (*ep) badusage();
-
-*/
-
screen= DefaultScreen(d);
screen= DefaultScreen(d);
- w= XCreateSimpleWindow(d,DefaultRootWindow(d),0,0,
50,5
0,0,0,0);
+ w= XCreateSimpleWindow(d,DefaultRootWindow(d),0,0,
100,2
0,0,0,0);
cmap= DefaultColormap(d,screen);
colour(&gc_green, "green");
cmap= DefaultColormap(d,screen);
colour(&gc_green, "green");
- colour(&gc_red, "
dark
red");
+ colour(&gc_red, "red");
colour(&gc_yellow, "yellow");
colour(&gc_blue, "blue");
colour(&gc_yellow, "yellow");
colour(&gc_blue, "blue");