Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nerrons
purr-data
Commits
50574d8c
Commit
50574d8c
authored
11 years ago
by
Ivica Bukvic
Browse files
Options
Downloads
Patches
Plain Diff
updated to reflect new sys call for parsing path
parent
c18cb1a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
externals/ext13/wavinfo.c
+4
-23
4 additions, 23 deletions
externals/ext13/wavinfo.c
with
4 additions
and
23 deletions
externals/ext13/wavinfo.c
+
4
−
23
View file @
50574d8c
...
...
@@ -77,37 +77,18 @@ static void wavinfo_bang(t_wavinfo *x)
// outlet_float(x->x_obj.ob_outlet, x->x_f);
}
extern
char
*
canvas_path_replace
(
char
const
*
const
original
,
char
const
*
const
pattern
,
char
const
*
const
replacement
);
static
void
wavinfo_symbol
(
t_wavinfo
*
x
,
t_symbol
*
filename
)
{
struct
stat
statbuf
;
t_wave
*
wavinfo
;
int
result
;
char
fname
[
MAXPDSTRING
];
char
*
final_name
;
char
fname
[
FILENAME_MAX
];
//check for @sys_extra path and replace
if
(
strstr
(
filename
->
s_name
,
"@pd_extra"
)
!=
NULL
)
{
t_namelist
*
path
=
pd_extrapath
;
while
(
path
->
nl_next
)
path
=
path
->
nl_next
;
final_name
=
canvas_path_replace
(
filename
->
s_name
,
"@pd_extra"
,
path
->
nl_string
);
}
else
{
final_name
=
filename
->
s_name
;
}
//fprintf(stderr," %s %s\n", filename->s_name, final_name);
canvas_makefilename
(
x
->
x_canvas
,
filename
->
s_name
,
fname
,
MAXPDSTRING
);
fprintf
(
stderr
,
"... %s %s
\n
"
,
filename
->
s_name
,
fname
);
int
ok
=
(
stat
(
f
inal_
name
,
&
statbuf
)
>=
0
);
int
ok
=
(
stat
(
fname
,
&
statbuf
)
>=
0
);
if
(
ok
>
0
)
{
canvas_makefilename
(
x
->
x_canvas
,
final_name
,
fname
,
MAXPDSTRING
);
if
((
x
->
x_fd
=
open
(
fname
,(
O_NONBLOCK
|
O_RDONLY
)))
<
0
)
{
error
(
"can't open %s"
,
fname
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment