Пример #1
0
Файл: attr.c Проект: UMhaus/VTK
static int
ncx_pad_getn_Ilong(const void **xpp, size_t nelems, long *tp, nc_type type)
{
        switch(type) {
        case NC_CHAR:
                return NC_ECHAR;
        case NC_BYTE:
                return ncx_pad_getn_schar_long(xpp, nelems, tp);
        case NC_SHORT:
                return ncx_pad_getn_short_long(xpp, nelems, tp);
        case NC_INT:
                return ncx_getn_int_long(xpp, nelems, tp);
        case NC_FLOAT:
                return ncx_getn_float_long(xpp, nelems, tp);
        case NC_DOUBLE:
                return ncx_getn_double_long(xpp, nelems, tp);
        default:
                assert("ncx_pad_getn_Ilong invalid type" == 0);
        }
        return NC_EBADTYPE;
}
static int
ncx_pad_getn_Ilong(const void **xpp, size_t nelems, long *tp, nc_type type)
{
  switch(type) {
  case NC_CHAR:
    return NC_ECHAR;
  case NC_BYTE:
    return ncx_pad_getn_schar_long(xpp, nelems, tp);
  case NC_SHORT:
    return ncx_pad_getn_short_long(xpp, nelems, tp);
  case NC_INT:
    return ncx_getn_int_long(xpp, nelems, tp);
  case NC_FLOAT:
    return ncx_getn_float_long(xpp, nelems, tp);
  case NC_DOUBLE:
    return ncx_getn_double_long(xpp, nelems, tp);
  case NC_NAT:
    break; /* Some compilers complain if enums are missing from a switch */
  }
  assert("ncx_pad_getn_Ilong invalid type" == 0);
  return NC_EBADTYPE;
}