}
#define istty (1)
-#define alarm(n) (0)
+#define alarm(n) do { } while(0)
#endif /* BIOS */
* and also keep the BIOS data area safe (1.5K), plus a bit extra for
* where we may have to put a.out headers for older kernels.
*/
- if (mon_return = (mem[1].size > 512*1024L)) mem[0].size = newaddr;
+ if ((mon_return = (mem[1].size > 512*1024L))) mem[0].size = newaddr;
mem[0].base += 2048;
mem[0].size -= 2048;
printf("%s: %s\n", label, str);
}
-#define apm_printf printf
+#define apm_printf(args) printf args
#else
#define apm_perror(label, ax) ((void)0)
-#define apm_printf
+#define apm_printf(args)
#endif
static void off(void)
}
if (be.bx != (('P' << 8) | 'M'))
{
- apm_printf("APM signature not found (got 0x%04x)\n", be.bx);
+ apm_printf(("APM signature not found (got 0x%04x)\n", be.bx));
return;
}
al= be.ax & 0xff;
if (al > 9)
al= (al >> 4)*10 + (al & 0xf);
- apm_printf("APM version %u.%u%s%s%s%s%s\n",
+ apm_printf(("APM version %u.%u%s%s%s%s%s\n",
ah, al,
(be.cx & 0x1) ? ", 16-bit PM" : "",
(be.cx & 0x2) ? ", 32-bit PM" : "",
(be.cx & 0x4) ? ", CPU-Idle" : "",
(be.cx & 0x8) ? ", APM-disabled" : "",
- (be.cx & 0x10) ? ", APM-disengaged" : "");
+ (be.cx & 0x10) ? ", APM-disengaged" : ""));
/* Connect */
be.ax= 0x5301; /* APM, Real mode interface connect */
al= be.ax & 0xff;
if (al > 9)
al= (al >> 4)*10 + (al & 0xf);
- apm_printf("Got APM connection version %u.%u\n", ah, al);
+ apm_printf(("Got APM connection version %u.%u\n", ah, al));
/* Enable */
be.ax= 0x5308; /* APM, Enable/disable power management */
goto disco;
}
- apm_printf("Power off sequence successfully completed.\n\n");
- apm_printf("Ha, ha, just kidding!\n");
+ apm_printf(("Power off sequence successfully completed.\n\n"));
+ apm_printf(("Ha, ha, just kidding!\n"));
disco:
/* Disconnect */
case USERFUN:
case SELECT:
if (c == e->arg[0]) choice= e->value;
+ case NOFUN:
+ break;
}
}
} while (choice == nil);
putch('\n');
break;
case 'v':
- printf(version);
+ printf("%s", version);
break;
case 'c':
clear_screen();
case R_OFF: off(); ok= 1; break;
case R_CTTY: ctty(nil); ok= 1; break;
case R_RESET: reset(); ok= 1; break;
+
+ case R_NULL:
+ case R_ECHO:
+ case R_TRAP:
+ case R_UNSET:
+ /* Handled after the switch. */
+ break;
}
/* Command to check bootparams: */