Skip to content
Snippets Groups Projects
Commit 95c35bb2 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Move function to only caller.

parent 227ee91f
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#include <stdarg.h>
#include <ctype.h>
#include "binary.h"
#include "cdf.h"
#include "cdi.h"
#include "cdi_int.h"
......@@ -148,6 +149,48 @@ void cdiPrintVersion(void)
fprintf(stderr, " FILE library version : %s\n", fileLibraryVersion());
}
static 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!")));
#undef STRING
#undef XSTRING
}
void cdiDebug(int level)
{
if ( level == 1 || (level & 2) ) CDI_Debug = 1;
......
......@@ -386,8 +386,6 @@ void recordInitEntry(record_t *record);
void cdiCheckZaxis(int zaxisID);
void cdiPrintDatatypes(void);
void cdiDefAccesstype(int streamID, int type);
int cdiInqAccesstype(int streamID);
......
......@@ -19,48 +19,6 @@
#include "binary.h"
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!")));
#undef STRING
#undef XSTRING
}
static const char uuidFmt[] = "%02hhx%02hhx%02hhx%02hhx-"
"%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-"
"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx";
......
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