Switch to unified view

a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp
...
...
54
#define MAX(A,B) (((A)>(B)) ? (A) : (B))
54
#define MAX(A,B) (((A)>(B)) ? (A) : (B))
55
#endif
55
#endif
56
56
57
bool ParamStale::needrecompute()
57
bool ParamStale::needrecompute()
58
{
58
{
59
    LOGDEB2(("ParamStale:: needrecompute. parent gen %d mine %d\n", 
60
       parent->m_keydirgen, savedkeydirgen));
59
    if (parent->m_keydirgen != savedkeydirgen) {
61
    if (parent->m_keydirgen != savedkeydirgen) {
62
  LOGDEB2(("ParamState:: needrecompute. conffile %p\n", conffile));
63
60
        savedkeydirgen = parent->m_keydirgen;
64
        savedkeydirgen = parent->m_keydirgen;
61
        string newvalue;
65
        string newvalue;
62
        if (!conffile)
66
        if (!conffile)
63
            return false;
67
            return false;
64
        conffile->get(paramname, newvalue, parent->m_keydir);
68
        conffile->get(paramname, newvalue, parent->m_keydir);
65
        if (newvalue.compare(savedvalue)) {
69
        if (newvalue.compare(savedvalue)) {
66
            savedvalue = newvalue;
70
            savedvalue = newvalue;
71
      LOGDEB2(("ParamState:: needrecompute. return true newvalue [%s]\n",
72
           newvalue.c_str()));
67
            return true;
73
            return true;
68
        }
74
        }
69
    }
75
    }
70
    return false;
76
    return false;
71
}
77
}
...
...
437
443
438
#define STOPSUFFIXES ((SuffixStore *)m_stopsuffixes)
444
#define STOPSUFFIXES ((SuffixStore *)m_stopsuffixes)
439
445
440
bool RclConfig::inStopSuffixes(const string& fni)
446
bool RclConfig::inStopSuffixes(const string& fni)
441
{
447
{
442
    if (m_stopsuffixes == 0 || m_stpsuffstate.needrecompute()) {
448
    LOGDEB2(("RclConfig::inStopSuffixes(%s)\n", fni.c_str()));
449
    // Beware: needrecompute() needs to be called always. 2nd test stays back.
450
    if (m_stpsuffstate.needrecompute() || m_stopsuffixes == 0) {
443
    // Need to initialize the suffixes
451
    // Need to initialize the suffixes
444
        delete STOPSUFFIXES;
452
        delete STOPSUFFIXES;
445
    if ((m_stopsuffixes = new SuffixStore) == 0) {
453
    if ((m_stopsuffixes = new SuffixStore) == 0) {
446
        LOGERR(("RclConfig::inStopSuffixes: out of memory\n"));
454
        LOGERR(("RclConfig::inStopSuffixes: out of memory\n"));
447
        return false;
455
        return false;