Wil Vree wrote:
> help help help
>
> i've installed swish-e and try to run it. When i specify /home/web
> as th IndexDir in the swish-e.conf then there is no result. If I specify
> a specific html file. the indexing does work. So why dont it work when I
> specify a directory. Why arent the subdirectories indexed as specified in th
> manual. Or should I specify every file to index in a files.conf as stated in
> the manual. (which would be very inconvenient.)
Is there any chance you're using /usr/ucb/cc on Solaris? I've seen a
problem when using this compiler with the opendir/readdir functions.
Under cc, the dirent structure is incorrect and the d_name starts two
bytes too early so you lose the first two characters of the file name.
To see this happen try the following program with /usr/ucb/cc:
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
int main()
{
DIR *dir;
struct dirent *dirent;
if (!(dir = opendir("."))) {
perror("opendir");
return 1;
}
while (dirent = readdir(dir)) {
puts(dirent->d_name);
}
closedir(dir);
return 0;
}
Assuming this is the problem, switch to gcc.
moo
----------------------------------------------------------------------
Ron Klatchko - Senior Software Engineer
UCSF Library and Center for Knowledge Management
ron@ckm.ucsf.edu
Received on Wed Oct 22 10:28:27 1997