]> git.pld-linux.org Git - packages/vice.git/blob - vice-home_etc.patch
11316df27b365c1cd280959f8e7cf0c764622856
[packages/vice.git] / vice-home_etc.patch
1 --- vice-2.2/src/arch/unix/archdep.h~   2009-10-21 18:46:46.000000000 +0200
2 +++ vice-2.2/src/arch/unix/archdep.h    2010-03-11 11:51:47.773489033 +0100
3 @@ -114,7 +114,7 @@
4  #define ARCHDEP_KEYBOARD_SYM_NONE 0
5  #endif
6  
7 -extern const char *archdep_home_path(void);
8 +extern const char *archdep_home_etc_path(void);
9  
10  /* set this path to customize the preference storage */ 
11  extern const char *archdep_pref_path;
12 --- vice-2.2/src/arch/unix/gui/uicommands.c~    2009-10-21 18:46:40.000000000 +0200
13 +++ vice-2.2/src/arch/unix/gui/uicommands.c     2010-03-11 11:53:07.350154527 +0100
14 @@ -296,7 +296,7 @@
15  
16  static UI_CALLBACK(load_quicksnap)
17  {
18 -    char *fname = util_concat(archdep_home_path(), "/", VICEUSERDIR, "/", machine_name, ".vsf", NULL);
19 +    char *fname = util_concat(archdep_home_etc_path(), "/", VICEUSERDIR, "/", machine_name, ".vsf", NULL);
20  
21      if (!ui_emulation_is_paused()) {
22          interrupt_maincpu_trigger_trap(load_snapshot_trap, (void *)fname);
23 @@ -328,7 +328,7 @@
24  
25  static UI_CALLBACK(save_quicksnap)
26  {
27 -    char *fname = util_concat(archdep_home_path(), "/", VICEUSERDIR, "/", machine_name, ".vsf", NULL);
28 +    char *fname = util_concat(archdep_home_etc_path(), "/", VICEUSERDIR, "/", machine_name, ".vsf", NULL);
29  
30      interrupt_maincpu_trigger_trap(save_snapshot_trap, (void *)fname);
31  }
32 --- vice-2.3/src/arch/unix/archdep.c~   2010-10-24 06:12:37.000000000 +0200
33 +++ vice-2.3/src/arch/unix/archdep.c    2011-03-23 12:15:18.370096657 +0100
34 @@ -151,6 +151,14 @@
35      return home;
36  }
37  
38 +extern const char *archdep_home_etc_path(void)
39 +{
40 +       char *home_etc = getenv("HOME_ETC");
41 +
42 +       if (home_etc) return home_etc;
43 +       return archdep_home_path();
44 +}
45 +
46  char *archdep_default_sysfile_pathlist(const char *emu_id)
47  {
48      static char *default_path;
49 @@ -164,7 +172,7 @@
50          const char *home_path;
51  
52          boot_path = archdep_boot_path();
53 -        home_path = archdep_home_path();
54 +        home_path = archdep_home_etc_path();
55  
56          /* First search in the `LIBDIR' then the $HOME/.vice/ dir (home_path)
57             and then in the `boot_path'.  */
58 @@ -230,7 +238,7 @@
59      if (archdep_pref_path == NULL) {
60          const char *home;
61        
62 -        home = archdep_home_path();
63 +        home = archdep_home_etc_path();
64          return util_concat(home, "/.vice/vicerc", NULL);
65      } else {
66          return util_concat(archdep_pref_path, "/vicerc", NULL);
67 @@ -242,7 +250,7 @@
68      if (archdep_pref_path == NULL) {
69          const char *home;
70  
71 -        home = archdep_home_path();
72 +        home = archdep_home_etc_path();
73          return util_concat(home, "/.vice/fliplist-", machine_get_name(), ".vfl", NULL);
74      } else {
75          return util_concat(archdep_pref_path, "/fliplist-", machine_get_name(), ".vfl", NULL);
76 @@ -254,7 +262,7 @@
77      if (archdep_pref_path == NULL) {
78          const char *home;
79  
80 -        home = archdep_home_path();
81 +        home = archdep_home_etc_path();
82          return util_concat(home, "/.vice/autostart-", machine_get_name(), ".d64", NULL);
83      } else {
84          return util_concat(archdep_pref_path, "/autostart-", machine_get_name(), ".d64", NULL);
85 @@ -268,7 +276,7 @@
86      const char *viceuserdir;
87  
88      if (archdep_pref_path == NULL) {
89 -        home = archdep_home_path();
90 +        home = archdep_home_etc_path();
91          viceuserdir = util_concat(home, "/.vice", NULL);
92      } else {
93          viceuserdir = archdep_pref_path;
This page took 0.070304 seconds and 2 git commands to generate.