IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19805


Ignore:
Timestamp:
Oct 2, 2008, 7:42:26 AM (18 years ago)
Author:
eugene
Message:

adding the ability to specify boolean comparisons on the comment

File:
1 edited

Legend:

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

    r19778 r19805  
    2424} psMetadataItemCompareOp;
    2525
    26 /* determine boolean operator specified in comment: @OP: X@ (default is ==) */
     26/* determine boolean operator specified in comment: OP: XX (default is ==) */
    2727psMetadataItemCompareOp p_psMetadataItemCompareGetOp (const psMetadataItem *item) {
    2828
    2929    if (!item->comment) return PS_MD_OP_EQ;
    3030
    31     char *p1 = strstr (item->comment, "@OP:");
     31    char *p1 = strstr (item->comment, "OP:");
    3232    if (!p1) return PS_MD_OP_EQ;
    33     p1 += 4; // point to first char after @OP:
     33    p1 += 3; // point to first char after @OP:
    3434    while (isblank(p1[0])) p1++;
    3535
    36     char *p2 = strchr (p1, '@');
    37     if (!p2) return PS_MD_OP_EQ;
    38 
    39     // the string starting at p1 and p2 must contain one of the following:
     36    // the string starting at p1 must contain one of the following:
    4037    // == or = PS_MD_OP_EQ,
    4138    // < PS_MD_OP_LT,
Note: See TracChangeset for help on using the changeset viewer.