summaryrefslogtreecommitdiff
path: root/board/MAI/bios_emulator/scitech/src/pm/tests/restore.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/MAI/bios_emulator/scitech/src/pm/tests/restore.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
* Code cleanup:LABEL_2003_06_27_2340
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/pm/tests/restore.c')
-rw-r--r--board/MAI/bios_emulator/scitech/src/pm/tests/restore.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/board/MAI/bios_emulator/scitech/src/pm/tests/restore.c b/board/MAI/bios_emulator/scitech/src/pm/tests/restore.c
index b808052c02..e00be750e3 100644
--- a/board/MAI/bios_emulator/scitech/src/pm/tests/restore.c
+++ b/board/MAI/bios_emulator/scitech/src/pm/tests/restore.c
@@ -45,24 +45,24 @@ void setVideoMode(int mode)
int main(void)
{
PM_HWND hwndConsole;
- ulong stateSize;
+ ulong stateSize;
void *stateBuf;
FILE *f;
/* Write the saved console state buffer to disk */
if ((f = fopen("/etc/pmsave.dat","rb")) == NULL) {
- printf("Unable to open /etc/pmsave.dat for reading!\n");
- return -1;
- }
+ printf("Unable to open /etc/pmsave.dat for reading!\n");
+ return -1;
+ }
fread(&stateSize,1,sizeof(stateSize),f);
if (stateSize != PM_getConsoleStateSize()) {
- printf("Size mismatch in /etc/pmsave.dat!\n");
- return -1;
- }
+ printf("Size mismatch in /etc/pmsave.dat!\n");
+ return -1;
+ }
if ((stateBuf = PM_malloc(stateSize)) == NULL) {
- printf("Unable to allocate console state buffer!\n");
- return -1;
- }
+ printf("Unable to allocate console state buffer!\n");
+ return -1;
+ }
fread(stateBuf,1,stateSize,f);
fclose(f);
@@ -71,7 +71,7 @@ int main(void)
/* Forcibly set 80x25 text mode using the BIOS */
setVideoMode(0x3);
-
+
/* Restore the previous console state */
PM_restoreConsoleState(stateBuf,0);
PM_closeConsole(hwndConsole);
@@ -79,4 +79,3 @@ int main(void)
printf("Console state successfully restored from /etc/pmsave.dat\n");
return 0;
}
-