changeset 5 | e3ee9aa21b1f |
parent 4 | 70b4e0b27e2c |
child 13 | d7ce3b1dddc4 |
4:70b4e0b27e2c | 5:e3ee9aa21b1f |
---|---|
7 #include <fcntl.h> |
7 #include <fcntl.h> |
8 #include <assert.h> |
8 #include <assert.h> |
9 #include <limits.h> |
9 #include <limits.h> |
10 #include <unistd.h> |
10 #include <unistd.h> |
11 #include <iwlib.h> |
11 #include <iwlib.h> |
12 |
|
13 #include "config.h" |
|
12 |
14 |
13 char *eights[] = { "ø", "▁", "▂", "▃", "▄", "▅", "▆","▇", "█" }; |
15 char *eights[] = { "ø", "▁", "▂", "▃", "▄", "▅", "▆","▇", "█" }; |
14 |
16 |
15 char *color_stop; |
17 char *color_stop; |
16 char *color_red; |
18 char *color_red; |
26 } |
28 } |
27 return rev ? color_green : color_red; |
29 return rev ? color_green : color_red; |
28 } |
30 } |
29 |
31 |
30 int main(int argc, char *argv[]) { |
32 int main(int argc, char *argv[]) { |
31 assert(argc>1); |
33 if (argc<=1) { |
34 fprintf(stderr, "Usage: %s <wlan0> [term|pango]\n", argv[0]); |
|
35 fflush(stderr); |
|
36 return 1; |
|
37 } |
|
32 |
38 |
33 int skfd; |
39 int skfd; |
34 if((skfd = iw_sockets_open()) < 0) { |
40 if((skfd = iw_sockets_open()) < 0) { |
35 perror("socket"); |
41 perror("socket"); |
36 exit(-1); |
42 exit(-1); |