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
e06f803b
Commit
e06f803b
authored
Nov 10, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function for objid to filename string added
parent
015b1c7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
src/lib/co/src/co_cdh.c
src/lib/co/src/co_cdh.c
+33
-0
src/lib/co/src/co_cdh.h
src/lib/co/src/co_cdh.h
+6
-0
No files found.
src/lib/co/src/co_cdh.c
View file @
e06f803b
...
...
@@ -1409,6 +1409,39 @@ cdh_ObjidToString (
return
ls
;
}
//! Converts a object identifier, 'oid' to a filename string.
/*!
The output string will be in the format:
xxx_xxx_xxx_xxx_yyyyyyyy
where xxx are the volume id in decimal form and yyyyyyyy
the object index in hex form.
If 's' is non null the resultant string will be catenated
to 's', otherwise the resultant string will be returned.
*/
char
*
cdh_ObjidToFnString
(
char
*
s
,
pwr_tOid
oid
)
{
cdh_uObjid
loid
;
static
char
str
[
40
];
loid
.
pwr
=
oid
;
sprintf
(
str
,
"%3.3u_%3.3u_%3.3u_%3.3u_%8.8x"
,
loid
.
o
.
vid_3
,
loid
.
o
.
vid_2
,
loid
.
o
.
vid_1
,
loid
.
o
.
vid_0
,
loid
.
o
.
oix
);
if
(
s
!=
NULL
)
return
strcat
(
s
,
str
);
else
return
str
;
}
//! Converts a volume identifier, 'vid' to a string.
/*!
...
...
src/lib/co/src/co_cdh.h
View file @
e06f803b
...
...
@@ -912,6 +912,12 @@ cdh_ObjidToString (
int
prefix
);
char
*
cdh_ObjidToFnString
(
char
*
s
,
pwr_tOid
oid
);
char
*
cdh_ArefToString
(
char
*
s
,
...
...
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