formatting

SVN revision: 15994
This commit is contained in:
Carsten Haitzler 2005-08-02 09:55:03 +00:00
parent ec414c6f6a
commit 4bc83ed144
1 changed files with 17 additions and 14 deletions

View File

@ -5,13 +5,13 @@
#include "e_mod_main.h" #include "e_mod_main.h"
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#include <sys/types.h> # include <sys/types.h>
#include <sys/sysctl.h> # include <sys/sysctl.h>
#include <fcntl.h> # include <fcntl.h>
#ifdef __i386__ # ifdef __i386__
#include <machine/apm_bios.h> # include <machine/apm_bios.h>
#endif # endif
#include <stdio.h> # include <stdio.h>
#endif #endif
/* TODO List: /* TODO List:
@ -27,8 +27,10 @@ static int _battery_cb_check(void *data);
static Status *_battery_linux_acpi_check(Battery *ef); static Status *_battery_linux_acpi_check(Battery *ef);
static Status *_battery_linux_apm_check(Battery *ef); static Status *_battery_linux_apm_check(Battery *ef);
/* Should these be #ifdef'd ? */ /* Should these be #ifdef'd ? */
#ifdef __FreeBSD__
static Status *_battery_bsd_acpi_check(Battery *ef); static Status *_battery_bsd_acpi_check(Battery *ef);
static Status *_battery_bsd_apm_check(Battery *ef); static Status *_battery_bsd_apm_check(Battery *ef);
#endif
static Battery_Face *_battery_face_new(E_Container *con); static Battery_Face *_battery_face_new(E_Container *con);
static void _battery_face_free(Battery_Face *ef); static void _battery_face_free(Battery_Face *ef);
@ -659,14 +661,16 @@ _battery_cb_check(void *data)
len = sizeof(acline); len = sizeof(acline);
if (sysctlbyname("hw.acpi.acline", &acline, &len, NULL, 0) == 0) if (sysctlbyname("hw.acpi.acline", &acline, &len, NULL, 0) == 0)
{ {
len = 3; len = 3;
if (sysctlnametomib("hw.acpi.acline", acline_mib, &len) == 0) if (sysctlnametomib("hw.acpi.acline", acline_mib, &len) == 0)
ef->battery_check_mode = CHECK_ACPI; ef->battery_check_mode = CHECK_ACPI;
} else { }
apm_fd = open("/dev/apm", O_RDONLY); else
{
apm_fd = open("/dev/apm", O_RDONLY);
if (apm_fd != -1) if (apm_fd != -1)
ef->battery_check_mode = CHECK_APM; ef->battery_check_mode = CHECK_APM;
} }
} }
switch (ef->battery_check_mode) switch (ef->battery_check_mode)
{ {
@ -1366,4 +1370,3 @@ _battery_face_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi)
face = data; face = data;
e_gadman_mode_set(face->gmc->gadman, E_GADMAN_MODE_EDIT); e_gadman_mode_set(face->gmc->gadman, E_GADMAN_MODE_EDIT);
} }