Ignore:
Timestamp:
2005-09-28T16:51:04+12:00 (19 years ago)
Author:
kjdon
Message:

allow _If_(\"_macro_\" eq \"value\", true, false) as well as
_If_("_macro_" eq "value", true, false)
cos the former is what the GLI outputs for e.g. collectionextra.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/display.cpp

    r10141 r10662  
    13911391// the two quoted strings are compared
    13921392bool displayclass::boolexpr (const text_t &package, const text_t &expr, int recursiondepth) {
    1393 
    13941393  if (expr.empty()) return false;
    13951394
     
    14011400  }
    14021401  if (expexpr.empty() || expexpr == "0") return false;
    1403   if (expr[0] != '\"') return true;
    1404 
     1402  // allow \" as start of exp as well as ", cos this is what the GLI writes out
     1403  if (expr[0] != '\"' && !(expr[0] == '\\' && expr[1] == '"')) {
     1404    return true;
     1405  }
    14051406  // don't use expexpr while separating quoted parts of
    14061407  // expression just in case expanded out macros contain
     
    14241425    op.clear();
    14251426    while (here != end) {
    1426       if (*here == '"') ++quotecount;
     1427      if (*here == '\\' && *(here+1) =='"') {
     1428    ++quotecount; // found an escaped quote
     1429    ++here;
     1430      }
     1431      else if (*here == '"') ++quotecount;
    14271432      else if (quotecount == 1) string1.push_back(*here);
    14281433      else if ((quotecount == 2) && !is_unicode_space (*here))
Note: See TracChangeset for help on using the changeset viewer.