Switch to unified view

a/src/query/xadump.cpp b/src/query/xadump.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: xadump.cpp,v 1.16 2007-06-19 15:47:46 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: xadump.cpp,v 1.17 2008-04-18 11:39:47 dockes Exp $ (C) 2004 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
220
        for (term = db->termlist_begin(docid);
220
        for (term = db->termlist_begin(docid);
221
         term != db->termlist_end(docid); term++) {
221
         term != db->termlist_end(docid); term++) {
222
        Xapian::PositionIterator pos;
222
        Xapian::PositionIterator pos;
223
        for (pos = db->positionlist_begin(docid, *term); 
223
        for (pos = db->positionlist_begin(docid, *term); 
224
             pos != db->positionlist_end(docid, *term); pos++) {
224
             pos != db->positionlist_end(docid, *term); pos++) {
225
            if (buf.size() < *pos)
225
            if (buf.size() <= *pos)
226
            buf.resize((*pos)+1);
226
            buf.resize((*pos)+100);
227
            buf[(*pos)] = *term;
227
            buf[(*pos)] = *term;
228
        }
228
        }
229
        }
229
        }
230
        for (vector<string>::iterator it = buf.begin(); it != buf.end();
230
        for (vector<string>::iterator it = buf.begin(); it != buf.end();
231
         it++) {
231
         it++) {