Switch to unified view

a/src/query/plaintorich.cpp b/src/query/plaintorich.cpp
...
...
48
    }
48
    }
49
    return sterms;
49
    return sterms;
50
}
50
}
51
51
52
struct MatchEntry {
52
struct MatchEntry {
53
    // Start/End byte offsets in the document text
53
    pair<int, int> offs;
54
    pair<int, int> offs;
55
    // Index of the search group this comes from: this is to relate a 
56
    // match to the original user input.
54
    unsigned int grpidx;
57
    unsigned int grpidx;
55
    MatchEntry(int sta, int sto, unsigned int idx) 
58
    MatchEntry(int sta, int sto, unsigned int idx) 
56
    : offs(sta, sto), grpidx(idx)
59
    : offs(sta, sto), grpidx(idx)
57
    {
60
    {
58
    }
61
    }
...
...
74
    // matches
77
    // matches
75
78
76
    for (vector<vector<string> >::const_iterator vit = hdata.groups.begin();
79
    for (vector<vector<string> >::const_iterator vit = hdata.groups.begin();
77
         vit != hdata.groups.end(); vit++) {
80
         vit != hdata.groups.end(); vit++) {
78
        if (vit->size() == 1) {
81
        if (vit->size() == 1) {
82
#ifndef RCL_INDEX_STRIPCHARS
83
      if (o_index_stripchars) {
84
#endif
79
        m_terms[vit->front()] = vit - hdata.groups.begin();
85
            m_terms[vit->front()] = vit - hdata.groups.begin();
86
#ifndef RCL_INDEX_STRIPCHARS
87
      } else {
88
          string dumb = vit->front();
89
          unacmaybefold(vit->front(), dumb, "UTF-8", UNACOP_UNACFOLD);
90
          m_terms[dumb] = vit - hdata.groups.begin();
91
      }
92
#endif
80
        } else if (vit->size() > 1) {
93
        } else if (vit->size() > 1) {
81
        for (vector<string>::const_iterator it = vit->begin(); 
94
        for (vector<string>::const_iterator it = vit->begin(); 
82
             it != vit->end(); it++) {
95
             it != vit->end(); it++) {
96
#ifndef RCL_INDEX_STRIPCHARS
97
      if (o_index_stripchars) {
98
#endif
83
            m_gterms.insert(*it);
99
            m_gterms.insert(*it);
100
#ifndef RCL_INDEX_STRIPCHARS
101
      } else {
102
          string dumb = *it;
103
          unacmaybefold(*it, dumb, "UTF-8", UNACOP_UNACFOLD);
104
          m_gterms.insert(dumb);
105
      }
106
#endif
84
        }
107
        }
85
        }
108
        }
86
    }
109
    }
87
    }
110
    }
88
111