aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-06-01 00:02:06 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-06-01 00:02:06 +0000
commit7506c55b8483a44107a3e8abffb4a393bf0497f1 (patch)
tree009b83aec7459b28be536ba9acb252df2959ecfb /packages
parent3e27801ec301700678553df450d9cc7739621b22 (diff)
tested patch against 0.40.2 and 0.41-0test04; I think it's ready for inclusion
svn path=/trunk/; revision=7735
Diffstat (limited to 'packages')
-rw-r--r--packages/patches/embed_plist-0.41-0test04.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/patches/embed_plist-0.41-0test04.patch b/packages/patches/embed_plist-0.41-0test04.patch
new file mode 100644
index 00000000..db50e686
--- /dev/null
+++ b/packages/patches/embed_plist-0.41-0test04.patch
@@ -0,0 +1,23 @@
+Index: s_file.c
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/s_file.c,v
+--- s_file.c 15 Oct 2005 23:14:28 -0000 1.8
++++ s_file.c 31 May 2007 22:39:12 -0000 1.8.2.3
+@@ -215,7 +215,17 @@
+ {
+ char cmdbuf[256];
+ int nread = 0, nleft = size;
++ char embedded_prefs[MAXPDSTRING];
++ char user_prefs[MAXPDSTRING];
++ char *homedir = getenv("HOME");
++ struct stat statbuf;
++ /* the 'defaults' command expects the filename without .plist at the end */
++ snprintf(embedded_prefs, MAXPDSTRING, "%s/../org.puredata.pd", sys_libdir->s_name);
++ snprintf(user_prefs, MAXPDSTRING, "%s/Library/Preferences/org.puredata.pd.plist", homedir);
++ if (stat(user_prefs, &statbuf) == 0)
+ snprintf(cmdbuf, 256, "defaults read org.puredata.pd %s 2> /dev/null\n", key);
++ else
++ snprintf(cmdbuf, 256, "defaults read %s %s 2> /dev/null\n", embedded_prefs, key);
+ FILE *fp = popen(cmdbuf, "r");
+ while (nread < size)
+ {