CGNS_ENUMT(DataType_t) cgi_datatype(char const *adf_type)
{
if (strncmp(adf_type, "I4", 33) == 0) return CGNS_ENUMV(Integer);
if (strncmp(adf_type, "I8", 33) == 0) return CGNS_ENUMV(LongInteger);
if (strncmp(adf_type, "R4", 33) == 0) return CGNS_ENUMV(RealSingle);
if (strncmp(adf_type, "R8", 33) == 0) return CGNS_ENUMV(RealDouble);
if (strncmp(adf_type, "C1", 33) == 0) return CGNS_ENUMV(Character);
if (strncmp(adf_type, "X4", 33) == 0) return CGNS_ENUMV(ComplexSingle);
if (strncmp(adf_type, "X8", 33) == 0) return CGNS_ENUMV(ComplexDouble);
return CGNS_ENUMV(DataTypeNull);
}