#76 closed defect (fixed)
Function psMetadataItemPrint format
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
In SDR-02 paragraph 5.2.3, function psMetadataItemPrint states metadata items
are to be printed to an open file descriptor. Is there a specific format the
metadata is to be written to the file?
Change History (3)
comment:1 by , 22 years ago
| Status: | new → assigned |
|---|
comment:2 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
I have redefined this funtion to be valid only for the numeric and string data
types, and I have added a format string to the command. the section from the
SDRS now reads:
Metadata items may be printed to an open file descriptor based on a
provided format. The format string is an sprintf format statement
with exactly one \% formatting command. If the metadata item type is
a numeric type, this formatting command must also be numeric, and type
conversion performed to the value to match the format type. If the
metadata item type is a string, the formatting command must also be
for a string (\%s type of command). If the metadata type is any other
data type, printing is not allowed.
\begin{verbatim}
void psMetadataItemPrint(FILE *fd, const char *format, const psMetadataItem
*restrict md);
\end{verbatim}

this function is not very well thought out. we will revisit the purpose of this
function and redefine it.