1 diff -Nru wmint-0.9-orig/wmint/wmint.c wmint-0.9/wmint/wmint.c
2 --- wmint-0.9-orig/wmint/wmint.c 2008-03-22 22:57:17.771804010 +0200
3 +++ wmint-0.9/wmint/wmint.c 2008-03-22 23:24:15.174803493 +0200
4 @@ -34,8 +34,10 @@
5 #define MY_EMAIL "slix@gcu-squad.org"
6 #define GCU_HOME "http://www.gcu-squad.org/"
7 #define WMINT_VERSION "0.9"
8 +#define SLEEP_USECS 10000
9
10 char *ProgName;
11 +unsigned int usecs = SLEEP_USECS;
12
13 typedef struct {
14 unsigned short bit;
15 @@ -110,6 +112,19 @@
16 exit(1);
17 };
18 break;
19 + case 's' :
20 + if (++i == argc)
21 + {
22 + usage();
23 + exit(1);
24 + };
25 + usecs = (unsigned int) strtol(argv[i], &endp, 10);
26 + if (*endp || usecs<0 || usecs>1000000)
27 + {
28 + usage();
29 + exit(1);
30 + };
31 + break;
32 case 'v' :
33 printVersion();
34 exit(0);
35 @@ -269,7 +284,7 @@
36 break;
37 }
38 }
39 - usleep(10000L);
40 + usleep(usecs);
41 }
42
43 }
44 @@ -526,7 +541,8 @@
45 fprintf(stderr, "\nwmint - Sébastien Liénard <%s>, GCU (%s)\n\n",MY_EMAIL,GCU_HOME);
46 fprintf(stderr, "usage:\n");
47 fprintf(stderr, "\t-d <display name>\n");
48 - fprintf(stderr, "\t-i <interrupt number>\n");
49 + fprintf(stderr, "\t-i <interrupt number>\n");
50 + fprintf(stderr, "\t-s <sleep between refresh (in microseconds), default %u>\n", SLEEP_USECS);
51 fprintf(stderr, "\t-h\tthis help screen\n");
52 fprintf(stderr, "\t-v\tprint the version number\n");
53 fprintf(stderr, "\n");
|