STATIC const char *
static int __inline apm_get_event(struct apmregs *r) { int rv; rv = apmcall(APM_GET_PM_EVENT, 0, r); #ifdef APMDEBUG if (r->bx) printf("apm_get_event: %x\n", r->bx); #endif return rv; }  const char *
STATIC const char *apm_err_translate __P((int code));#define	apm_get_powstat(r) apmcall(APM_POWER_STATUS, APM_DEV_ALLDEVS, &r)#define	apm_get_event(r) apmcall(APM_GET_PM_EVENT, 0, &r)STATIC void	apm_standby __P((void));STATIC void	apm_suspend __P((void));STATIC void	apm_resume __P((struct apm_softc *, struct apmregs *));STATIC const char *apm_err_translate(code)	int code;{	switch(code) {	case APM_ERR_PM_DISABLED:		return "power management disabled";	case APM_ERR_REALALREADY:		return "real mode interface already connected";	case APM_ERR_NOTCONN:		return "interface not connected";	case APM_ERR_16ALREADY:		return "16-bit interface already connected";	case APM_ERR_16NOTSUPP:		return "16-bit interface not supported";	case APM_ERR_32ALREADY:		return "32-bit interface already connected";	case APM_ERR_32NOTSUPP:		return "32-bit interface not supported";	case APM_ERR_UNRECOG_DEV:		return "unrecognized device ID";	case APM_ERR_ERANGE:		return "parameter out of range";	case APM_ERR_NOTENGAGED:		return "interface not engaged";	case APM_ERR_UNABLE:		return "unable to enter requested state";	case APM_ERR_NOEVENTS:		return "No pending events";	case APM_ERR_NOT_PRESENT:		return "No APM present";	default:		return "unknown error code?";	}}