printf(" battery charge ");
printf(" battery is ");
apm_power_print (sc, regs)	struct apm_softc *sc;	struct apmregs *regs;{#if !defined(APM_NOPRINT)	sc->batt_life = BATT_LIFE(regs);	if (BATT_LIFE(regs) != APM_BATT_LIFE_UNKNOWN) {		printf("%s: battery life expectancy %d%%\n",		    sc->sc_dev.dv_xname,		    BATT_LIFE(regs));	}	printf("%s: AC ", sc->sc_dev.dv_xname);	switch (AC_STATE(regs)) {	case APM_AC_OFF:		printf("off,");		break;	case APM_AC_ON:		printf("on,");		break;	case APM_AC_BACKUP:		printf("backup power,");		break;	default:	case APM_AC_UNKNOWN:		printf("unknown,");		break;	}	if (apm_minver == 0) {		printf(" battery charge ");		switch (BATT_STATE(regs)) {		case APM_BATT_HIGH:			printf("high");			break;		case APM_BATT_LOW:			printf("low");			break;		case APM_BATT_CRITICAL:			printf("critical");			break;		case APM_BATT_CHARGING:			printf("charging");			break;		case APM_BATT_UNKNOWN:			printf("unknown");			break;		default:			printf("undecoded (%x)", BATT_STATE(regs));			break;		}	} else if (apm_minver >= 1) {		if (BATT_FLAGS(regs) & APM_BATT_FLAG_NOBATTERY)			printf(" no battery");		else {			printf(" battery charge ");			if (BATT_FLAGS(regs) & APM_BATT_FLAG_HIGH)				printf("high");			else if (BATT_FLAGS(regs) & APM_BATT_FLAG_LOW)				printf("low");			else if (BATT_FLAGS(regs) & APM_BATT_FLAG_CRITICAL)				printf("critical");			else				printf("unknown");			if (BATT_FLAGS(regs) & APM_BATT_FLAG_CHARGING)				printf(", charging");			if (BATT_REM_VALID(regs))				printf(", estimated %d:%02d minutes",				    BATT_REMAINING(regs) / 60,				    BATT_REMAINING(regs) % 60);		}	}	printf("\n");#endif}