Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Change done to int as it is the CPU's natural type
[slstatus.git]
/
slstatus.c
diff --git
a/slstatus.c
b/slstatus.c
index
b05d915
..
e8d367b
100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-19,7
+19,7
@@
struct arg {
char *argv0;
char buf[1024];
char *argv0;
char buf[1024];
-static
unsigned short
int done;
+static int done;
static Display *dpy;
#include "config.h"
static Display *dpy;
#include "config.h"
@@
-53,9
+53,10
@@
main(int argc, char *argv[])
struct sigaction act;
struct timespec start, current, diff, intspec, wait;
size_t i, len;
struct sigaction act;
struct timespec start, current, diff, intspec, wait;
size_t i, len;
- int sflag
= 0
;
+ int sflag;
char status[MAXLEN];
char status[MAXLEN];
+ sflag = 0;
ARGBEGIN {
case 's':
sflag = 1;
ARGBEGIN {
case 's':
sflag = 1;
@@
-97,6
+98,7
@@
main(int argc, char *argv[])
if (sflag) {
printf("%s\n", status);
if (sflag) {
printf("%s\n", status);
+ fflush(stdout);
} else {
XStoreName(dpy, DefaultRootWindow(dpy), status);
XSync(dpy, False);
} else {
XStoreName(dpy, DefaultRootWindow(dpy), status);
XSync(dpy, False);