Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!foxhound.dsto.gov.au!fang.dsto.gov.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!news.cs.su.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!nctuccca.edu.tw!netnews.ntu.edu.tw!spider!hcchu From: hcchu@spider.ee.ntu.edu.tw (Hung-Chi Chu) Newsgroups: comp.os.386bsd.apps Subject: Re: WAIS Date: 10 Mar 1994 15:44:47 GMT Organization: Department of Electrical Engineering, National Taiwan University Lines: 408 Distribution: world Message-ID: <2lnf9f$rm2@netnews.ntu.edu.tw> References: <2lm3mr$t86@ntx.City.UniSA.edu.au> Reply-To: hcchu@r350.ee.ntu.edu.tw NNTP-Posting-Host: @spider.ee.ntu.edu.tw In article t86@ntx.City.UniSA.edu.au, deraad@CUTL.City.UniSA.edu.au (Mark de Raad) writes: >Has anybody compiled any of the WAIS flavour (freeWAIS, wais, biowais etc) >on FreeBSD? Im getting a lot of errors... Following is the patch I applied under NetBSD-current. Maybe it will help you. BEGIN ----------------------------------------------------------- *** wais-8-b5.1/ui/screen-ui.c.orig Mon Jul 13 05:10:25 1992 --- wais-8-b5.1/ui/screen-ui.c Sat Nov 20 21:25:17 1993 *************** *** 51,56 **** --- 51,57 ---- * */ + #include <termios.h> #include <curses.h> #include <signal.h> #include <setjmp.h> *************** *** 267,272 **** --- 268,274 ---- long logtype, loglevel; char *format; + va_start(ap); logtype = va_arg(ap, int); loglevel = va_arg(ap, int); format = va_arg(ap, char*); *************** *** 369,375 **** { char message[STRINGSIZE]; ! if (strcmp(doc->doc->type, "WSRC")) { fprintf(stderr, "%s", "%s is not a WAIS source. You can only USE WAIS sources.", firstphrase(trim_junk(doc->doc->headline))); /* PrintStatus("%s is not a WAIS source. You can only USE WAIS sources.", --- 371,377 ---- { char message[STRINGSIZE]; ! if ((doc->doc->type == NULL) || strcmp(doc->doc->type[0], "WSRC") != 0) { fprintf(stderr, "%s", "%s is not a WAIS source. You can only USE WAIS sources.", firstphrase(trim_junk(doc->doc->headline))); /* PrintStatus("%s is not a WAIS source. You can only USE WAIS sources.", *************** *** 805,812 **** mvprintw(j++,0,"%s\t%s","Company: ",current_doc->doc->company); if (NULL != current_doc->doc->industry) mvprintw(j++,0,"%s\t%s","Industry: ",current_doc->doc->industry); ! if (NULL != current_doc->doc->type) ! mvprintw(j++,0,"%s\t%s","Type: ",current_doc->doc->type); mvprintw(j++,0,"%s\t%d","Score ",current_doc->rawScore); mvprintw(j++,0,"%s\t%ld","# of Lines: ",current_doc->doc->numLines); --- 807,814 ---- mvprintw(j++,0,"%s\t%s","Company: ",current_doc->doc->company); if (NULL != current_doc->doc->industry) mvprintw(j++,0,"%s\t%s","Industry: ",current_doc->doc->industry); ! if ((NULL != current_doc->doc->type) && current_doc->doc->type[0] != NULL) ! mvprintw(j++,0,"%s\t%s","Type: ",current_doc->doc->type[0]); mvprintw(j++,0,"%s\t%d","Score ",current_doc->rawScore); mvprintw(j++,0,"%s\t%ld","# of Lines: ",current_doc->doc->numLines); *************** *** 1044,1049 **** --- 1046,1052 ---- question->ResultDocuments = NULL; question->numresdocs = listlength((List)question->ResultDocuments); + question->maxresdocs = *options[6].var.intptr; SearchWais(question); question->modified = FALSE; *** wais-8-b5.1/ui/source.h.orig Tue Nov 17 00:45:55 1992 --- wais-8-b5.1/ui/source.h Sat Nov 20 20:55:21 1993 *************** *** 72,78 **** SourceList ReadListOfSources _AP((FILE* fp)); Boolean ReadSource _AP((Source source, FILE* file)); Boolean ReadSourceFile _AP((Source asource, char* filename, char* directory)); ! Source loadSource _AP((char* name)); void set_connection _AP((Source source)); Boolean newSourcep _AP((char* name)); Boolean is_source _AP((char* name, Boolean test)); --- 72,78 ---- SourceList ReadListOfSources _AP((FILE* fp)); Boolean ReadSource _AP((Source source, FILE* file)); Boolean ReadSourceFile _AP((Source asource, char* filename, char* directory)); ! Source loadSource _AP((char* name, char* sourcepath)); void set_connection _AP((Source source)); Boolean newSourcep _AP((char* name)); Boolean is_source _AP((char* name, Boolean test)); *** wais-8-b5.1/x/Imakefile.orig Thu Jul 30 07:09:10 1992 --- wais-8-b5.1/x/Imakefile Tue Jan 18 22:23:27 1994 *************** *** 48,56 **** CDEBUGFLAGS = -g -Bstatic -DUSE_ALTFONT -DMOTIF -D_NO_PROTO - */ CDEBUGFLAGS = -g TOBJ = xwais.o \ display.o \ --- 48,56 ---- CDEBUGFLAGS = -g -Bstatic -DUSE_ALTFONT -DMOTIF -D_NO_PROTO CDEBUGFLAGS = -g + */ TOBJ = xwais.o \ display.o \ *** wais-8-b5.1/x/filereq.c.orig Fri Jul 17 08:18:51 1992 --- wais-8-b5.1/x/filereq.c Tue Jan 18 22:41:07 1994 *************** *** 92,98 **** else { if(last_file == pos) { last_file = NO_ITEM_SELECTED; ! DoSave(); } else { last_file = pos; --- 92,98 ---- else { if(last_file == pos) { last_file = NO_ITEM_SELECTED; ! DoSave(w, closure, call_data); } else { last_file = pos; *** wais-8-b5.1/x/myAsciiSrc.c.orig Fri Jun 26 11:09:10 1992 --- wais-8-b5.1/x/myAsciiSrc.c Tue Jan 18 22:42:03 1994 *************** *** 101,107 **** --- 101,109 ---- static String MyStrncpy(), StorePiecesInString(); static Boolean SetValues(), WriteToFile(); extern int errno, sys_nerr; + #ifndef __NetBSD__ extern char* sys_errlist[]; + #endif #define superclass (&textSrcClassRec) MyAsciiSrcClassRec myasciiSrcClassRec = { *** wais-8-b5.1/x/qcommands.c.orig Sat Jul 18 05:11:21 1992 --- wais-8-b5.1/x/qcommands.c Tue Jan 18 22:43:50 1994 *************** *** 1011,1017 **** messwidget = t->status; PrintStatus(STATUS_CONT, STATUS_MEDIUM, "\nSearching for next keyword..."); ! PrintStatusW(msg, t->status); cpos = XawTextGetInsertionPoint(tw); minpos = findKeyword(t->text+cpos, NULL); --- 1011,1017 ---- messwidget = t->status; PrintStatus(STATUS_CONT, STATUS_MEDIUM, "\nSearching for next keyword..."); ! PrintStatusW(msg, t->status, false); cpos = XawTextGetInsertionPoint(tw); minpos = findKeyword(t->text+cpos, NULL); *** wais-8-b5.1/ir/ir.c.orig Fri Aug 28 02:27:50 1992 --- wais-8-b5.1/ir/ir.c Sat Nov 20 20:55:20 1993 *************** *** 1195,1201 **** } static int ! alphasort(d1, d2) struct dirent **d1; struct dirent **d2; { --- 1195,1201 ---- } static int ! alphasort_(d1, d2) struct dirent **d1; struct dirent **d2; { *************** *** 1242,1248 **** FILE *fp; k = *headerNum; ! if ((i = scandir(".", &list, filesonly, alphasort)) < 0) { return; } if(strcmp(path, "/") && --- 1242,1248 ---- FILE *fp; k = *headerNum; ! if ((i = scandir(".", &list, filesonly, alphasort_)) < 0) { return; } if(strcmp(path, "/") && *** wais-8-b5.1/ir/server-single.c.orig Fri Aug 28 01:42:34 1992 --- wais-8-b5.1/ir/server-single.c Sat Nov 20 20:55:21 1993 *************** *** 332,338 **** static int indexing_needed = 0; static char *info_dict = INFO_DICT; ! extern int alphasort(); /* selecttion function for scandir() * trigger on ".src" extension, regular file, and != "INFO.src" --- 332,338 ---- static int indexing_needed = 0; static char *info_dict = INFO_DICT; ! extern int alphasort_(); /* selecttion function for scandir() * trigger on ".src" extension, regular file, and != "INFO.src" *************** *** 494,500 **** /* compare with candidates */ ! if ((n_files = scandir(index_dir, &list, srcfiles, alphasort)) < 0) { waislog(WLOG_HIGH, WLOG_ERROR, "Error: reading directory %s, %s", index_dir, sys_errlist[errno]); --- 494,500 ---- /* compare with candidates */ ! if ((n_files = scandir(index_dir, &list, srcfiles, alphasort_)) < 0) { waislog(WLOG_HIGH, WLOG_ERROR, "Error: reading directory %s, %s", index_dir, sys_errlist[errno]); *** wais-8-b5.1/ir/server.c.orig Fri Aug 28 01:40:42 1992 --- wais-8-b5.1/ir/server.c Sat Nov 20 20:55:21 1993 *************** *** 349,355 **** static int indexing_needed = 0; static char *info_dict = INFO_DICT; ! extern int alphasort(); /* selecttion function for scandir() * trigger on ".src" extension, regular file, and != "INFO.src" --- 349,355 ---- static int indexing_needed = 0; static char *info_dict = INFO_DICT; ! extern int alphasort_(); /* selecttion function for scandir() * trigger on ".src" extension, regular file, and != "INFO.src" *************** *** 553,559 **** /* compare with candidates */ ! if (scandir(index_dir, &list, srcfiles, alphasort) < 0) { waislog(WLOG_HIGH, WLOG_ERROR, "Error: reading directory %s, %s", index_dir, sys_errlist[errno]); --- 553,559 ---- /* compare with candidates */ ! if (scandir(index_dir, &list, srcfiles, alphasort_) < 0) { waislog(WLOG_HIGH, WLOG_ERROR, "Error: reading directory %s, %s", index_dir, sys_errlist[errno]); *** wais-8-b5.1/ir/irtfiles.c.orig Thu May 7 08:31:33 1992 --- wais-8-b5.1/ir/irtfiles.c Sat Nov 20 20:55:21 1993 *************** *** 48,53 **** --- 48,54 ---- * */ + #include <sys/types.h> #include <ctype.h> #include <string.h> #include "panic.h" *** wais-8-b5.1/ir/sockets.c.orig Fri Aug 28 01:42:05 1992 --- wais-8-b5.1/ir/sockets.c Fri Dec 17 00:23:30 1993 *************** *** 67,73 **** extern int errno; #endif /* ultrix BSD or Mach */ ! extern char *sys_errlist[]; /* XXX --- 67,73 ---- extern int errno; #endif /* ultrix BSD or Mach */ ! extern const char *const sys_errlist[]; /* XXX *** wais-8-b5.1/lib/scandir.c.orig Thu Jul 18 07:38:01 1991 --- wais-8-b5.1/lib/scandir.c Sat Nov 20 21:06:12 1993 *************** *** 3,10 **** --- 3,12 ---- ** Scan a directory, collecting all (selected) items into a an array. */ + #ifndef __NetBSD__ #include <sys/types.h> #include <stdio.h> + #include <dirent.h> #include "pdftw.h" #ifdef RCSID *************** *** 84,86 **** --- 86,89 ---- return i; } + #endif *** wais-8-b5.1/lib/alphasort.c.orig Thu Jul 18 07:37:56 1991 --- wais-8-b5.1/lib/alphasort.c Sat Nov 20 20:55:20 1993 *************** *** 11,17 **** #endif /* RCSID */ int ! alphasort(d1, d2) struct dirent **d1; struct dirent **d2; { --- 11,17 ---- #endif /* RCSID */ int ! alphasort_(d1, d2) struct dirent **d1; struct dirent **d2; { *** wais-8-b5.1/lib/ftw.c.orig Thu Jul 18 07:37:58 1991 --- wais-8-b5.1/lib/ftw.c Sat Nov 20 21:03:24 1993 *************** *** 8,13 **** --- 8,16 ---- #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> + #ifdef __NetBSD__ + #include <dirent.h> + #endif #include "pdftw.h" #ifdef RCSID *** wais-8-b5.1/Makefile.orig Fri Aug 28 01:59:18 1992 --- wais-8-b5.1/Makefile Sat Nov 20 21:17:31 1993 *************** *** 47,55 **** # for other UNIX-like OS's set this to this directory. #TOP:sh = pwd # or fill in the blank for other OS's ! #TOP = ? ! comment-me: ! @echo You must set "\$$(TOP)" to point to the wais src directory SUPDIR = $(TOP)/ir --- 47,55 ---- # for other UNIX-like OS's set this to this directory. #TOP:sh = pwd # or fill in the blank for other OS's ! TOP = /home/src/wais-8-b5.1 ! #comment-me: ! # @echo You must set "\$$(TOP)" to point to the wais src directory SUPDIR = $(TOP)/ir *************** *** 61,67 **** # for relevance feedaback in the search engine, add -DRELEVANCE_FEEDBACK # USG for Unix Dirent in lib # for SGIs running IRIX 4.0.1, add -cckr ! CFLAGS = -g -I$(SUPDIR) -DSECURE_SERVER -DRELEVANCE_FEEDBACK -DUSG MAKE = make -k --- 61,67 ---- # for relevance feedaback in the search engine, add -DRELEVANCE_FEEDBACK # USG for Unix Dirent in lib # for SGIs running IRIX 4.0.1, add -cckr ! CFLAGS = -O -I$(SUPDIR) -DSECURE_SERVER -DRELEVANCE_FEEDBACK -DUSG MAKE = make -k END -------------------------------------------------------- -- Hung-Chi Chu Email: hcchu@r350.ee.ntu.edu.tw