ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/xpram_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/xpram_unix.cpp (file contents):
Revision 1.3 by cebix, 2000-04-10T18:53:12Z vs.
Revision 1.8 by gbeauche, 2005-01-30T21:42:14Z

# Line 1 | Line 1
1   /*
2   *  xpram_unix.cpp - XPRAM handling, Unix specific stuff
3   *
4 < *  Basilisk II (C) 1997-2000 Christian Bauer
4 > *  Basilisk II (C) 1997-2005 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 26 | Line 26
26  
27  
28   // XPRAM file name and path
29 + #if POWERPC_ROM
30 + const char XPRAM_FILE_NAME[] = ".sheepshaver_nvram";
31 + #else
32   const char XPRAM_FILE_NAME[] = ".basilisk_ii_xpram";
33 + #endif
34   static char xpram_path[1024];
35  
36  
# Line 48 | Line 52 | void LoadXPRAM(void)
52          // Load XPRAM from settings file
53          int fd;
54          if ((fd = open(xpram_path, O_RDONLY)) >= 0) {
55 <                read(fd, XPRAM, 256);
55 >                read(fd, XPRAM, XPRAM_SIZE);
56                  close(fd);
57          }
58   }
# Line 62 | Line 66 | void SaveXPRAM(void)
66   {
67          int fd;
68          if ((fd = open(xpram_path, O_WRONLY | O_CREAT, 0666)) >= 0) {
69 <                write(fd, XPRAM, 256);
69 >                write(fd, XPRAM, XPRAM_SIZE);
70                  close(fd);
71          }
72   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines