Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David MacDonald
purr-data
Commits
6af6311f
Commit
6af6311f
authored
Jan 28, 2017
by
Jonathan Wilkes
Browse files
improve readability of preferences reader script for OSX
parent
f62125fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/s_file.c
View file @
6af6311f
...
...
@@ -326,7 +326,14 @@ static void sys_initloadpreferences(void)
// "loadlib1" : "libdir", loadlib1: libdir
// "path1" : "\/System\/Library\/Fonts" path1: /System/Library/Fonts
// }
snprintf
(
cmdbuf
,
MAXPDSTRING
,
"defaults export %s - | plutil -convert json -r -o - - | sed -E -e 's/[{}]//g' -e 's/^ *
\"
(([^
\"
]|
\\\\
.)*)
\"
*: *
\"
(([^
\"
]|
\\\\
.)*)
\"
.*/
\\
1:
\\
3/' -e 's/
\\\\
(.)/
\\
1/g'"
,
prefs
);
snprintf
(
cmdbuf
,
MAXPDSTRING
,
"defaults export %s - "
"| plutil -convert json -r -o - - "
"| sed -E "
"-e 's/[{}]//g' "
"-e 's/^ *
\"
(([^
\"
]|
\\\\
.)*)
\"
*: *
\"
(([^
\"
]|
\\\\
.)*)
\"
.*/
\\
1:
\\
3/' "
"-e 's/
\\\\
(.)/
\\
1/g'"
,
prefs
);
// open the pipe
fp
=
popen
(
cmdbuf
,
"r"
);
if
(
!
fp
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment