*BSD News Article 16873


Return to BSD News archive

Newsgroups: comp.os.386bsd.apps
Path: sserve!newshost.anu.edu.au!munnari.oz.au!uunet!wupost!darwin.sura.net!newsserver.jvnc.net!news.edu.tw!news!ccds3.ntu.edu.tw!spider!hcchu
From: hcchu@spider.ee.ntu.edu.tw (Hung-Chi Chu)
Subject: Re: WAIS & Gopher on 386bsd
Message-ID: <1993Jun7.051025.4660@ccds3.ntu.edu.tw>
Sender: usenet@ccds3.ntu.edu.tw (USENET PROXY ACCOUNT)
Nntp-Posting-Host: spider.ee.ntu.edu.tw
Reply-To: f80204@cad.ee.ntu.edu.tw
Organization: Department of Electrical Engineering, National Taiwan University
References: <1993Jun4.183132.79095@ucl.ac.uk>
Date: Mon, 7 Jun 1993 05:10:25 GMT
Lines: 194

In article <Philip.91.739116533@shark.stmarys.ca> Philip@shark.stmarys.ca (Philip Howard (Computer Services)) writes:
>So I'd like to hear if anyone else has tried to port WAIS or Gopher with 
>WAIS to 386bsd -patchlevel 0.2.3, to be exact.

I have ported WAIS clients except Xwais to NetBSD. It should also work on 386BSD.
Now I use Emacs as the interface to WAIS. It works well.
Following is my patches ...
-------------------------------- CUT HERE ----------------------------------------
*** wais-8-b5.1/lib/scandir.c.orig	Thu Jul 18 07:37:47 1991
--- wais-8-b5.1/lib/scandir.c	Wed Jun  2 19:54:25 1993
***************
*** 3,8 ****
--- 3,9 ----
  **  Scan a directory, collecting all (selected) items into a an array.
  */
  
+ #ifndef __386BSD__
  #include <sys/types.h>
  #include <stdio.h>
  #include "pdftw.h"
***************
*** 84,86 ****
--- 85,88 ----
  
      return i;
  }
+ #endif
*** wais-8-b5.1/lib/alphasort.c.orig	Thu Jul 18 07:37:42 1991
--- wais-8-b5.1/lib/alphasort.c	Wed Jun  2 19:59:42 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/ir/ir.c.orig	Fri Aug 28 02:27:36 1992
--- wais-8-b5.1/ir/ir.c	Wed Jun  2 20:01:43 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:20 1992
--- wais-8-b5.1/ir/server-single.c	Wed Jun  2 20:02:56 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:28 1992
--- wais-8-b5.1/ir/server.c	Wed Jun  2 20:03:09 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:19 1992
--- wais-8-b5.1/ir/irtfiles.c	Wed Jun  2 20:04:20 1993
***************
*** 48,53 ****
--- 48,54 ----
   *
   */
  
+ #include <sys/types.h>
  #include <ctype.h>
  #include <string.h>
  #include "panic.h"  
*** wais-8-b5.1/ui/source.h.orig	Tue Nov 17 00:45:41 1992
--- wais-8-b5.1/ui/source.h	Wed Jun  2 20:08:41 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));

--------------------------------- CUT HERE ------------------------------------
--
+-----------------------------------------------------------------------------+
| National Taiwan University, Department of Electrical Engineering, CAD group |
|									      | 
|                 Hung-Chi Chu  < f80204@cad.ee.ntu.edu.tw >                  |
+-----------------------------------------------------------------------------+