archie/prospero/lib/psrv/wais_gw/sourceparse.c

21 lines
441 B
C
Raw Normal View History

2024-05-27 16:13:40 +02:00
#include <sys/types.h>
#include <stdio.h>
#include "source.h"
void
main(int argc, char *argv[])
{
char sourcename[512];
WAISSOURCE source = waissource_alloc();
sprintf(sourcename,"%s.src", argv[1]);
source = findsource(sourcename,
"/usr/local/wais/wais-sources/");
if (source == NULL) { fprintf(stderr,"Error finding source.\n"); }
else {
printf("%s %s %s\n",source->server, source->name, source->service);
}
}