2004-08-19 Alan Carriou Release of wmacpiload-0.1.2-ac4 - src/battest.c: removed from source tree. - src/main.c: o (parse_argument,print_help): added DEFAULT_ALARM_TEMPERATURE macro, and the '-t' command line option. o "currcap" renamed as "capacity". o random verbose messages added and/or fixed. o (valid_name,parse_argument,print_help): added the '-id' command line option to ignore one device, such as an unused battery slot (would prevent the user to have to click the icon once at each startup if the unused battery slot is the first monitored by default). o (check_battery_plugged): fixed. o (acpi_read): fixed incorrect reference to i->ac->statefile; better use of the buffer. o (valid_name): strcmp replaced by strncmp. o added MMALLOC macro, and replaced all malloc calls into MMALLOCs. o Some functions were removed: enumerate_devices, init_stats_bat, init_stats_thermal, init_stats_ac, parse_dir; some others were added to replace them: acpi_detect, battery_init, add_next_battery, thermal_zone_init, add_thermal_zone, ac_adapter_init, add_next_ac_adapter. Meanwhile, init_stats was changed to keep consistency. o To reduce the cpu usage at update time, the state file names have been added to the Battery, AC_Adapter and Thermal structures, and are calculated once and for all in the battery_init, ac_adapter_init and thermal_init functions, rather than within acpi_read (and a few other places). o The device_name typedef has been replaced by char*, so that the device name lengths are no longer limited. o removed useless global variable "count". o (acpi_read): replaced bzero by memset. o (main): return replaced by exit. o (main): ncolor definition and initialization got separated. o (get_battery_capacity): capacity definition and initialization got separated. o replaced all exit(0) by exit(EXIT_SUCCESS) and exit(1) by exit(EXIT_FAILURE). o (my_system): cmd compared to NULL. o (acpi_detect): checks if the potential device description has a directory structure. - src/dockapp.c: o replaced all exit(0) by exit(EXIT_SUCCESS) and exit(1) by exit(EXIT_FAILURE). - all code/doc related to user-specified stand-by/suspend commands got commented. - doc/wmacpiload.1: -id, -t and -V command line options are now documented; the rest got updated. - configure.ac: AC_INIT,AC_CHECK_FUNCS updated. 2004-04-25 Alan Carriou Release of wmacpiload-0.1.2-ac3 - configure.ac: added AC_FUNC_SELECT_ARGTYPES and AC_CHECK_FUNCS(strerror) - src/main.c: o renamed _verbose to verbose o changed once more the AcpiInfos definition. o (dir_select): renamed to valid_name and fixed o (strcat3): fixed and prototype changed o (init_stats_*): moved verbose devices enumeration into enumerate_devices o (acpi_read): added some verbose messages o fixed some "unstyled" code 2004-04-12 Alan Carriou Release of wmacpiload-0.1.2-ac2 2004-04-?? Alan Carriou - main.c: fixed the declarations of acpi_exists, update, switch_light, with explicit "void" arguments. - main.c: changed again the AcpiInfos structure. Now split into Battery, Therm_Zone and AC_adapter. - main.c: added numerous error messages related to problems parsing /proc/acpi files. - main.c: renamed switch_thermal, switch_battery to their more logical names next_thermal, next_battery. - main.c: now using an enum type for battery charging status instead of an int - main.c: added DEFAULT_UPDATE_TIME and DEFAULT_ALARM_BAT_LEVEL macros - main.c (print_help): split the message into two printf (for compiler compa- tibility issues) - main.c (acpi_exists): code simplified - main.c (init_stats): prototype changed: now returns void. - main.c (init_stats): converted buf from char* to char[512]. - main.c (init_stats): this function got too long, so i split it into smaller functions: init_stats_thermal, init_stats_ac, init_stats_bat, check_battery_plugged, get_battery_currcap. - main.c (init_stats*): the decision whether to exit (because of absent devices) is taken only after all devices have been probed. - main.c (acpi_read): now checks whether a battery has been plugged in/out since last update, before trying to read its status/remaining capacity. - main.c (parse_dir): replaced strcpy by strncpy. - main.c: added a function strcat3 to safely build file names, instead of having a bunch of malloc / strcpy / strcat. - src/parts.xpm, main.c (draw_pcdigit, draw_status_digit): now displays "-" as a charging state, and "---%" as charge when monitored battery is plugged out. 2004-31-03 Alan Carriou - main.c (parse_dir, init_stats, acpi_read): checks for malloc failure. - main.c (init_stats): checks whether the batteries are plugged in before reading currcap. 2004-30-03 Alan Carriou - configure.ac: o AC_INIT doesn't refer anymore to wmapmload-0.3.2, but to wmacpiload-0.1.2-ac2, and bug reports are given to bratag... o added AC_FUNC_FORK, AC_HEADER_DIRENT, and AC_CHECK_FUNCS (if some auto- conf-guru could help clean up that stuff, please ;) - src/Makefile.am: changed CPPFLAGS into AM_CPPFLAGS. - depcomp, install-sh, mkinstalldirs, missing, config.guess, config.sub: latest versions of automake add/update these files. 2004-29-03 Alan Carriou - main.c (parse_dir): prototype changed. - main.c: added a "-V"/"--verbose" command line option: o global variable "_version" added. o (print_help, parse_arguments): updated o (init_stats, switch_battery, switch_thermal): put the debug messages inside "if (_verbose) {...}" loops rather than "//debug" lines. 2004-28-03 Alan Carriou - main.c (acpi_getinfos): fixed a printf bug format. - doc/wmacpiload.1: fixed erroneous references to wmapmload ;) - main.c (main): removed the first call to acpi_getinfos(), which is now useless - main.c (acpi_read, draw_timedigit): commented out some unused variables. 2004-13-03 Alan Carriou Release of wmacpiload-0.1.2-ac1 - (Linux only) Added support for multiple batteries, thermal sensors and ACs, with detection at run-time. o Changed AcpiInfo structure, so that it contains the needed info o (parse_dir, and dir_select): created to parse a directory, such as /proc/acpi/battery. o (init_stats) [LINUX]: changed to detect all devices, using parse_dir(). o (acpi_read): updated to get the info about these devices. o (switch_thermal, switch_battery): created to choose, among available devices, which one we are looking after. o (main): added two lines in the main loop to call switch-thermal() or switch_battery() after a middle/right click. o Added some printf() debug messages to see if all this works, each one between "//debug" and "//". - Removed the .xvpics dir from the tarball. - main.c (print_help): fixed help message "WM mails monitor dockapp" into "WM acpi monitor dockapp". - main.c (main): calls update() before the main loop, so that one does not have to wait the update interval to see the system state. - main.c: comments added. 2003-28-03 Changed currcap and remain to be floating cars rather than int in order to fix a divide by zero problem.