|
a/src/query/docseq.cpp |
|
b/src/query/docseq.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: docseq.cpp,v 1.10 2007-01-19 10:32:39 dockes Exp $ (C) 2005 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: docseq.cpp,v 1.11 2008-09-29 08:59:20 dockes Exp $ (C) 2005 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
|
|
... |
|
... |
25 |
int DocSequence::getSeqSlice(int offs, int cnt, vector<ResListEntry>& result)
|
25 |
int DocSequence::getSeqSlice(int offs, int cnt, vector<ResListEntry>& result)
|
26 |
{
|
26 |
{
|
27 |
int ret = 0;
|
27 |
int ret = 0;
|
28 |
for (int num = offs; num < offs + cnt; num++, ret++) {
|
28 |
for (int num = offs; num < offs + cnt; num++, ret++) {
|
29 |
result.push_back(ResListEntry());
|
29 |
result.push_back(ResListEntry());
|
30 |
if (!getDoc(num, result.back().doc, &result.back().percent,
|
30 |
if (!getDoc(num, result.back().doc, &result.back().subHeader)) {
|
31 |
&result.back().subHeader)) {
|
|
|
32 |
result.pop_back();
|
31 |
result.pop_back();
|
33 |
return ret;
|
32 |
return ret;
|
34 |
}
|
33 |
}
|
35 |
}
|
34 |
}
|
36 |
return ret;
|
35 |
return ret;
|