Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
c235f0e5
Commit
c235f0e5
authored
Oct 10, 2015
by
Uwe Schulzweida
Browse files
printinfo.h: update from CDO
parent
83c334f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/printinfo.h
View file @
c235f0e5
// This file is used in CDI and CDO !!!
#define DATE_FORMAT "%5.4d-%2.2d-%2.2d"
#define TIME_FORMAT "%2.2d:%2.2d:%2.2d"
...
...
@@ -13,7 +15,20 @@ int cdiUUIDIsNull(const unsigned char uuid[CDI_UUID_SIZE])
}
static
void
date2str
(
int
date
,
char
*
datestr
,
int
maxlen
)
void
datetime2str
(
int
date
,
int
time
,
char
*
datetimestr
,
int
maxlen
)
{
int
year
,
month
,
day
;
cdiDecodeDate
(
date
,
&
year
,
&
month
,
&
day
);
int
hour
,
minute
,
second
;
cdiDecodeTime
(
time
,
&
hour
,
&
minute
,
&
second
);
int
len
=
sprintf
(
datetimestr
,
DATE_FORMAT
"T"
TIME_FORMAT
,
year
,
month
,
day
,
hour
,
minute
,
second
);
if
(
len
>
(
maxlen
-
1
)
)
fprintf
(
stderr
,
"Internal problem (%s): sizeof input string is too small!
\n
"
,
__func__
);
}
void
date2str
(
int
date
,
char
*
datestr
,
int
maxlen
)
{
int
year
,
month
,
day
;
cdiDecodeDate
(
date
,
&
year
,
&
month
,
&
day
);
...
...
@@ -24,7 +39,7 @@ static void date2str(int date, char *datestr, int maxlen)
}
static
void
time2str
(
int
time
,
char
*
timestr
,
int
maxlen
)
void
time2str
(
int
time
,
char
*
timestr
,
int
maxlen
)
{
int
hour
,
minute
,
second
;
cdiDecodeTime
(
time
,
&
hour
,
&
minute
,
&
second
);
...
...
@@ -35,7 +50,7 @@ static void time2str(int time, char *timestr, int maxlen)
}
static
void
printFiletype
(
int
streamID
,
int
vlistID
)
void
printFiletype
(
int
streamID
,
int
vlistID
)
{
int
filetype
=
streamInqFiletype
(
streamID
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment