Lines 1-16
Link Here
|
1 |
--- apm_read.c.orig Tue May 17 06:49:13 2005 |
1 |
--- apm_read.c.orig Wed Jul 27 08:23:06 2005 |
2 |
+++ apm_read.c Sun May 29 20:38:24 2005 |
2 |
+++ apm_read.c Wed Jul 27 23:15:33 2005 |
3 |
@@ -301,6 +301,9 @@ |
3 |
@@ -413,6 +413,9 @@ |
4 |
unsigned int remaining_capacity = 0; |
4 |
unsigned int remaining_capacity = 0; |
5 |
unsigned int present_rate = 0; |
5 |
unsigned int present_rate = 0; |
6 |
|
6 |
|
7 |
+ unsigned int percent; |
7 |
+ unsigned int percent; |
8 |
+ unsigned int time_left; |
8 |
+ unsigned int time_left; |
9 |
+ |
9 |
+ |
10 |
/* First check if there is an ACPI system */ |
10 |
if ( ! acpi_available ) |
11 |
if ((fd = open("/proc/acpi/info", O_RDONLY)) == -1) { |
11 |
return -1; |
12 |
error_handle(1, "open_acpi_info_file"); |
12 |
|
13 |
@@ -503,7 +506,7 @@ |
13 |
@@ -617,7 +620,7 @@ |
14 |
* Calculate the percentage and time to full charge |
14 |
* Calculate the percentage and time to full charge |
15 |
* or discharge based on the reported rate. |
15 |
* or discharge based on the reported rate. |
16 |
*/ |
16 |
*/ |
Lines 19-25
Link Here
|
19 |
last_full_capacity ? |
19 |
last_full_capacity ? |
20 |
(float)remaining_capacity / (float)last_full_capacity * 100 |
20 |
(float)remaining_capacity / (float)last_full_capacity * 100 |
21 |
: 0; |
21 |
: 0; |
22 |
@@ -512,7 +515,6 @@ |
22 |
@@ -626,7 +629,6 @@ |
23 |
++state.update; |
23 |
++state.update; |
24 |
} |
24 |
} |