");
for (k=tab->nkey; k--; key = key->nextkey)
{
fprintf(stream, "");
esize = t_size[key->ttype];
ptr = key->ptr;
for (i = key->nbytes/esize; i--; ptr += esize)
switch(key->ttype)
{
case T_FLOAT:
fprintf(stream, *key->printf?key->printf:"%g", *(float *)ptr);
if (i)
putc(' ', stream);
break;
case T_DOUBLE:
fprintf(stream, *key->printf?key->printf:"%f", *(double *)ptr);
if (i)
putc(' ', stream);
break;
case T_SHORT:
fprintf(stream, *key->printf?key->printf:"%d", *(short *)ptr);
if (i)
putc(' ', stream);
break;
case T_LONG:
fprintf(stream, *key->printf?key->printf:"%d", *(int *)ptr);
if (i)
putc(' ', stream);
break;
case T_LONGLONG:
fprintf(stream, *key->printf?key->printf:"%lld", *(SLONGLONG *)ptr);
if (i)
putc(' ', stream);
break;
case T_BYTE:
if (key->htype==H_BOOL)
{
if (*ptr)
fprintf(stream, "T");
else
fprintf(stream, "F");
}
else
fprintf(stream, key->printf?key->printf:"%d", (int)*ptr);
if (i)
putc(' ', stream);
break;
case T_STRING:
fprintf(stream, "%c", (int)*ptr);
break;
default:
error(EXIT_FAILURE, "*FATAL ERROR*: Unknown FITS type in ",
"voprint_obj()");
}
fprintf(stream, " | ");
}
fprintf(stream, "
\n");
return;
}