/* Additional information is returned in the info pointer, providing that APM 1.2 is in use. If no messges are pending the value 0x80 is returned (No power management events pending).  */
static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info)
/* Additional information is returned in the info pointer, providing that APM 1.2 is in use. If no messges are pending the value 0x80 is returned (No power management events pending).  */
static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info)
{
	struct apm_bios_call call;
	call.func = APM_FUNC_GET_EVENT;
	call.ebx = call.ecx = 0;
	if (apm_bios_call(&call))
		return call.err;
	*event = call.ebx;
	if (apm_info.connection_version < 0x0102)
		*info = ~0;
	else
		*info = call.ecx;
	return APM_SUCCESS;
}