Lines 1-11
Link Here
|
1 |
--- torsmo.c.orig Thu Aug 5 19:39:06 2004 |
1 |
--- torsmo.c.orig Wed Oct 13 17:31:57 2004 |
2 |
+++ torsmo.c Thu Aug 5 19:39:20 2004 |
2 |
+++ torsmo.c Wed Oct 13 17:35:45 2004 |
|
|
3 |
@@ -376,7 +376,7 @@ |
4 |
snprintf(buf, 255, "%.1fM", m); |
5 |
} |
6 |
else if (a >= 1024) |
7 |
- snprintf(buf, 255, "%Ldk", a/1024L); |
8 |
+ snprintf(buf, 255, "%Ldk", a/1024); |
9 |
else |
10 |
snprintf(buf, 255, "%Ld", a); |
11 |
} |
3 |
@@ -998,7 +998,7 @@ |
12 |
@@ -998,7 +998,7 @@ |
4 |
} |
13 |
} |
5 |
OBJ(acpitemp) { |
14 |
OBJ(acpitemp) { |
6 |
/* does anyone have decimals in acpi temperature? */ |
15 |
/* does anyone have decimals in acpi temperature? */ |
7 |
- snprintf(p, n, "%d", (int) get_acpi_temperature(obj->data.i)); |
16 |
- snprintf(p, n, "%d", (int) get_acpi_temperature(obj->data.i)); |
8 |
+ snprintf(p, n, "%0.1f", (int) get_acpi_temperature(obj->data.i)); |
17 |
+ snprintf(p, n, "%0.1f", (float)get_acpi_temperature(obj->data.i)); |
9 |
} |
18 |
} |
10 |
OBJ(acpifan) { |
19 |
OBJ(acpifan) { |
11 |
snprintf(p, n, "%s", get_acpi_fan()); |
20 |
snprintf(p, n, "%s", get_acpi_fan()); |
|
|
21 |
@@ -2248,8 +2248,8 @@ |
22 |
|
23 |
/* handle other command line arguments */ |
24 |
|
25 |
- optind = 0; |
26 |
- |
27 |
+ optind = optreset = 1; |
28 |
+ |
29 |
while (1) { |
30 |
int c = getopt(argc, argv, getopt_string); |
31 |
if(c == -1) break; |
32 |
@@ -2353,8 +2353,7 @@ |
33 |
|
34 |
default: |
35 |
fprintf(stderr, "torsmo: forked to background, pid is %d\n", ret); |
36 |
- exit(0); |
37 |
- break; |
38 |
+ return 0; |
39 |
} |
40 |
} |
41 |
|