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

Comparing SheepShaver/src/Unix/prefs_unix.cpp (file contents):
Revision 1.11 by gbeauche, 2008-01-01T09:47:38Z vs.
Revision 1.12 by asvitkine, 2009-07-23T19:12:51Z

# Line 54 | Line 54 | static char prefs_path[1024];
54   *  Load preferences from settings file
55   */
56  
57 < void LoadPrefs(void)
57 > void LoadPrefs(const char *vmdir)
58   {
59 +        if (vmdir) {
60 +                snprintf(prefs_path, sizeof(prefs_path), "%s/prefs", vmdir);
61 +                FILE *prefs = fopen(prefs_path, "r");
62 +                if (!prefs) {
63 +                        printf("No file at %s found.\n", prefs_path);
64 +                        exit(1);
65 +                }
66 +                LoadPrefsFromStream(prefs);
67 +                fclose(prefs);
68 +                return;
69 +        }
70 +
71          // Construct prefs path
72          prefs_path[0] = 0;
73          char *home = getenv("HOME");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines