Skip to content
Snippets Groups Projects
Commit f5c05d39 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdiPrintDatatypes: print SizeType and DateType.

parent 4d62f1a2
No related branches found
No related tags found
No related merge requests found
Pipeline #11032 failed
......@@ -155,40 +155,47 @@ void cdiPrintDatatypes(void)
{
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
fprintf (stderr, "+-------------+-------+\n"
"| types | bytes |\n"
"+-------------+-------+\n"
"| void * | %3d |\n"
"+-------------+-------+\n"
"| char | %3d |\n"
"+-------------+-------+\n"
"| bool | %3d |\n"
"| short | %3d |\n"
"| int | %3d |\n"
"| long | %3d |\n"
"| long long | %3d |\n"
"| size_t | %3d |\n"
"| off_t | %3d |\n"
"+-------------+-------+\n"
"| float | %3d |\n"
"| double | %3d |\n"
"| long double | %3d |\n"
"+-------------+-------+\n\n"
"+-------------+-----------+\n"
"| INT32 | %-9s |\n"
"| INT64 | %-9s |\n"
"| FLT32 | %-9s |\n"
"| FLT64 | %-9s |\n"
"+-------------+-----------+\n"
"\n byte ordering is %s\n\n",
(int) sizeof(void *), (int) sizeof(char), (int) sizeof(bool),
(int) sizeof(short), (int) sizeof(int), (int) sizeof(long), (int) sizeof(long long),
(int) sizeof(size_t), (int) sizeof(off_t),
(int) sizeof(float), (int) sizeof(double), (int) sizeof(long double),
STRING(INT32), STRING(INT64), STRING(FLT32), STRING(FLT64),
((HOST_ENDIANNESS == CDI_BIGENDIAN) ? "BIGENDIAN"
: ((HOST_ENDIANNESS == CDI_LITTLEENDIAN) ? "LITTLEENDIAN"
: "Unhandled endianness!")));
fprintf(stderr, "+-------------+-------+\n"
"| types | bytes |\n"
"+-------------+-------+\n"
"| void * | %3d |\n"
"+-------------+-------+\n"
"| char | %3d |\n"
"+-------------+-------+\n"
"| bool | %3d |\n"
"| short | %3d |\n"
"| int | %3d |\n"
"| long | %3d |\n"
"| long long | %3d |\n"
"| size_t | %3d |\n"
"| off_t | %3d |\n"
"+-------------+-------+\n"
"| float | %3d |\n"
"| double | %3d |\n"
"| long double | %3d |\n"
"+-------------+-------+\n\n",
(int) sizeof(void *), (int) sizeof(char), (int) sizeof(bool),
(int) sizeof(short), (int) sizeof(int), (int) sizeof(long), (int) sizeof(long long),
(int) sizeof(size_t), (int) sizeof(off_t),
(int) sizeof(float), (int) sizeof(double), (int) sizeof(long double));
fprintf(stderr,
"+-------------+-----------+\n"
"| INT32 | %-9s |\n"
"| INT64 | %-9s |\n"
"| FLT32 | %-9s |\n"
"| FLT64 | %-9s |\n"
"| SizeType | %-9s |\n"
"| DateType | %-9s |\n"
"+-------------+-----------+\n",
STRING(INT32), STRING(INT64), STRING(FLT32), STRING(FLT64), STRING(CDI_SIZE_TYPE), STRING(CDI_DATE_TYPE));
fprintf(stderr, "\n byte ordering is %s\n\n",
((HOST_ENDIANNESS == CDI_BIGENDIAN) ? "BIGENDIAN"
: ((HOST_ENDIANNESS == CDI_LITTLEENDIAN) ? "LITTLEENDIAN"
: "Unhandled endianness!")));
#undef STRING
#undef XSTRING
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment