IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23859


Ignore:
Timestamp:
Apr 14, 2009, 2:12:00 PM (17 years ago)
Author:
Paul Price
Message:

There's no reason why multiple '@' characters can't appear on the same line: in the value or comment.

File:
1 edited

Legend:

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

    r23288 r23859  
    180180
    181181    return cleaned;
    182 }
    183 
    184 // Count repeat occurances of a single character within a line. The input string must be null terminated.
    185 static psS32 repeatedChars(char *inString,
    186                            char ch)
    187 {
    188     psS32 count = 0;
    189 
    190     while(*inString!='\0') {
    191         if(*inString == ch) {
    192             count++;
    193         }
    194         inString++;
    195     }
    196 
    197     return count;
    198182}
    199183
     
    10711055    *notBlank = true;
    10721056
    1073     // Check for more than one '@' in a line
    1074     // XXX this logic is wrong -- there's no reason a @ can't appear in a
    1075     // comment
    1076     if (repeatedChars(linePtr, '@') > 1) {
    1077         psError(PS_ERR_IO, true,
    1078                 _("More than one '@' character is not allowed"));
    1079         return false;
    1080     }
    1081 
    10821057    // Get metadata item name
    10831058    psS32               status = 0;
Note: See TracChangeset for help on using the changeset viewer.