Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
d3aab760
Commit
d3aab760
authored
Dec 05, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge support for double references in Ge action commands
parent
e9705e3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
29 deletions
+59
-29
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+59
-29
No files found.
xtt/lib/ge/src/ge_graph.cpp
View file @
d3aab760
...
...
@@ -4254,48 +4254,78 @@ void Graph::get_command( char *in, char *out, GeDyn *dyn)
if
(
strcmp
(
oname
,
""
)
==
0
)
{
strcpy
(
out
,
str
);
return
;
}
s0
=
str
;
}
else
if
(
strcmp
(
oname
,
""
)
==
0
)
{
cdh_Strcpy
(
out
,
in
);
return
;
}
t0
=
out
;
while
(
(
s
=
strstr
(
s0
,
"$object"
)))
{
cdh_Strncpy
(
t0
,
s0
,
s
-
s0
);
t0
+=
s
-
s0
;
strcpy
(
t0
,
oname
);
t0
+=
strlen
(
oname
);
s0
=
s
+
strlen
(
"$object"
);
}
cdh_Strcpy
(
t0
,
s0
);
if
(
strcmp
(
oname
,
""
)
!=
0
)
{
t0
=
out
;
while
(
(
s
=
strstr
(
s0
,
"$object"
)))
{
cdh_Strncpy
(
t0
,
s0
,
s
-
s0
);
t0
+=
s
-
s0
;
strcpy
(
t0
,
oname
);
t0
+=
strlen
(
oname
);
s0
=
s
+
strlen
(
"$object"
);
}
cdh_Strcpy
(
t0
,
s0
);
t0
=
out
;
if
(
(
s
=
strchr
(
out
,
'&'
))
&&
*
(
s
+
1
)
==
'('
)
{
t0
=
out
;
}
if
(
(
s
=
strchr
(
out
,
'&'
)))
{
if
(
*
(
s
+
1
)
==
'('
)
{
// Replace attribute in parenthesis with its value
pwr_tAName
refname
;
pwr_sAttrRef
aref
;
pwr_tStatus
sts
;
char
*
start
,
*
end
;
pwr_tAName
refname
;
pwr_sAttrRef
aref
;
pwr_tStatus
sts
;
char
*
start
,
*
end
;
start
=
s
;
strcpy
(
refname
,
s
+
2
);
if
(
(
s
=
strchr
(
refname
,
')'
))
==
0
)
return
;
start
=
s
;
strcpy
(
refname
,
s
+
2
);
if
(
(
s
=
strchr
(
refname
,
')'
))
==
0
)
return
;
*
s
=
0
;
end
=
start
+
strlen
(
refname
)
+
3
;
sts
=
gdh_GetObjectInfo
(
refname
,
&
aref
,
sizeof
(
aref
));
if
(
EVEN
(
sts
))
return
;
*
s
=
0
;
end
=
start
+
strlen
(
refname
)
+
3
;
sts
=
gdh_GetObjectInfo
(
refname
,
&
aref
,
sizeof
(
aref
));
if
(
EVEN
(
sts
))
return
;
sts
=
gdh_AttrrefToName
(
&
aref
,
str
,
sizeof
(
str
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
;
strcat
(
str
,
end
);
strcpy
(
start
,
str
);
}
else
if
(
*
(
s
+
1
)
==
'&'
&&
*
(
s
+
2
)
==
'('
)
{
pwr_tAName
refname
;
pwr_sAttrRef
aref
;
pwr_tStatus
sts
;
char
*
start
,
*
end
;
start
=
s
;
strcpy
(
refname
,
s
+
3
);
if
(
(
s
=
strchr
(
refname
,
')'
))
==
0
)
return
;
*
s
=
0
;
end
=
start
+
strlen
(
refname
)
+
4
;
sts
=
gdh_GetObjectInfo
(
refname
,
&
aref
,
sizeof
(
aref
));
if
(
EVEN
(
sts
))
return
;
sts
=
gdh_AttrrefToName
(
&
aref
,
str
,
sizeof
(
str
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
;
sts
=
gdh_AttrrefToName
(
&
aref
,
str
,
sizeof
(
str
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
;
sts
=
gdh_GetObjectInfo
(
str
,
&
aref
,
sizeof
(
aref
));
if
(
EVEN
(
sts
))
return
;
sts
=
gdh_AttrrefToName
(
&
aref
,
str
,
sizeof
(
str
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
;
strcat
(
str
,
end
);
strcpy
(
start
,
str
);
strcat
(
str
,
end
);
strcpy
(
start
,
str
);
}
}
}
...
...
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