IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15495


Ignore:
Timestamp:
Nov 7, 2007, 4:59:00 PM (19 years ago)
Author:
Paul Price
Message:

No need to cut strings off at 1024 characters.

File:
1 edited

Legend:

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

    r14008 r15495  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.162 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-07-04 01:36:14 $
     14 *  @version $Revision: 1.163 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-11-08 02:59:00 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4949/******************************************************************************/
    5050
    51 /** Maximum size of a string */
    52 #define MAX_STRING_LENGTH 1024
     51// None
    5352
    5453/******************************************************************************/
     
    278277        {
    279278            char *string = va_arg(argPtr, char *);
    280             metadataItem->data.str =
    281                 string ? psStringNCopy(string, MAX_STRING_LENGTH)
    282                 : NULL;
     279            metadataItem->data.str = string ? psStringCopy(string) : NULL;
    283280        }
    284281        break;
     
    526523}
    527524
    528 // this function copies the input metadata to the output, supplementing existing metadata 
     525// this function copies the input metadata to the output, supplementing existing metadata
    529526// folders with the contents from corresponding folders in the output
    530527bool p_psMetadataOverlay(const char *file,
    531                         unsigned int lineno,
    532                         const char *func,
    533                         psMetadata *out,
    534                         const psMetadata *in)
     528                        unsigned int lineno,
     529                        const char *func,
     530                        psMetadata *out,
     531                        const psMetadata *in)
    535532{
    536533    PS_ASSERT_METADATA_NON_NULL(in, NULL);
     
    551548        psTrace("psLib.types", 5, "Copying %s (%s)...\n", inItem->name, inItem->comment);
    552549
    553         // if this is a metadata, and it has a corresponding match, overlay them
    554         if (inItem->type == PS_DATA_METADATA) {
    555             bool status;
    556             psMetadata *outFolder = psMetadataLookupMetadata (&status, out, inItem->name);
    557             if (outFolder) {
    558                 if (!psMetadataOverlay (outFolder, inItem->data.md)) {
    559                     fprintf (stderr, "Error overlaying metadata folder\n");
    560                     result = false;
    561                 }
    562                 continue;
    563             }
    564         }
     550        // if this is a metadata, and it has a corresponding match, overlay them
     551        if (inItem->type == PS_DATA_METADATA) {
     552            bool status;
     553            psMetadata *outFolder = psMetadataLookupMetadata (&status, out, inItem->name);
     554            if (outFolder) {
     555                if (!psMetadataOverlay (outFolder, inItem->data.md)) {
     556                    fprintf (stderr, "Error overlaying metadata folder\n");
     557                    result = false;
     558                }
     559                continue;
     560            }
     561        }
    565562
    566563        // Copy the item and add it on.  report all errors so we get a listing
Note: See TracChangeset for help on using the changeset viewer.