I have been using old version of swish for 6 months and I have
already fixed the major "not" bug. I discovered only recently
swish-e (information came very late in France) but it seems
that the "notresultlist" function is still bugged, because of
the "% 128" system of file numbers. Here is the piece of code
that I have written in old version, taking in account the fact
that filenums are dropped % 128 .
With congratulations to the team which maintains this very useful tool.
=======================================================
Jean-Louis MALTRET Mathematique-Informatique
Tel: +33 04.91.82.92.95 Faculte des Sciences
Fax: +33 04.91.82.93.57 163 Avenue de Luminy
jlm@lumimath.univ-mrs.fr F-13288 MARSEILLE Cedex 09
http://eiffel.univ-mrs.fr/~jlm/
-------------------------------------------------------
"Felix qui potuit rerum cognoscere causas"
Virgile (Georgiques II,489)
=======================================================
-------------------------------------------------------
/* This performs the NOT unary operation on a result list.
** NOTed files are marked with a default rank of 1000. */
struct result *notresultlist(rp, fp)
struct result *rp;
FILE *fp;
{
int i, j, filenums, jlm=0;
struct result *newp;
newp = NULL;
initmarkentrylist();
while (rp != NULL) {
marknum(rp->filenum);
rp = rp->next;
}
/* JLM */
filenums = getindexfilenum(fp) ;
if (debug) printf("# notlist : filenums = %d",filenums);
/* for (i = 1; !ismarked(i) && i < filenums; i++) */
for (i = 1,j = 1; i <=filenums; i++,j++)
{
/* JLM */
if (!(j % 128)) j++;
if (!ismarked(j) )
{
jlm++;
newp = (struct result *) addtoresultlist(newp,
j, 1000, IN_ALL);
}
}
if (debug) printf(" filenots = %d\n",jlm);
return newp;
}
----------------------------------------------
Received on Mon Dec 1 11:11:19 1997