IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19668


Ignore:
Timestamp:
Sep 23, 2008, 9:22:09 AM (18 years ago)
Author:
Paul Price
Message:

Print unsupported types too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadata.c

    r18714 r19668  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.171 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2008-07-24 22:42:28 $
     14 *  @version $Revision: 1.172 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2008-09-23 19:22:09 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    13761376    psMetadataItem *item = NULL; // Item from metadata
    13771377    while ( (item = psMetadataGetAndIncrement(iter)) ) {
    1378         //So that unsupported types are not printed here, adding a switch statement
    1379         switch(item->type) {
    1380         case PS_DATA_STRING:
    1381         case PS_DATA_BOOL:
    1382         case PS_DATA_S8:
    1383         case PS_DATA_S16:
    1384         case PS_DATA_S32:
    1385         case PS_DATA_S64:
    1386         case PS_DATA_U8:
    1387         case PS_DATA_U16:
    1388         case PS_DATA_U32:
    1389         case PS_DATA_U64:
    1390         case PS_DATA_F32:
    1391         case PS_DATA_F64:
    1392         case PS_DATA_METADATA:
    1393         case PS_DATA_REGION:
    1394         case PS_DATA_LIST:
    1395         case PS_DATA_TIME:
    1396         case PS_DATA_VECTOR:
    1397             // Indent...
    1398             //                fprintf(fd, "\n");
    1399             for (int i = 0; i < level; i++) {
    1400                 fprintf(fd, "  ");
    1401             }
    1402             fprintf(fd, "%s", item->name);
    1403             if (item->comment && strlen(item->comment) > 0) {
    1404                 fprintf(fd, " (%s)", item->comment);
    1405             }
    1406             fprintf(fd, ": ");
    1407             break;
    1408         case PS_DATA_UNKNOWN:
    1409         default:
    1410             break;
    1411         }
     1378        for (int i = 0; i < level; i++) {
     1379            fprintf(fd, "  ");
     1380        }
     1381        fprintf(fd, "%s", item->name);
     1382        if (item->comment && strlen(item->comment) > 0) {
     1383            fprintf(fd, " (%s)", item->comment);
     1384        }
     1385        fprintf(fd, ": ");
     1386
    14121387        switch (item->type) {
    14131388        case PS_DATA_STRING:
     
    15661541            case PS_DATA_UNKNOWN:
    15671542            default:
    1568               psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    1569                       _("Specified psDataType, %d, is not supported."), vector->type.type);
    1570               psFree(iter);
    15711543              fprintf(fd, "<Unsupported type>\n");
    1572               return false;
    15731544          }
    15741545          break;
Note: See TracChangeset for help on using the changeset viewer.