gopher-3.0.15/0000775000000000000000000000000012621233174007755 5ustar gopher-3.0.15/announcements/0000775000000000000000000000000010762617110012632 5ustar gopher-3.0.15/announcements/3.0.0.txt0000664000000000000000000002172510762617110014040 0ustar Gopher Turns 10 / Gopher 3.0 (Furry Terror) Released January 8, 2002 The Internet Gopher Server and Curses Client is 10 years old!* Since its [1]announcement in late 1991, Gopher quickly sprang up to be one of the most innovative technologies of its time. Gopher today still provides features not found on Web servers -- namely, its idea that the entire planet is just one big filesystem. Modern browsers such as Konqueror and Mozilla show it to us that way, even with drag-and-drop integration with the desktop. Today we release the Internet Gopher Server and Client version 3.0. After having been totally unmodified for five years, the Internet Gopher has kicked back to life. The University of Minnesota placed the code under the GNU General Public License and an interested group of hackers set to work on it. A year later, we have this release. About Gopher To learn about Gopher, please visit The Gopher Project [[2]gopher/[3]web], A Brief Introduction to Gopherspace [[4]gopher/[5]web], or The Gopher Manifesto [[6]gopher/[7]web]. Obtaining Gopher/Gopherd 3.0 Debian sid users may run "apt-get install gopher gopherd" beginning on approximately January 11. The source distribution may be downloaded from: * [8]gopher://gopher.quux.org/1/devel/gopher * [9]Quux.Org's Web-To-Gopher Interface to the Above * [10]http://www.quux.org/give-me-gopher/ for people that want a more conventional HTTP presentation. Release Notes * You are encouraged to use ./configure --disable-auth to build. * BSD users should use "gmake" to build. Changes since UMN Gopher release 2.3.1 In Brief: * Many security and buffer overrun fixes * New security features in gopherd * Improved handling of MIME types * Modified to work on modern operating systems. Verified to work in Linux for multiple platforms and NetBSD/i386. Should also work for HURD. * Many other modifications, see below. A more detailed listing is below -- but it is still abbreviated. The most current is available from CVS. gopher (3.0.0-1) unstable; urgency=low * Patched to work with Hurd. Closes: #115511. Uses suggestions from James Morrison but not his patch. * gopher.c, gopherd/error.c, gopher/download.c: Modified to use HAVE_STRERROR * configure.in: Modified with checks for sys/param.h, HURD header files, get_current_dir_name, etc. * configure.h.in, configure: rebuilt. * Moved the current UMN Copyright notice in "COPYING" into "copyright" * Updated copyright files, etc. with current info. * Updated the locales with semi-current copyright stuff. * Updated greeting in gopher and gopherd. * This is Gopher 3.0.0, the Furry Terror release. -- John Goerzen Tue, 8 Jan 2002 15:31:00 -0500 gopher (2.3.1-15) unstable; urgency=low * NetBSD port effort began. * Added crypt.h to configure.in's list of headers to look for. Reran autoconf/autoheader. * Modified gopherd/AUTH.h to include crypt.h only if it's available and to include unistd.h if it's available. (NetBSD) * Integrated patches from David Allen (may have been done earlier anyway) * config.h.in: rebuilt by autoheader * configure: rebuilt by autoconf * configure.in: * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * Added checkes for term.h, re_comp.h, regex.h * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * Use REGEXLIBS * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * object/GSgopherobj.c: Removed #include, now use "Regex.h" that has proper regex determining logic * object/Regex.h: Moved regex.h include to here. Make it conditional based on configure test. Add conditional re_comp.h include. * gopherd/gopherd.c: Add init of view and filter after setjmp to eliminate clobbering due to longjmp and a warning. Cast parameters to *printf to long as appropriate. * AUTH.h: Add missing AUTHITEMSprocessLine prototype * AUTH.h: Add a check to prevent including twice. * gopherdconf.c: Add a missing prototype. * AUTH.c: add missing include of GGroup.h * download.c: Added cast to long for some *printf's * Now compiles with only one warning on NetBSD. * This is Gopher 20020108-01.cvs * object/Regex.h: now conditionally includes sys/types.h for regex.h * This is Gopher 20020108-02.cvs -- John Goerzen Tue, 8 Jan 2002 13:11:00 -0500 gopher (2.3.1-14) unstable; urgency=low * Added build-depends on autoconf. Closes: #113255. -- John Goerzen Thu, 1 Nov 2001 12:49:00 -0500 gopher (2.3.1-13) unstable; urgency=low * Added Build-Depends. Closes: #94237. -- John Goerzen Mon, 23 Apr 2001 11:00:04 -0500 gopher (2.3.1-12) unstable; urgency=low * Only chown /var/gopher if it's just created. Closes: #89557. -- John Goerzen Fri, 6 Apr 2001 15:35:16 -0500 gopher (2.3.1-11) unstable; urgency=low * Many sprintf -> snprintf changes. -- John Goerzen Wed, 17 Jan 2001 15:22:09 -0500 gopher (2.3.1-10) unstable; urgency=low * Added mp3 MIME type. Closes: #81529. * Now logs about chroot status on server startup. -- John Goerzen Wed, 17 Jan 2001 13:11:25 -0500 gopher (2.3.1-9) unstable; urgency=low * Fixed potential buffer overflows. Closes: #82602. -- John Goerzen Wed, 17 Jan 2001 12:12:51 -0500 gopher (2.3.1-8) unstable; urgency=low * Update to latest code in CVS, much from David Allen * Fixed dh_testversion to 2.0.103. Closes: #79883. -- John Goerzen Sat, 6 Jan 2001 20:06:01 -0500 gopher (2.3.1-7) unstable; urgency=low * A new debian rev to fix the access: problem in the gopherdlocal.conf. -- John Goerzen Tue, 19 Dec 2000 23:40:09 -0500 gopher (2.3.1-6) unstable; urgency=low * Added many excellent code patches and cleanups from David Allen . -- John Goerzen Tue, 19 Dec 2000 20:18:09 -0500 gopher (2.3.1-5) unstable; urgency=low * Additional code modifications and fixes. -- John Goerzen Mon, 18 Dec 2000 17:03:56 -0500 gopher (2.3.1-4) unstable; urgency=low * Disable authentication for the moment due to security concerns. -- John Goerzen Tue, 17 Oct 2000 23:49:20 -0500 gopher (2.3.1-3) unstable; urgency=low * Added startopts as a gopherd conffile. -- John Goerzen Tue, 22 Aug 2000 22:25:25 -0500 gopher (2.3.1-2) unstable; urgency=low * Modify postinst to be easier for people to use if they already have a gopher user. * Fixed a bug in the restart option for the init script. * Made debian/copyright more verbose. -- John Goerzen Tue, 22 Aug 2000 21:57:26 -0500 gopher (2.3.1-1) unstable; urgency=low * Initial re-release. Package had been yanked after 1995 due to licensing. * UMN has just GPL'd gopher. * This package contains the security fix from bugtraq. * I have patched it to chroot() and setuid() earlier for better security. SIDE EFFECT: logging will not work if chroot() is used. * The extension chopping code was buggy, so I have removed it. * Made many fixes to eliminate compiler warnings and errors. * Removed redefinitions of sys_errlist * Included more header files to bring in relevant prototypes * Modified to use Debian paths * Modified configure.in to look for -lcrypt * Modified Makefile.config.in to use -Wall * Removed -DSETPROCTITLE from configure.in to make start-stop-daemon work better. * Added logrotate * Wrote Debian support from scratch. * AUTH.h includes crypt.h * gopherd/Makefile.in uses separate conffile dir (Debian path) * STRstring.h had a paren problem; gcc on alpha brought it out. Fixed. * String.h was missing some header files. * Other fixes. -- John Goerzen Thu, 17 Aug 2000 15:16:07 -0500 * The exact date of version 1.0 of UMN gopher's release is not logged, but this is about the right time. _________________________________________________________________ $Id: 3.0.0.html,v 1.4 2002/01/08 22:14:44 jgoerzen Exp $ References Visible links 1. http://groups.google.com/groups?selm=1991Sep10.020238.4751%40cs.umn.edu 2. gopher://gopherproject.org/1/Software/Gopher/ 3. http://gopherproject.org/ 4. gopher://gopher.floodgap.com/0/gopher/welcome 5. http://quux.org/hurg/hurg?selector=%2Fgopher%2Fwelcome&port=70&type=0&host=gopher.floodgap.com&username=A+Brief+Introduction+to+Gopherspace 6. gopher://gopher.quux.org/0/Software/Gopher/whygopher/gopher-manifesto.txt 7. http://quux.org/hurg/hurg?selector=0%2FSoftware%2FGopher%2Fwhygopher%2Fgopher-manifesto.txt&port=70&type=0&host=gopher.quux.org&username=Gopher+Manifesto 8. gopher://gopher.quux.org/1/devel/gopher 9. http://quux.org/hurg/hurg?selector=1%2Fdevel%2Fgopher&port=70&type=1&host=gopher.quux.org&username=Gopher 10. http://www.quux.org/give-me-gopher/ Hidden links: 11. mailto:jgoerzen@complete.org gopher-3.0.15/announcements/3.0.4.html0000664000000000000000000000570110762617110014165 0ustar Gopher (FurryTerror) 3.0.4 Released

Gopher FurryTerror Released

March 20, 2002

Today we release the Internet Gopher Server and Client version 3.0.4, two months after the release of our 10th anniversary 3.0 edition.

Since version 3.0, the following major changes have occured:

About Gopher

To learn about Gopher, please visit The Gopher Project [gopher/web], A Brief Introduction to Gopherspace [gopher/web], or The Gopher Manifesto [gopher/web].

Obtaining Gopher/Gopherd 3.0.4

Debian sid users may run "apt-get install gopher gopherd" beginning on approximately March 22.

The source distribution may be downloaded from:

Release Notes


$Id: 3.0.4.html,v 1.3 2002/03/20 03:08:06 jgoerzen Exp $ gopher-3.0.15/announcements/3.0.0.html0000664000000000000000000002335110762617110014162 0ustar Gopher Turns 10 / Gopher 3.0 (Furry Terror) Released

Gopher Turns 10 / Gopher 3.0 (Furry Terror) Released

January 8, 2002

The Internet Gopher Server and Curses Client is 10 years old!* Since its announcement in late 1991, Gopher quickly sprang up to be one of the most innovative technologies of its time. Gopher today still provides features not found on Web servers -- namely, its idea that the entire planet is just one big filesystem. Modern browsers such as Konqueror and Mozilla show it to us that way, even with drag-and-drop integration with the desktop.

Today we release the Internet Gopher Server and Client version 3.0.

After having been totally unmodified for five years, the Internet Gopher has kicked back to life. The University of Minnesota placed the code under the GNU General Public License and an interested group of hackers set to work on it. A year later, we have this release.

About Gopher

To learn about Gopher, please visit The Gopher Project [gopher/web], A Brief Introduction to Gopherspace [gopher/web], or The Gopher Manifesto [gopher/web].

Obtaining Gopher/Gopherd 3.0

Debian sid users may run "apt-get install gopher gopherd" beginning on approximately January 11.

The source distribution may be downloaded from:

Release Notes

Changes since UMN Gopher release 2.3.1

In Brief: A more detailed listing is below -- but it is still abbreviated. The most current is available from CVS.
gopher (3.0.0-1) unstable; urgency=low

  * Patched to work with Hurd.  Closes: #115511.  Uses
    suggestions from James Morrison 
    but not his patch.
    * gopher.c, gopherd/error.c, gopher/download.c:
      Modified to use HAVE_STRERROR
    * configure.in: Modified with checks for sys/param.h, HURD header files,
      get_current_dir_name, etc.
    * configure.h.in, configure: rebuilt.
  * Moved the current UMN Copyright notice in "COPYING" into "copyright"
  * Updated copyright files, etc. with current info.
  * Updated the locales with semi-current copyright stuff.
  * Updated greeting in gopher and gopherd.
  * This is Gopher 3.0.0, the Furry Terror release.  

 -- John Goerzen   Tue,  8 Jan 2002 15:31:00 -0500

gopher (2.3.1-15) unstable; urgency=low

  * NetBSD port effort began.
  * Added crypt.h to configure.in's list of headers to look for.
    Reran autoconf/autoheader.
  * Modified gopherd/AUTH.h to include crypt.h only if it's available
    and to include unistd.h if it's available.  (NetBSD)
  * Integrated patches from David Allen 
    (may have been done earlier anyway)
  * config.h.in: rebuilt by autoheader
  * configure: rebuilt by autoconf
  * configure.in:
    * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat
    * Added checkes for term.h, re_comp.h, regex.h
  * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check
  * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in:
    * Use REGEXLIBS
  * gopher/globals.h, gopher/gopher.c: Remove sys_errlist
  * object/GSgopherobj.c: Removed  #include, now use
    "Regex.h" that has proper regex determining logic
  * object/Regex.h: Moved regex.h include to here.  Make it conditional
    based on configure test.  Add conditional re_comp.h include.
  * gopherd/gopherd.c: Add init of view and filter after setjmp
    to eliminate clobbering due to longjmp and a warning.  Cast
    parameters to *printf to long as appropriate.
  * AUTH.h: Add missing AUTHITEMSprocessLine prototype
  * AUTH.h: Add a check to prevent including twice.
  * gopherdconf.c: Add a missing prototype.
  * AUTH.c: add missing include of GGroup.h
  * download.c: Added cast to long for some *printf's
  * Now compiles with only one warning on NetBSD.
  * This is Gopher 20020108-01.cvs
  * object/Regex.h: now conditionally includes sys/types.h for regex.h
  * This is Gopher 20020108-02.cvs

 -- John Goerzen   Tue,  8 Jan 2002 13:11:00 -0500

gopher (2.3.1-14) unstable; urgency=low

  * Added build-depends on autoconf.  Closes: #113255.

 -- John Goerzen   Thu,  1 Nov 2001 12:49:00 -0500

gopher (2.3.1-13) unstable; urgency=low

  * Added Build-Depends.  Closes: #94237.

 -- John Goerzen   Mon, 23 Apr 2001 11:00:04 -0500

gopher (2.3.1-12) unstable; urgency=low

  * Only chown /var/gopher if it's just created.  Closes: #89557.

 -- John Goerzen   Fri,  6 Apr 2001 15:35:16 -0500

gopher (2.3.1-11) unstable; urgency=low

  * Many sprintf -> snprintf changes.

 -- John Goerzen   Wed, 17 Jan 2001 15:22:09 -0500

gopher (2.3.1-10) unstable; urgency=low

  * Added mp3 MIME type.  Closes: #81529.
  * Now logs about chroot status on server startup.

 -- John Goerzen   Wed, 17 Jan 2001 13:11:25 -0500

gopher (2.3.1-9) unstable; urgency=low

  * Fixed potential buffer overflows.  Closes: #82602.

 -- John Goerzen   Wed, 17 Jan 2001 12:12:51 -0500

gopher (2.3.1-8) unstable; urgency=low

  * Update to latest code in CVS, much from
    David Allen 
  * Fixed dh_testversion to 2.0.103.  Closes: #79883.

 -- John Goerzen   Sat,  6 Jan 2001 20:06:01 -0500

gopher (2.3.1-7) unstable; urgency=low

  * A new debian rev to fix the access: problem in the gopherdlocal.conf.

 -- John Goerzen   Tue, 19 Dec 2000 23:40:09 -0500

gopher (2.3.1-6) unstable; urgency=low

  * Added many excellent code patches and cleanups from
    David Allen .

 -- John Goerzen   Tue, 19 Dec 2000 20:18:09 -0500

gopher (2.3.1-5) unstable; urgency=low

  * Additional code modifications and fixes.

 -- John Goerzen   Mon, 18 Dec 2000 17:03:56 -0500

gopher (2.3.1-4) unstable; urgency=low

  * Disable authentication for the moment due to security concerns.

 -- John Goerzen   Tue, 17 Oct 2000 23:49:20 -0500

gopher (2.3.1-3) unstable; urgency=low

  * Added startopts as a gopherd conffile.

 -- John Goerzen   Tue, 22 Aug 2000 22:25:25 -0500

gopher (2.3.1-2) unstable; urgency=low

  * Modify postinst to be easier for people to use if they already have
    a gopher user.
  * Fixed a bug in the restart option for the init script.
  * Made debian/copyright more verbose.

 -- John Goerzen   Tue, 22 Aug 2000 21:57:26 -0500

gopher (2.3.1-1) unstable; urgency=low

  * Initial re-release.  Package had been yanked after 1995 due to licensing.
  * UMN has just GPL'd gopher.
  * This package contains the security fix from bugtraq.
  * I have patched it to chroot() and setuid() earlier for better
    security.
    SIDE EFFECT: logging will not work if chroot() is used.
  * The extension chopping code was buggy, so I have removed it.
  * Made many fixes to eliminate compiler warnings and errors.
  * Removed redefinitions of sys_errlist
  * Included more header files to bring in relevant prototypes
  * Modified to use Debian paths
  * Modified configure.in to look for -lcrypt
  * Modified Makefile.config.in to use -Wall
  * Removed -DSETPROCTITLE from configure.in to make start-stop-daemon
    work better.
  * Added logrotate
  * Wrote Debian support from scratch.
  * AUTH.h includes crypt.h
  * gopherd/Makefile.in uses separate conffile dir (Debian path)
  * STRstring.h had a paren problem; gcc on alpha brought it out.  Fixed.
  * String.h was missing some header files.
  * Other fixes.

 -- John Goerzen   Thu, 17 Aug 2000 15:16:07 -0500
* The exact date of version 1.0 of UMN gopher's release is not logged, but this is about the right time.
$Id: 3.0.0.html,v 1.4 2002/01/08 22:14:44 jgoerzen Exp $ gopher-3.0.15/configure0000664000000000000000000035401012621233174011664 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --disable-debug controls whether debug text is compilied in" ac_help="$ac_help --enable-socks use socks library, requires -lsocks" ac_help="$ac_help --enable-locale use international localized msgs for the client" ac_help="$ac_help --enable-datadir=dir enable custom datadir (/gopher-data)" ac_help="$ac_help --enable-port=portnum enable custom port (70)" ac_help="$ac_help --enable-dl=dlpathname use Tim Cook's dl databases" ac_help="$ac_help --enable-opt=args Special optimization flags to pass to the compiler" ac_help="$ac_help --without-wais Don't try using WAIS (default: try)" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=gopher/gopher.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi echo "----------------------------------------------------------------------" echo "You are about to build the Gopher system for Unix" echo "Please read the file doc/INSTALL for full information on" echo "building Gopher" echo " " echo "Gopher is copyrighted software, see the file Copyright in" echo "the distribution for more information and limitations." echo "----------------------------------------------------------------------" echo " " # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:556: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:586: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:637: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:669: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 680 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:716: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:744: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:806: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:859: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata ac_cv_prog_LN_S="ln -s" else ac_cv_prog_LN_S=ln fi fi LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:882: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:910: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 echo "configure:938: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ###################################################################### # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" DEBUGGING=$enableval else DEBUGGING="" fi if test "$DEBUGGING" = yes; then DEBUGGING="-DDEBUGGING" fi ###################################################################### HAVE_SOCKS=0 # Check whether --enable-socks or --disable-socks was given. if test "${enable_socks+set}" = set; then enableval="$enable_socks" HAVE_SOCKS=1 else HAVE_SOCKS=0 fi if test "$HAVE_SOCKS" = 1; then echo $ac_n "checking for main in -lsocks""... $ac_c" 1>&6 echo "configure:1011: checking for main in -lsocks" >&5 ac_lib_var=`echo socks'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocks $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 SOCKSLIBS="-lsocks"; SOCKSFLAGS="-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect" else echo "$ac_t""no" 1>&6 fi fi ###################################################################### GINTERNATIONAL="" # Check whether --enable-locale or --disable-locale was given. if test "${enable_locale+set}" = set; then enableval="$enable_locale" GINTERNATIONAL="-DGINTERNATIONAL" else GINTERNATIONAL="" fi ###################################################################### GOPHER_DATA="/gopher-data" # Check whether --enable-datadir or --disable-datadir was given. if test "${enable_datadir+set}" = set; then enableval="$enable_datadir" GOPHER_DATA="$enableval" else GOPHER_DATA="/gopher-data" fi ###################################################################### GOPHER_PORT=70 # Check whether --enable-port or --disable-port was given. if test "${enable_port+set}" = set; then enableval="$enable_port" GOPHER_PORT="$enableval" else GOPHER_PORT=70 fi ###################################################################### # Check whether --enable-dl or --disable-dl was given. if test "${enable_dl+set}" = set; then enableval="$enable_dl" DLPATH="$enableval";DLOBJS="$enableval/getdesc.o $enableval/enddesc.o";SERVEROPTS="$SERVEROPTS -DDL" else : fi ###################################################################### # Check whether --enable-opt or --disable-opt was given. if test "${enable_opt+set}" = set; then enableval="$enable_opt" OPT="$enableval" else OPT="$CFLAGS" fi ###################################################################### # If we can't find connect, try looking in -lsocket, -lnsl, and -linet. # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has # libsocket.so which has a bad implementation of gethostbyname (it # only looks in /etc/hosts), so we only look for -lsocket if we need # it. unset ac_cv_func_connect echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:1118: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:1146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 case $LIBS in *-lnsl*) ;; *) echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 echo "configure:1166: checking for main in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac case $LIBS in *-lnsl*) ;; *) echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 echo "configure:1212: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac case $LIBS in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:1258: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac case $LIBS in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 echo "configure:1308: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac unset ac_cv_func_connect for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1360: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done fi echo $ac_n "checking for gethostname""... $ac_c" 1>&6 echo "configure:1416: checking for gethostname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostname) || defined (__stub___gethostname) choke me #else gethostname(); #endif ; return 0; } EOF if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 LIBOBJS="$LIBOBJS hostname.o" fi ###################################################################### with_wais=1 # Check whether --with-wais or --without-wais was given. if test "${with_wais+set}" = set; then withval="$with_wais" with_wais=1 else with_wais=0 fi LDFLAGS=$OLDLDFLAGS echo $ac_n "checking for re_comp in -lcompat""... $ac_c" 1>&6 echo "configure:1483: checking for re_comp in -lcompat" >&5 ac_lib_var=`echo compat'_'re_comp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcompat $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 REGEXLIBS="$REGEXLIBS -lcompat" else echo "$ac_t""no" 1>&6 fi ###################################################################### echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 echo "configure:1525: checking for main in -lmalloc" >&5 ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo malloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 echo "configure:1570: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 CLIENTLIBS="$CLIENTLIBS -lcurses" else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6 echo "configure:1606: checking for main in -ltermcap" >&5 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 CLIENTLIBS="$CLIENTLIBS -ltermcap" else echo "$ac_t""no" 1>&6 fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 echo "configure:1647: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> int main() { DIR *dirp = 0; ; return 0; } EOF if { (eval echo configure:1660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 echo "configure:1685: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -ldir" else echo "$ac_t""no" 1>&6 fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 echo "configure:1726: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lx" else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1768: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1848: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 echo "configure:1952: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifndef WEXITSTATUS #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main() { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_sys_wait_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 if test $ac_cv_header_sys_wait_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_SYS_WAIT_H 1 EOF fi for ac_hdr in strings.h string.h sys/param.h term.h re_comp.h regex.h crypt.h fcntl.h time.h ctype.h limits.h locale.h sys/types.h sys/stat.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h stdlib.h libgen.h regexp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1997: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:2035: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 echo "configure:2110: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "uid_t" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_uid_t=yes else rm -rf conftest* ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_uid_t" 1>&6 if test $ac_cv_type_uid_t = no; then cat >> confdefs.h <<\EOF #define uid_t int EOF cat >> confdefs.h <<\EOF #define gid_t int EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo "configure:2144: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else rm -rf conftest* ac_cv_type_pid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_pid_t" 1>&6 if test $ac_cv_type_pid_t = no; then cat >> confdefs.h <<\EOF #define pid_t int EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo "configure:2177: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF #define size_t unsigned EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo "configure:2210: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include int main() { struct tm *tp; ; return 0; } EOF if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 echo "configure:2245: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF if { (eval echo configure:2258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_tm=sys/time.h fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_tm" 1>&6 if test $ac_cv_struct_tm = sys/time.h; then cat >> confdefs.h <<\EOF #define TM_IN_SYS_TIME 1 EOF fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 echo "configure:2281: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes else rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2330: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2369: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo "configure:2422: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef HAVE_UNISTD_H # include # endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ #ifdef __cplusplus extern "C" { void *malloc(unsigned); } #else char *malloc(); #endif int main() { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize(); /* * First, make a file with some known garbage in it. */ data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) *(data + i) = rand(); umask(0); fd = creat("conftestmmap", 0600); if (fd < 0) exit(1); if (write(fd, data, pagesize) != pagesize) exit(1); close(fd); /* * Next, try to mmap the file at a fixed address which * already has something else allocated at it. If we can, * also make sure that we see the same garbage. */ fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit(1); /* * Finally, make sure that changes to the mapped area * do not percolate back to the file as seen by read(). * (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit(1); close(fd); unlink("conftestmmap"); exit(0); } EOF if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_mmap_fixed_mapped=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF #define HAVE_MMAP 1 EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:2593: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:2615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:2634: checking for working strcoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_strcoll_works=no else cat > conftest.$ac_ext < main () { exit (strcoll ("abc", "def") >= 0 || strcoll ("ABC", "DEF") >= 0 || strcoll ("123", "456") >= 0); } EOF if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strcoll_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_strcoll_works=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 if test $ac_cv_func_strcoll_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 echo "configure:2676: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_VFORK_H 1 EOF else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 echo "configure:2711: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 echo "configure:2717: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char vfork(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vfork) || defined (__stub___vfork) choke me #else vfork(); #endif ; return 0; } EOF if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vfork=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_VFORK_H #include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static #ifdef __cplusplus sparc_address_test (int arg) #else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } main() { pid_t parent = getpid (); pid_t child; sparc_address_test (); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } EOF if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_vfork_works=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 if test $ac_cv_func_vfork_works = no; then cat >> confdefs.h <<\EOF #define vfork fork EOF fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo "configure:2885: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char vprintf(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vprintf) || defined (__stub___vprintf) choke me #else vprintf(); #endif ; return 0; } EOF if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vprintf=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_VPRINTF 1 EOF else echo "$ac_t""no" 1>&6 fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo "configure:2937: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else _doprnt(); #endif ; return 0; } EOF if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func__doprnt=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_DOPRNT 1 EOF else echo "$ac_t""no" 1>&6 fi fi ac_have_func=no # yes means we've found a way to get the load average. # Some systems have getloadavg without any extra libraries. echo $ac_n "checking for getloadavg""... $ac_c" 1>&6 echo "configure:2993: checking for getloadavg" >&5 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getloadavg(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getloadavg) || defined (__stub___getloadavg) choke me #else getloadavg(); #endif ; return 0; } EOF if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getloadavg=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_getloadavg=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes else echo "$ac_t""no" 1>&6 fi if test $ac_have_func = no; then # Some systems with -lutil have (and need) -lkvm as well, some do not. # On Solaris, -lkvm requires nlist from -lelf, so check that first # to get the right answer into the cache. echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6 echo "configure:3046: checking for elf_begin in -lelf" >&5 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lelf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lelf $LIBS" else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6 echo "configure:3086: checking for kvm_open in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lkvm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lkvm $LIBS" else echo "$ac_t""no" 1>&6 fi # Check for the 4.4BSD definition of getloadavg. echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6 echo "configure:3127: checking for getloadavg in -lutil" >&5 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes else echo "$ac_t""no" 1>&6 fi fi if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. # Since it is not a standard part of AIX, it might be installed locally. ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS" echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6 echo "configure:3173: checking for getloadavg in -lgetloadavg" >&5 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lgetloadavg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lgetloadavg $LIBS" else echo "$ac_t""no" 1>&6 LIBS="$ac_getloadavg_LIBS" fi fi # Make sure it is really in the library, if we think we found it. for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3219: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done if test $ac_cv_func_getloadavg = yes; then cat >> confdefs.h <<\EOF #define HAVE_GETLOADAVG 1 EOF ac_have_func=yes else # Figure out what our getloadavg.c needs. ac_have_func=no ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 echo "configure:3285: checking for sys/dg_sys_info.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes; cat >> confdefs.h <<\EOF #define DGUX 1 EOF echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6 echo "configure:3316: checking for dg_sys_info in -ldgc" >&5 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldgc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi else echo "$ac_t""no" 1>&6 fi # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then ac_have_func=yes; cat >> confdefs.h <<\EOF #define SVR4 1 EOF fi if test $ac_have_func = no; then ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6 echo "configure:3380: checking for inq_stats/cpustats.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes; cat >> confdefs.h <<\EOF #define UMAX 1 EOF cat >> confdefs.h <<\EOF #define UMAX4_3 1 EOF else echo "$ac_t""no" 1>&6 fi fi if test $ac_have_func = no; then ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6 echo "configure:3423: checking for sys/cpustats.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes; cat >> confdefs.h <<\EOF #define UMAX 1 EOF else echo "$ac_t""no" 1>&6 fi fi if test $ac_have_func = no; then for ac_hdr in mach/mach.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:3464: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 echo "configure:3504: checking for nlist.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define NLIST_STRUCT 1 EOF echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6 echo "configure:3535: checking for n_un in struct nlist" >&5 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct nlist n; n.n_un.n_name = 0; ; return 0; } EOF if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_nlist_n_un=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_nlist_n_un=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6 if test $ac_cv_struct_nlist_n_un = yes; then cat >> confdefs.h <<\EOF #define NLIST_NAME_UNION 1 EOF fi else echo "$ac_t""no" 1>&6 fi fi # Do not have getloadavg in system libraries. # Some definitions of getloadavg require that the program be installed setgid. echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6 echo "configure:3574: checking whether getloadavg requires setgid" >&5 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5 | egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then rm -rf conftest* ac_cv_func_getloadavg_setgid=yes else rm -rf conftest* ac_cv_func_getloadavg_setgid=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6 if test $ac_cv_func_getloadavg_setgid = yes; then NEED_SETGID=true; cat >> confdefs.h <<\EOF #define GETLOADAVG_PRIVILEGED 1 EOF else NEED_SETGID=false fi if test $ac_cv_func_getloadavg_setgid = yes; then echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6 echo "configure:3610: checking group of /dev/kmem" >&5 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # On Solaris, /dev/kmem is a symlink. Get info on the real file. ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` # If we got an error (system does not support symlinks), try without -L. test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` ac_cv_group_kmem=`echo $ac_ls_output \ | sed -ne 's/[ ][ ]*/ /g; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; / /s/.* //;p;'` fi echo "$ac_t""$ac_cv_group_kmem" 1>&6 KMEM_GROUP=$ac_cv_group_kmem fi echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 echo "configure:3632: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6 echo "configure:3675: checking for main in -ltermcap" >&5 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi for ac_func in bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mkstemp mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree wattron wattroff wstandout wstandend do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3720: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done cat > conftest.$ac_ext < int main() { getdtablesize(); ; return 0; } EOF if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile Makefile.config object/Makefile gopher/Makefile gopher/locales/Makefile doc/Makefile gophfilt/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g s%@RANLIB@%$RANLIB%g s%@SET_MAKE@%$SET_MAKE%g s%@DEBUGGING@%$DEBUGGING%g s%@SOCKSLIBS@%$SOCKSLIBS%g s%@SOCKSFLAGS@%$SOCKSFLAGS%g s%@GINTERNATIONAL@%$GINTERNATIONAL%g s%@GOPHER_DATA@%$GOPHER_DATA%g s%@GOPHER_PORT@%$GOPHER_PORT%g s%@DLPATH@%$DLPATH%g s%@DLOBJS@%$DLOBJS%g s%@OPT@%$OPT%g s%@REGEXLIBS@%$REGEXLIBS%g s%@WAISTYPE@%$WAISTYPE%g s%@SEARCH@%$SEARCH%g s%@CLIENTLIBS@%$CLIENTLIBS%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@NEED_SETGID@%$NEED_SETGID%g s%@KMEM_GROUP@%$KMEM_GROUP%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 gopher-3.0.15/COPYING0000664000000000000000000004311010762617110011007 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gopher-3.0.15/debian/0000775000000000000000000000000012655456440011211 5ustar gopher-3.0.15/debian/rules0000775000000000000000000000605112621147342012262 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 by Joey Hess. # # This version is for a hypothetical package that builds an # architecture-dependant package, as well as an architecture-independent # package. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. export DH_COMPAT=4 # This has to be exported to make some magic below work. export DH_OPTIONS configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. autoconf autoheader ln -vs /usr/share/gnulib/lib/getloadavg.c . ./configure --prefix=/usr --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info --disable-auth \ --sysconfdir=/etc touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. -$(MAKE) distclean -$(MAKE) clean -rm -f `find . -name "config.cache"` -rm -f config.status -rm -f `find . -name "config.log"` -rm -f Makefile.config gopher/Makefile gopher/locales/Makefile \ Makefile config.h doc/Makefile \ gophfilt/Makefile object/Makefile getloadavg.c dh_clean install: DH_OPTIONS= install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/gopher. $(MAKE) install prefix=`pwd`/debian/gopher/usr \ PREFIX=`pwd`/debian/gopher/usr \ DESTDIR=`pwd`/debian/gopher chmod -R a-x debian/gopher/etc #dh_movefiles chmod u+x debian/gopher/etc/gopher debian/gopher/etc # Build architecture-independent files here. # Pass -i to all debhelper commands in this target to reduce clutter. binary-indep: DH_OPTIONS=-i binary-indep: build install # Need this version of debhelper for DH_OPTIONS to work. dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installemacsen # dh_installpam dh_installinit dh_installcron dh_installlogrotate # dh_installmanpages dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_compress dh_fixperms # You may want to make some executables suid here. dh_installdeb # dh_perl dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. # Pass -a to all debhelper commands in this target to reduce clutter. binary-arch: DH_OPTIONS=-a binary-arch: build install # Need this version of debhelper for DH_OPTIONS to work. dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installemacsen # dh_installpam dh_installinit dh_installlogrotate dh_installcron # dh_installmanpages dh_installinfo # dh_undocumented dh_installchangelogs dh_strip dh_link dh_compress dh_fixperms # You may want to make some executables suid here. dh_installdeb # dh_makeshlibs # dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-arch .PHONY: build clean binary-arch binary install gopher-3.0.15/debian/cron.d.ex0000664000000000000000000000012110762617110012712 0ustar # # Regular cron jobs for the gopher package # 0 4 * * * root gopher_maintenance gopher-3.0.15/debian/docs0000664000000000000000000000015610762617110012054 0ustar README doc/INSTALL doc/TODO doc/client.changes doc/clientlogging.vms doc/object.changes doc/PLATFORMS doc/FAQ gopher-3.0.15/debian/menu.ex0000664000000000000000000000015710762617110012504 0ustar ?package(gopher):needs=X11|text|vc|wm section=Apps/see-menu-manual\ title="gopher" command="/usr/bin/gopher" gopher-3.0.15/debian/dirs0000664000000000000000000000012510762617110012061 0ustar usr/bin usr/sbin usr/share/man/man1 usr/share/man/man5 usr/share/man/man8 etc/gopher gopher-3.0.15/debian/startopts0000664000000000000000000000141410762617110013165 0ustar # Put options for gopherd in here. Set options to "" to not set # or follow the comments. If chroot is enabled, you wiill not be able # to use decoders unless you copy them under your gopher root. The # same goes for calling other scripts, and there may be logging # difficulties. # Set DONTCHROOT to -c if you don't want to use chroot. # DONTCHROOT="-c" DONTCHROOT="" # The username that you run gopher as. Leave blank to run as root. # USEUID="" USEUID="-u gopher" # The option file for gopher. OPTIONFILE="-o /etc/gopherd/gopherd.conf" # Logging. Set to the empty string to disable. #LOGGING="" LOGGING="-l /var/log/gopherd.log" # The home for gopher. GOPHERHOME="/var/gopher" # Gopher's port. GOPHERPORT="70" # Any other options to pass along. OTHEROPTS="" gopher-3.0.15/debian/copyright0000664000000000000000000000245610762617110013141 0ustar This package was debianized by John Goerzen on Thu, 17 Aug 2000 15:16:07 -0500. It was downloaded from gopher://quux.org/1/devel/gopher Old Upstream Author(s): University of Minnesota Current Upstream Authors: John Goerzen and the gopher team Copyright: Gopher software distribution for UNIX Copyright (C) 1991-2000 University of Minnesota Copyright (C) 2000-2005 John Goerzen and the gopher developers This package (Gopher software distribution for UNIX) originally had different copying restrictions. It is now distributed under the GPL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Debian GNU/Linux users can find the GPL in /usr/share/common-licenses/GPL. gopher-3.0.15/debian/conffiles0000664000000000000000000000000010762617110013060 0ustar gopher-3.0.15/debian/ex.doc-base.package0000664000000000000000000000077410762617110014614 0ustar Document: gopher Title: Debian gopher Manual Author: Abstract: This manual describes what gopher is and how it can be used to manage online manuals on Debian systems. Section: unknown Format: debiandoc-sgml Files: /usr/share/doc/gopher/gopher.sgml.gz Format: postscript Files: /usr/share/doc/gopher/gopher.ps.gz Format: text Files: /usr/share/doc/gopher/gopher.text.gz Format: HTML Index: /usr/share/doc/gopher/html/index.html Files: /usr/share/doc/gopher/html/*.html gopher-3.0.15/debian/compat0000664000000000000000000000000212621232727012400 0ustar 5 gopher-3.0.15/debian/control0000664000000000000000000000117212621147342012604 0ustar Source: gopher Section: net Priority: optional Maintainer: John Goerzen Standards-Version: 3.6.2 Build-Depends: debhelper (>= 4.0.0), ncurses-dev, autoconf, gnulib Package: gopher Provides: gopher-client Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Distributed Hypertext Client, Gopher protocol This package contains the client for the distributed global directory and hypertext system known as gopher. This is a text-based (ncurses) client from the University of Minnesota. It also supports the gopher+ protocol, as well as links to ftp, http, and other external viewers. gopher-3.0.15/debian/changelog0000644000000000000000000003536412655456440013074 0ustar gopher (3.0.15build1) xenial; urgency=medium * No-change rebuild for ncurses6 transition. -- Matthias Klose Sat, 06 Feb 2016 20:52:48 +0000 gopher (3.0.15) unstable; urgency=medium * Correct possible segfault in option parsing. Closes #715977, #715978. -- John Goerzen Thu, 12 Nov 2015 19:00:08 -0600 gopher (3.0.14) unstable; urgency=medium * Fix Debian (Closes: #798758) thanks to patch from Axel Beckert + Use autoconf and gnulib instead of autoconf2.13. + debian/rules: configure-stamp is a dependency of build-stamp, not build. + debian/rules: Add symlink to /usr/share/gnulib/lib/getloadavg.c and remove it again in the clean target. -- John Goerzen Thu, 12 Nov 2015 11:47:19 -0600 gopher (3.0.13) unstable; urgency=low * More changes to download.c to prefer getcwd() to get_current_dir_name(). Closes: #366560. -- John Goerzen Sat, 17 Jun 2006 11:10:31 -0500 gopher (3.0.12) unstable; urgency=low * Applied patch to make it build for Hurd. Closes: #346447. -- John Goerzen Tue, 9 May 2006 10:37:49 -0500 gopher (3.0.11) unstable; urgency=high * [security] Fix for client buffer overflows [CAN-2005-2772]. -- John Goerzen Thu, 22 Sep 2005 05:24:02 -0500 gopher (3.0.10) unstable; urgency=low * Version 3.0.8 fixed the security bug that was later submitted as CAN-2005-1853 and DSA-770-1. * The upload for this changelog notice was requested by the Debian testing-security team. -- John Goerzen Sat, 30 Jul 2005 16:16:07 -0500 gopher (3.0.9) unstable; urgency=low * Updated version number in patchlevel.h. (Oops, it still says 3.0.5) -- John Goerzen Wed, 20 Jul 2005 05:55:50 -0500 gopher (3.0.8) unstable; urgency=low * Fix compile error with gcc 3.4. Closes: #258752. * Fixed warnings relating to prototypes. In download.c, prefer getcwd() to get_current_dir_name(). Closes: #226552. * No longer crash on problems piping to external programs. Thanks, Goeran Weinholt, for the patch. Closes: #128990. * Install makes dirs for manpages if they don't already exist. Combined with other fixes in this version and prior versions, all bugs in 142913 are resolved. Closes: #142913. * [debian] Removed build-deps on build-essential packages. Closes: #262423. * [debian] Updated standards-version and to new debhelper. * Fixed a small memory leak in download.c. * Fix potential insecure /tmp usage in gopher.c. * Use socklen_t instead of int for socket length operations, avoiding warnings about incorrect signedness. * Updated copyright files. -- John Goerzen Wed, 20 Jul 2005 05:41:40 -0500 gopher (3.0.7) unstable; urgency=low * Use Autoconf 2.13 on Debian systems. Closes: #206183. -- John Goerzen Mon, 25 Aug 2003 12:59:02 -0500 gopher (3.0.6) unstable; urgency=low * Deprecated gopherd in favor of PyGopherd. -- John Goerzen Mon, 18 Aug 2003 12:11:17 -0500 gopher (3.0.5) unstable; urgency=low * Integrated my patch to 3.0.4 for Solaris compilation. * Logging with chroot has long since been fixed; added a note to startopts about other chroot stuff. Closes: #82590, #82591. * Gopherd sometimes sent "+INFO " instead of "+INFO: ". Fixed. Closes: #142912. * doc/Makefile.in: Install manpages 0644 instead of 0755. -- John Goerzen Fri, 26 Apr 2002 09:09:55 -0500 gopher (3.0.4) unstable; urgency=low * MAJOR rewrite of regex support. This should make gopher compile and work better on several platforms. * Added regcomp and regree func checks to configure.in and regenerated configure and config.h * Removed the DOMAIN configure support, DOMAIN_NAME in gopherd, backupdomain in Socket.c, etc. This should prevent the no.domain.name problem that people have been seeing. Regenerated configure stuff. * Added line for .png to gopherd.conf.in * Added note about UFS builds on MacOS X to doc/PLATFORMS * Added FAQ and modified debian/docs * Updated gopherd.8 with information about type 'i' * Fixed gopher's URL handling -- it was missing the type character. Closes: #138337. * Another regex change. Let's hope this fixes things for Solaris. * Fixed to properly calculated first arg to select in gopherd.c -- John Goerzen Tue, 19 Mar 2002 13:08:39 -0500 gopher (3.0.3) unstable; urgency=low * Patches for FreeBSD: * Test in configure for stdlib.h * Include stdlib.h if it's available in Malloc.h * Don't include malloc.h if it's missing in Malloc.h * Don't include strcasestr if it's present in util.c and util.h * Actually use our configure.in test for malloc.h in object/* files. * New configure.in tests for regexp.h and libgen.h * Regex.c: define __GOPHER_REGEX_C__ for extern support in Regex.h * Regex.c: For __APPLE__, REGEX_param is regexp *. * Regex.h: Move the lengthy SYSV regex test to top of file * Regex.h: Wrap libgen.h include in HAVE_LIBGEN_H * Regex.h: Enclose REGEX_param=regcomp in parens to avoid warnings * Regex.h: Add extern for REGEX_param. * Regex.h: Darwin is unlike anything else. Support it with __APPLE__. * STRstring.h: Include malloc.h only if actually here. * Ditto for Stdlib.h. * Added /etc/logrotate.d/gopherd to gopherd.conffiles. Closes: #132804. -- John Goerzen Tue, 12 Feb 2002 07:45:00 -0500 gopher (3.0.2) unstable; urgency=low * gopher: Removed processing of . at end of text files. It would stop downloading when it would see ".\n" in a file. Will need to modify gopher/ourutils.c:937 area to deal with this properly -- ignore .\n if it's at the end of the file, otherwise preserve it. Reported by Ashok Aiyar * Did the modification as described above. * Updated README. * Global change gopher@boombox.micro.umn.edu -> gopher@complete.org * Removed ./GPL. This info is now in the file COPYING. * Changes to work with Solaris: * configure.in: Now looks for strings.h and string.h * object/Regex.h: Now include re_comp.h if available. Include regex.h only if re_comp.h is unavailable. Define the SYSVREGEX stuff only if HAVE_RE_COMP_H is not defined * object/String.h: Include string.h and strings.h based on configure test. Reports from Don Fike * Added doc/PLATFORMS and updated debian/docs * gopherd.conf's include of gopherdlocal.conf was hardcoded to /etc. Now use configure's sysconfdir to generate it. Moved gopherd.conf to gopherd.conf.in, modified Makefile.in to support this, removed gopherd.conf from source tree. Reported by Kevin Griffin * Added lines to gopherd.conf.in for .ogg and .mp2 files. Suggestion from Kevin Griffin * Using $(INSTALL) from subdirectories broke on systems where install-sh was used because $(INSTALL) would always resolve to ./install-sh. Replaced all instances of $(INSTALL) with @INSTALL@ (autoconf would provide the correct path) and removed INSTALL from Makefile.config. Reported by Don Fike on Solaris 2.6. * Updated our copy of install-sh with the one from a current automake. * Updated patchlevel.h for release of 3.0.2. -- John Goerzen Fri, 11 Jan 2002 07:45:00 -0500 gopher (3.0.1) unstable; urgency=low * Installation routines modified -- pass -d to install to create config dirs. This should fix installation problems. * Use sysconfigdir rather that $(DESTDIR)/etc for config files. * Fix a bug with specifying the gopher host on the command line. -- John Goerzen Thu, 10 Jan 2002 07:30:00 -0500 gopher (3.0.0-1) unstable; urgency=low * Patched to work with Hurd. Closes: #115511. Uses suggestions from James Morrison but not his patch. * gopher.c, gopherd/error.c, gopher/download.c: Modified to use HAVE_STRERROR * configure.in: Modified with checks for sys/param.h, HURD header files, get_current_dir_name, etc. * configure.h.in, configure: rebuilt. * Moved the current UMN Copyright notice in "COPYING" into "copyright" * Updated copyright files, etc. with current info. * Updated the locales with semi-current copyright stuff. * Updated greeting in gopher and gopherd. * This is Gopher 3.0.0, the Furry Terror release. -- John Goerzen Tue, 8 Jan 2002 15:31:00 -0500 gopher (2.3.1-15) unstable; urgency=low * NetBSD port effort began. * Added crypt.h to configure.in's list of headers to look for. Reran autoconf/autoheader. * Modified gopherd/AUTH.h to include crypt.h only if it's available and to include unistd.h if it's available. (NetBSD) * Integrated patches from David Allen (may have been done earlier anyway) * config.h.in: rebuilt by autoheader * configure: rebuilt by autoconf * configure.in: * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * Added checkes for term.h, re_comp.h, regex.h * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * Use REGEXLIBS * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * object/GSgopherobj.c: Removed #include, now use "Regex.h" that has proper regex determining logic * object/Regex.h: Moved regex.h include to here. Make it conditional based on configure test. Add conditional re_comp.h include. * gopherd/gopherd.c: Add init of view and filter after setjmp to eliminate clobbering due to longjmp and a warning. Cast parameters to *printf to long as appropriate. * AUTH.h: Add missing AUTHITEMSprocessLine prototype * AUTH.h: Add a check to prevent including twice. * gopherdconf.c: Add a missing prototype. * AUTH.c: add missing include of GGroup.h * download.c: Added cast to long for some *printf's * Now compiles with only one warning on NetBSD. * This is Gopher 20020108-01.cvs * object/Regex.h: now conditionally includes sys/types.h for regex.h * This is Gopher 20020108-02.cvs -- John Goerzen Tue, 8 Jan 2002 13:11:00 -0500 gopher (2.3.1-14) unstable; urgency=low * Added build-depends on autoconf. Closes: #113255. -- John Goerzen Thu, 1 Nov 2001 12:49:00 -0500 gopher (2.3.1-13) unstable; urgency=low * Added Build-Depends. Closes: #94237. -- John Goerzen Mon, 23 Apr 2001 11:00:04 -0500 gopher (2.3.1-12) unstable; urgency=low * Only chown /var/gopher if it's just created. Closes: #89557. -- John Goerzen Fri, 6 Apr 2001 15:35:16 -0500 gopher (2.3.1-11) unstable; urgency=low * Many sprintf -> snprintf changes. -- John Goerzen Wed, 17 Jan 2001 15:22:09 -0500 gopher (2.3.1-10) unstable; urgency=low * Added mp3 MIME type. Closes: #81529. * Now logs about chroot status on server startup. -- John Goerzen Wed, 17 Jan 2001 13:11:25 -0500 gopher (2.3.1-9) unstable; urgency=low * Fixed potential buffer overflows. Closes: #82602. -- John Goerzen Wed, 17 Jan 2001 12:12:51 -0500 gopher (2.3.1-8) unstable; urgency=low * Update to latest code in CVS, much from David Allen * Fixed dh_testversion to 2.0.103. Closes: #79883. -- John Goerzen Sat, 6 Jan 2001 20:06:01 -0500 gopher (2.3.1-7) unstable; urgency=low * A new debian rev to fix the access: problem in the gopherdlocal.conf. -- John Goerzen Tue, 19 Dec 2000 23:40:09 -0500 gopher (2.3.1-6) unstable; urgency=low * Added many excellent code patches and cleanups from David Allen . -- John Goerzen Tue, 19 Dec 2000 20:18:09 -0500 gopher (2.3.1-5) unstable; urgency=low * Additional code modifications and fixes. -- John Goerzen Mon, 18 Dec 2000 17:03:56 -0500 gopher (2.3.1-4) unstable; urgency=low * Disable authentication for the moment due to security concerns. -- John Goerzen Tue, 17 Oct 2000 23:49:20 -0500 gopher (2.3.1-3) unstable; urgency=low * Added startopts as a gopherd conffile. -- John Goerzen Tue, 22 Aug 2000 22:25:25 -0500 gopher (2.3.1-2) unstable; urgency=low * Modify postinst to be easier for people to use if they already have a gopher user. * Fixed a bug in the restart option for the init script. * Made debian/copyright more verbose. -- John Goerzen Tue, 22 Aug 2000 21:57:26 -0500 gopher (2.3.1-1) unstable; urgency=low * Initial re-release. Package had been yanked after 1995 due to licensing. * UMN has just GPL'd gopher. * This package contains the security fix from bugtraq. * I have patched it to chroot() and setuid() earlier for better security. SIDE EFFECT: logging will not work if chroot() is used. * The extension chopping code was buggy, so I have removed it. * Made many fixes to eliminate compiler warnings and errors. * Removed redefinitions of sys_errlist * Included more header files to bring in relevant prototypes * Modified to use Debian paths * Modified configure.in to look for -lcrypt * Modified Makefile.config.in to use -Wall * Removed -DSETPROCTITLE from configure.in to make start-stop-daemon work better. * Added logrotate * Wrote Debian support from scratch. * AUTH.h includes crypt.h * gopherd/Makefile.in uses separate conffile dir (Debian path) * STRstring.h had a paren problem; gcc on alpha brought it out. Fixed. * String.h was missing some header files. * Other fixes. -- John Goerzen Thu, 17 Aug 2000 15:16:07 -0500 Thu Feb 9 21:32:43 1995 Ted Hajek * gopherd/Makefile (install): Fixed syntax error in the installation of gopherdlocal.conf. * gopher/CURcurses.h: Changed inclusion of curses.h to inclusion of "ncurses/curses.h". Hopefully this will solve strange problems with terminal features. Wed Jul 31 17:31:11 MET DST 1996 Michael Meskes * Renamed function ustat in g_ustat to get gopherd compile with ELF libc * Corrected version number (Bugs #1718, #1851, #3965) * Added Architecture, Priority and Section field (Bug#3933) * Changed debian.rules file for new naming scheme * Removed 'RECOMMENDS: freeWAIS' line (Bug #1717) * Corrected extended description (Bug #3668, #3683) * Changed weekly cron script (Bug #3262) * Compress manpages Local variables: mode: debian-changelog End: gopher-3.0.15/debian/manpage.1.ex0000664000000000000000000000354710762617110013315 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH GOPHER SECTION "August 17, 2000" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME gopher \- program to do something .SH SYNOPSIS .B gopher .RI [ options ] " files" ... .br .B bar .RI [ options ] " files" ... .SH DESCRIPTION This manual page documents briefly the .B gopher and .B bar commands. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. Instead, it has documentation in the GNU Info format; see below. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBgopher\fP is a program that... .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. .TP .B \-h, \-\-help Show summary of options. .TP .B \-v, \-\-version Show version of program. .SH SEE ALSO .BR bar (1), .BR baz (1). .br The programs are documented fully by .IR "The Rise and Fall of a Fooish Bar" , available via the Info system. .SH AUTHOR This manual page was written by unknown , for the Debian GNU/Linux system (but may be used by others). gopher-3.0.15/debian/manpage.sgml.ex0000664000000000000000000000777110762617110014122 0ustar FIRSTNAME"> SURNAME"> August 17, 2000"> SECTION"> jgoerzen@complete.org"> GOPHER"> Debian GNU/Linux"> GNU"> ]>
&dhemail;
&dhfirstname; &dhsurname; 2000 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; program to do something &dhpackage; DESCRIPTION This manual page documents briefly the &dhpackage; and bar commands. This manual page was written for the &debian; distribution because the original program does not have a manual page. Instead, it has documentation in the &gnu; Info format; see below. &dhpackage; is a program that... OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. Show summary of options. Show version of program. SEE ALSO bar (1), baz (1). The programs are documented fully by The Rise and Fall of a Fooish Bar available via the Info system. AUTHOR This manual page was written by &dhusername; &dhemail; for the &debian; system (but may be used by others).
gopher-3.0.15/make.com0000664000000000000000000000170610762617110011376 0ustar $ v = 'f$verify(0)' $!******************************************************************** $ IF P1 .EQS. "" $ THEN $ type/nopage sys$input: Usage: @make UCX @make WOLLONGONG @make MULTINET @make CMUIP @make NETLIB @make TCPWARE $ exit $ ENDIF $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $ v1 = f$verify(1) $ set default [.object] $ v1 = 'f$verify(0)' $ @compile 'P1' 'P2' $ @link 'P1' 'P2' $! $ v1 = f$verify(1) $ set default [-.gopher] $ v1 = 'f$verify(0)' $ @compile 'P1' 'P2' $ @link 'P1' 'P2' $! $ v1 = f$verify(1) $ set default [-.gophfilt] $ v1 = 'f$verify(0)' $ @make_gophfilt 'P1' 'P2' $ IF P2 .eqs. "DEBUG" $ THEN $ v1 = f$verify(1) $ set default [-] $ v1 = 'f$verify(0)' $ goto CLEANUP $ ENDIF $! $ v1 = f$verify(1) $ set default [-.gopher.locales] $ v1 = 'f$verify(0)' $ @make $! $ v1 = f$verify(1) $ set default [-.-] $ v1 = 'f$verify(0)' $! $ CLEANUP: $ v1 = f$verify(v) $exit gopher-3.0.15/config.sub0000664000000000000000000004311310762617110011737 0ustar #! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS (if any). basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ | arme[lb] | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ | pdp11 | mips64el | mips64orion | mips64orionel \ | sparc) basic_machine=$basic_machine-unknown ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigados) basic_machine=m68k-cbm os=-amigados ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[345]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-sysv32 ;; i[345]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-sysv4 ;; i[345]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-sysv ;; i[345]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-solaris2 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; np1) basic_machine=np1-gould ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | p6) # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium basic_machine=i586-intel ;; pentium-* | p5-* | p6-*) # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; k5) # We don't have specific support for AMD's K5 yet, so just call it a Pentium basic_machine=i586-amd ;; nexen) # We don't have specific support for Nexgen yet, so just call it a Pentium basic_machine=i586-nexgen ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; symmetry) basic_machine=i386-sequent os=-dynix ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) basic_machine=mips-mips ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware* | svr4*) os=-sysv4 ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* ) # Remember, each alternative MUST END IN *, to match a version number. ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -ctix* | -uts*) os=-sysv ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -xenix) os=-xenix ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-ibm) os=-aix ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigados ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -lynxos*) vendor=lynx ;; -aix*) vendor=ibm ;; -hpux*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxworks*) vendor=wrs ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os gopher-3.0.15/gophfilt/0000775000000000000000000000000012621233142011564 5ustar gopher-3.0.15/gophfilt/tryit.com0000664000000000000000000000246010762617110013446 0ustar $ v = 'f$verify(0)' $!******************************************************************** $! F.Macrides 15-Dec-1994 Enable DEBUG build via P2. $! F.Macrides 01-Dec-1994 Initial version. $!******************************************************************** $! MODULE: tryit.com $! Example DCL script for use with gophfilt $!********************************************************************/ $ set noon $ IF f$type(gophfilt) .eqs. "" $ THEN $ v = f$verify(1) $!*************************************************** $! define gophfilt as a foreign command: $! $! gophfilt :== $device[directory]gophfilt.exe $! $ v = 'f$verify(0)' $ exit $! $ ENDIF $ v = f$verify(1) $!************************************************** $! Pass filename as P1 if you want output to a file: $! $ if P1 .nes. "" then define sys$output "''P1'" $! $!************************ $! Try it with qualifiers: $! $ gophfilt -t 0 -p "0/Information About Gopher/about"- -h gopher.tc.umn.edu -s 70 $! $!******************* $! Try it with a URL: $! $ gophfilt "gopher://gopher.tc.umn.edu:70/00/Information%20About%20Gopher/about" $! $!******************************************************* $! Try it with tabbed stream input from the command file: $! $ gophfilt 0 0/Information About Gopher/about gopher.tc.umn.edu 70 $! $ v = 'f$verify(0)' $ exit gopher-3.0.15/gophfilt/gophfilt.c0000664000000000000000000001226710762617110013561 0ustar /******************************************************************** * * @(#)gophfilt.c 1.2 * ********************************************************************* * MODULE: gophfilt.c * Semi-traditional unix filter for gophering. ********************************************************************* */ #include #include "Stdlib.h" #include #include "conf.h" #include "string.h" #include "GSgopherobj.h" GopherObj *Oneshot; int DEBUG = 0; SIGRETTYPE timeout(); /*** for getopt processing ***/ extern char *optarg; extern int optind; #ifdef VMS int DCLsystem(command) char *command; { if(command && strcmp(command, "")) fprintf(stdout, "Cannot execute: %s\n", command); else fprintf(stdout, "Cannot spawn.\n"); return(0); } #endif /* VMS */ int main(argc, argv) int argc; char *argv[]; { int manual = 0; int path = 0; int type = 0; unsigned timer = 10; char *host = CLIENT1_HOST; int port = CLIENT1_PORT; char *item = ""; int c, x = 0; int numread, sockfd; char buf[1024]; /* Allocate the Gopher object structure */ Oneshot = GSnew(); while ((c = getopt(argc, argv, "h:s:p:i:t:T:")) != -1) switch (c) { case 's': port = atoi(optarg); manual++; break; case 'p': GSsetPath(Oneshot, optarg); manual++; path++; break; case 'h': host = optarg; manual++; break; case 'T': timer = (unsigned)atoi(optarg); break; case 't': GSsetType(Oneshot, *optarg); manual++; type++; break; case 'i': item = optarg; manual++; break; default: #ifdef VMS fprintf(stdout, "Error in parsing command line arguments.\n"); exit(0); #else return(-1); #endif } /**** Get a URL from the command line, if present ****/ if (optind < argc && strchr(argv[optind], ':') != NULL) { x=GSfromURL(Oneshot, argv[optind], AFTP_HOST, AFTP_PORT, x); manual+=x; if (x & G_PATH) path++; if (x & G_TYPE) type++; if (x & G_HOST) host = GSgetHost(Oneshot); if (x & G_PORT) port = GSgetPort(Oneshot); } /* Set the port to either the default or one provided */ GSsetPort(Oneshot, port); GSsetHost(Oneshot, host); /* See if the minimum stuff was provided */ if (manual && (!path || !type)) { #ifdef VMS fprintf(stdout, "Manual operation and insufficient parameters were provided.\n"); exit(0); #else return(-2); /* error if not */ #endif } /* Get the selector item from stdin if not already filled in by hand */ if (!manual) { if (GSfromNet(Oneshot, 0) < 0) { /* Error if cannot get it */ #ifdef VMS fprintf(stdout, "Piped operation and unable to read selector from stdin.\n"); exit(0); #else return(-3); #endif } } /** Get the kind of file from the first character **/ /** Filter out files that we can't deal with **/ switch (GSgetType(Oneshot)) { case A_FILE: case A_DIRECTORY: case A_MACHEX: case A_PCBIN: case A_CSO: case A_INDEX: case A_SOUND: case A_UNIXBIN: case A_GIF: case A_HTML: case A_MIME: case A_IMAGE: break; default: #ifdef VMS fprintf(stdout, "Unsupported item type requested.\n"); exit(0); #else return(-4); #endif } /* Connect to the specified server */ if ((sockfd = GSconnect(Oneshot)) <0) { #ifdef VMS fprintf(stdout, "Unable to connect to specified host and port combination.\n"); exit(0); #else return(-5); #endif } /** Send out the request **/ writestring(sockfd, GSgetPath(Oneshot)); if (strlen(item)) { writestring(sockfd, "\t"); writestring(sockfd, item); } writestring(sockfd, "\r\n"); /* Set an alarm in case we get nothing */ (void)signal(SIGALRM, timeout); (void)alarm(timer); switch (GSgetType(Oneshot)) { case A_FILE: /* contents of a plain file */ case A_DIRECTORY: /* listing of a directory */ case A_MACHEX: /* results of a search */ case A_INDEX: /* Text ends with a lonesome '.' on a line */ while (readline(sockfd, buf, sizeof(buf)) > 0) { (void)alarm((unsigned)0); (void)alarm(timer); ZapCRLF(buf); if (*buf == '.' && *(buf+1) == '\0') break; fputs(buf, stdout); putc('\n', stdout); } break; case A_SOUND: /* Binary stuff */ case A_IMAGE: case A_GIF: case A_UNIXBIN: case A_PCBIN: /* Binary stuff we just read til it's gone */ while ((numread = readn(sockfd, buf, sizeof buf)) > 0) { (void)alarm((unsigned)0); (void)alarm(timer); if (fwrite(buf, numread, 1, stdout) == 0) { close(sockfd); #ifdef VMS fprintf(stderr, "Error encountered writing to stdout.\n"); #else return(-6); #endif } } break; } close(sockfd); (void)alarm((unsigned)0); #ifdef VMS exit(1); #else return(0); #endif } /*SUBTTL timeout() - Alarm expired while awaiting data */ /* */ SIGRETTYPE timeout() { #ifdef VMS fprintf(stdout, "Timeout occurred while waiting for more data.\n"); exit(0); #else exit(-7); #endif } gopher-3.0.15/gophfilt/make_gophfilt.com0000664000000000000000000000465010762617110015107 0ustar $ vg = 'f$verify(0)' $!******************************************************************** $! F.Macrides 15-Dec-1994 Enable DEBUG build via P2. $! F.Macrides 01-Dec-1994 Initial version. $!******************************************************************** $! MODULE: makefilt.com $! compiling and linking script for gophfilt $!********************************************************************/ $! $ IF P1 .EQS. "" $ THEN $ type/nopage sys$input: Usage: @compile UCX @compile WOLLONGONG @compile MULTINET @compile CMUIP @compile NETLIB @compile TCPWARE $ exit $ ENDIF $ IF P2 .EQS. "DEBUG" $ THEN $ write sys$output "Compiling gophfilt with DEBUG..." $ debug := "/obj=gophfilt.objd/debug/noopt" $ ELSE $ debug := "" $ ENDIF $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $! $ IF P1 .eqs. "TCPWARE" $ THEN $ write sys$output "Compiling gophfilt with UCX emulation..." $ transport := "UCX" $ ELSE $ transport := "''P1'" $ ENDIF $! $ IF f$trnlnm("VAXCMSG") .eqs. "DECC$MSG" .or. - f$trnlnm("DECC$CC_DEFAULT") .eqs. "/DECC" $ THEN $ optfile := "''P1'_DECC" $ vg1 = f$verify(1) $! DECC: $ define/nolog C$USER_INCLUDE [-],[-.object] $ define/nolog DECC$USER_INCLUDE [-],[-.object] $ vg1 = 'f$verify(0)' $ IF transport .eqs. "UCX" $ THEN $ vg1 = f$verify(1) $ cc/prefix=(all,except=(setlocale))- /warning=(disable=implicitfunc)- /define=('transport'=1,__VMS_CURSES)- 'debug' gophfilt.c $ vg1 = 'f$verify(0)' $ ELSE $ vg1 = f$verify(1) $ cc/prefix=(all,except=(connect,gethostbyname,htons,inet_addr,- setsockopt,socket,setlocale))- /warning=(disable=implicitfunc)- /define=('transport'=1,__VMS_CURSES)- 'debug' gophfilt.c $ vg1 = 'f$verify(0)' $ ENDIF $ ELSE $ optfile := "''P1'_VAXC" $ vg1 = f$verify(1) $! VAXC: $ cc/include=([-],[-.object])/define=('transport'=1)- 'debug' gophfilt.c $ vg1 = 'f$verify(0)' $ ENDIF $! $ IF P2 .eqs. "DEBUG" $ THEN $ vg1 = f$verify(1) $! $ link/debug/exe=gophfilt_debug- gophfilt.objd,[-.object]libgopher_debug/lib,- sys$library:vaxccurse/lib,- sys$disk:[-.gopher.vmsopts]'optfile'/opt $! $ vg1 = 'f$verify(0)' $ ELSE $ vg1 = f$verify(1) $! $ link gophfilt.obj,[-.object]libgopher/lib,- sys$library:vaxccurse/lib,- sys$disk:[-.gopher.vmsopts]'optfile'/opt $! $ vg1 = 'f$verify(0)' $ ENDIF $! $ CLEANUP: $ vg1 = f$verify(vg) $exit gopher-3.0.15/gophfilt/Makefile.in0000664000000000000000000000540610762617110013643 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.3 $ # $Date: 2002/01/11 15:55:59 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gophfilt/Makefile.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile # Makefile for gopher filter client #********************************************************************* # Revision History: # $Log: Makefile.in,v $ # Revision 1.3 2002/01/11 15:55:59 jgoerzen # * Using $(INSTALL) from subdirectories broke on systems # where install-sh was used because $(INSTALL) would always # resolve to ./install-sh. Replaced all instances of # $(INSTALL) with @INSTALL@ (autoconf would provide the correct # path) and removed INSTALL from Makefile.config. Reported # by Don Fike on Solaris 2.6. # * Updated our copy of install-sh with the one from # a current automake. # # Revision 1.2 2002/01/08 17:36:14 jgoerzen # Finally builds! # # Changes: # # * config.h.in: rebuilt by autoheader # # * configure: rebuilt by autoconf # # * configure.in: # * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat # * Added checkes for term.h, re_comp.h, regex.h # # * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check # # * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: # * Use REGEXLIBS # # * gopher/globals.h, gopher/gopher.c: Remove sys_errlist # # * object/GSgopherobj.c: Removed #include, now use # "Regex.h" that has proper regex determining logic # # * object/Regex.h: Moved regex.h include to here. Make it conditional # based on configure test. Add conditional re_comp.h include. # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 1.1 1996/01/06 00:33:31 lindner # rel 2.3 # #********************************************************************/ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ include ../Makefile.config OBJS = gophfilt.o CCFLAGS = $(OPT) $(INTLOPTS) -I.. -I$(top_srcdir) -I$(top_srcdir)/object TARGET = gophfilt all: $(TARGET) .c.o: $(CC) $(CCFLAGS) -c $< ../object/libgopher.a: (cd ..; $(MAKE) $(MFLAGS) objects) $(TARGET) : $(OBJS) ../object/libgopher.a $(CC) $(LDFLAGS) -o $@ $(OBJS) ../object/libgopher.a @REGEXLIBS@ @LIBS@ install : all -mv $(CLIENTDIR)/$(TARGET) $(CLIENTDIR)/$(TARGET).old @INSTALL@ $(TARGET) $(CLIENTDIR) clean: -rm -f $(TARGET) $(OBJS) *.out *~ core $(OBJS): $(srcdir)/../object/GSgopherobj.h $(srcdir)/../conf.h gopher-3.0.15/Makefile.in0000664000000000000000000001365010762617110012027 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.10 $ # $Date: 2002/04/26 13:33:33 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/Makefile.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile # Makefile for entire gopher distribution. #********************************************************************* # Revision History: # $Log: Makefile.in,v $ # Revision 1.10 2002/04/26 13:33:33 jgoerzen # Removed glib MIME stuff. We'll move to Pygopherd first. # # Revision 1.8 2002/01/28 03:38:58 jgoerzen # Patches for FreeBSD: # * Test in configure for stdlib.h # * Include stdlib.h if it's available in Malloc.h # * Don't include malloc.h if it's missing in Malloc.h # * Don't include strcasestr if it's present in util.c and util.h # # Revision 1.7 2002/01/09 02:56:09 jgoerzen # Updated archive target again # # Revision 1.6 2002/01/09 02:53:12 jgoerzen # Fixed over-zealous Makefile.in problem. # # Revision 1.5 2002/01/09 00:47:05 jgoerzen # Fixed archive target in Makefile.in # MANIFEST updated by make archive # # Revision 1.4 2002/01/09 00:43:30 jgoerzen # Updated # # Revision 1.3 2002/01/08 16:49:42 jgoerzen # Modified distclean to be better behaved. # # Revision 1.2 2002/01/08 16:44:19 jgoerzen # configure.in: Modified to check for crypt.h # Reran autoconf & autoheader # Makefile.in: Modified to be better with distclean # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 3.1 1996/01/04 18:52:02 lindner # Updates for autoconf # # Revision 3.15 1994/12/07 23:58:19 lindner # Fix for VMS zip builder # # Revision 3.14 1994/11/18 22:25:39 lindner # Fix for quicktar # # Revision 3.13 1994/08/19 17:02:06 lindner # Remove ZIP file before creating it.. # # Revision 3.12 1994/01/07 20:52:01 lindner # pl11 # # Revision 3.11 1993/08/19 20:31:54 lindner # minor fixes for quicktar # # Revision 3.10 1993/08/17 21:58:11 lindner # Fix for dependencies, all # # Revision 3.9 1993/08/12 06:34:23 lindner # Added quicktar.. # # Revision 3.8 1993/08/05 22:22:40 lindner # warning message for archive # # Revision 3.7 1993/07/27 05:32:28 lindner # added gophfilt and zip stuff # # Revision 3.6 1993/07/21 16:15:58 lindner # Added tags target, install for shared libraries # # Revision 3.5 1993/04/15 22:00:52 lindner # Move to looking for ui for WAIS stuff # # Revision 3.4 1993/03/18 23:11:15 lindner # 1.2b3 release # # Revision 3.3 1993/02/19 21:41:58 lindner # Fix to automatically copy Makefile.config.dist when making a distribution. # # Revision 3.2 1993/02/19 21:24:24 lindner # Mods for CVS # # Revision 3.1.1.1 1993/02/11 18:02:49 lindner # Gopher+1.2beta release # # Revision 1.3 1992/12/29 23:30:22 lindner # Removed all references to fanout and mindexd, it's in gopherd now.. # # Revision 1.2 1992/12/11 19:32:00 lindner # make tar now uses gnu tar, ignores RCS directorys and symbolic links # # Revision 1.1 1992/12/11 19:01:43 lindner # Gopher1.1 Release # #********************************************************************/ SHELL = /bin/sh @SET_MAKE@ all: objects client gopherfilter @echo "Welcome to Gopher" #### Start of system configuration section. #### srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ${srcdir}/configure: configure.in cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: stamp-h.in ${srcdir}/stamp-h.in: configure.in cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status ./config.status Makefile: Makefile.in config.status ./config.status config.status: configure ./config.status --recheck include Makefile.config client: gopher/gopher gopherfilter: gophfilt/gophfilt objects: object/libgopher.a # gopher is dependant on conf.h - (as are other things) gopher/gopher: object/libgopher.a conf.h $(srcdir)/gopher/*c $(srcdir)/gopher/*h @echo "Making client" (cd gopher; $(MAKE) $(MFLAGS) all) gophfilt/gophfilt: object/libgopher.a conf.h $(srcdir)/gophfilt/*c @echo "Making gophfilt" (cd gophfilt; $(MAKE) $(MFLAGS) all) object/libgopher.a: $(srcdir)/object/*c $(srcdir)/object/*h @echo "Making Objects" (cd object; $(MAKE) $(MFLAGS) all) install: (cd object; $(MAKE) $(MFLAGS) install); (cd gopher; $(MAKE) $(MFLAGS) install); (cd gophfilt; $(MAKE) $(MFLAGS) install); (cd doc; $(MAKE) $(MFLAGS) install) clean: (cd gopher; $(MAKE) $(MFLAGS) clean) (cd object; $(MAKE) $(MFLAGS) clean) (cd gophfilt; $(MAKE) $(MFLAGS) clean) (cd doc; $(MAKE) $(MFLAGS) clean) -rm -f "examples/Sample Directory/wais-index/index."* distclean: spotless -rm -f Makefile Makefile.config spotless: clean -rm -f config.log config.cache config.h config.status -rm -f object/Makefile gopher/Makefile -rm -f gopher/locales/Makefile doc/Makefile gophfilt/Makefile -rm -rf debian/stamp* -rm -rf debian/tmp -rm -f *~ archive: distclean -rm -f ir ui bin MANIFEST touch MANIFEST HERE=`basename $$PWD`; \ echo $$HERE ; \ cd .. ; \ find $$HERE -type f -print |grep -v '\.o$$' |grep -v '~$$' |grep -v 'CVS' >$$HERE/MANIFEST ; \ tar -T $$HERE/MANIFEST -czvf $$HERE.tar.gz ;\ rm -f $$HERE.zip ; \ egrep -v '^test' <$$HERE/MANIFEST | zip -@ $$HERE.zip @echo Built $$HERE.tar.gz and $$HERE.zip @echo "Did you remember to update the patchlevel.h Paul?..." @echo "Hmmm... Hmmmm...." quicktar: HERE=`basename $$PWD`; \ touch MANIFEST ; \ cd .. ; \ find $$HERE -type f -print |grep -v '.o$$' |grep -v '~$$' |grep -v 'CVS' >$$HERE/MANIFEST ; \ /usr/gnu/bin/tar -T $$HERE/MANIFEST -cZvf $$HERE.tar.Z ; tags: etags `find . -print | egrep '\.[ch]$$'` gopher-3.0.15/object/0000775000000000000000000000000012621233142011216 5ustar gopher-3.0.15/object/Stat.h0000664000000000000000000000177410762617110012320 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Stat.h,v $ * $Status: $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Stat.h * Portable method of getting struct stat and friends ********************************************************************* * Revision History: * $Log: Stat.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.1 1994/06/29 05:46:45 lindner * Portable stat.h file * * *********************************************************************/ #ifndef G_STAT_H #define G_STAT_H # ifdef VMS # include # else # include # endif #endif gopher-3.0.15/object/BLblock.h0000664000000000000000000000752310762617110012713 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2000/12/20 01:19:20 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/BLblock.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992,1993 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: BLblock.h * Header file and abstraction of a gopher+ block ********************************************************************* * Revision History: * $Log: BLblock.h,v $ * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.5 1995/09/26 05:16:30 lindner * more fixes... * * Revision 3.4 1995/09/25 22:07:16 lindner * Ansification * * Revision 3.3 1995/02/27 17:45:32 lindner * Use enums for block structures * * Revision 3.2 1993/03/26 19:50:41 lindner * Mitra fixes for better/clearer fromNet code * * Revision 3.1.1.1 1993/02/11 18:03:06 lindner * Gopher+1.2beta release * * Revision 1.1 1993/01/31 00:31:12 lindner * Initial revision * * *********************************************************************/ #ifndef BLBLOCK_H #define BLBLOCK_H #include "STRstring.h" #include "STAarray.h" #include "boolean.h" #include "util.h" /** Return Values for *fromNet() functions **/ #define SOFTERROR -1 #define HARDERROR -2 #define MORECOMING 1 #define FOUNDEOF 0 typedef struct block_struct Blockobj; typedef DynArray BlockArray; #include "GSgopherobj.h" /** The different types of blocks **/ enum blocktype { BLOCK_UNKNOWN =0, BLOCK_VIEW =1, BLOCK_ASK =2, BLOCK_ABSTRACT =3, BLOCK_ADMIN =4 }; typedef enum blocktype BlockType; /** The block data is a union, it can either be a filename or the ** actual data in a STRarray, or a gopher reference. **/ union BlockData_union { String *filename; StrArray *text; GopherObj *gs; }; typedef union BlockData_union BlockData; enum blockdatatype { BDATA_NONE =0, BDATA_FILE =1, BDATA_TEXT =2, BDATA_GREF =3 }; typedef enum blockdatatype BlockDataType; struct block_struct { BlockType btype; String *Blockname; BlockDataType datatype; BlockData data; }; /****** Macros/data access ********/ #define BLgetName(a) (STRget((a)->Blockname)) #define BLsetName(a,b) (STRset((a)->Blockname,(b))) #define BLgetBlocktype(a) (STRget((a)->btype)) #define BLsetBlocktype(a,b) (STRset((a)->btype,(b))) #define BLgetDatatype(a) ((a)->datatype) /**** Prototype declarations. ****/ Blockobj *BLnew(); void BLdestroy(Blockobj *bl); void BLinit(Blockobj *bl); void BLcpy(Blockobj *dest, Blockobj *orig); int BLgetNumLines(Blockobj *bl); void BLsetFile(Blockobj *bl, char *filename); void BLsetGref(Blockobj *bl, GopherObj *); void BLsetText(Blockobj *bl, StrArray *sta); char * BLgetLine(Blockobj *bl, int lineno); void BLtoNet(Blockobj *bl, int fd, boolean showheader); int BLfromNet(Blockobj *bl, int fd, char *blockname); int BLAsearch(BlockArray *bla, char *bname); void BLaddText(Blockobj *bl, char *text); /************************************************************* ** Define a dynamic block array **/ #include "DAarray.h" #define BLAnew(a) (DAnew((a),BLnew,BLinit,BLdestroy,BLcpy)) #define BLAinit(a) (DAinit((a))) #define BLAgetTop(a) (DAgetTop(a)) #define BLAgetEntry(a,b) (Blockobj*)(DAgetEntry(a,b)) #define BLApush(a,b) (DApush((DynArray*)(a),(char*)(b))) #define BLAdestroy(a) (DAdestroy(a)) #define BLAcpy(a,b) (DAcpy(a,b)) #endif gopher-3.0.15/object/util.h0000664000000000000000000000565210762617110012361 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/02/12 21:24:21 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/util.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: util.h * Header file for routines in util.c ********************************************************************* * Revision History: * $Log: util.h,v $ * Revision 1.5 2002/02/12 21:24:21 jgoerzen * Removed __USE_GNU -- it conflicted * * Revision 1.4 2002/02/12 21:22:56 jgoerzen * Added __USE_GNU def * * Revision 1.3 2002/02/12 21:20:14 jgoerzen * Made files using strcasecmp() include util.h * * Revision 1.2 2002/01/28 03:38:58 jgoerzen * Patches for FreeBSD: * * Test in configure for stdlib.h * * Include stdlib.h if it's available in Malloc.h * * Don't include malloc.h if it's missing in Malloc.h * * Don't include strcasestr if it's present in util.c and util.h * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.5 1995/09/25 22:07:26 lindner * Ansification * * Revision 3.4 1995/04/15 07:07:40 lindner * Add ControlC handling feature... * * Revision 3.3 1994/01/21 04:20:40 lindner * Better forward prototypes * * Revision 3.2 1993/03/18 22:28:46 lindner * Updated protos * * Revision 3.1.1.1 1993/02/11 18:03:06 lindner * Gopher+1.2beta release * * Revision 2.1 1992/12/21 19:43:15 lindner * Added prototype for skip_whitespace * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef __GOPHER_UTIL_H__ #define __GOPHER_UTIL_H__ #include #include "config.h" /* * Definitions of stuff in util.c */ int readn(int fd, char *ptr, int nbytes); int writen(int fd, char *ptr, int nbytes); int writestring(int, char*); int readrecvbuf(int sockfd, char *buf, int len); int readline(int fd, char *ptr, int maxlen); int readtoken(int fd, char *ptr, int maxlen, char zechar); int sreadword(char *input, char *output, int maxlen); void ZapCRLF(char * ); void Fromhexstr(char * , char *); void Tohexstr(char *input, char *output); void Hexall(char *input, char *output); #ifndef HAVE_STRCASESTR char *strcasestr(char *inputline, char *match); #endif char *skip_whitespace(char *); /* * Interrupt stuff */ #include "boolean.h" #include extern boolean ControlCpressed; extern jmp_buf Jmpenv; void controlc(int sig); void controlcJmp(int sig); int interruptable_read(int fd, char *ptr, int nbytes); int primeControlc(); void reprimeControlc(); #endif /* __GOPHER_UTIL_H__ */ gopher-3.0.15/object/Stdlib.h0000664000000000000000000000422210762617110012615 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2002/02/12 19:54:18 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Stdlib.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Stdlib.h * Include stdlib.h on systems that have it. ********************************************************************* * Revision History: * $Log: Stdlib.h,v $ * Revision 1.3 2002/02/12 19:54:18 jgoerzen * Updated with regex fixes * * Revision 1.2 2000/08/23 00:03:59 jgoerzen * Updates * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.6 1996/01/04 18:26:50 lindner * Updates for autoconf * * Revision 3.5 1994/04/07 17:26:26 lindner * Fix for pyramids * * Revision 3.4 1994/03/07 04:42:05 lindner * Add sys/types.h and compatible.h * * Revision 3.3 1993/07/07 19:28:04 lindner * Mods for SGIs * * Revision 3.2 1993/06/15 06:07:16 lindner * Mods for VMS * * Revision 3.1.1.1 1993/02/11 18:03:04 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef GSTDLIB_H #define GSTDLIB_H #include "compatible.h" /** These definitely need stdlib.h **/ #if defined(STDC_HEADERS) # ifndef sony_news /** Ack! sonynews is STDC but no stdlib! **/ # include # endif #else /** These definitely *don't* want stdlib.h **/ # if !defined(mips) && !defined(sequent) && !defined(n16) && !defined(NeXT) && !defined(ultrix) && !defined(UMAX43) && !defined(sony_news) && !defined(pyr) # include # endif #endif #if !defined(VMS) # include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_MALLOC_H #include #endif #include #endif #endif /* GSTDLIB_H */ gopher-3.0.15/object/Wait.h0000664000000000000000000000516610762617110012310 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Wait.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Wait.h * Routines that portably define waitpid() ********************************************************************* * Revision History: * $Log: Wait.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.10 1996/01/04 18:22:57 lindner * Updated for autoconf * * Revision 3.9 1995/02/06 22:10:13 lindner * Fix for systems without waitpid and wait3 * * Revision 3.8 1994/06/29 06:35:52 lindner * Add sequent to list of machines without waitpid() * Use POSIX macros if present (Coopersmith) * * Revision 3.7 1994/04/14 15:44:22 lindner * Add Gwaitstatus for VMS * * Revision 3.6 1994/04/08 19:15:46 lindner * Fix for old union wait stuff * * Revision 3.5 1994/03/08 03:23:23 lindner * Waitpid for vms * * Revision 3.4 1993/11/02 06:16:58 lindner * Fix for epix * * Revision 3.3 1993/07/20 23:19:41 lindner * Use waitpid, not wait3 * * Revision 3.2 1993/05/05 18:40:16 lindner * Solaris mods * * Revision 3.1.1.1 1993/02/11 18:03:04 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ /* * A header file to portably include the stuff for doing waitpid() etal */ #include "Stdlib.h" /* for pid_t */ #ifdef VMS # define NO_WAITPID_WAIT3 # include #endif #ifdef NO_WAITPID_WAIT3 # define Portawait int pid_t waitpid(); # define Gwaitstatus(a) (a) #else # include # include # include /** These don't know what waitpid() is.. Naughty! **/ # if !defined(HAVE_WAITPID) && defined(HAVE_WAIT3) typedef union wait Portawait; # define waitpid(a,b,c) wait3(b,c,NULL) # define Gwaitstatus(a) ((a).w_status) # else /*** Everything else mostly does.. ***/ typedef int Portawait; # if defined(WIFEXITED) && defined(WEXITSTATUS) && defined(WIFSIGNALED) && defined(WTERMSIG) # define Gwaitstatus(a) (WIFEXITED(a) ? WEXITSTATUS(a) : (WIFSIGNALED(a) ? WTERMSIG(a) : 0)) # else # define Gwaitstatus(a) (a) # endif # endif #endif /* VMS */ gopher-3.0.15/object/GDgopherdir.h0000664000000000000000000000651010762617110013574 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/GDgopherdir.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: GDgopherdir.h * Header file/abstraction of a gopher directory ********************************************************************* * Revision History: * $Log: GDgopherdir.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.7 1995/10/31 16:47:57 lindner * Switch to void+ pointer * * Revision 3.6 1995/09/25 22:07:17 lindner * Ansification * * Revision 3.5 1994/07/21 22:26:37 lindner * Alan's GDlocation stuff * * Revision 3.4 1994/01/21 04:47:20 lindner * Add function prototypes * * Revision 3.3 1994/01/10 03:29:07 lindner * New Method GDsetNumitems() * * Revision 3.2 1993/04/15 21:35:59 lindner * Changed protos * * Revision 3.1.1.1 1993/02/11 18:03:03 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef GDGOPHERDIR_H #define GDGOPHERDIR_H #include "GSgopherobj.h" #include "DAarray.h" /**************************************************************** ** A Gopher directory structure... ** Features dynamic growth among other things... ** *****************************************************************/ struct g_dir_struct { String *Title; GopherObj *Location; DynArray *Gophers; int currentitem; }; typedef struct g_dir_struct GopherDirObj; typedef struct g_dir_struct *GopherDirObjp; #define GDgetEntry(a,b) ((GopherObj *)(DAgetEntry((a)->Gophers,(b)))) #define GDgetTitle(a) (STRget((a)->Title)) #define GDsetTitle(a,b) (STRset((a)->Title,b)) #define GDgetLocation(a) ((a)->Location) #define GDgetNumitems(a) (DAgetNumitems((a)->Gophers)) #define GDsetNumitems(a,b) (DAsetTop((a)->Gophers,(b))) #define GDsetCurrentItem(a,b) ((a)->currentitem=b) #define GDgetCurrentItem(a) ((a)->currentitem) /*** Real live functions declared in GDgopherdir.c ***/ GopherDirObj *GDnew(int size); void GDdestroy(GopherDirObj *); void GDinit(GopherDirObj *); void GDsetLocation(GopherDirObj *gd, GopherObj *gs); void GDaddGS(GopherDirObj *gd, GopherObj *gs); void GDaddGSmerge(GopherDirObj *gd, GopherObj *gs); void GDsort(GopherDirObj *); void GDtoNet(GopherDirObj *gd, int sockfd, GSformat fmt, char *ticket, void (*prefcn)()); void GDplustoNet(GopherDirObj *gd, int sockfd, char **filter, char *ticket); void GDfromNet(GopherDirObj *gd, int sockfd, int (*eachitem)()); int GDplusfromNet(GopherDirObj *gd, int fd, int (*eachitem)()); void GDgrow(); void GDfromLink(GopherDirObj *, FileIO *, char *, int, char*, char*); void GDtoLink(GopherDirObj *gd, int fd); GopherDirObj *GDdeleteGS(GopherDirObj *gd, int j); int GDSearch(GopherDirObj *gd, char *text); #endif /* GDGOPHERDIR_H */ gopher-3.0.15/object/Locale.c0000664000000000000000000003227610762617110012600 0ustar /********************************************************************** * $Id: Locale.c,v 1.2 2001/01/17 21:16:35 jgoerzen Exp $ * * Paul Lindner, University of Minnesota DCS * * Copyright 1994 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************** * MODULE: Locale.c * These routines make using the international messages facilities easier. * * This interface could be applied to methods other than X/Open coding * (VMS etc..) ********************************************************************** * $Log: Locale.c,v $ * Revision 1.2 2001/01/17 21:16:35 jgoerzen * More psinrtf -> snprintf changes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.9 1994/12/05 22:44:42 lindner * Added VMS code from F. Macrides for specifying the default language * via the GOPHERMSGS_DEFAULT definition in conf.h, for when a series of * languages have been made available by setting the DCL logical * LC_MESSAGES to the * wildcard. * * Added code for specifying the device where shared images of message * files will be found, via the GOPHERMSGS_DEV definition in conf.h. * * Blocked potential ACCVIO's for VMSers who misunderstand how to set up * the messaging and do it wrong. * * Revision 3.8 1994/11/24 08:10:20 lindner * sundry compiler fixes * * Revision 3.7 1994/11/17 06:34:00 lindner * Fixes for VMS internationalization * * Revision 3.6 1994/08/19 16:27:51 lindner * Alan's mega-patch for Locale stuff * * Revision 3.5 1994/07/25 14:00:35 lindner * Add std comments * */ #include "Locale.h" #ifdef GINTERNATIONAL #include "Stdlib.h" #include "String.h" #include "DAarray.h" #include "STRstring.h" #include "fileio.h" #include nl_catd Gcatd = (nl_catd) -1; #ifdef NO_XPGCAT /** if we're not using the X/Open message catalogs, we have to keep track of the locale **/ String *msgLocale = NULL; #endif /* NO_XPGCAT */ /*************** DynArray of messages ***************/ typedef DynArray GtxtArray; GtxtArray *GtxtMsgs = (GtxtArray *) NULL; #define GtxtNew STRnew #define GtxtInit STRinit #define GtxtCopy STRcpy #define GtxtDestroy STRdestroy /*************** Public interfaces ***************/ char * Gtxt (defaultString, msgNumber) char *defaultString; int msgNumber; { String *msgString; if ( (Gcatd == (nl_catd) -1) ) return defaultString; if ( GtxtMsgs != NULL ) { if (DAgetNumitems(GtxtMsgs) < msgNumber) { DAgrow(GtxtMsgs, msgNumber); } msgString = (String *) DAgetEntry(GtxtMsgs, msgNumber - 1); #ifndef NO_XPGCAT if (STRlen(msgString) == 0) { STRset(msgString, catgets(Gcatd, NL_SETD, msgNumber, defaultString)); } #endif if (STRget(msgString) != NULL) return (STRget(msgString)); } #ifdef NO_XPGCAT return defaultString; #else return (catgets(Gcatd, NL_SETD, msgNumber, defaultString)); #endif } #ifdef flags #undef flags #endif nl_catd Gtxtopen (catname, flags) char *catname; int flags; /* not used */ { #ifdef NO_XPGCAT FileIO *fio = NULL; char quotechar = '\0'; char inputline[1024]; #endif /*NO_XPGCAT*/ if (GtxtMsgs != NULL) { DAdestroy(GtxtMsgs); } #ifdef NO_XPGCAT if (strchr(catname,'/') != NULL) { /* file path name */ fio = FIOopenUFS(catname, O_RDONLY, 0); } else if ( (msgLocale != NULL) && (STRlen(msgLocale) > 0) ) { snprintf(inputline, sizeof(inputline), "%s/%s.msg", LOCALEDIR, STRget(msgLocale)); fio = FIOopenUFS(inputline, O_RDONLY, 0); } if (fio != NULL) { GtxtMsgs = (GtxtArray *) DAnew(10, GtxtNew, GtxtInit, GtxtDestroy, GtxtCopy); if (GtxtMsgs == NULL) { FIOclose(fio); Gcatd = -1; return Gcatd; } while (FIOreadline(fio, inputline, sizeof(inputline))) { if (*inputline == '$') { if (strncmp(inputline + 1, "quote ", 6)==0) quotechar = *(inputline + 7); } else if (isdigit(*inputline)) { char *cp, *cp2; int msgNumber; msgNumber = atoi(inputline); if (msgNumber != 0) { if (quotechar != '\0') { cp = strchr(inputline, quotechar); if (cp != NULL) { cp2 = cp++; do { cp2 = strchr(cp2 + 1, quotechar); } while ((cp2 != NULL) && (*(cp2-1) == '\\')); if (cp2 != NULL) *cp2 = '\0'; } } else { cp = inputline; while (isdigit(*cp)) cp++; cp++; /* skip exactly one char after number */ cp2 = cp + strlen(cp); if (*cp2 == '\n') /* strip trailing return */ *cp2 = '\0'; } if (cp != NULL) { if (DAgetNumitems(GtxtMsgs) < msgNumber) { DAgrow(GtxtMsgs, msgNumber); } STRset((String *) DAgetEntry(GtxtMsgs, msgNumber - 1), cp); } } } } FIOclose(fio); Gcatd = 1; /* random positive number */ } else Gcatd = -1; #else Gcatd = catopen(catname, flags); if (Gcatd != (nl_catd) -1) { GtxtMsgs = (GtxtArray *) DAnew(10, GtxtNew, GtxtInit, GtxtDestroy, GtxtCopy); } #endif /* NO_XPGCAT */ return Gcatd; } #ifndef VMS char * Gtxtlocale(type, str) int type; char *str; { #ifdef NO_XPGCAT # ifdef LC_MESSAGES if ( (type == LC_ALL) || (type == LC_MESSAGES) ) { # else if (type == LC_ALL) { # endif if (*str == '\0') { /* load from LC_MESSAGES or LANG env var */ char *cp; cp = getenv("LC_MESSAGES"); if (cp == NULL) cp = getenv("LANG"); if (cp != NULL) { if (msgLocale == NULL) msgLocale = STRnew(); STRset(msgLocale, str); } } else { if (msgLocale == NULL) msgLocale = STRnew(); STRset(msgLocale, str); } } #endif /* NO_XPGCAT */ #ifndef NO_LOCALE return (setlocale(type,str)); #else if (msgLocale == NULL) return NULL; else return STRget(msgLocale); #endif /* NO_LOCALE */ } #else /* VMS */ #include "[-]conf.h" #include "GDgopherDir.h" #include "GSgopherObj.h" #include #include int GTXT_facility=0; char *GTXT_language; #ifndef GOPHERMSGS_DEFAULT #define GOPHERMSGS_DEFAULT "- none -" #endif /* GOPHERMSGS_DEFAULT */ #ifndef GOPHERMSGS_DEV #define GOPHERMSGS_DEV "GopherP_Dir:.EXE" #endif /* GOPHERMSGS_DEV */ extern GopherDirObj *setlocale_LangDir; /* ** Emulate catgets() by securing a VMS message */ char * catgets(junk1, junk2, code, msg_default) int junk1; int junk2; int code; char *msg_default; { struct dsc$descriptor_s buf_; static char buf[512]; int i; int x; /* Reconfigure code as VMS error condition */ code = (GTXT_facility<<16) + (code << 3) + 3; code |= 0x08008000; buf_.dsc$b_dtype = DSC$K_DTYPE_T; buf_.dsc$b_class = DSC$K_CLASS_S; buf_.dsc$a_pointer = buf; buf_.dsc$w_length = sizeof(buf); memset(buf,'\0',sizeof(buf)); i = 0; x = SYS$GETMSG(code, &i, &buf_, 1, 0); if ((x & 1) && (x != SS$_MSGNOTFND)) { buf[i] = '\0'; return(buf); } return(msg_default); } /* ** Emulate catopen() by locating and activating a VMS message file */ nl_catd catopen(char *filespec, int junk) { struct dsc$descriptor_s filespec_; struct dsc$descriptor_s symbol_; unsigned long value; int status; $DESCRIPTOR(image_,GOPHERMSGS_DEV); char *file; char *cp; filespec_.dsc$b_dtype = symbol_.dsc$b_dtype = DSC$K_DTYPE_T; filespec_.dsc$b_class = symbol_.dsc$b_class = DSC$K_CLASS_S; if ((cp=strstr(filespec, "GOPHER_MSG")) == NULL) return(SS$_IVLOGNAM); file = (char *)malloc(sizeof(char)*(strlen(cp)+1)); strcpy(file,cp); GTXT_language = strstr(file,"_MSG") + strlen("_MSG"); cp = strrchr(GTXT_language,'.'); if (cp) *cp = '\0'; symbol_.dsc$a_pointer = (char *)malloc(sizeof(char)*(strlen("GOPHER_LANG") +1+strlen(GTXT_language))); strcpy(symbol_.dsc$a_pointer,"GOPHER_LANG"); strcat(symbol_.dsc$a_pointer,GTXT_language); symbol_.dsc$w_length = strlen(symbol_.dsc$a_pointer); filespec_.dsc$a_pointer = file; filespec_.dsc$w_length = strlen(filespec_.dsc$a_pointer); status = LIB$FIND_IMAGE_SYMBOL(&filespec_,&symbol_,&value,&image_); free(symbol_.dsc$a_pointer); free(file); if (status == SS$_NORMAL) { GTXT_facility = value; return( (nl_catd) 1); } else return ( (nl_catd) -1 ); } /* ** This procedure secures the LC_MESSAGES logical or symbol or SYS$LANGUAGE ** system logical and inserts it into the GopherP_Dir:gopher_msg_%s.exe ** filespec. If not defined, "*" is inserted, triggering a wildcard search ** of message files. The filespec is then searched for, and for each ** matching filespec found, the message number 222 is retrieved and inserted ** into a menu list. If no menu list entries are retrieved, Gtxt() is ** disabled, causing the default message to be returned. If only one menu ** list entry is retrieved, the message file it came from is chosen as the ** process level message file and Gtxt() is enabled to read it. If more ** than one menu list entry is retrieved, the menu is offered to the user, ** and the choice they make is set as the process level message file and ** Gtxt() is enabled to read it. */ #include #include void rsetlocale(int facility) { Gcatd = (nl_catd) 1; GTXT_facility = facility; if (GtxtMsgs != NULL) DAdestroy(GtxtMsgs); GtxtMsgs = (GtxtArray *) DAnew(10, GtxtNew, GtxtInit, GtxtDestroy, GtxtCopy); } void setlocale(char *x, char *y) { int status; int defaultLang = -1; char fname[256], *cp; char command[256]; char iso_language[33]; GopherObj *tmpgs = NULL; static struct dsc$descriptor_s language_ = {0,DSC$K_DTYPE_T, DSC$K_CLASS_S,0}; static struct FAB wild_fab; static struct NAM wild_nam; static char fullname[256]; static char expanded[256]; static char result[256]; iso_language[0] = '\0'; if (getenv("LC_MESSAGES") != NULL) strcpy(iso_language,getenv("LC_MESSAGES")); else { /* Test SYS$LANGUAGE using LIB$GET_USERS_LANGUAGE() */ language_.dsc$w_length = sizeof(iso_language)-1; language_.dsc$a_pointer = iso_language; if (SS$_NORMAL == (status = LIB$GET_USERS_LANGUAGE(&language_))) iso_language[language_.dsc$w_length] = '\0'; else iso_language[0] = '\0'; } while (iso_language[0] != '\0' && iso_language[strlen(iso_language)-1] == ' ') iso_language[strlen(iso_language)-1] = '\0'; if (iso_language[0] == '\0') strcpy(iso_language,"*"); if ((cp=strchr(GOPHERMSGS_DEV, ':')) != NULL) { strcpy(fname, GOPHERMSGS_DEV); sprintf(cp=strchr(fname, ':'), ":gopher_msg_%s.exe", iso_language); } else { snprintf(fname, sizeof(fname), "GopherP_Dir:gopher_msg_%s.exe", iso_language); } /* Scan for fname; on a hit, activate the image and get menu message */ wild_fab = cc$rms_fab; wild_nam = cc$rms_nam; wild_fab.fab$b_fac = FAB$M_GET; wild_fab.fab$l_fop = FAB$V_NAM; wild_fab.fab$l_nam = &wild_nam; wild_fab.fab$l_dna = fname; wild_fab.fab$b_dns = strlen(wild_fab.fab$l_dna); wild_nam.nam$l_esa = expanded; wild_nam.nam$l_rsa = result; wild_nam.nam$b_ess = wild_nam.nam$b_rss = 255; wild_fab.fab$l_fna = fullname; wild_fab.fab$b_fns = fullname[0] = expanded[0] = result[0] = 0; if ((status = SYS$PARSE(&wild_fab)) != RMS$_NORMAL) return; /* The while loop will hang if wild_fab is invalid */ Gcatd = (nl_catd) 1; /* Always try to get the msg here. */ while (status!=RMS$_NMF && status!=RMS$_FNF) { if ((( status = SYS$SEARCH(&wild_fab)) &1) != 1) continue; result[wild_nam.nam$b_rsl] = '\0'; if ((nl_catd)1 != catopen(result,0)) continue; strcpy(command,Gtxt("",232)); if (strlen(command)) { /* An available language */ if (setlocale_LangDir == NULL) { setlocale_LangDir = GDnew(32); /* 1st language */ GDsetTitle(setlocale_LangDir,""); } tmpgs = GSnew(); /* Store language menu item */ GSsetTitle(tmpgs, command); strcpy(command+1,result); GSsetType(tmpgs, command[0] = A_LANGUAGE); GSsetPath(tmpgs, command); GSsetHost(tmpgs,"0.0.0.0"); GSsetPort(tmpgs,GTXT_facility); GDaddGS(setlocale_LangDir, tmpgs); GSdestroy(tmpgs); if (strcmp(GTXT_language+1,GOPHERMSGS_DEFAULT)==0) { defaultLang = GDgetNumitems(setlocale_LangDir) - 1; } } } Gcatd = (nl_catd) -1; /* By default, never bother trying a message file */ if (setlocale_LangDir) { /* We have one or more available languages */ if (GDgetNumitems(setlocale_LangDir)==1) { status = 0; /* Only one choice */ rsetlocale(GSgetPort(GDgetEntry(setlocale_LangDir,0))); GDdestroy(setlocale_LangDir); setlocale_LangDir = NULL; } else if (defaultLang != -1) /* No choice for now. */ rsetlocale(GSgetPort(GDgetEntry(setlocale_LangDir,defaultLang))); else { /* Two or more choices. */ status = setlocale_screen(); rsetlocale(GSgetPort(GDgetEntry(setlocale_LangDir,status))); } } } void Gtxtlocale(a,b) char *a, *b; { setlocale(a,b); } #endif /* VMS */ #endif /* GINTERNATIONAL */ gopher-3.0.15/object/Malloc.h0000664000000000000000000000541710762617110012612 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2002/01/28 03:38:58 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Malloc.h,v $ * $Status: $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Malloc.h * Portable method of getting malloc definitions ********************************************************************* * Revision History: * $Log: Malloc.h,v $ * Revision 1.3 2002/01/28 03:38:58 jgoerzen * Patches for FreeBSD: * * Test in configure for stdlib.h * * Include stdlib.h if it's available in Malloc.h * * Don't include malloc.h if it's missing in Malloc.h * * Don't include strcasestr if it's present in util.c and util.h * * Revision 1.2 2000/08/23 00:03:59 jgoerzen * Updates * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.9 1996/01/04 18:25:38 lindner * Updates for autoconf * * Revision 3.8 1995/06/30 20:30:01 lindner * NewMEM define * * Revision 3.7 1994/06/29 06:37:55 lindner * ... * * Revision 3.6 1994/06/29 05:44:17 lindner * Make sure to only include malloc.h once * * Revision 3.5 1994/05/24 05:42:17 lindner * Fix for old field version of DECC * * Revision 3.4 1994/05/19 14:25:24 lindner * faster VMS VAXC malloc * * Revision 3.3 1993/10/19 20:46:35 lindner * use stdio.h in Malloc.h to get NULL if necessary * * Revision 3.2 1993/10/11 17:23:32 lindner * Better malloc fix for systems without NULL * * Revision 3.1.1.1 1993/02/11 18:03:03 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef G_MALLOC_H #define G_MALLOC_H /* * Just enough to get us memory allocation and NULL * * Ick, portable code is ugly! */ #include "Stdlib.h" #ifdef HAVE_MALLOC_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Usually can get NULL from stdio.h */ #ifndef NULL #include #endif /* Punt! */ #ifndef NULL #define NULL ((void*) 0) #endif #ifdef HAVE_MALLOC_H # include #endif /* memory management for VAXC */ #if defined(VMS) && defined(VAXC) && !defined(__DECC) # include # define malloc VAXC$MALLOC_OPT # define calloc VAXC$CALLOC_OPT # define free VAXC$FREE_OPT # define cfree VAXC$CFREE_OPT # define realloc VAXC$REALLOC_OPT #endif /* VMS and VAXC */ #define NewMEM(a) ((a*)malloc(sizeof(a))) #endif /* G_MALLOC_H */ gopher-3.0.15/object/fileio.c0000664000000000000000000004567010762617110012652 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2000/12/20 01:19:20 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/fileio.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 92, 93, 94 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: fileio.c * Socket/file input output routines. ********************************************************************* * Revision History: * $Log: fileio.c,v $ * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.41 1996/01/04 18:25:12 lindner * Updates for autoconf * * Revision 3.40 1995/11/03 18:01:28 lindner * Fix for waitpid stuff * * Revision 3.39 1995/09/25 22:07:23 lindner * Ansification * * Revision 3.38 1995/06/12 15:32:41 lindner * Close correct file descriptor * * Revision 3.37 1995/06/08 05:17:54 lindner * From Fote: Deal with UCX's funny EPIPE return value on EOF * immediately after each socket_read(). * * Ensure that file is closed on fstat() error in FIOopenUFS() * * Revision 3.36 1995/04/15 06:53:39 lindner * Different way of returning errors * * Revision 3.35 1995/03/09 05:28:19 lindner * Insure files get closed in FIO routines * * Revision 3.34 1995/02/27 17:45:52 lindner * Fix for sco * * Revision 3.33 1995/01/02 21:09:46 lindner * Fix for UCX menu ordering * * Revision 3.32 1994/12/20 17:09:46 lindner * Fix for binary file retrievals * * Revision 3.31 1994/12/03 02:14:13 lindner * Correct fix for waitpid() code * * Revision 3.30 1994/12/02 00:37:05 lindner * Fix for mail and misc process execution * * Revision 3.29 1994/12/01 00:30:13 lindner * Remove EINTR wait for FIOwaitpid.. sigh.. * * Revision 3.28 1994/11/29 06:30:04 lindner * Make waitpid keep going after an interrupted system call * * Revision 3.27 1994/11/29 04:59:38 lindner * Fix for broken shell scripts with Shell Index type * * Revision 3.26 1994/10/21 02:42:47 lindner * fix for 0 length files * * Revision 3.25 1994/10/19 03:33:57 lindner * Fix nasty bug, combine more code... * * Revision 3.24 1994/10/13 05:26:16 lindner * Compiler complaint fixes * * Revision 3.23 1994/09/29 19:54:57 lindner * Routines to use memory mapped I/O * * Revision 3.22 1994/07/21 22:19:37 lindner * Add filename new and change debug msg * * Revision 3.21 1994/06/29 06:43:04 lindner * Remove VMS message about reversed values, initialize filename * * Revision 3.20 1994/05/25 20:57:20 lindner * Fix for piped play commands * * Revision 3.19 1994/04/25 03:44:42 lindner * Don't block empty FIOsystem() command on VMS. That's what's used for * the '!' or '$' commands, and they've already be checked for permission * in Gopher.c. * * Reversed DCLsystem() return values in CURCurses.c, and eliminated the * reversing kludge in FIOsystem(). * * Fixed break of open() for Alpha. (all From F.Macrides) * * Revision 3.18 1994/04/25 03:37:00 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.17 1994/04/25 02:18:46 lindner * Fix for gcc-Wall * * Revision 3.16 1994/04/14 18:14:49 lindner * Fix for closing null files * * Revision 3.15 1994/04/14 15:44:55 lindner * Remove duplicate variable * * Revision 3.14 1994/04/08 21:07:34 lindner * Put back a variable * * Revision 3.13 1994/04/08 20:05:57 lindner * gcc -Wall fixes * * Revision 3.12 1994/04/08 19:15:47 lindner * Fix for old union wait stuff * * Revision 3.11 1994/04/07 22:51:24 lindner * Fix for typecast * * Revision 3.10 1994/04/01 04:43:31 lindner * Fixes for memory leak in argv, and exit status * * Revision 3.9 1994/03/30 21:37:48 lindner * Fix for AIX that doesn't #define unix.. * * Revision 3.8 1994/03/11 00:10:52 lindner * Fix for FIOopenUFS() * * Revision 3.7 1994/03/09 16:57:56 lindner * Fix for other vms system() call * * Revision 3.6 1994/03/09 02:11:49 lindner * Use DCLsystem for VMS * * Revision 3.5 1994/03/08 17:23:17 lindner * Fix for return vals * * Revision 3.4 1994/03/08 06:17:15 lindner * Nuke compiler warnings * * Revision 3.3 1994/03/08 03:22:39 lindner * Additions for process management * * Revision 3.2 1994/03/04 17:43:36 lindner * Fix for weird error * * Revision 3.1 1994/02/20 16:20:48 lindner * New object based versions of buffered io routines * * *********************************************************************/ #include "fileio.h" #include "Malloc.h" #include #include "Debug.h" #include "Wait.h" #include "String.h" #include "Stdlib.h" #include "compatible.h" #ifdef VMS # include #else # include #endif #ifdef MMAP_IO # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif static char ** FIOgetargv(char *cmd); /* * Cache of used fios */ static FileIO* FIOusedfios[FIOMAXOFILES]; static int FIOnumusedfios = -1; /* * Pop a recently used item. */ static FileIO *FIOpopUsedfio() { if (FIOnumusedfios > 0) { return(FIOusedfios[--FIOnumusedfios]); } else return(NULL); } /* * Push an item on our recently used stack. */ static boolean FIOpushUsedfio(FileIO *oldfio) { if (FIOnumusedfios < FIOMAXOFILES) { FIOusedfios[FIOnumusedfios++] = oldfio; return(0); } else return(-1); } static FileIO * FIOnew() { FileIO *temp; if (FIOnumusedfios == -1) { int i; /* Initialize the usedfios struct the first time through */ for (i=0; i < FIOMAXOFILES; i++) { FIOusedfios[i] = NULL; } FIOnumusedfios=0; } temp = FIOpopUsedfio(); if (temp == NULL) { temp = (FileIO *) malloc(sizeof(FileIO)); temp->filename = STRnew(); } else { STRinit(temp->filename); } temp->issocket = -1; temp->pid = -1; temp->fd = (pid_t) -1; temp->buf = NULL; temp->bufindex = -1; temp->bufdatasize = -1; temp->filename = STRnew(); return(temp); } /* * Should only be called by FIOclose* functions really.. */ void FIOdestroy(FileIO *fio) { if (FIOpushUsedfio(fio)) { /** No space in cache. **/ free(fio); } } /* * Open a file, initialize data structures. */ FileIO * FIOopenUFS(char *fname, int flags, int mode) { int fd; FileIO *fio; struct stat buf; if (fname == NULL) return(NULL); /* Okay, try and open up the file */ fd = open(fname, flags, mode ); if (fd < 0) return(NULL); /* Couldn't open file */ if (fstat(fd, &buf)) { close(fd); return(NULL); /* Couldn't open anything */ } fio = FIOnew(); FIOsetSocket(fio, FALSE); FIOsetFilename(fio, fname); FIOsetfd(fio,fd); return(fio); } /* * Start FIO routines on an already open file descriptor */ FileIO* FIOopenfd(int fd, boolean issocket) { FileIO *fio; fio = FIOnew(); FIOsetfd(fio, fd); FIOsetSocket(fio, issocket); return(fio); } FileIO* FIOopenProcess(char *prog, char **args, char *rw) { int pfd[2]; int pid; FileIO *fio; if (prog == NULL) return(NULL); fio = FIOnew(); dup(0); /*** Arghh!! pipe doesn't work right when all fds are closed! */ if (pipe(pfd) < 0) return(NULL); switch (pid = vfork()) { case -1: /* Error */ (void) close(pfd[0]); (void) close(pfd[1]); break; case 0: /* Child */ if (rw == NULL || *rw == '\0') { /** mimic system(), don't do anything **/ (void) close(pfd[0]); (void) close(pfd[1]); } else if (*rw == 'r') { if (pfd[1] != 1) { dup2(pfd[1], 1); (void) close(pfd[1]); } (void) close(pfd[0]); } else { if (pfd[0] != 0) { dup2(pfd[0], 0); (void) close(pfd[0]); } (void) close(pfd[1]); } #ifdef VMS execv(prog, args); #else /** Unix **/ if (*prog == '/') execv(prog, args); else execvp(prog, args); /* search the path for the command */ #endif _exit(1); } /* parent.. */ if (rw == NULL || *rw == '\0') { /** Don't do anything, mimic system() **/ FIOsetfd(fio, -1); (void) close(pfd[0]); (void) close(pfd[1]); } else if (*rw == 'r') { FIOsetfd(fio, pfd[0]); (void) close(pfd[1]); } else { FIOsetfd(fio, pfd[1]); (void) close(pfd[0]); } FIOsetPid(fio, pid); FIOsetSocket(fio, FALSE); return(fio); } /* * Close a file/socket/process */ int FIOclose(FileIO *fio) { int result; if (fio == NULL) return(0); if (FIOgetPid(fio) >= 0) { close(FIOgetfd(fio)); result = FIOwaitpid(fio); FIOdestroy(fio); return(result); } #ifdef MMAP_IO /** Unmap memory mapped I/O stuff here.. **/ if (FIOgetFilename(fio) != NULL && fio->buf != NULL) munmap(fio->buf, FIOgetBufDsize(fio)); #endif result = FIOisSocket(fio) ? socket_close(FIOgetfd(fio)) : close(FIOgetfd(fio)); FIOdestroy(fio); return(result); } /* * A portable waitpid fcn that returns the exit value of the child process * * Should be better about stopped and signaled processes.... */ int FIOwaitpid(FileIO *fio) { Portawait status; pid_t result; do { errno = 0; result = waitpid(FIOgetPid(fio), &status, 0); } while (result != FIOgetPid(fio) && (errno == ECHILD)); return(Gwaitstatus(status) & 0xf); } /* * write n bytes to an fd.. * * returns -1 on error. */ int FIOwriten(FileIO *fio, char *ptr, int nbytes) { int nleft, nwritten; int fd = FIOgetfd(fio); nleft = nbytes; while(nleft > 0) { nwritten = FIOisSocket(fio) ? socket_write(fd, ptr, nleft) : write(fd, ptr, nleft); if (nwritten <= 0) return(nwritten); /* error */ nleft -= nwritten; ptr += nwritten; } return(nbytes - nleft); } /* * write a string to a FileDescriptor, eventually buffer outgoing input * * If write fails a -1 is returned. Otherwise zero is returned. */ int FIOwritestring(FileIO *fio, char *str) { int length; Debug("writing: %s\n",str); if (str == NULL) return(0); length = strlen(str); if (FIOwriten(fio, str, length) != length) { Debugmsg("writestring: writen failed\n"); return(-1); } else return(0); } #ifdef MMAP_IO static int FIOreadbuf_mmap(FileIO *fio, char *newbuf, int newbuflen) { struct stat buf; char *bytes; if (FIOgetFilename(fio) != NULL) { /** Do MMAP IO if we can... **/ if (fio->buf == NULL) { if (fstat(FIOgetfd(fio), &buf)) { close(FIOgetfd(fio)); return(-1); } if (buf.st_size == 0) return(0); FIOsetBufDsize(fio, buf.st_size); FIOsetBufIndex(fio, 0); bytes = mmap(0, buf.st_size, PROT_READ, MAP_SHARED | MAP_FILE, FIOgetfd(fio), 0); #ifdef HAVE_MADVISE madvise(bytes, buf.st_size, MADV_SEQUENTIAL); #endif if (bytes == (caddr_t) -1) return(-1); fio->buf = bytes; } if (FIOgetBufIndex(fio) == -1) return(0); /** Okay, lets return some data... **/ if (FIOgetBufIndex(fio) >= FIOgetBufDsize(fio)) return(0); if ((FIOgetBufIndex(fio) + newbuflen) > FIOgetBufDsize(fio)) { newbuflen = FIOgetBufDsize(fio) - FIOgetBufIndex(fio); } memcpy(newbuf, fio->buf+FIOgetBufIndex(fio), newbuflen); FIOsetBufIndex(fio, FIOgetBufIndex(fio) + newbuflen); return(newbuflen); } /** This is an error condition **/ return(-1); } #endif /* * Read through a buffer, more efficient for character at a time * processing. Not so good for block binary transfers */ int FIOreadbuf(FileIO *fio, char *newbuf, int newbuflen) { int len; int fd = FIOgetfd(fio); char *recvbuf; int bytesread = 0; #ifdef MMAP_IO if (FIOisMMAPable(fio)) { return(FIOreadbuf_mmap(fio,newbuf, newbuflen)); } #endif if (FIOgetBufIndex(fio) == -1) { if (fio->buf == NULL) fio->buf = (char *) malloc(sizeof(char) * FIOBUFSIZE); len = FIOisSocket(fio) ? socket_read(fd, fio->buf, FIOBUFSIZE) : read(fd, fio->buf, FIOBUFSIZE); #if defined(FIO_NOMULTIEOF) if (len < 0 && errno == EPIPE) { /** EOF **/ FIOsetBufIndex(fio,-1); return(0); } #endif FIOsetBufDsize(fio, len); FIOsetBufIndex(fio, 0); if (len == 0) { FIOsetBufIndex(fio,-1); return(bytesread); /** EOF **/ } } recvbuf = fio->buf; while (newbuflen--) { *newbuf++ = recvbuf[FIOgetBufIndex(fio)++]; bytesread++; if (FIOgetBufIndex(fio) == FIOgetBufDsize(fio) && newbuflen != 0) { /** Read another buffer **/ len = FIOisSocket(fio) ? socket_read(fd, fio->buf, FIOBUFSIZE) : read(fd, fio->buf, FIOBUFSIZE); #if defined(FIO_NOMULTIEOF) if (len < 0 && errno == EPIPE) { /** EOF **/ len = 0; errno = 0; } #endif if (len == 0) { FIOsetBufIndex(fio,-1); return(bytesread); /** EOF **/ } if (len < 0) return(len); /** Error **/ FIOsetBufDsize(fio, len); FIOsetBufIndex(fio, 0); } else if (FIOgetBufIndex(fio) >= FIOgetBufDsize(fio)) /* Read a new buffer next time through */ FIOsetBufIndex(fio, -1); } return(bytesread); } /* Read 'n' bytes from a descriptor, non buffered direct into the storage. */ int FIOreadn(FileIO *fio, char *ptr, int nbytes) { int nleft, nread; int fd = FIOgetfd(fio); nleft = nbytes; while (nleft > 0) { nread = FIOisSocket(fio) ? socket_read(fd, ptr, nleft) : read(fd, ptr, nleft); #if defined(FIO_NOMULTIEOF) if (nread < 0 && errno == EPIPE) { /** EOF **/ nread = 0; errno = 0; } #endif if (nread < 0) return(nread); /* error, return < 0 */ else if (nread == 0) /* EOF */ break; nleft -= nread; ptr += nread; } return(nbytes - nleft); } /* * Read a line from the file/socket, Read the line one byte at a time, * looking for the newline. We store the newline in the buffer, * then follow it with a null (the same as fgets(3)). * We return the number of characters up to, but not including, * the null (the same as strlen(3)) */ int FIOreadline(FileIO *fio, char *ptr, int maxlen) { int bytesread; int rc; char c; for (bytesread=1; bytesread < maxlen; bytesread++) { if ( (rc = FIOreadbuf(fio, &c, 1)) == 1) { *ptr++ = c; if (c == '\n') break; } else if (rc == 0) { if (bytesread == 1) return(0); /* EOF, no data read */ else break; /* EOF, some data was read */ } else return(rc); /* error */ } *ptr = 0; /* Tack a NULL on the end */ Debug("FIOreadline: %s\n", (ptr-bytesread)); return(bytesread); } /* * This does the same as readline, except that all newlines and * carriage returns are automatically zapped. * * More efficient than doing a readline and a ZapCRLF */ int FIOreadlinezap(FileIO *fio, char *ptr, int maxlen) { int len; len = FIOreadtoken(fio, ptr, maxlen, '\n'); ptr += len; ptr --; if (len && *ptr == '\r') { ptr[len] = '\0'; len--; } return(len); } /* * Read a line from the file/socket, Read the line one byte at a time, * looking for the token. We nuke the token from the returned string. * We return the number of characters up to, but not including, * the null (the same as strlen(3)) */ int FIOreadtoken(FileIO *fio, char *ptr, int maxlen, char zechar) { int bytesread; int rc; char c; for (bytesread=1; bytesread < maxlen; bytesread++) { rc = FIOreadbuf(fio, &c, 1); if (rc == 1) { *ptr++ = c; if (c == zechar) { *(ptr - 1) = '\0'; break; } } else if (rc == 0) { if (bytesread == 1) return(0); /* EOF, no data read */ else break; /* EOF, some data was read */ } else return(rc); /* error */ } *ptr = 0; /* Tack a NULL on the end */ Debug("readtoken: %s\n", (ptr-bytesread)); return(bytesread); } static int FIOexecv(char *prog, char **args) { FileIO *fio; int result; #ifdef VMS int i = 0; char buffer[1024]; /* DCL hog heaven */ strcpy(buffer, prog); strcat(buffer, " "); while (i++) { if (args[i] == NULL) break; strcat(buffer, args[i]); strcat(buffer, " "); } result = DCLsystem(buffer); #else fio = FIOopenProcess(prog, args, NULL); result = FIOclose(fio); #endif /* VMS */ return(result); } /* * Do the minimal shell/dcl processing */ static char ** FIOgetargv(char *cmd) { int inquote = 0; int insquote = 0; int i; static char *argv[256]; /* Sufficient for now.. */ int argc = 0; char buf[256]; char *cp = buf; if (cmd == NULL || strlen(cmd) >= 245) return(NULL); for (i=0; cmd[i] != '\0'; i++) { switch (cmd[i]) { case ' ': case '\t': /* Separators */ if (insquote || inquote) { *cp = cmd[i]; cp++; break; } else { *cp = '\0'; argv[argc++] = strdup(buf); cp = buf; /** Get rid of any other whitespace **/ while (cmd[i+1] == ' ' || cmd[i+1] == '\t') i++; } break; case '"': if (!insquote) inquote = 1-inquote; break; case '\'': if (!inquote) insquote = 1-insquote; break; case '\\': /* Quote next character if not in quotes */ if (insquote || inquote) { *cp = cmd[i]; cp++; } else { *cp = cmd[i+1]; cp++; i++; } break; default: *cp = cmd[i]; cp++; break; } } if (buf != cp) { *cp = '\0'; argv[argc++] = strdup(buf); } argv[argc] = NULL; return(argv); } /* * An emulation of the system() call without the shell * returns the exit status of the child */ int FIOsystem(char *cmd) { char **argv; int result, i; #ifdef VMS return(DCLsystem(cmd)); #else if (cmd == NULL || *cmd == '\0') return(-1); argv = FIOgetargv(cmd); result = FIOexecv(argv[0], argv); for (i=0; argv[i] != NULL; i++) free(argv[i]); return(result); #endif } /* * Similar to popen... */ FileIO *FIOopenCmdline(char *cmd, char *rw) { char **argv; FileIO *fio; if (cmd == NULL) return(NULL); if (*cmd == '|') cmd++; argv = FIOgetargv(cmd); fio = FIOopenProcess(argv[0], argv, rw); return(fio); } gopher-3.0.15/object/fileio.h0000664000000000000000000001221110762617110012640 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2000/12/20 01:19:20 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/fileio.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 92, 93, 94 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: fileio.h * Abstration of socket/file input output routines. ********************************************************************* * Revision History: * $Log: fileio.h,v $ * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.16 1996/01/04 18:25:00 lindner * Updates for autoconf * * Revision 3.15 1995/09/25 22:07:24 lindner * Ansification * * Revision 3.14 1995/04/15 06:51:18 lindner * Use interruptable_read * * Revision 3.13 1995/02/06 22:12:52 lindner * Smaller max for fileio structs * * Revision 3.12 1994/10/18 21:39:06 lindner * NeXT doesn't have mmap * * Revision 3.11 1994/09/29 19:54:24 lindner * Add definition for Memory mapped I/O * * Revision 3.10 1994/08/19 16:29:37 lindner * Add definition for memory mapped I/O * * Revision 3.9 1994/07/21 17:30:44 lindner * Mods for Xenix * * Revision 3.8 1994/04/25 03:40:07 lindner * VMS socket stuff still wasn't working.. * * Revision 3.7 1994/04/22 06:42:02 lindner * better compatibility checking * * Revision 3.6 1994/04/13 04:28:23 lindner * add vms compatible.h * * Revision 3.5 1994/04/01 04:43:55 lindner * fixes for VMS includes * * Revision 3.4 1994/03/17 04:36:32 lindner * Fix for UCX * * Revision 3.3 1994/03/11 00:09:14 lindner * Fix for UCX * * Revision 3.2 1994/03/08 03:21:18 lindner * Mods for opening processes without sh * * Revision 3.1 1994/02/20 16:20:50 lindner * New object based versions of buffered io routines * * *********************************************************************/ #ifndef FILEIO_H #define FILEIO_H #include "STRstring.h" #include "boolean.h" #include "Stdlib.h" #include "util.h" #ifdef VMS # include # include # include #else # ifdef M_XENIX # include # include # include # else # include # endif #endif /* VMS */ #include "compatible.h" struct fileio_struct { int bufindex; int bufdatasize; int bytepos; char *buf; boolean issocket; String *filename; int fd; pid_t pid; }; typedef struct fileio_struct FileIO; #define FIOBUFSIZE 4096 #define FIOMAXOFILES 64 #define FIOisSocket(a) ((a)->issocket) #define FIOgetPid(a) ((a)->pid) #define FIOgetfd(a) ((a)->fd) #define FIOgetFilename(a) (STRget((a)->filename)) #define FIOgetBufIndex(a) ((a)->bufindex) #define FIOgetBufDsize(a) ((a)->bufdatasize) #define FIOsetfd(a,b) ((a)->fd=(b)) #define FIOsetPid(a,b) ((a)->pid=(b)) #define FIOsetSocket(a,b) ((a)->issocket=(b)) #define FIOsetFilename(a,b) (STRset((a)->filename,(b))) #define FIOsetBufIndex(a,b) ((a)->bufindex = (b)) #define FIOsetBufDsize(a,b) ((a)->bufdatasize = (b)) #define FIOisMMAPable(a) (FIOgetFilename(a) != NULL) /* * Optionally use BSD memory mapped I/O */ #if defined(HAVE_MMAP) # define MMAP_IO #endif /* * More elegant way of doing socket writes than ifdefs everywhere */ #if defined(VMS) int DCLsystem(/* char */); # define system(a) DCLsystem(a) /** Note that Multinet already has socket_* **/ # if defined(WOLLONGONG) || defined(CMUIP) || defined(NETLIB) # define socket_write netwrite # define socket_read netread # define socket_close netclose # endif # if defined(UCX) # define socket_write write # define socket_read read # define socket_close close # endif /** Note that Wollongong is like Multinet for EPIPE handling **/ # if defined(UCX) || defined(CMUIP) || defined(NETLIB) # define FIO_NOMULTIEOF # endif #else /* Unix systems */ # define socket_write write # define socket_read interruptable_read # define socket_close close #endif /** Forward Declarations **/ FileIO *FIOopenUFS(char *fname, int flags, int mode); FileIO *FIOopenfd(int fd, int issocket); FileIO *FIOopenProcess(char *prog, char **args, char *rw); FileIO *FIOopenCmdline(char *cmd, char *rw); int FIOclose(FileIO *fio); int FIOwriten(FileIO *fio, char *ptr, int nbytes); int FIOwritestring(FileIO *, char *); int FIOreadbuf(FileIO *fio, char *newbuf, int newbuflen); int FIOreadn(FileIO *fio, char *ptr, int nbytes); int FIOreadline(FileIO *fio, char *ptr, int maxlen); int FIOreadlinezap(FileIO *fio, char *ptr, int maxlen); int FIOreadtoken(FileIO *fio, char *ptr, int maxlen, char zechar); int FIOwaitpid(FileIO *fio); int FIOsystem(char *cmd); void FIOdestroy(FileIO *fio); #endif gopher-3.0.15/object/DAarray.h0000664000000000000000000000332510762617110012722 0ustar /******************************************************************** * lindner * 3.1.1.1 * 1993/02/11 18:03:06 * /home/mudhoney/GopherSrc/CVS/gopher+/object/DAarray.h,v * Exp * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: DAarray.h * Dynamic Array Header file/abstraction ********************************************************************* * Revision History: * DAarray.h,v * Revision 3.1.1.1 1993/02/11 18:03:06 lindner * Gopher+1.2beta release * * Revision 1.2 1992/12/21 20:04:04 lindner * Added DAcpy() * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef DAARRAY_H #define DAARRAY_H /* * A dynamic array class */ struct da_struct { char **objects; /** Should be void** perhaps */ int Top; int maxsize; char * (*newfn)(); void (*initfn)(); void (*destroyfn)(); char * (*copyfn)(); }; typedef struct da_struct DynArray; #define DAgetEntry(a,b) (((a)->objects[b])) #define DAgetTop(a) ((a)->Top) #define DAsetTop(a,b) ((a)->Top=(b)) #define DAgetNumitems(a) ((a)->Top) DynArray *DAnew(); void DAdestroy(DynArray *da); void DAinit(DynArray *da); void DApush(DynArray *da, char *obj); char * DApop(DynArray *da); void DAsort(DynArray *da, int (*sortfn)()); void DAgrow(DynArray *da, int size); void DAsort(DynArray *da, int (*sortfn)()); void DAcpy(DynArray *dest, DynArray *orig); #endif gopher-3.0.15/object/RBTree.h0000664000000000000000000000521310762617110012520 0ustar /********************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/RBTree.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1995 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: RBTree.h * Definition of a Red-Black balanced tree container. ********************************************************************* * Revision History: * $Log: RBTree.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.2 1995/10/31 16:48:21 lindner * Better readability, fix bugs.. * * Revision 3.1 1995/06/30 20:31:04 lindner * New red-black tree code * **********************************************************************/ #include "boolean.h" enum direction {LEFT, RIGHT, NOWHERE }; enum nodecolor {RED, BLACK}; typedef enum direction direction; typedef enum nodecolor nodecolor; struct RBTree_node_struct { char *data; struct RBTree_node_struct *l_child; struct RBTree_node_struct *r_child; nodecolor rb_right; nodecolor rb_left; direction last_pass; }; typedef struct RBTree_node_struct RBTree_node; #define RBTsetRBright(a,v) ((a)->rb_right=(v)) /* Sets ptr to black or Red */ #define RBTsetRBleft(a,v) ((a)->rb_left=(v)) #define RBTgetRBright(a) ((a)->rb_right) #define RBTgetRBleft(a) ((a)->rb_left) #define RBTgetDirection(a) ((a)->last_pass) #define RBTsetDirection(a,v) ((a)->last_pass=(v)) #define RBTattachLeftNode(a,v) ((a)->l_child = (v)) #define RBTattachRightNode(a,v) ((a)->r_child = (v)) #define RBTgetRight(a) ((a)->r_child) #define RBTgetLeft(a) ((a)->l_child) #define RBTaddData(a,v) ((a)->data=(v)) #define RBTgetData(a) ((a)->data) /**********************************************************************/ struct RBTree_struct { RBTree_node *entry; int (*cmpfn)(); void (*initfn)(); void (*destroyfn)(); char * (*copyfn)(); }; typedef struct RBTree_struct RBTree; /*** For the top level tree structure ***/ #define RBTsetEntry(a,v) ((a)->entry = (v)) #define RBTgetEntry(a) ((a)->entry) #define RBTcmp(a,b,c) ((a)->cmpfn(b,c)) #define RBTdestroyfcn(a,b) ((a)->destroyfn(RBTgetData(b))) RBTree *RBTnew(); void RBTdestroy(RBTree *rbt); void RBTtraverse(RBTree *rbt, void (*func)()); char *RBTfind(RBTree *rbt, char* data); void RBTinsert(RBTree *rbt, char *data); gopher-3.0.15/object/String.h0000664000000000000000000000556510762617110012655 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.4 $ * $Date: 2002/01/10 18:43:18 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/String.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: String.h * Header file that automagically includes string/strings.h ********************************************************************* * Revision History: * $Log: String.h,v $ * Revision 1.4 2002/01/10 18:43:18 jgoerzen * * Changes to work with Solaris: * * configure.in: Now looks for strings.h and string.h * * object/Regex.h: Now include re_comp.h if available. * Include regex.h only if re_comp.h is unavailable. * Define the SYSVREGEX stuff only if HAVE_RE_COMP_H is not defined * * object/String.h: Include string.h and strings.h based on configure * test. * * Revision 1.3 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.2.1 2000/12/18 23:04:29 mdallen * removed nested comments from unused include * * Revision 1.2 2000/08/19 01:36:18 jgoerzen * include more relevant header files. * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.8 1996/01/04 18:23:43 lindner * Updates for autoconf * * Revision 3.7 1994/07/21 22:08:24 lindner * include both string and strings on suns * * Revision 3.6 1994/06/29 06:38:27 lindner * Remove extra include of string.h * * Revision 3.5 1994/04/07 17:26:46 lindner * Fix for pyramids * * Revision 3.4 1994/03/08 04:03:52 lindner * Fix for missing strdup forward declaration * * Revision 3.3 1993/06/15 06:09:50 lindner * Fixes for multiple includes and prettification * * Revision 3.2 1993/05/05 18:39:49 lindner * Solaris and VMS mods * * Revision 3.1.1.1 1993/02/11 18:03:04 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef GSTRINGS_H #define GSTRINGS_H /* string.h == Sys V & ANSI C strings.h == BSD Though your milage may vary... */ #if 0 #include "compatible.h" /* For strdup, etal */ #endif /* 0 */ #ifdef __convex__ # include #endif #ifdef HAVE_STRING_H /* Define __USE_GNU for string.h so strcasestr gets included. (also _GNU_SOURCE for other systems) */ #define __USE_GNU #define _GNU_SOURCE #include #undef __USE_GNU #undef _GNU_SOURCE #endif #ifdef HAVE_STRINGS_H #include #endif #include #include #endif /* GSTRINGS_H */ gopher-3.0.15/object/url.c0000664000000000000000000002176710762617110012206 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.4 $ * $Date: 2002/03/19 16:57:41 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/url.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: url.c * Simplified method of getting urls.. ********************************************************************* * Revision History: * $Log: url.c,v $ * Revision 1.4 2002/03/19 16:57:41 jgoerzen * Fixed type handling. * * Revision 1.3 2001/01/17 21:16:35 jgoerzen * More psinrtf -> snprintf changes * * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.19 1995/10/31 16:53:57 lindner * Small fix for ftp urls.. * * Revision 3.18 1995/09/25 22:07:24 lindner * Ansification * * Revision 3.17 1995/08/29 07:13:07 lindner * Add tickets to urls * * Revision 3.16 1995/02/06 22:10:47 lindner * Fix for systems without strstr, compiler casts * * Revision 3.15 1994/12/05 22:47:19 lindner * Fixed settings of Gopher Type in URLparse() * * Revision 3.14 1994/11/18 22:45:55 lindner * Remove unused variable * * Revision 3.13 1994/11/18 21:41:48 lindner * Fix order of FTP arguments * * Revision 3.12 1994/11/13 06:30:06 lindner * Expanded URL parsing routines * * Revision 3.11 1994/10/13 05:25:56 lindner * Compiler complaint fixes * * Revision 3.10 1994/08/19 16:28:30 lindner * More hexification of URL strings * * Revision 3.9 1994/07/25 03:51:41 lindner * Compiler fix * * Revision 3.8 1994/07/21 22:17:20 lindner * Add ftp urls * * Revision 3.7 1994/03/04 17:42:57 lindner * Fixes from Alan Coopersmith * * Revision 3.6 1994/01/21 04:25:41 lindner * Add support for tn3270 and better gopher url handling * * Revision 3.5 1993/12/30 04:18:08 lindner * translate telnet url correctly * * Revision 3.4 1993/12/27 16:14:03 lindner * Enlarge buffer size, make html docs on gopher server into http: refs * * Revision 3.3 1993/11/02 06:14:09 lindner * Add url html hack * * *********************************************************************/ #include "url.h" #include "GSgopherobj.h" #include "Malloc.h" #include "String.h" #include "compatible.h" Url * URLnew() { Url *temp; temp = (Url *) malloc(sizeof(Url)); temp->url = STRnew(); temp->Host = STRnew(); temp->Port = -1; temp->Path = STRnew(); temp->User = STRnew(); temp->Pass = STRnew(); temp->Gtype = '\0'; URLsetService(temp, unset); return(temp); } void URLdestroy(Url *url) { STRdestroy(url->url); STRdestroy(url->Host); STRdestroy(url->Path); STRdestroy(url->User); STRdestroy(url->Pass); free(url); } /* * Make a default url from the current Gopher Object... */ void URLfromGS(Url *url, GopherObj *gs, char *ticket) { char u[2048], *path, *cp; *u = '\0'; path = GSgetPath(gs); if (GSgetHost(gs) == NULL) return; if ((GSgetType(gs) == A_TN3270) || (GSgetType(gs) == A_TELNET)) { /* [telnet|tn3270]://[host]@[login]:[port] */ if (GSgetType(gs) == A_TELNET) strcpy(u,"telnet://"); else strcpy(u,"tn3270://"); Tohexstr(GSgetHost(gs), u + 9); if ( (path != NULL) && (*path != '\0') ) { cp = u + strlen(u); *(cp++) = '@'; Tohexstr(path, cp); } snprintf(u + strlen(u), sizeof(u) - strlen(u) - 1, ":%d", GSgetPort(gs)); } else if (path != NULL) { if (strncmp(path, "GET /", 5) == 0) { /* http://[host]:[port][path without "GET "] */ strcpy(u, "http://"); Tohexstr(GSgetHost(gs), u+7); snprintf(u + strlen(u), sizeof(u) - strlen(u) - 1, ":%d", GSgetPort(gs)); Tohexstr(path + 4, u + strlen(u)); } else if (strncmp(path, "ftp:", 4) == 0) { /** ftp://[host]/[pathname]; **/ char *atsign; if (path[4] == '/' && path [5] == '/') { strcpy(u, path); } else { strcpy(u, "ftp://"); strcat(u, path + 4); atsign = strchr(u, '@'); if (atsign != NULL) Tohexstr( path + (atsign-u)-1, atsign ); } } else { /* gopher://[host]:[port]/[type][path] */ strcpy(u, "gopher://"); Tohexstr(GSgetHost(gs), u + 9); snprintf(u + strlen(u), sizeof(u) - strlen(u) - 1, ":%d/%c", GSgetPort(gs), GSgetType(gs)); if (ticket != NULL && strlen(ticket) > 0) Tohexstr(ticket, u+strlen(u)); Tohexstr(path, u + strlen(u)); } } URLset(url, u); } /* * Hack gopher directories into an HTML type... */ void URLmakeHTML(Url *url) { char *cp = URLget(url); if (cp == NULL) return; if (strncmp(cp, "gopher://", 9) != 0) return; /** find the type character **/ cp = strchr(cp+10, '/'); if (cp ==NULL) return; /** Test link for current host **/ /* host = cp+10; if (strcasecmp(host, hostname) != 0) return;*/ cp ++; /** cp is now pointed at the type character **/ if (*cp == '1' && *(cp+1) == '1') { /** It's a directory **/ *cp = 'h'; *(cp+1) = 'h'; } } /* * Get the transport of the specified URL */ UrlServiceType URLgetService(Url *url) { UrlServiceType st; if (url->service == unset) { char *urlcp; urlcp = URLget(url); if (urlcp == NULL) return(unknown); st = unknown; if (strncasecmp("ftp:", urlcp, 4)==0) st = ftp; else if (strncasecmp(urlcp, "gopher:", 7)==0) st = gopher; else if (strncasecmp(urlcp, "telnet:", 7)==0) st = telnet; else if (strncasecmp(urlcp, "tn3270:", 7)==0) st = tn3270; else if (strncasecmp(urlcp, "http:", 5)==0) st = http; URLsetService(url, st); } return(url->service); } static boolean URLparse(Url *url) { char *cp, *cp2, *cp3, *urlcp; UrlServiceType serviceType; serviceType = URLgetService(url); if (serviceType == unknown) return(FALSE); urlcp = URLget(url); if (urlcp == NULL) return(FALSE); urlcp = strdup(urlcp); /* This lets us scribble on the string */ cp = strstr(urlcp, "://"); /* skip over servicetype + "://" */ if (cp == NULL) return(FALSE); cp += 3; cp3 = strchr(cp, '/'); /* end of login:passwd@host:port/ section */ if (cp3 == NULL) { cp3 = cp + strlen(cp) + 1; /* No slash at the end... */ URLsetPath(url, "/"); } else { Fromhexstr(cp3, cp3); URLsetPath(url,cp3); *(cp3++) = '\0'; /* trunc the host part, remove sep slash, now cp3 points at the type. */ } if (serviceType == gopher) { if (cp3 != NULL && (int)strlen(cp3) > 1) { URLsetGophType(url, *(cp3++)); URLsetPath(url,cp3++); } else { URLsetGophType(url, '1'); } } /* * Find Username/pass for ftp/telnet */ cp2 = strchr(cp, '@'); if ((cp2 != NULL) && (cp2 < cp3)) { char *pass; *cp2 = '\0'; cp2++; pass = strchr(cp, ':'); if ((pass != NULL) && (pass < cp3)) { *pass = '\0'; pass++; Fromhexstr(pass, pass); URLsetPass(url, pass); } URLsetUser(url, cp); cp = cp2; /** cp now points to hostname **/ } /* * Find port */ cp2 = strchr(cp, ':'); if ((cp2 != NULL) && (cp2 < cp3)) { *cp2 = '\0'; cp2++; URLsetPort(url, atoi(cp2)); URLsetHost(url, cp); } else { switch (serviceType) { case http: URLsetPort(url, 80); break; case telnet: case tn3270: URLsetPort(url, 23); break; case gopher: URLsetPort(url, 70); break; case news: URLsetPort(url, 119); break; case ftp: case unset: case unknown: break; } URLsetHost(url, cp); } return(TRUE); } char * URLgetHost(Url *url) { if (STRget(url->Host) == NULL) URLparse(url); return(STRget(url->Host)); } int URLgetPort(Url *url) { if (url->Port == -1) URLparse(url); return(url->Port); } char * URLgetPath(Url *url) { if (STRget(url->Path) == NULL) URLparse(url); return(STRget(url->Path)); } char * URLgetUser(Url *url) { if (STRget(url->User) == NULL) URLparse(url); return(STRget(url->User)); } char * URLgetPass(Url *url) { if (STRget(url->Pass) == NULL) URLparse(url); return(STRget(url->Pass)); } char URLgetGophType(Url *url) { if (URLgetService(url) != gopher) return('\0'); if (url->Gtype == '\0') URLparse(url); return(url->Gtype); } gopher-3.0.15/object/url.h0000664000000000000000000000507110762617110012201 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2000/12/20 01:19:20 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/url.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: url.h * Simplified method of getting urls.. ********************************************************************* * Revision History: * $Log: url.h,v $ * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.5 1995/09/25 22:07:25 lindner * Ansification * * Revision 3.4 1995/08/29 07:13:07 lindner * Add tickets to urls * * Revision 3.3 1994/11/13 06:30:12 lindner * Expanded URL parsing routines * * Revision 3.2 1993/11/02 06:14:11 lindner * Add url html hack * *********************************************************************/ #ifndef URL_H #define URL_H #include "STRstring.h" #include "util.h" typedef enum {gopher, http, ftp, telnet, tn3270, news, unset,unknown} UrlServiceType; struct url_struct { String* url; UrlServiceType service; String* Host; int Port; String* Path; String* User; String* Pass; /** Gopher specific information **/ char Gtype; }; typedef struct url_struct Url; #define URLget(a) (STRget((a)->url)) #define URLset(a,b) (STRset((a)->url,(b))) #define URLsetGophType(a,b) ((a)->Gtype=(b)) #define URLsetPort(a,b) ((a)->Port=(b)) #define URLsetPath(a,b) (STRset((a)->Path, (b))) #define URLsetHost(a,b) (STRset((a)->Host, (b))) #define URLsetUser(a,b) (STRset((a)->User, (b))) #define URLsetPass(a,b) (STRset((a)->Pass, (b))) #define URLsetService(a,b) ((a)->service=(b)) #include "GSgopherobj.h" UrlServiceType URLgetService(); Url *URLnew(); void URLdestroy(); void URLfromGS(Url *url, GopherObj *gs, char *ticket); void URLmakeHTML(Url *url); char *URLgetTransport(Url *url); char *URLgetHost(Url *url); int URLgetPort(Url *url); char URLgetGophType(Url *url); char *URLgetPath(Url *url); char *URLgetHost(Url *url); int URLgetPort(Url *url); char *URLgetUser(Url *url); char *URLgetPass(Url *url); #endif /* URL_H */ gopher-3.0.15/object/Makefile.in0000664000000000000000000000345310762617110013275 0ustar srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ include ../Makefile.config CCFLAGS = $(OPT) @CFLAGS@ $(INTLOPTS) $(DEBUGGING) $(WAISTYPE) $(SOCKSFLAGS) -I.. -I$(srcdir) -I$(top_srcdir) OBJS = STRstring.o GDgopherdir.o GSgopherobj.o \ DAarray.o VIews.o BLblock.o \ Sockets.o util.o compatible.o \ url.o Debug.o Regex.o \ fileio.o Locale.o RBTree.o TARGET = libgopher.a libgopher.so.0.1 all: shared $(TARGET) # # Make shared library directories # shared: @-if [ -f /lib/ld.so -a "$(SHAREDLIB)" = "sun" ]; \ then \ mkdir shared-sun; \ fi touch shared .c.o: $(OBJS) @CC@ $(CCFLAGS) $(PIC) -c $< @-if [ -d shared-sun ]; then \ echo "Building shared version of $@"; \ @CC@ $(CCFLAGS) -fPIC -o shared-sun/$@ -c $<; \ fi # # Stuff for shared libraries # libgopher.so.0.1: $(OBJS) @-if [ -d shared-sun ]; then \ echo "Building shared library $@"; \ cd shared-sun; \ rm -f $@; \ ld -o $@ -assert pure-text $(OBJS);\ mv $@ ..; \ fi libgopher.sa.0.1: $(OBJS) ; libgopher.a: $(OBJS) rm -f libgopher.a ar rcv libgopher.a $(OBJS) @RANLIB@ libgopher.a || true clean: -rm -f $(TARGET) $(OBJS) *.out *~ core TAGS \ *.sa.* shared -rm -rf shared-sun GSgopherobj.o: $(srcdir)/GSgopherobj.h Locale.o: $(srcdir)/Locale.h $(srcdir)/Locale.c @CC@ $(CCFLAGS) $(PIC) -DLOCALEDIR=\"$(CLIENTLIB)/gophernls\" -c $(srcdir)/Locale.c @-if [ -d shared-sun ]; then \ echo "Building shared version of $@"; \ @CC@ $(CCFLAGS) -DLOCALEDIR=\"$(CLIENTLIB)/gophernls\" \ -fPIC -o shared-sun/$@ -c $(srcdir)/Locale.c; \ fi # #install shared libraries if need be.. # install: @-if [ -f *.so.* ]; then \ echo "Installing Sun shared gopher library" ;\ @INSTALL@ libgopher.so.0.1 $(CLIENTLIB); \ @INSTALL@ libgopher.a $(CLIENTLIB); \ fi gopher-3.0.15/object/STAarray.h0000664000000000000000000000356510762617110013073 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/STAarray.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: STAarray.h * Header file, abstraction of a dynamic Strings array. ********************************************************************* * Revision History: * $Log: STAarray.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.4 1995/09/26 05:16:32 lindner * more fixes... * * Revision 3.3 1993/07/27 00:30:13 lindner * plus patch from Mitra * * Revision 3.2 1993/03/26 19:51:05 lindner * Added STApop * * Revision 3.1.1.1 1993/02/11 18:03:07 lindner * Gopher+1.2beta release * * Revision 1.1 1993/01/31 00:34:40 lindner * Initial revision * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef STAARRAY_H #define STAARRAY_H #include "STRstring.h" #include "DAarray.h" typedef DynArray StrArray; #define STAnew(a) (DAnew((a),STRnew,STRinit,STRdestroy,STRcpy)) #define STAinit(a) (DAinit((a))) #define STAgetTop(a) (DAgetTop(a)) #define STAgetEntry(a,b) (String*)(DAgetEntry(a,b)) /* Some places use STAgetEntry and then pretend they got a char* back)*/ #define STAgetText(a,b) (char*)(STRget(STAgetEntry(a,b))) #define STApush(a,b) (DApush((DynArray*)(a),(char*)(b))) #define STApop(a) (String*)(DApop(a)) #define STAdestroy(a) (DAdestroy(a)) #define STAcpy(a,b) (DAcpy(a,b)) #endif gopher-3.0.15/object/RBTree.c0000664000000000000000000002663410762617110012525 0ustar /********************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2001/01/17 21:48:05 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/RBTree.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1995 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: RBTree.c * Implementation of a Red-Black balanced tree container. ********************************************************************* * Revision History: * $Log: RBTree.c,v $ * Revision 1.2 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.3 1995/10/31 16:48:21 lindner * Better readability, fix bugs.. * * Revision 3.2 1995/09/25 22:07:19 lindner * Ansification * * Revision 3.1 1995/06/30 20:31:04 lindner * New red-black tree code * **********************************************************************/ #include "RBTree.h" #include "Malloc.h" RBTree *mytree; void printit(); /*********************************************************************** * Prototypes */ static void RBTleft_right(RBTree *thetree, RBTree_node *child, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent); static void RBTright_left(RBTree *thetree, RBTree_node *child, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent); static void RBTright_right(RBTree *thetree, RBTree_node * parent, RBTree_node * grandparent, RBTree_node * great_grandparent); static void RBTleft_left(RBTree *thetree, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent); /**********************************************************************/ RBTree_node *RBTNnew(void) { RBTree_node *temp; temp = (RBTree_node*) malloc(sizeof(RBTree_node)); RBTsetDirection(temp, NOWHERE); RBTsetRBright(temp, BLACK); RBTsetRBleft(temp, BLACK); RBTattachLeftNode(temp, NULL); RBTattachRightNode(temp, NULL); return(temp); } void RBTdestroy_node(RBTree *thetree, RBTree_node *rbt_node) { if (rbt_node != NULL) { RBTdestroy_node(thetree, RBTgetLeft(rbt_node)); RBTdestroy_node(thetree, RBTgetRight(rbt_node)); RBTdestroyfcn(thetree, rbt_node); free(rbt_node); } } static void RBTred_sibling_ck(RBTree_node* child, RBTree_node * parent) { if ((RBTgetRBright(child) == RED) && (RBTgetRBleft(child) == RED)) { /* if two red siblings change to black */ RBTsetRBright(child, BLACK); RBTsetRBleft(child, BLACK); /* if parent exists, change to red */ if (parent != NULL) { if (RBTgetDirection(parent) == LEFT) RBTsetRBleft(parent, RED); else RBTsetRBright(parent, RED); } } } /**********************************************************************/ static int RBTbalance(RBTree *thetree, RBTree_node *child, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent) { if (grandparent != NULL) { /* must have tree nodes to need rebalance*/ if (RBTgetDirection(parent) == LEFT) { if (RBTgetRBleft(parent) == RED) { if (RBTgetDirection(grandparent) == LEFT) { if (RBTgetRBleft(grandparent) == RED) { RBTleft_left(thetree, parent, grandparent, great_grandparent); return(TRUE); } } else { if (RBTgetRBright(grandparent) == RED) { RBTright_left(thetree, child, parent, grandparent, great_grandparent); return(TRUE); } } } } else if (RBTgetRBright(parent) == RED) { if (RBTgetDirection(grandparent) == LEFT) { if (RBTgetRBleft(grandparent) == RED) { RBTleft_right(thetree, child, parent, grandparent, great_grandparent); return(TRUE); } } else { if (RBTgetRBright(grandparent) == RED) { RBTright_right(thetree, parent, grandparent, great_grandparent); return(TRUE); } } } } return(FALSE); } /**********************************************************************/ static void RBTleft_right(RBTree *thetree, RBTree_node *child, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent) { RBTree_node *temp[2]; #ifdef RBT_TEST printf("left_right called\n"); #endif if (great_grandparent != NULL ) if (RBTgetDirection(great_grandparent) == RIGHT) RBTattachRightNode(great_grandparent, child); else RBTattachLeftNode(great_grandparent, child); else RBTsetEntry(thetree, child); temp[0] = RBTgetLeft(child); temp[1] = RBTgetRight(child); RBTattachLeftNode(grandparent, temp[1]); RBTattachRightNode(parent, temp[0]); RBTattachRightNode(child, grandparent); RBTattachLeftNode(child, parent); /* reset red_black fields */ RBTsetRBleft(grandparent, BLACK); RBTsetRBright(parent, BLACK); RBTsetRBleft(child, RED); RBTsetRBright(child, RED); } /**********************************************************************/ static void RBTright_left(RBTree *thetree, RBTree_node *child, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent) { RBTree_node *temp[2]; #ifdef RBT_TEST printf("right_left called\n"); #endif if (great_grandparent != NULL ) if (RBTgetDirection(great_grandparent) == RIGHT) RBTattachRightNode(great_grandparent, child); else RBTattachLeftNode(great_grandparent, child); else RBTsetEntry(thetree, child); temp[0] = RBTgetLeft(child); temp[1] = RBTgetRight(child); RBTattachRightNode(grandparent, temp[0]); RBTattachLeftNode(parent, temp[1]); RBTattachLeftNode(child, grandparent); RBTattachRightNode(child, parent); /* reset red_black fields */ RBTsetRBright(grandparent, BLACK); RBTsetRBleft(parent, BLACK); RBTsetRBright(child, RED); RBTsetRBleft(child, RED); } /**********************************************************************/ static void RBTright_right(RBTree *thetree, RBTree_node * parent, RBTree_node * grandparent, RBTree_node * great_grandparent) { RBTree_node *temp; #ifdef RBT_TEST printf("right_right called\n"); #endif if (great_grandparent != NULL) { if (RBTgetDirection(great_grandparent) == RIGHT) RBTattachRightNode(great_grandparent, parent); else RBTattachLeftNode(great_grandparent, parent); } else RBTsetEntry(thetree, parent); temp = RBTgetLeft(parent); RBTattachRightNode(grandparent, temp); RBTattachLeftNode(parent, grandparent); /* reset red_black fields appropriately */ RBTsetRBright(grandparent, BLACK); RBTsetRBleft(parent, RED); } /**********************************************************************/ static void RBTleft_left(RBTree *thetree, RBTree_node *parent, RBTree_node *grandparent, RBTree_node *great_grandparent) { RBTree_node *temp; #ifdef RBT_TEST printf("left_left called\n"); #endif if (great_grandparent != NULL) RBTattachLeftNode(great_grandparent, parent); else RBTsetEntry(thetree, parent); temp = RBTgetRight(parent); RBTattachLeftNode(grandparent, temp); RBTattachRightNode(parent, grandparent); RBTsetRBleft(grandparent, BLACK);/* reset rb fields */ RBTsetRBright(parent, RED); } /**********************************************************************/ void RBTinsert(RBTree *thetree, char *data) { RBTree_node *data_node ; RBTree_node *local_root ; RBTree_node *current ; RBTree_node *parent = NULL; RBTree_node *grandparent = NULL; RBTree_node *great_grandparent = NULL ; boolean balanced=FALSE; data_node = RBTNnew(); /* create and initialize new node*/ RBTaddData(data_node, data); local_root = RBTgetEntry(thetree); if (local_root == NULL) { /* start a new tree */ RBTsetEntry(thetree, data_node); return; } current = local_root; /* get ready to insert new node*/ while (current != NULL) { /* check for two red siblings*/ RBTred_sibling_ck(current,parent); if (!balanced) { /* only one rebalance per insertion*/ balanced = RBTbalance(thetree, current, parent, grandparent, great_grandparent); if (balanced == 0) { /* if we haven't rebalanced update grandparent * and great grand parent. ie if rebalancing have been * done, all of these local ptrs execpt current are * invalid. */ great_grandparent=grandparent; grandparent=parent; } } parent=current; if (RBTcmp(thetree, RBTgetData(current), data) > 0) { /* mark where we're moving and go left */ RBTsetDirection(current, LEFT); current = RBTgetLeft(current); } else { /* mark where we're moving and go right */ RBTsetDirection(current, RIGHT); current = RBTgetRight(current); } } if (RBTgetDirection(parent) == LEFT) { RBTattachLeftNode(parent, data_node); RBTsetRBleft(parent, RED); } else { RBTattachRightNode(parent, data_node); RBTsetRBright(parent, RED); } } /********************************************************************** * Functions for the top level tree structure... */ RBTree * RBTnew(int (*cmpfunc)(), void (*destroyfn)()) { RBTree *temp; temp = (RBTree*) malloc(sizeof(RBTree)); if (temp == NULL) return(NULL); temp->cmpfn = cmpfunc; temp->destroyfn = destroyfn; temp->entry = NULL; return(temp); } void RBTdestroy(RBTree *rbt) { RBTdestroy_node(rbt, RBTgetEntry(rbt)); free(rbt); } static void RBTinorder(RBTree_node *node, void (*func)()) { if (node != NULL) { RBTinorder(RBTgetLeft(node), func); func(RBTgetData(node)); RBTinorder(RBTgetRight(node), func); } } void RBTtraverse(RBTree *rbt, void (*func)()) { RBTinorder(RBTgetEntry(rbt), func); } char * RBTfind(RBTree *rbt, char *data) { RBTree_node *rbt_node = RBTgetEntry(rbt); int whichway; while ((whichway = RBTcmp(rbt, data, RBTgetData(rbt_node))) != 0) { if (whichway < 0) rbt_node = RBTgetLeft(rbt_node); else rbt_node = RBTgetRight(rbt_node); if (rbt_node == NULL) return(NULL); } return(RBTgetData(rbt_node)); } /********************************************************************** * Test code below here.... */ #ifdef RBT_TEST #include #include static int count = 0; void printit(char *data) { printf("%s", data); } void main() { FILE *foo; char myline[256]; char *moo; mytree = RBTnew(strcmp, free); foo = fopen("testfile", "r"); while(fgets(myline, sizeof(myline), foo)) { RBTinsert(mytree, strdup(myline)); /* RBTtraverse(mytree, printit);*/ } /** Find an item **/ moo = RBTfind(mytree, "butterfly\n"); if (moo) printf("Found %s\n", moo); else printf("Didn't find butterfly...\n"); RBTtraverse(mytree, printit); RBTdestroy(mytree); } #endif gopher-3.0.15/object/GDgopherdir.c0000664000000000000000000003314610762617110013574 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/GDgopherdir.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: GDgopherdir.c * Implement gopher directory routines ********************************************************************* * Revision History: * $Log: GDgopherdir.c,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.38 1996/01/04 18:26:51 lindner * Updates for autoconf * * Revision 3.37 1995/10/31 16:47:47 lindner * Switch to void+ pointer * * Revision 3.36 1995/09/26 05:16:32 lindner * more fixes... * * Revision 3.35 1995/09/25 22:07:16 lindner * Ansification * * Revision 3.34 1995/04/15 07:07:38 lindner * Add ControlC handling feature... * * Revision 3.33 1995/02/17 18:34:09 lindner * Fix stupid bug * * Revision 3.32 1995/02/16 22:32:43 lindner * HTML icon support * * Revision 3.31 1995/02/13 19:09:25 lindner * Fix for link updating * * Revision 3.30 1995/02/06 22:11:26 lindner * Fix for GDsearch comparision * * Revision 3.29 1995/02/01 22:06:22 lindner * Put back GDaddGSmerge, ugh. * * Revision 3.27 1994/10/18 21:36:34 lindner * Remove unused variable * * Revision 3.26 1994/07/21 22:29:00 lindner * misc hacks * * Revision 3.25 1994/07/06 03:01:30 lindner * VMS doesn't have strcoll * * Revision 3.24 1994/06/29 06:47:51 lindner * Use strcoll to sort if GINTERNATIONAL is defined * * Revision 3.23 1994/06/29 05:45:54 lindner * Mods to pump tickets to the net * * Revision 3.22 1994/04/27 19:21:37 lindner * Fix for semicolons after Debugmsg * * Revision 3.21 1994/04/25 03:36:56 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.20 1994/04/21 21:24:57 lindner * Fix fcn header * * Revision 3.19 1994/04/19 14:32:27 lindner * Change GD and GSfromLink routines to use FIO * * Revision 3.18 1994/04/13 04:28:58 lindner * Fix for Type=X items * * Revision 3.17 1994/02/20 16:28:19 lindner * Remove dead code for GDtoNetHTML * * Revision 3.16 1994/01/10 03:27:28 lindner * Better GDdeleteGS method, allow ignoring of items by doing a Type=X in a .names file * * Revision 3.15 1993/11/29 01:07:57 lindner * In GDtoLink(), add FALSE argument to GStoLink() call in order to prevent * the Admin and ModDate information from being saved in the user bookmark * file. (Macrides) * * Revision 3.14 1993/11/02 06:15:15 lindner * HTML additions * * Revision 3.13 1993/08/23 20:56:34 lindner * Fix for empty directory in g+ client * * Revision 3.12 1993/08/19 20:51:33 lindner * Mitra comments * * Revision 3.11 1993/08/19 20:24:04 lindner * Mitra's Debug patch * * Revision 3.10 1993/07/29 20:02:16 lindner * Removed dead variables * * Revision 3.9 1993/07/27 05:30:22 lindner * Mondo Debug overhaul from Mitra * * Revision 3.8 1993/07/27 00:30:08 lindner * plus patch from Mitra * * Revision 3.7 1993/07/14 20:37:08 lindner * Negative numbering patches * * Revision 3.6 1993/06/22 06:07:17 lindner * Added Domain= hacks.. * * Revision 3.5 1993/04/15 21:35:12 lindner * Debug code, better .Link processing, better GDfromNet() * * Revision 3.4 1993/03/26 19:50:44 lindner * Mitra fixes for better/clearer fromNet code * * Revision 3.3 1993/03/24 17:04:49 lindner * bad strcmp() can check unmalloced() mem, fixed * * Revision 3.2 1993/03/18 22:13:29 lindner * filtering, compression fixes * * Revision 3.1 1993/02/11 18:03:01 lindner * Initial revision * * Revision 2.1 1993/02/09 22:46:50 lindner * Many additions for gopher+ * * Revision 1.4 1993/01/31 00:22:51 lindner * Changed GDaddGS to merge entries with the same path. * Added GDplusfromNet() to siphon data from network. * GDfromLink now knows about ~/ inside of Path= * Changed GDSearch to ignore leading character. * * Revision 1.3 1992/12/19 04:44:09 lindner * Added GDplustoNet() * * Revision 1.2 1992/12/16 20:37:04 lindner * Added function GDsearch(), does a linear search of a gopher directory * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #include #include "GDgopherdir.h" #include "Malloc.h" #include "util.h" #include "String.h" #include "fileio.h" #include "Debug.h" #include "fileio.h" /*********************************************************************** ** Stuff for GopherDirObjs ** ***********************************************************************/ GopherDirObj* GDnew(int size) { GopherDirObj *temp; temp = (GopherDirObj*) malloc(sizeof(GopherDirObj)); temp->Gophers = DAnew(size, GSnew, GSinit, GSdestroy, GScpy); temp->Title = STRnew(); temp->Location = NULL; temp->currentitem = 1; GDinit(temp); return(temp); } void GDdestroy(GopherDirObj *gd) { DAdestroy(gd->Gophers); if (gd->Location != NULL) GSdestroy(gd->Location); STRdestroy(gd->Title); free(gd); } void GDinit(GopherDirObj *gd) { DAinit(gd->Gophers); STRinit(gd->Title); gd->Location = NULL; } void GDsetLocation(GopherDirObj *gd, GopherObj *gs) { if (gd->Location == NULL) gd->Location = GSnew(); else GSinit(gd->Location); GScpy(gd->Location, gs); } /** This proc adds a GopherObj to a gopherdir. It will attempt to merge two items if need be.. **/ void GDaddGSmerge(GopherDirObj *gd, GopherObj *gs) { int num; num = GDSearch(gd, GSgetPath(gs)); if (num == -1) GDaddGS(gd, gs); else { if (GSgetType(gs) == 'X') { gd = GDdeleteGS(gd, num); } else GSmerge(GDgetEntry(gd, num),gs); } } /* * This one never tries to merge */ void GDaddGS(GopherDirObj *gd, GopherObj *gs) { if (GSgetType(gs) != 'X') DApush(gd->Gophers, (char*)gs); } /* * Really weird!!! We need this for qsort, don't know why we can't use * GScmp... */ #define sgn(a) ((a) == 0 ? 0 : (a) < 0 ? -1 : 1) static int GSqsortcmp(GopherObj **gs1, GopherObj **gs2) { if (GSgetTitle(*gs1) == NULL) return(1); if (GSgetTitle(*gs2) == NULL) return(-1); /** No numbering set on either entry, or both numbered entries have the same number **/ if (GSgetNum(*gs1) == GSgetNum(*gs2)) return(strcoll(GSgetTitle(*gs1), GSgetTitle(*gs2))); /** If the signs are equal, compare the numbers conventionally **/ /** N.B. If the signs ARE equal, they cannot be 0 (otherwise we would **/ /** have had the above case, because only the sign of 0 is 0) */ if (sgn(GSgetNum(*gs1)) == sgn(GSgetNum(*gs2))) return(GSgetNum(*gs1) < GSgetNum(*gs2) ? -1 : 1); /** The signs must be different, so we can use a conventional test, **/ /** remembering only to say positive numbers go before negative ones **/ return(GSgetNum(*gs1) > GSgetNum(*gs2) ? -1 : 1); } /* * Sorts a gopher directory */ void GDsort(GopherDirObj *gd) { DAsort(gd->Gophers, GSqsortcmp); } void GDtoNet(GopherDirObj *gd, int sockfd, GSformat fmt, char *ticket, void (*prefcn)()) { int i; GopherObj *gs; Debugmsg("GDplustoNet\n"); if (fmt == GSFORM_HTML) { writestring(sockfd, "
\r\n"); } for (i=0; i< GDgetNumitems(gd); i++) { gs = GDgetEntry(gd, i); if (fmt == GSFORM_HTML) writestring(sockfd, "
"); if (prefcn) prefcn(gs, sockfd); GStoNet(GDgetEntry(gd, i), sockfd, fmt, ticket); } if (fmt == GSFORM_HTML) { writestring(sockfd, "
\r\n"); } } void GDplustoNet(GopherDirObj *gd, int sockfd, char **filter, char *ticket) { int i; for (i=0; i< GDgetNumitems(gd); i++) { GSplustoNet(GDgetEntry(gd, i), sockfd,filter, ticket); } } /* * Gopher+ counterpart to GDfromNet() * returns number of items found */ int GDplusfromNet(GopherDirObj *gd, int fd, int (*eachitem)()) { static GopherObj *TempGopher = NULL; int j, result; char inputline[256]; Debugmsg("GDplusfromNet:: start\r\n"); if (TempGopher == NULL) TempGopher = GSnew(); /** State: _begin_ **/ result = readrecvbuf(fd, inputline, 1); if (result <=0) return(0); else if (*inputline == '.') { /*** Read off the rest of the junk... ***/ readline(fd,inputline,sizeof(inputline)); return(0); } else if (*inputline != '+') return(0); Debugmsg("after readrecvbuf"); /** State _FirstPlus_ **/ result = readtoken(fd, inputline, sizeof(inputline), ':'); if (result <=0) return(result); Debugmsg("after readtoken"); if (strcmp(inputline, "INFO")!=0) { return(0); } Debugmsg("after INFO"); /** Read the space **/ if (readrecvbuf(fd, inputline, 1) <=0) return(HARDERROR); /*** State _FirstINFO_ ***/ for (j=0; !ControlCpressed ; j++) { Debugmsg("for start"); GSinit(TempGopher); result = GSplusfromNet(TempGopher, fd); switch (result) { case MORECOMING: GDaddGS(gd, TempGopher); if (eachitem != NULL) eachitem(); break; case FOUNDEOF: GDaddGS(gd, TempGopher); return(j+1); case HARDERROR: /** Give up reading - bad read or protocol error **/ return(j); case SOFTERROR: /** This one was bad, but we can try for next **/ j= j-1; if (j<0) j=0; break; } } /* for */ /** only get here if Control C pressed **/ ControlCpressed = FALSE; return(j); } /* * Fill up a GopherDirObj with GopherObjs, given a gopher directory coming * from sockfd. * * For each GopherObj retrieved, eachitem() is executed. * */ void GDfromNet(GopherDirObj *gd, int sockfd, int (*eachitem)()) { static GopherObj *TempGopher; int i; char *cp1, *cp2; Debugmsg("GDfromNet..."); if (TempGopher == NULL) TempGopher = GSnew(); for (; !ControlCpressed ;) { GSinit(TempGopher); i = GSfromNet(TempGopher, sockfd); /* In gopher+1.2b2 this routine clears up if GSfromNet returns a failure, better to clear up in GSfromNet so that the system returns in a known state - note that other callers of GSfromNet didn't clean up and crashed! */ switch (i) { case 0: if (GSgetType(TempGopher) == '3' && ((cp1 = GSgetTitle(TempGopher)) != NULL) && ((cp2 = strchr(cp1, '\n')) != NULL)) { GopherObj *TempG2; do { TempG2 = GSnew(); GScpy(TempG2, TempGopher); GSsetType(TempG2, A_INFO); GSsetTitle(TempG2, cp2+1); *cp2 = '\0'; GSsetTitle(TempGopher, cp1); GDaddGS(gd, TempGopher); TempGopher = TempG2; if ((cp1 = GSgetTitle(TempGopher)) == NULL) break; } while ((cp2 = strchr(cp1, '\n')) != NULL); } GDaddGS(gd, TempGopher); if (eachitem != NULL) eachitem(); break; case 1: /* . on a line by itself, nothing more */ return; case SOFTERROR: /** Unknown object type **/ break; case HARDERROR: return; } }/* for */ if (ControlCpressed) { ControlCpressed = FALSE; } } /* * Given an open file descriptor and an inited GopherDirobj, * read in gopher links, and add them to a gopherdir */ void GDfromLink(GopherDirObj *gd, FileIO *fio, char *host, int port, char *directory, char *peer) { GopherObj *gs; int result; char *cp; gs = GSnew(); while (1) { GSinit(gs); result = GSfromLink(gs, fio, host, port,directory, peer); if (result == HARDERROR) break; if (result == SOFTERROR) continue; cp = GSgetPath(gs); if (*cp == '.') GDaddGSmerge(gd, gs); else GDaddGS(gd, gs); if (result == FOUNDEOF) break; } GSdestroy(gs); } void GDtoLink(GopherDirObj *gd, int fd) { int i; for (i=0; i< GDgetNumitems(gd); i++) { GStoLink(GDgetEntry(gd, i), fd, FALSE); } } /*** Search for a specific gopher item ***/ /* Note first char is G0 type and is ignored*/ int GDSearch(GopherDirObj *gd, char *text) { int i; GopherObj *gs; int cplen; char *cp; Debug("GDSearch: %s;\n",text); if (gd == NULL) return(-1); if (text == NULL) return(-1); if ((int) strlen(text) <= 1) return(-1); for (i=0; i< GDgetNumitems(gd); i++) { gs = GDgetEntry(gd, i); cp = GSgetPath(gs); if (cp != NULL) { cplen = strlen(cp); if (cplen >1 && strcmp(text+1, cp+1) == 0) { Debugmsg("Matched\n"); return(i); } } } Debugmsg("GDsearch: No Match\n"); return(-1); } /* * Delete an item in a gopher GD.. Do it in place... */ GopherDirObj * GDdeleteGS(GopherDirObj *gd, int j) { int i; if (GDgetNumitems(gd) == j+1) { /* Last item in the directory */ GSinit(GDgetEntry(gd,j)); GDsetNumitems(gd, j); return(gd); } /** Okay, now let's copy the items down, one by one.. **/ for (i= j+1; i GDgetNumitems(gd)-1) GDsetCurrentItem(gd, GDgetCurrentItem(gd)-1); return(gd); } gopher-3.0.15/object/Debug.h0000664000000000000000000000066710762617110012433 0ustar #ifndef DEBUG_H #define DEBUG_H #include "boolean.h" extern boolean DEBUG; #ifdef DEBUGGING # include # define Debug(str,val) if (DEBUG) { fprintf(stderr,str,val); } # define Debugmsg(str) if (DEBUG) { fprintf(stderr,str); } # define DebugGSplusPrint(gop,str) if (DEBUG) { GSplusPrint(gop,str); } #else # define Debug(str,val) # define Debugmsg(str) # define DebugGSplusPrint(gop,str) #endif #endif /* DEBUG_H */ gopher-3.0.15/object/GSgopherobj.c0000664000000000000000000014464612621232663013621 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.8 $ * $Date: 2002/03/19 20:07:16 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/GSgopherobj.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: GSgopherobj.c * Implement gopher directory functions. ********************************************************************* * Revision History: * $Log: GSgopherobj.c,v $ * Revision 1.8 2002/03/19 20:07:16 jgoerzen * GSgopherobj.c: Moved Regex.h include up. * * Regex.c, Regex.h: continuing full rewrites. * * Revision 1.7 2002/01/08 17:36:14 jgoerzen * Finally builds! * * Changes: * * * config.h.in: rebuilt by autoheader * * * configure: rebuilt by autoconf * * * configure.in: * * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * * Added checkes for term.h, re_comp.h, regex.h * * * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * * * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * * Use REGEXLIBS * * * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * * * object/GSgopherobj.c: Removed #include, now use * "Regex.h" that has proper regex determining logic * * * object/Regex.h: Moved regex.h include to here. Make it conditional * based on configure test. Add conditional re_comp.h include. * * Revision 1.6 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.5 2001/01/17 21:16:35 jgoerzen * More psinrtf -> snprintf changes * * Revision 1.4 2000/12/26 22:48:12 s2mdalle * * Changed GSsendHeader(int, int) => GSsendHeader(int, long) because the * second argument is often the file size, and an int may not be * sufficient depending on platform. Most calls use canned values of -1 * and -2 anyway. * * Revision 1.3 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.2 2000/08/23 00:18:41 jgoerzen * Various bugfixes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.85 1995/11/10 22:26:26 lindner * Fix for wierd relative gopher URLs * * Revision 3.84 1995/11/03 18:00:45 lindner * Coen: changes * * Revision 3.83 1995/11/03 05:37:13 lindner * Convert ------ to
* * Revision 3.82 1995/10/04 22:30:45 lindner * Add
to the end of info lines * * Revision 3.81 1995/09/28 22:59:25 lindner * Move nullword * * Revision 3.80 1995/09/25 22:07:18 lindner * Ansification * * Revision 3.79 1995/08/29 07:13:06 lindner * Add tickets to urls * * Revision 3.78 1995/06/12 15:33:41 lindner * Add onlyhtml support * * Revision 3.77 1995/05/02 04:03:51 lindner * Remove unused variable * * Revision 3.76 1995/04/15 07:07:19 lindner * Fix for fcn prototype, check for error * * Revision 3.75 1995/02/22 05:30:25 lindner * reintroduce gsinit to gsnew * * Revision 3.74 1995/02/17 18:29:37 lindner * Abstract display support * * Revision 3.73 1995/02/16 22:32:44 lindner * HTML icon support * * Revision 3.72 1995/02/07 07:12:55 lindner * oops! * * Revision 3.71 1995/02/07 07:06:58 lindner * performance fixes * * Revision 3.70 1995/02/06 22:13:52 lindner * Performance fixes * * Revision 3.69 1995/02/02 17:14:46 lindner * Fix for memory leaks and accesses * * Revision 3.68 1995/02/01 22:08:02 lindner * Put back GSaddmerge * * Revision 3.67 1995/02/01 21:44:41 lindner * Remove GSmerge fcns, Add message/rfc822 and application/gopher to GSisText * * Revision 3.66 1994/12/15 17:30:49 lindner * Allow multi-line abstracts in link files, Fix for ftp URL generation * * Revision 3.65 1994/12/05 22:39:55 lindner * Fix Name and Path settings in GSfromURL * * Revision 3.64 1994/11/17 06:33:58 lindner * Fixes for VMS internationalization * * Revision 3.63 1994/11/13 06:30:48 lindner * Better GSfromURL * * Revision 3.62 1994/10/24 22:15:53 lindner * Add PDF type * * Revision 3.61 1994/10/18 21:37:03 lindner * Make sure buf is set * * Revision 3.60 1994/10/13 05:27:18 lindner * Compiler complaint fixes * * Revision 3.59 1994/09/29 19:26:45 lindner * Fix for debug messages and NULL values * * Revision 3.58 1994/08/19 16:13:09 lindner * mktime() etc, fixes from Alan Coopersmith * * Revision 3.57 1994/08/03 20:03:44 lindner * Fix for adding ask stuff * * Revision 3.56 1994/07/31 04:57:20 lindner * Fix for .names messup... * * Revision 3.55 1994/07/21 22:29:18 lindner * misc hacks * * Revision 3.54 1994/07/06 19:21:34 lindner * use strftime to get localized date and time * * Revision 3.53 1994/06/29 06:51:21 lindner * ifdef GINTERNATIONAL, use strftime to localize the date string * returned by GSgetModDate() * * in GSplusfromNet(), if there's anything in the ADMIN block other than * Admin, ModDate, or TTL entries, save it for the client's showinfo() * Server Information * * Move GSfromURL() return code definitions to header so other files can * call it * * Fix GStoNetURL() & HTML display of directories * * Round sizes in GSaddView * * Make GSfromURL() lie and say all http: is HTML so the client * passes it off to a http-speaking program anyway (assuming * all HTML viewers speak http, that is) (Coopersmith) * * Revision 3.52 1994/06/29 05:45:56 lindner * Mods to pump tickets to the net * * Revision 3.51 1994/05/25 20:57:46 lindner * Remove unused var * * Revision 3.50 1994/05/06 02:29:46 lindner * Fix from Robert Beckett for binhex files * * Revision 3.49 1994/04/25 03:36:58 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.48 1994/04/25 02:26:30 lindner * Fix for url problems * * Revision 3.47 1994/04/25 02:16:31 lindner * Fix for |= mistype * * Revision 3.46 1994/04/22 06:41:35 lindner * More pacbell hacks for Domain= * * Revision 3.45 1994/04/22 03:26:15 lindner * pacbell hack * * Revision 3.44 1994/04/19 14:32:29 lindner * Change GD and GSfromLink routines to use FIO * * Revision 3.43 1994/04/13 19:16:17 lindner * Fix for ASK block bug * * Revision 3.42 1994/04/08 20:05:52 lindner * gcc -Wall fixes * * Revision 3.41 1994/04/07 17:27:09 lindner * Fix for pyramids * * Revision 3.40 1994/04/01 04:38:06 lindner * Fix for conditional macros * * Revision 3.39 1994/03/31 22:48:55 lindner * fix for Hgopher and ask requests * * Revision 3.38 1994/03/31 21:05:11 lindner * More debug code, and fix for Socket return values * * Revision 3.37 1994/03/17 04:37:41 lindner * Fix for spinning clients * * Revision 3.36 1994/03/08 15:56:17 lindner * gcc -Wall fixes * * Revision 3.35 1994/03/04 17:59:16 lindner * More URL fixes from A.C. * * Revision 3.34 1994/02/20 16:27:44 lindner * Remove dead code for GDtoNetHTML * * Revision 3.33 1994/01/25 06:51:21 lindner * Many additions for URL/HTML support, removed insidious dot at end of host.. * * Revision 3.32 1994/01/10 03:28:12 lindner * Allow bangs in Domain= lines, to negate classes of hosts * * Revision 3.31 1994/01/06 06:10:53 lindner * fix for cvs entries * * * Revision 3.30 1994/01/06 05:43:46 lindner * Fix for type=1 and ask blocks. * * Revision 3.29 1993/12/27 16:25:39 lindner * Add fix for appending a period to domain names * * Revision 3.28 1993/11/29 01:07:23 lindner * In GSfromLink(), disable handling of "Domain_pat:" for VMS to keep the * compiler from complaining about the lack of re_comp() and re_exec(). * "Domain_pat:" handling isn't needed in the client anyway. (Wolfe) * * Add "AddInfo" argument to GStoLink(). This option decides whether to * add the Admin and ModDate fields to the basic information about the * gopher object. Bookmarks should not include them, but requested * technical information ('=' and '^') should. This change requires * changes to gopher/gopher.c and object/GDgopherdir.c; see below. * (Macrides) * * Revision 3.27 1993/11/05 07:24:46 lindner * Allow Type=1? etc.. in .link files * * Revision 3.26 1993/11/04 04:50:50 lindner * Add quotes around HREFs * * Revision 3.25 1993/11/04 02:10:47 lindner * Added Domain_pat= line to check for a regexp domains * * Revision 3.24 1993/11/03 15:35:40 lindner * Fix problems with bookmarks of gopher+ items * * Revision 3.23 1993/11/02 06:15:24 lindner * HTML additions * * Revision 3.22 1993/10/26 17:49:50 lindner * Fix for NULL view in GSisText() * * Revision 3.21 1993/10/22 20:02:33 lindner * Add Movie (;) and Info (i) type support * * Revision 3.20 1993/09/18 04:44:41 lindner * Additions to fix caching of Multiple view items * * Revision 3.19 1993/09/11 06:41:08 lindner * Fix for picky compilers * * Revision 3.18 1993/09/11 06:32:52 lindner * URL support * * Revision 3.17 1993/09/01 21:51:59 lindner * Remove GSnewSet, better initialization in GSnew() * * Revision 3.16 1993/08/19 20:24:11 lindner * Mitra's Debug patch * * Revision 3.15 1993/07/29 20:02:55 lindner * Removed dead variables * * Revision 3.14 1993/07/27 20:17:25 lindner * Fix improper bracketed debug output * * Revision 3.13 1993/07/27 05:30:23 lindner * Mondo Debug overhaul from Mitra * * Revision 3.12 1993/07/27 00:30:09 lindner * plus patch from Mitra * * Revision 3.11 1993/07/23 04:50:17 lindner * Mods to allow abstract/admin setting in .names files * * Revision 3.10 1993/07/21 03:31:09 lindner * Askdata can be stored locally, plus GSfromLink doesn't core dump with * mangled items * * Revision 3.9 1993/07/14 20:37:11 lindner * Negative numbering patches * * Revision 3.8 1993/07/07 19:30:12 lindner * Split off socket based fcns to Sockets.c * * Revision 3.7 1993/07/06 20:22:40 lindner * Added listener and accept fcns * * Revision 3.6 1993/06/22 06:07:14 lindner * Added Domain= hacks.. * * Revision 3.5 1993/04/15 17:44:52 lindner * Fixed link processing, mods from Mitra * * Revision 3.4 1993/03/26 19:50:46 lindner * Mitra fixes for better/clearer fromNet code * * Revision 3.3 1993/03/24 17:05:33 lindner * Additions for Localfile for each GopherObj * * Revision 3.2 1993/03/18 22:15:50 lindner * filtering, memory leaks fixed, GSmerge problems * *********************************************************************/ #include "GSgopherobj.h" #if defined(mips) && defined(ultrix) /*** Gross hack, yuck! ***/ #define _SIZE_T #endif #include "String.h" #include "STRstring.h" #include "Regex.h" #include #include "compatible.h" #include #include "Malloc.h" #include "Sockets.h" #include "util.h" #include "Debug.h" #include "fileio.h" #include #ifdef pyr unsigned long errno; #endif /* * Make a new gopherobj... Should reuse destroyed GopherObjs... */ GopherObj * GSnew() { GopherObj *temp; temp = (GopherObj *) malloc(sizeof(GopherObj)); temp->Selstr = STRnew(); temp->Title = STRnew(); temp->Host = STRnew(); temp->Localfile = STRnew(); temp->Localview = STRnew(); temp->gplus = NULL; temp->isask = FALSE; temp->url = NULL; GSinit(temp); return(temp); } /* * Initialize the gopherplus components of the object * (Only called for a gplus item) */ void GSplusnew(GopherObj *gs) { if (gs->gplus == NULL) { gs->gplus = (GplusObj *) malloc(sizeof(GplusObj)); } gs->gplus->Admin = STRnew(); gs->gplus->ModDate = STRnew(); gs->gplus->Views = VIAnew(10); gs->gplus->OtherBlocks = BLAnew(5); gs->gplus->Askdata = NULL; } /*** Destroy gopher object ***/ void GSdestroy(GopherObj *gs) { STRdestroy(gs->Selstr); STRdestroy(gs->Title); STRdestroy(gs->Host); if (GSgetLocalFile(gs) != NULL) unlink(GSgetLocalFile(gs)); STRdestroy(gs->Localfile); STRdestroy(gs->Localview); GSplusdestroy(gs); if (gs->url != NULL) URLdestroy(gs->url); free(gs); } /*** Destroy Gopher+ attributes ***/ void GSplusdestroy(GopherObj *gs) { if (gs->gplus != NULL) { STRdestroy(gs->gplus->Admin); STRdestroy(gs->gplus->ModDate); VIAdestroy(gs->gplus->Views); BLAdestroy(gs->gplus->OtherBlocks); (void)GSsetAskdata(gs, NULL); free(gs->gplus); gs->gplus = NULL; } } /* * Clear out all the crud */ void GSinit(GopherObj *gs) { GSsetType(gs, '\0'); STRinit(gs->Title); STRinit(gs->Selstr); STRinit(gs->Host); if (GSgetLocalFile(gs) != NULL) unlink(GSgetLocalFile(gs)); STRinit(gs->Localfile); STRinit(gs->Localview); gs->ttl = -1; gs->iPort = 0; GSsetNum(gs, 0); GSsetWeight(gs, 0); GSsetGplus(gs,FALSE); /** Default is no gplus **/ GSsetAsk(gs, FALSE); if (gs->url != NULL) URLdestroy(gs->url); gs->url = NULL; GSplusInit(gs); } /* * Clear out gopher+ crud if it exists */ void GSplusInit(GopherObj *gs) { if (gs->gplus != NULL) { STRinit(gs->gplus->Admin); STRinit(gs->gplus->ModDate); VIAinit(gs->gplus->Views); STAinit(gs->gplus->OtherBlocks); } } /* * Set a URL for the gopherobject.. */ void GSsetURL(gs, url) GopherObj *gs; char *url; { if (gs->url == NULL) gs->url = URLnew(); URLset(gs->url, url); } int GSgetNumBlocks(GopherObj *gs) { if (gs->gplus == NULL) return(-1); return(BLAgetTop(gs->gplus->OtherBlocks)); } Blockobj* GSgetBlock(GopherObj *gs, int bnum) { if (gs->gplus == NULL || bnum < 0) return(NULL); return(BLAgetEntry(gs->gplus->OtherBlocks, bnum)); } /* * Return the number of views if item is gopher+ */ int GSgetNumViews(GopherObj *gs) { if (gs->gplus == NULL) return(0); return(VIAgetTop(gs->gplus->Views)); } /* * Find out what a specific view is */ VIewobj * GSgetView(GopherObj *gs, int viewnum) { if (gs->gplus == NULL) return(NULL); return(VIAgetEntry(gs->gplus->Views, viewnum)); } char * GSgetURL(GopherObj *gs, char *ticket) { if (gs->url == NULL) { gs->url = URLnew(); URLfromGS(gs->url, gs, ticket); } return(URLget(gs->url)); } char * GSgetURLhtml(GopherObj *gs, char *ticket) { char *cp = GSgetURL(gs, ticket); char *cp2; int views; if ((cp != NULL) && (strncmp(cp, "gopher://", 9) == 0)) { if ( GSgplusInited(gs) ) { for (views=0; views< GSgetNumViews(gs); views++) { if (!(strncasecmp(VIgetType(GSgetView(gs,views)), "text/html", 9))) { cp = strdup(cp); /** find the type character **/ cp2 = strchr(cp+10, '/'); if (cp2 != NULL) { *(++cp2) = 'h'; cp2++; if (strncmp(cp2, "%2a",3)==0) { /** validated item, skip forward... **/ cp2 = strstr(cp2, "%20"); if (cp2 != NULL) { cp2 +=3; cp2 = strstr(cp2, "%20"); if (cp2 != NULL) { cp2+=3; *cp2 = 'h'; } } } else *cp2 = 'h'; } } } } if (strstr(cp, "/1validate%201") != NULL) { cp = strdup(cp); cp2 = strchr(cp+10, '/'); if (cp2 != NULL) { *(++cp2) = 'h'; *(++cp2) = 'h'; *(cp2+11) = 'h'; } } else if (strstr(cp, "/hhalidate%201") != NULL) { cp = strdup(cp); cp2 = strchr(cp+10, '/'); *(cp2+13) = 'h'; } else if (*(GSgetPath(gs)) == '*') { /** This is a validated item.. **/ ; } } return cp; } static char * GStoNetURL(GopherObj *gs, char *url, char *ticket) { char *path, *ftphost, *ftppath; *url = '\0'; path = GSgetPath(gs); /** This is a server specific hack for now.. **/ if (path == NULL) return(NULL); if ((path != NULL) && (strncmp(path, "ftp://", 6) == 0)) { strcpy(url, path); return(url); } else if ((path != NULL) && (strncmp(path, "ftp:", 4) == 0) ) { ftphost = path+4; ftppath = strchr(ftphost, '@'); if (ftppath != NULL) { sprintf(url, "ftp://%.*s/", (int) (ftppath - ftphost), ftphost); ftppath++; /*** The rest is the file/path ***/ if (*ftppath == '/') ftppath++; strcat(url, ftppath); return(url); } } strcpy(url,GSgetURLhtml(gs,ticket)); return(url); } Blockobj* GSfindBlock(GopherObj *gs, char *blockname) { int x; x = BLAsearch(GSgetOtherBlocks(gs), blockname); Debug("GSfind num is %d\n", x); if (x < 0) return(NULL); else return(GSgetBlock(gs, x)); } void GSsetBlock(GopherObj *gs, char *blockname, char *text, boolean appendIfPoss) { Blockobj *bl = NULL; boolean newbl = FALSE; Debug("GSsetBlock:%s;",blockname); Debug("%s\r\n", text); if (appendIfPoss) bl = GSfindBlock(gs, blockname); if (bl == NULL) { newbl = TRUE; bl = BLnew(); } BLsetName(bl, blockname); BLaddText(bl, text); #ifdef DEBUGGING if (DEBUG) BLtoNet(bl, fileno(stderr), TRUE); #endif if (gs->gplus == NULL) GSplusnew(gs); if (newbl) { BLApush(gs->gplus->OtherBlocks, bl); BLdestroy(bl); } } /* * Set the Askdata, destroy if necessary.. */ char ** GSsetAskdata(GopherObj *gs, char **askdata) { if (!GSgplusInited(gs)) return(NULL); /** Destroy data if necessary **/ if (gs->gplus->Askdata != NULL) { int i=0; char **Askmoo = gs->gplus->Askdata; while (Askmoo[i] != NULL) { free(Askmoo[i++]); } free(Askmoo); } gs->gplus->Askdata = askdata; return(askdata); } /* * Set the administrator line as defined in Gopher+ protocol * Name */ /* Converts the gopher+ moddate from to a struct tm ptr */ struct tm * GSgetModDateTM(GopherObj *gs) { static struct tm time; char *cp; #ifndef NO_MKTIME time_t converted; #endif if ( (gs->gplus == NULL) || (STRget(gs->gplus->ModDate) == NULL) ) return NULL; cp = strchr(STRget(gs->gplus->ModDate), '<'); if (cp == NULL) return NULL; #define ASCII_TO_INT(a) (a - '0') /* Should really do some sanity checking on the input here */ time.tm_year = ((ASCII_TO_INT(cp[1]) * 1000) + (ASCII_TO_INT(cp[2]) * 100) + (ASCII_TO_INT(cp[3]) * 10) + ASCII_TO_INT(cp[4]) ) - 1900; time.tm_mon = (ASCII_TO_INT(cp[5]) * 10) + ASCII_TO_INT(cp[6]) - 1; time.tm_mday = (ASCII_TO_INT(cp[7]) * 10) + ASCII_TO_INT(cp[8]); time.tm_hour = (ASCII_TO_INT(cp[9]) * 10) + ASCII_TO_INT(cp[10]); time.tm_min = (ASCII_TO_INT(cp[11]) * 10) + ASCII_TO_INT(cp[12]); time.tm_sec = (ASCII_TO_INT(cp[13]) * 10) + ASCII_TO_INT(cp[14]); time.tm_isdst = -1; /* make the system figure it out */ #ifndef NO_MKTIME /* if mktime() is present, let it do sanity checking and day of week setting for us */ converted = mktime(&time); if (converted != -1) return (localtime(&converted)); #endif return (&time); } #if defined(VMS) || (defined(GINTERNATIONAL) && !defined(NO_STRFTIME)) /* In internationalized environments, convert the ModDate string to the * native language when it's requested. * If i18n is not on, the macro from GSgopherobj.h is used. * (The i18n definition's are turned on or off in Locale.h) */ char * GSgetModDate(GopherObj *gs) { char dateBuf[256]; char *datetime; struct tm *modTime; if ( (gs->gplus == NULL) || (STRget(gs->gplus->ModDate) == NULL) ) return NULL; modTime = GSgetModDateTM(gs); if ( (modTime != NULL) && strftime(dateBuf, sizeof(dateBuf) - 16, "%c ", modTime) ) { datetime = strchr(STRget(gs->gplus->ModDate), '<'); if (datetime != NULL) strncat(dateBuf, datetime, 16); STRset(gs->gplus->ModDate, dateBuf); } return STRget(gs->gplus->ModDate); } #endif /* GINTERNATIONAL */ void GSsetAdmin(GopherObj *gs, char *admin) { if (gs->gplus == NULL) GSplusnew(gs); STRset(gs->gplus->Admin, admin); } void GSsetModDate(GopherObj *gs, char *str) { if (gs->gplus == NULL) GSplusnew(gs); STRset(gs->gplus->ModDate, str); } /** Add a view for a specific gopherobj **/ void GSaddView(GopherObj *gs, char *view, char *language, int estsize) { char tmpstr[64]; VIewobj *temp; if (estsize > 960) snprintf(tmpstr, sizeof(tmpstr), "%dk", (estsize + 512)/1024); else snprintf(tmpstr, sizeof(tmpstr), ".%dk", ((estsize+64)*10)/1024); temp = VInew(); VIsetType(temp, view); VIsetLang(temp, language); VIsetSize(temp, tmpstr); VIApush(gs->gplus->Views, temp); VIdestroy(temp); } void GSdelTopView(GopherObj *gs) { #define VIApop(a) (DApop((DynArray*)(a))) VIApop(gs->gplus->Views); } void GSaddBlock(GopherObj *gs, char *Blockname, char *file) { Blockobj *bl; bl = BLnew(); BLsetName(bl, Blockname); BLsetFile(bl, file); ; if (gs->gplus == NULL) GSplusnew(gs); BLApush(gs->gplus->OtherBlocks, bl); BLdestroy(bl); } /* * Send a gopher reference into an fd */ static char *nullword = "(NULL)"; void GStoNet(GopherObj *gs, int sockfd, GSformat fmt, char *ticket) { char buf[1024]; int i; Blockobj *bl; if (ticket == NULL) ticket = ""; buf[0] = GSgetType(gs); if (buf[0] == '\0') /* For example a .names with no Type */ buf[0] = '3'; if (fmt == GSFORM_G0) { for (i=0; i< GSgetNumBlocks(gs); i++) { bl = GSgetBlock(gs, i); if (strcasecmp(BLgetName(bl), "ONLYHTML")==0) return; } snprintf(buf + 1, sizeof(buf) - 1, "%s\t%s%s\t%s\t%d", GSgetTitle(gs) ? GSgetTitle(gs) : nullword, ticket ? ticket : nullword, GSgetPath(gs) ? GSgetPath(gs) : nullword, GSgetHost(gs) ? GSgetHost(gs) : nullword, GSgetPort(gs)); if (GSisAsk(gs)) strcat(buf, "\t?\r\n"); else if (GSisGplus(gs)) strcat(buf, "\t+\r\n"); else strcat(buf, "\r\n"); writestring(sockfd, buf); Debug("GStoNet:%s", buf); } else if (fmt == GSFORM_GPLUS) { ; } else if (fmt == GSFORM_HTML) { char url[256]; for (i=0; i < GSgetNumBlocks(gs); i++) { bl = GSgetBlock(gs, i); if (strcmp(BLgetName(bl), "NOHTML") == 0) return; } if (GSgetType(gs) == A_INFO) { writestring(sockfd, "
"); if (strncmp(GSgetTitle(gs), "----------------",16)==0) { writestring(sockfd, "
"); } else writestring(sockfd, GSgetTitle(gs)); writestring(sockfd, "
"); return; } GStoNetURL(gs, url, ticket); if (url[0] == '\0') return; snprintf(buf, sizeof(buf), "%s\r\n", url, GSgetTitle(gs)); writestring(sockfd, buf); if (GSgplusInited(gs)) { Blockobj *bl; bl = GSfindBlock(gs, "ABSTRACT"); if (bl != NULL) { writestring(sockfd, "
"); BLtoNet(bl, sockfd, FALSE); writestring(sockfd, "\r\n"); } } if (GSgetWeight(gs) != 0) { snprintf(buf, sizeof(buf), "
Score: %d\r\n", GSgetWeight(gs)); writestring(sockfd, buf); } } } /* * Send a long gopher data descriptor * * filter is a character array of blocks to send */ void GSplustoNet(GopherObj *gs, int sockfd, char **filter, char *ticket) { int i; char tmpstr[256]; boolean sendviews, sendadmin, sendothers; for (i=0; i < GSgetNumBlocks(gs); i++) { if (strcmp(BLgetName(GSgetBlock(gs, i)), "ONLYHTML") == 0) return; } if (filter == NULL) sendviews = sendadmin = sendothers = TRUE; else { sendviews = sendadmin = sendothers = FALSE; for (i=0; filter[i] != NULL ;i++) { if (strcasecmp(filter[i], "VIEWS")==0) sendviews = TRUE; else if (strcasecmp(filter[i], "ADMIN")==0) sendadmin = TRUE; else sendothers = TRUE; } } /** Send out the old style INFO stuff **/ writestring(sockfd, "+INFO: "); GStoNet(gs,sockfd, GSFORM_G0, ticket); /** Only write out "interesting" URLs **/ if (GSgetURL(gs,ticket) != NULL) { if (strncmp(GSgetURL(gs,ticket), "gopher:", 7) != 0) { writestring(sockfd, "+URL:\r\n "); writestring(sockfd, GSgetURL(gs,ticket)); writestring(sockfd, "\r\n"); } } if (GSgplusInited(gs)) { /*** Should special case for local filename.... ***/ if (GSgetAdmin(gs) != NULL && GSgetModDate(gs) != NULL && sendadmin){ writestring(sockfd, "+ADMIN:\r\n Admin: "); writestring(sockfd, GSgetAdmin(gs)); writestring(sockfd, "\r\n Mod-Date: "); writestring(sockfd, GSgetModDate(gs)); if (GSgetTTL(gs) > -1) { writestring(sockfd, "\r\n TTL: "); snprintf(tmpstr, sizeof(tmpstr), "%d", GSgetTTL(gs)); writestring(sockfd, tmpstr); } writestring(sockfd, "\r\n"); } if (GSgetNumViews(gs) > 0 && sendviews) { writestring(sockfd, "+VIEWS:\r\n"); for (i=0 ; i< GSgetNumViews(gs); i++) { VItoLine(GSgetView(gs, i), tmpstr); writestring(sockfd, tmpstr); writestring(sockfd, "\r\n"); } } if (sendothers) { for (i=0; i< GSgetNumBlocks(gs); i++) BLtoNet(GSgetBlock(gs, i),sockfd, TRUE); } } } /*** GSplusfromnet() assumes that the leading +INFO text has been read from the file descriptor. It returns 1 if there's more data (and another INFO block) 0 if there's EOF SOFTERROR caller can keep reading HARDERROR caller should stop reading ***/ int GSplusfromNet(GopherObj *gs, int fd) { int result,readok,i; boolean nextinfo = FALSE; char plusfield; Blockobj *bl; char inputline[512]; if (gs->gplus == NULL) GSplusnew(gs); bl = BLnew(); /** get the gopher-data descriptor **/ readok = GSfromNet(gs, fd); if (readok == HARDERROR) return(HARDERROR); /** If readok is softerror we still need to look for blocks to throw away any data before next item **/ /** Now start looking for blocks. Process blocks if we know how. **/ /** State: _GotGREF_ **/ if ((result = readrecvbuf(fd, &plusfield, 1))<0) return(HARDERROR); while (!nextinfo) { if (result == 0) { /*** We're done ***/ BLdestroy(bl); if (readok == SOFTERROR) return(SOFTERROR); else return(FOUNDEOF); } switch (plusfield) { case '.': readline(fd, inputline, sizeof(inputline)); result = FOUNDEOF; break; case '+': /*** State _NewBlock_ ***/ if (readtoken(fd,inputline, sizeof(inputline), ':') <= 0) return(HARDERROR); if (strcasecmp(inputline, "INFO")==0) { /** Get rid of the space. **/ if (readrecvbuf(fd, &plusfield,1) <= 0) return(HARDERROR); BLdestroy(bl); if (readok == SOFTERROR) return(SOFTERROR); else return(MORECOMING); } /** Specialized fromNets here **/ BLinit(bl); if ((result=BLfromNet(bl, fd, inputline)) <0) { /** Bad read **/ BLdestroy(bl); return(HARDERROR); } else if (result == FOUNDEOF) /** EOF, block read ok **/ nextinfo = TRUE; else nextinfo = FALSE; /*** See what the block is. Transform it if necessary ***/ if (strcasecmp(BLgetName(bl), "VIEWS")==0) { VIAfromBL(gs->gplus->Views, bl); } else if (strcasecmp(BLgetName(bl), "ADMIN")==0) { int saveAdminBlock = 0; for (i=0; igplus->OtherBlocks, bl); } else if (strcasecmp(BLgetName(bl), "URL")==0) { char *cp; cp = BLgetLine(bl, 0); if (cp != NULL) GSsetURL(gs, cp); } else BLApush(gs->gplus->OtherBlocks, bl); break; /** '+' **/ default: /*** Hmmm plusfield wasn't a plus or '.' **/ return(HARDERROR); } /** switch plusfield **/ } /** While **/ BLdestroy(bl); return(FOUNDEOF); } /* GSfromNet - no comments on the original, so this is my (Mitra's) guess GSfromNet reads a gopher style line, it is called from: GDfromNet - in which case the gopher line is the whole item or; GSplusfromNet - in which case it is the part after the +INFO. It should return after reading the whole line, however in gopher+1.2b2 this is not always the case, especially if it sees a Type=3 returns: 1 blank line (I think?) 0 ok -1 HARDERROR readfield etc error - give up -2 SOFTERROR unrecognized or unhandleable type - skip on to next one */ extern int readfield(); extern int readline(); #if 0 static void GSprocessObject(GopherObj *gs) { if (DEBUG) return; #ifdef GOPHERTOFTP_HOST if (strncmp(GSgetPath(gs),"ftp:",4) == 0) { GSsetPort(gs,GOPHERTOFTP_PORT); GSsetHost(gs,GOPHERTOFTP_HOST); } #endif } #endif /* 0 */ int GSfromNet(GopherObj *gs, int sockfd) { char foo[1024], *cp; if (readtoken(sockfd, foo, 1024, '\t')<= 0) { /* EOF or error */ return(HARDERROR); } GSsetType(gs, foo[0]); /** Get the kind of file from the first character **/ /** Filter out files that we can't deal with **/ switch (GSgetType(gs)) { case A_PDF: case A_FILE: case A_DIRECTORY: case A_MACHEX: case A_PCBIN: case A_CSO: case A_INDEX: case A_TELNET: case A_SOUND: case A_UNIXBIN: case A_GIF: case A_HTML: case A_TN3270: case A_MIME: case A_IMAGE: case A_INFO: case A_MOVIE: case A_APP: break; case A_ERROR: GSsetPath(gs, ""); GSsetHost(gs, ""); GSsetGplus(gs, FALSE); ZapCRLF(foo+1); cp = foo + strlen(foo+1); while (*cp == '.' && (*(cp-1) == '\n' || *(cp-1) == '\r')) { *cp = '\0'; ZapCRLF(foo+1); } break; case A_EOI: if (foo[1] == '\r' && foo[2] == '\n') return(1); default: /** Can't handle this type **/ readline(sockfd, foo, 1024);/** Cleanup **/ return(SOFTERROR); } /** Suck off the User Displayable name **/ cp = foo+1; while (*cp == '\n' || *cp == '\r') cp++; GSsetTitle(gs, cp); /** Suck off the Pathname **/ if (readtoken(sockfd, foo, 1024, '\t') <= 0) return(GSgetType(gs)==A_ERROR?0:HARDERROR); GSsetPath(gs, foo); /** Suck off the hostname **/ if (readtoken(sockfd, foo, 1024, '\t') <= 0) return(GSgetType(gs)==A_ERROR?0:HARDERROR); GSsetHost(gs, foo); if (readline(sockfd, foo, 1024)<=0) return(GSgetType(gs)==A_ERROR?0:HARDERROR); GSsetPort(gs, 0); /** Get the port number **/ if ((cp = strchr(foo, '\t')) != NULL) { *cp = '\0'; switch (*(cp+1)) { case '?': GSsetAsk(gs, TRUE); case '+': GSsetGplus(gs, TRUE); break; } } GSsetPort(gs, atoi(foo)); DebugGSplusPrint(gs,"GSfromNet end:"); return(0); } /** Copy a GopherObj ***/ void GScpy(GopherObj *dest, GopherObj *orig) { dest->sFileType = orig->sFileType; dest->iPort = orig->iPort; dest->Itemnum = orig->Itemnum; GSsetTitle(dest, GSgetTitle(orig)); GSsetPath(dest, GSgetPath(orig)); GSsetHost(dest, GSgetHost(orig)); GSsetGplus(dest, GSisGplus(orig)); GSsetAsk(dest, GSisAsk(orig)); if (orig->url != NULL) GSsetURL(dest, GSgetURL(orig, "")); GSsetTTL(dest, GSgetTTL(orig)); STRinit(dest->Localfile); STRinit(dest->Localview); GSpluscpy(dest, orig); } void GSpluscpy(GopherObj *dest, GopherObj *orig) { if (GSgplusInited(orig)) { if (!GSgplusInited(dest)) GSplusnew(dest); GSsetAdmin(dest, GSgetAdmin(orig)); GSsetModDate(dest, GSgetModDate(orig)); VIAcpy(dest->gplus->Views, orig->gplus->Views); BLAcpy(dest->gplus->OtherBlocks, orig->gplus->OtherBlocks); (void)GSsetAskdata(dest, GSgetAskdata(orig)); } } /** GSmerge combines 2 gopher objects overwriting fields defined in overlay **/ /* Called by GDaddGSmerge to merge gs into directory, that is only called by function to do this from a link */ void GSmerge(GopherObj *gs, GopherObj *overlay) { char *tempstr; char oldFileType; DebugGSplusPrint(gs,"GSmerge: Original"); DebugGSplusPrint(overlay,"GSmerge: Overlay"); if (GSgetHost(overlay) != NULL) { oldFileType = GSgetType(gs); if (GSgetType(overlay) != '\0') { /* Just setting Type wont work, since they interelated with Path * so set first char of path as well */ GSsetType(gs, GSgetType(overlay)); tempstr = GSgetPath(gs); if (*tempstr != A_DIRECTORY) { tempstr[0] = GSgetType(overlay); GSsetPath(gs, tempstr); } if (GSisAsk(overlay) && GSgetType(overlay) == A_DIRECTORY) GSaddView(gs, "application/gopher+-menu", "En_US", 0); /* lang==GDCgetLang(Config), 0 == dummy size here */ /* need this patch for proper protocol & Hgopher, which ignores gopher0 type in favor of +VIEW */ } if (GSgetTitle(overlay) != NULL) GSsetTitle(gs, GSgetTitle(overlay)); /* Don't set path - that is the key to the merge, and in the overlay most probably has the first char set to ' ' ????*/ if (GSgetHost(overlay) != NULL) GSsetHost(gs, GSgetHost(overlay)); if (GSgetPort(overlay) != 0) GSsetPort(gs, GSgetPort(overlay)); if (GSgetNum(overlay) != -1) GSsetNum(gs, GSgetNum(overlay)); if (GSgetWeight(overlay) != 0) GSsetWeight(gs, GSgetWeight(overlay)); if (GSgplusInited(overlay)) { if (!GSgplusInited(gs)) GSplusnew(gs); BLAcpy(gs->gplus->OtherBlocks, overlay->gplus->OtherBlocks); } if (GSgetAdmin(overlay) != NULL) GSsetAdmin(gs, GSgetAdmin(overlay)); if (GSgetModDate(overlay) != NULL) GSsetModDate(gs, GSgetModDate(overlay)); if (GSgetNumViews(gs) && oldFileType == A_FILE && GSgetType(gs) != A_FILE) { char *vs, vsize[64], *vc, vcomments[256]; VIewobj *temp; if ((vs = VIgetSize(GSgetView(gs, 0)))) strcpy(vsize, vs); if ((vc = VIgetComments(GSgetView(gs, 0)))) strcpy(vcomments, vc); VIAdestroy(gs->gplus->Views); gs->gplus->Views = VIAnew(10); temp = VInew(); VIsetType(temp, ""); VIsetLang(temp, ""); VIsetSize(temp, vsize); VIsetComments(temp, vcomments); VIApush(gs->gplus->Views, temp); VIdestroy(temp); } if (GSgetNumViews(overlay)) BLAcpy(gs->gplus->Views, overlay->gplus->Views); } DebugGSplusPrint(gs,"GSmerge: Result"); } /** Compare two GopherObjs ***/ #if 0 /* unused */ static int GScmp(GopherObj *gs1, GopherObj *gs2) { if (GSgetTitle(gs1) == NULL) return(1); if (GSgetTitle(gs2) == NULL) return(-1); return(strcmp(GSgetTitle(gs1), GSgetTitle(gs2))); } #endif /* 0 */ /*********** The following functions implement the gopher/gopher+ protocol, mostly GSconnect(), then GStransmit(), GSsendHeader() GSrecvHeader(); ************/ /* GSconnect performs a connection to socket 'service' on host * 'host'. Host can be a hostname or ip-address. If 'host' is null, the * local host is assumed. The parameter full_hostname will, on return, * contain the expanded hostname (if possible). Note that full_hostname is a * pointer to a char *, and is allocated by connect_to_gopher() * * returns Errors : ErrSocket* defined in Sockets.h or socket * */ int GSconnect(GopherObj *gs) { int sockfd; Debug("GSconnect: Host=%s",GSgetHost(gs)); Debug("Port=%d\r\n",GSgetPort(gs)); sockfd = SOCKconnect(GSgetHost(gs), GSgetPort(gs)); return(sockfd); } /* * GStransmit sends the request from the client to the server * * All parameters are optional except for gs and sockfd. * * the rest pertain to gopher+ transmission. */ void GStransmit(GopherObj *gs, int sockfd, char *search, char *command, char *view) { char *cp; char **ask = GSgetAskdata(gs); int i; writestring(sockfd, GSgetPath(gs)); if (search != NULL) { writestring(sockfd, "\t"); writestring(sockfd, search); } /** Only send if gplus **/ if (!GSisGplus(gs)) { writestring(sockfd, "\r\n"); return; } if (command != NULL) { writestring(sockfd, "\t"); writestring(sockfd, command); } if (view != NULL) { writestring(sockfd, view); } if (ask == NULL) writestring(sockfd, "\r\n"); else { writestring(sockfd, "\t1\r\n"); GSsendHeader(sockfd, -1); for (i=0; ;i++) { cp = ask[i]; if (cp == NULL) break; writestring(sockfd, cp); writestring(sockfd, "\r\n"); } writestring(sockfd, ".\r\n"); } } /* * GSsendHeader generates an appropriate header on sockfd * */ void GSsendHeader(int sockfd, long size) { char sizestr[64]; snprintf(sizestr, sizeof(sizestr), "+%ld\r\n", size); writestring(sockfd, sizestr); } /** GSsendErrorHeader sends an error message header/message to the client **/ void GSsendErrorHeader(GopherObj *gs, int sockfd, int errortype, char *errormsg) { char tmpstr[512]; snprintf(tmpstr, sizeof(tmpstr), "-%d %s\r\n", errortype, errormsg); writestring(sockfd, tmpstr); } /* * GSrecvHeader will retrieve a gopher+ header, if it exists * * It returns the expected number of bytes that are headed our * way, if it can. * * Otherwise it returns -1 to indicate to read until \r\n.\r\n * or -2 to indicate to read to EOF * * If it encounters an error, it returns 0 and sets errno to the * gopher error class. */ int GSrecvHeader(GopherObj *gs, int sockfd) { char headerline[256]; Debugmsg("GSrecvHeader\n"); if (GSisGplus(gs)) { if (readline(sockfd, headerline, sizeof(headerline))<=0) return(0); ZapCRLF(headerline); if (*headerline == '+') { if (*(headerline+1) == '-') return(- (atoi(headerline+2))); else return(atoi(headerline+1)); } else if (*headerline == '-') { /*** Oh no! an error! ***/ errno = atoi(headerline+1); return(0); } } /*** Guess if we're running old style gopher ***/ else { switch (GSgetType(gs)) { case A_SOUND: case A_IMAGE: case A_GIF: case A_UNIXBIN: case A_PCBIN: return(-2); break; default: return(-1); } } return(-1); /** Should never get here **/ } /* * This routine will load up the item information from a gopher item * if the item hasn't transferred it already... * * The savename param, if TRUE will keep the current name and type */ void GSgetginfo(GopherObj *gs, boolean savename) { int sockfd, bytes; char inputline[256]; String *tempname = NULL; char temptype='\0'; if (!GSisGplus(gs)) return; /** Try not to overwrite stuff unnecessarily.. **/ if (GSgplusInited(gs)) { if (GSgetAdmin(gs)!=NULL) return; if (GSgetAskdata(gs) != NULL) return; } if (savename) { tempname = STRnew(); STRset(tempname, GSgetTitle(gs)); temptype = GSgetType(gs); } GSplusnew(gs); /** Send out the request **/ if ((sockfd = GSconnect(gs)) <0) { /*check_sock(sockfd, GSgetHost(gs), GSgetPort(gs));*/ return; } GStransmit(gs, sockfd, NULL, "!", NULL); bytes = GSrecvHeader(gs,sockfd); if (bytes == 0) return; /*** Read off the first info block ***/ readtoken(sockfd, inputline, sizeof(inputline), ' '); GSplusfromNet(gs, sockfd); if (savename) { GSsetTitle(gs, STRget(tempname)); GSsetType(gs, temptype); STRdestroy(tempname); } } /* * GSfromLink takes an FIO structure and starts reading from it. * * It reads until it finds a line it recognizes, then * * It keeps going until it finds * eof, a non-recognized line, as long as there is a valid Path= line * * returns -1 on an error, 0 for EOF, 1 for success */ int GSfromLink( GopherObj *gs, FileIO *fio, char *host, int port, char *directory, char *peer) { int doneflags = 0; char buf[1024]; int bytesread; boolean DomainDefault = TRUE; /** Default for using domain stuff yes/no */ boolean BadDomain = FALSE; /** For use with the Domain= line **/ boolean DidDomain = FALSE; /** Needed to make Domain= lines into logical or's **/ buf[0] = '\0'; Debugmsg("GSfromLink...\n"); while ((bytesread = FIOreadlinezap(fio, buf, sizeof(buf)))>0) { if (buf[0] == '#') { if (doneflags & G_PATH) break; /* comment */ else continue; } ZapCRLF(buf); if (strncmp(buf, "Type=", 5)==0) { GSsetType(gs, buf[5]); if (buf[6] == '+') GSsetGplus(gs, TRUE); if (buf[6] == '?') GSsetAsk(gs, TRUE); doneflags |= G_TYPE; } else if (strncmp(buf, "Name=", 5)==0) { GSsetTitle(gs, buf+5); doneflags |= G_NAME; } else if (strncmp(buf, "Path=", 5)==0) { if (strncmp(buf+5, "~/",2) == 0 || strncmp(buf+5, "./",2) == 0) { char tmpstr[256]; *tmpstr = '.'; strcpy(tmpstr+1, directory); if (directory[strlen(directory)-1] == '/') strcat(tmpstr, buf+7); else strcat(tmpstr, buf+6); GSsetPath(gs, tmpstr); GSsetHost(gs, host); } else GSsetPath(gs, buf+5); doneflags |= G_PATH; } else if (strncmp(buf, "Host=", 5)==0) { if (buf[5] == '+' && buf[6] == '\0') GSsetHost(gs, host); else GSsetHost(gs, buf+5); doneflags |= G_HOST; } else if (strncmp(buf, "Port=", 5)==0) { if (buf[5] == '+' && buf[6] == '\0') GSsetPort(gs, port); else GSsetPort(gs, atoi(buf+5)); doneflags |= G_PORT; } else if (strncmp(buf, "Numb=", 5)==0) GSsetNum(gs, atoi(buf+5)); else if (strncmp(buf, "Abstract=", 9)==0) { char *acp; acp = buf+9; while (*(buf + strlen(buf)-1) == '\\' && bytesread >0) { /* A continuation line */ *(buf + strlen(buf)-1) = '\0'; GSsetAbstract(gs, acp); bytesread = FIOreadlinezap(fio, buf, sizeof(buf)); acp = buf; } GSsetAbstract(gs, acp); } else if (strncmp(buf, "Admin=", 6) == 0) GSsetAdmin(gs, buf +6); else if (strncmp(buf, "URL=", 4) == 0) doneflags |= GSfromURL(gs, buf + 4, host, port, doneflags); else if (strncmp(buf, "Domaindef=", 10)==0 && peer != NULL) { DomainDefault = (strcasecmp(buf+10, "no")!=0); Debug("Default Domain is %s\n", buf+10); } else if (strncmp(buf, "Domain=", 7) ==0 && peer != NULL) { /** Check to see if the peer matches the domain **/ int peerlen,domainlen; boolean TestResult = !DomainDefault; char *host = buf+7; if (*host == '!') { TestResult = TRUE; host++; } peerlen = strlen(peer); domainlen = strlen(host); if (DidDomain == TRUE && BadDomain == FALSE) break; if (domainlen > peerlen) { BadDomain = !TestResult; } else if (strncasecmp(buf+7, peer + peerlen - domainlen, domainlen)== 0) { /** Domains match, do it! **/ BadDomain = TestResult; } else BadDomain = !TestResult; DidDomain = TRUE; } #ifndef VMS else if (strncmp(buf, "Domain_pat=", 11) ==0 && peer != NULL) { char *host = buf+11; boolean TestResult = !DomainDefault; if (DidDomain == TRUE && BadDomain == FALSE) break; if (*host == '!') { host++; TestResult = TRUE; } /** Check for domain using regexps **/ if (re_comp(host)) break; if (re_exec(peer) == 1) BadDomain = TestResult; else BadDomain = !TestResult; DidDomain = TRUE; } #endif else if (strncmp(buf, "TTL=", 4) == 0) { GSsetTTL(gs, atoi(buf+4)); } else break; /*** Unknown name/item ***/ } Debugmsg("Done with this link item\n"); if (BadDomain) return(SOFTERROR); if (bytesread == 0) { if (doneflags & G_PATH) return(FOUNDEOF); /** Found the eof, plus there's a g item **/ else return(HARDERROR); /** Mangled item, plus eof, stop the game **/ } if (doneflags & G_PATH) return(MORECOMING); /** Found item, more coming. **/ else return(SOFTERROR); /** Mangled item, more coming.. **/ } /* * Fill in a GopherObj, given a URL */ int GSfromURL(GopherObj *gs, char *urltxt, char *host, int port, int doneflags) { char tempbuf[256]; Url *url; UrlServiceType serviceType; url = URLnew(); URLset(url, urltxt); Debug("GSfromURL: %s\r\n",urltxt); GSsetURL(gs, urltxt); serviceType = URLgetService(url); switch (serviceType) { case http: if (! (doneflags & G_TYPE)) { /* It may not be HTML, but we lie and say it is so the */ /* client passes it off to a http-speaking program */ GSsetType(gs, A_HTML); doneflags |= G_TYPE; } if (! (doneflags & G_PATH)) { snprintf(tempbuf, sizeof(tempbuf), "GET /%s", URLgetPath(url)); GSsetPath(gs, tempbuf); } doneflags |= G_PATH; break; case ftp: if (! (doneflags & G_HOST)) { GSsetHost(gs, host); doneflags |= G_HOST; } if (! (doneflags & G_PORT)) { GSsetPort(gs, port); doneflags |= G_PORT; } break; case telnet: if (! (doneflags & G_TYPE)) { GSsetType(gs, A_TELNET); doneflags |= G_TYPE; } case tn3270: if (! (doneflags & G_TYPE)) { GSsetType(gs, A_TN3270); doneflags |= G_TYPE; } break; case gopher: if (! (doneflags & G_TYPE)) { GSsetType(gs, URLgetGophType(url)); doneflags |= G_TYPE; } break; default: /* A type we can't deal with... */ return(doneflags); } if (! (doneflags & G_NAME)) { GSsetTitle(gs, URLget(url)); doneflags |= G_NAME; } /* Use login & password if needed & present */ switch (serviceType) { case telnet: case tn3270: if (URLgetUser(url) != NULL) GSsetPath(gs, URLgetUser(url)); else GSsetPath(gs, ""); doneflags |= G_PATH; break; /* Unhandled cases... */ case gopher: case http: case ftp: case news: case unset: case unknown: break; } if (serviceType == ftp) { if (!(doneflags & G_PATH)) { if (URLgetPath(url) != NULL && *URLgetPath(url) != '\0') snprintf(tempbuf, sizeof(tempbuf), "ftp:%s@/%s", URLgetHost(url), URLgetPath(url)); else snprintf(tempbuf, sizeof(tempbuf), "ftp:%s@/", URLgetHost(url)); GSsetPath(gs, tempbuf); doneflags |= G_PATH; } if (! (doneflags & G_TYPE)) { if (URLgetPath(url) != NULL) { if ((*(URLgetPath(url)) == '\0') || *(URLgetPath(url) + strlen(URLgetPath(url))-1) == '/') GSsetType(gs, A_DIRECTORY); else GSsetType(gs, A_FILE); doneflags |= G_TYPE; } } } else { if (! (doneflags & G_HOST)) { GSsetHost(gs, URLgetHost(url)); doneflags |= G_HOST; } if (! (doneflags & G_PORT)) { GSsetPort(gs, URLgetPort(url)); doneflags |= G_PORT; } } if (! (doneflags & G_PATH) || GSgetPath(gs) == NULL) { char *cp; GSsetPath(gs, (cp=URLgetPath(url)) ? cp : ""); doneflags |= G_PATH; } return doneflags; } void GStoLink(GopherObj *gs, int fd, BOOLEAN AddInfo) { char gtype[2]; char portnum[16]; gtype[0] = GSgetType(gs); gtype[1] = '\0'; writestring(fd, "#"); writestring(fd, "\nType="); writestring(fd, gtype); if (GSisGplus(gs)) writestring(fd, "+"); writestring(fd, "\nName="); writestring(fd, GSgetTitle(gs)); writestring(fd, "\nPath="); writestring(fd, GSgetPath(gs)); writestring(fd, "\nHost="); writestring(fd, GSgetHost(gs)); writestring(fd, "\nPort="); snprintf(portnum, sizeof(portnum), "%d", GSgetPort(gs)); writestring(fd, portnum); writestring(fd, "\n"); if (GSisGplus(gs) && GSgplusInited(gs) && AddInfo) { writestring(fd, "Admin="); writestring(fd, GSgetAdmin(gs)); writestring(fd, "\nModDate="); writestring(fd, GSgetModDate(gs)); writestring(fd, "\n"); } } boolean GSisText(GopherObj *gs, char *view) { if (view == NULL) { switch (GSgetType(gs)) { case A_DIRECTORY: case A_FILE: case A_MIME: case A_CSO: case A_MACHEX: return(TRUE); case A_HTML: /* For goofy relative urls, ugh! */ default: return(FALSE); } } else { char viewstowage[64], *cp; strcpy(viewstowage, view); if ((cp=strchr(viewstowage, ' '))!=NULL) { *cp = '\0'; view = viewstowage; } if (strncasecmp(view, "Text",4) == 0 || strncasecmp(view, "message/rfc822", 14)==0 || strncasecmp(view, "application/postscript", 21)==0 || strncasecmp(view, "application/mac-binhex40", 24)==0 || strncasecmp(view, "application/rtf", 15) == 0 || strncasecmp(view, "application/gopher", 18) == 0) return(TRUE); else return(FALSE); } } #ifdef DEBUGGING void GSplusPrint(GopherObj *gs, char *head) { int i; int oldDebug = DEBUG; DEBUG=FALSE; fprintf(stderr,"%s: Type=%c,Title=%s,Path=%s,Host=%s,Port=%d,Num=%d,Weight=%d,Plus=%d,Ask=%d\r\n", head, GSgetType(gs), GSgetTitle(gs), GSgetPath(gs), GSgetHost(gs), GSgetPort(gs), GSgetNum(gs), GSgetWeight(gs), GSisGplus(gs), GSisAsk(gs) ); if (GSgplusInited(gs)) for (i=0; i< GSgetNumBlocks(gs); i++) { BLtoNet(GSgetBlock(gs, i), fileno(stderr), TRUE); } fprintf(stderr,"===============\r\n"); DEBUG = oldDebug; } #endif gopher-3.0.15/object/Sockets.c0000664000000000000000000003076110762617110013011 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2002/03/19 20:42:48 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Sockets.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Sockets.c * Socket functions ********************************************************************* * Revision History: * $Log: Sockets.c,v $ * Revision 1.2 2002/03/19 20:42:48 jgoerzen * * Removed the DOMAIN configure support, DOMAIN_NAME in gopherd, * backupdomain in Socket.c, etc. This should prevent the no.domain.name * problem that people have been seeing. Regenerated configure stuff. * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.22 1995/09/25 22:07:20 lindner * Ansification * * Revision 3.21 1995/06/30 20:31:39 lindner * Fix for weirdness * * Revision 3.20 1995/04/15 07:07:39 lindner * Add ControlC handling feature... * * Revision 3.19 1994/07/31 05:09:47 lindner * Add option to log only IP * * Revision 3.18 1994/04/25 03:46:03 lindner * Fix for NETLIB and CMUIP * * Revision 3.17 1994/04/25 03:36:59 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.16 1994/04/08 20:05:53 lindner * gcc -Wall fixes * * Revision 3.15 1994/03/31 21:03:35 lindner * Use better, more descriptive return codes for socket routines * * Revision 3.14 1994/03/17 04:45:39 lindner * Add needed stdio.h * * Revision 3.13 1994/03/17 04:44:39 lindner * Add needed stdio.h * * Revision 3.12 1994/03/17 04:36:01 lindner * Move socket specific server code here, rearrange include files * * Revision 3.11 1994/03/08 15:56:20 lindner * gcc -Wall fixes * * Revision 3.10 1994/01/12 22:23:50 lindner * Fixes for Data General * * Revision 3.9 1993/12/27 16:16:03 lindner * Fix for sign on integer.. * * Revision 3.8 1993/10/19 20:49:02 lindner * Fix for NETLIB * * Revision 3.7 1993/10/11 17:26:01 lindner * Fix for cmuip/netlib * * Revision 3.6 1993/09/21 01:51:34 lindner * Moved netnames fcn.. * * Revision 3.5 1993/08/09 20:17:10 lindner * Fixes for CMULIB and NETLIB for VMS * * Revision 3.4 1993/08/05 03:23:37 lindner * Changes for CMUIP and NETLIB * * Revision 3.3 1993/07/29 20:01:02 lindner * Removed dead variables * * Revision 3.2 1993/07/27 05:30:27 lindner * Mondo Debug overhaul from Mitra * * Revision 3.1 1993/07/07 19:27:25 lindner * Socket functions * * * *********************************************************************/ /* Generic stuff */ #include #include "boolean.h" #include "compatible.h" #include "Debug.h" #include "util.h" #ifdef unix # include #endif #include "Sockets.h" #include "Malloc.h" /* * This turns the linger output off */ void SOCKlinger(int sockfd, boolean onoff) { #if defined(SO_LINGER) && !defined(NO_LINGER) struct linger linger; linger.l_onoff = onoff; linger.l_linger = 0; if (setsockopt(sockfd, SOL_SOCKET, SO_LINGER, (char *)&linger, sizeof (linger)) < 0) perror("server: can't turn off linger sockopt"),exit(-1); #endif } /* * This function returns a socket file descriptor bound to the given port */ #if !defined(CMUIP) && !defined(NETLIB) int SOCKbind_to_port(int port) { struct sockaddr_in serv_addr; int reuseaddr = 1; int sockfd; if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) perror("server: can't open stream socket"), exit(-1); /** Bind our local address so that the client can send to us **/ bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); serv_addr.sin_port = htons(port); if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuseaddr, sizeof(reuseaddr)) < 0) perror("server: can't set REUSEADDR!"),exit(-1); if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) <0) return(-1); /* perror("server: can't bind local address"),exit(-1);*/ SOCKlinger(sockfd, FALSE); return(sockfd); } /* * This routine finds out the hostname of the server machine. * It uses a couple of methods to find the fully qualified * Domain name * * If gdchost is non NULL then use that paramater instead of * the code in here. */ char * SOCKgetDNSname(char *gdchost) { static char DNSname[MAXHOSTNAMELEN]; struct hostent *hp; if (gdchost != NULL && *gdchost != '\0') return(gdchost); DNSname[0] = '\0'; /* Work out our fully-qualified name, for later use */ if (gethostname(DNSname, MAXHOSTNAMELEN) != 0) { fprintf(stderr, "Cannot determine the name of this host\n"); exit(-1); } /* Now, use gethostbyname to (hopefully) do a nameserver lookup */ hp = gethostbyname( DNSname); /* ** If we got something, and the name is longer than hostname, then ** assume that it must the the fully-qualified hostname */ if ( hp!=NULL && strlen(hp->h_name) > strlen(DNSname) ) strncpy( DNSname, hp->h_name, MAXHOSTNAMELEN ); return(DNSname); } /* * Tries to figure out what the currently connected port is. * * If it's a socket then it will return the port of the socket, * if it isn't a socket then it returns -1. */ int SOCKgetPort(int fd) { struct sockaddr_in serv_addr; socklen_t length = sizeof(serv_addr); /** Try to figure out the port we're running on. **/ if (getsockname(fd, (struct sockaddr *) &serv_addr,&length) == 0) return(ntohs(serv_addr.sin_port)); else return(-1); } #endif /* not CMUIP nor NETLIB */ /* SOCKconnect performs a connection to socket 'service' on host * 'host'. Host can be a hostname or ip-address. If 'host' is null, the * local host is assumed. The parameter full_hostname will, on return, * contain the expanded hostname (if possible). Note that full_hostname is a * pointer to a char *, and is allocated by connect_to_gopher() * * Errors: ErrSocket* defined in Sockets.h * */ int SOCKconnect(char *hostname, int port) { #if !defined(CMUIP) && !defined(NETLIB) struct sockaddr_in Server; struct hostent *HostPtr; int sockfd = 0; unsigned int ERRinet = -1; #ifdef _CRAY ERRinet = 0xFFFFFFFF; /* -1 doesn't sign extend on 64 bit machines */ #endif /*** Find the hostname address ***/ if (hostname == NULL || *hostname == '\0') return(ErrSocketNullHost); #ifdef DGUX Server.sin_addr = inet_addr(hostname); if (Server.sin_addr.s_addr == ERRinet) #else if ((Server.sin_addr.s_addr = inet_addr(hostname)) == ERRinet) #endif { if ((HostPtr = gethostbyname(hostname)) != NULL) { bzero((char *) &Server, sizeof(Server)); bcopy(HostPtr->h_addr, (char *) &Server.sin_addr, HostPtr->h_length); Server.sin_family = HostPtr->h_addrtype; } else return (ErrSocketGetHost); } else Server.sin_family = AF_INET; Server.sin_port = (unsigned short) htons(port); /*** Open the socket ***/ if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) return (ErrSocketCall); #ifndef UCX setsockopt(sockfd, SOL_SOCKET, ~SO_LINGER, 0, 0); #endif setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, 0, 0); setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, 0, 0); /*** Connect ***/ if (ControlCpressed) { /* Already interrupted */ return(ErrSocketInterrupted); } if (signal(SIGINT, controlcJmp) == SIG_ERR) perror("signal died:\n"), exit(-1); if (setjmp(Jmpenv)) { /* Note controlcJmp will reprime controlc and set flag*/ Debug("interruptable_connect triggered\r\n",NULL) return(ErrSocketInterrupted); } if (connect(sockfd, (struct sockaddr *) &Server, sizeof(Server)) < 0) { closenet(sockfd); reprimeControlc(); return (ErrSocketConnect); } reprimeControlc(); return(sockfd); #else /* !NETLIB && !CMUIP */ #ifdef NETLIB int status; static int iSock = 0; struct { long len; char *adr; } host_desc; #define NET_K_TCP 1 status = NET_ASSIGN (&iSock); if ((status & 1) == 0) return (ErrSocketCall); status = NET_BIND (&iSock, NET_K_TCP); if ((status & 1) == 0) return (ErrSocketCall); host_desc.adr = hostname; host_desc.len = strlen (host_desc.adr); status = TCP_CONNECT (&iSock, &host_desc, port); if ((status & 1) == 0) { NET_DEASSIGN (&iSock); if (status == SS$_REJECT || status == SS$_TIMEOUT) { if (status == SS$_REJECT) errno = ECONNREFUSED; else errno = ETIMEDOUT; return (ErrSocketConnect); } if (status == SS$_ENDOFFILE) return (ErrSocketGetHost); return (ErrSocketGetService); } return (iSock); #else /* ifdef NETLIB: assume CMUIP */ short channel; int status; struct { short status; short size; long xxx; } cmu_iosb; static struct {long l; char *a;} ip_dev = {12, "INET$DEVICE:"}; globalvalue NET$_CREF; /* Connection refused */ globalvalue NET$_FTO; /* Function timedout */ globalvalue NET$_DSNAMERR; /* Domain server name error */ status = SYS$ASSIGN (&ip_dev, &channel, 0, 0); if ((status & 1) == 0) return (ErrSocketCall); status = SYS$QIOW (0, channel, IO$_CREATE, &cmu_iosb, 0, 0, hostname, port, 0, 1, 0, 0); if ((status & 1) == 0 || (cmu_iosb.status & 1) == 0) { SYS$DASSGN (channel); if (cmu_iosb.status == SS$_ABORT || cmu_iosb.xxx == NET$_FTO) { if (cmu_iosb.xxx == NET$_CREF) errno = ECONNREFUSED; else errno = ETIMEDOUT; return(ErrSocketConnect); } if (cmu_iosb.xxx == NET$_DSNAMERR) return (ErrSocketGetHost); } return (channel); #endif #endif } /* * */ #if !defined(CMUIP) && !defined(NETLIB) /* temp - MLH */ int SOCKlisten(struct sockaddr_in * We) { int sockfd = 0; struct hostent *HostPtr; socklen_t len = sizeof(struct sockaddr); char name[100]; sockfd = SOCKbind_to_port(sockfd); if (listen(sockfd, 5) || getsockname(sockfd, (struct sockaddr *) We, &len)) { closenet(sockfd); return(ErrSocketGetHost); } gethostname(name, 100); if ((HostPtr = gethostbyname(name))) bcopy(HostPtr->h_addr, (char *) &We->sin_addr, HostPtr->h_length); return(sockfd); } /* SOCKaccept accepts a connection form some socket. * * Errors: ErrSocket* defined in Sockets.h */ int SOCKaccept(int s, struct sockaddr_in we) { int sockfd = 0; socklen_t len = sizeof(struct sockaddr); unsigned short tem; tem = ntohs(we.sin_port); Debugmsg("Here we go...\n"); if ((sockfd = accept(s, (struct sockaddr *) &we, &len)) < 0) { return ErrSocketConnect; } close(s); /* Der Mohr hat seine Schuldigkeit getan */ return(sockfd); } /* * SOCKnetnames -- return the network, subnet, and host names of * our peer process for the Internet domain. * * Parameters: "sock" is our socket * "host_name" * is filled in by this routine with the * corresponding ASCII names of our peer. * * if there doesn't exist a hostname in DNS etal, * the IP# will be inserted for the host_name * * "ipnum" is filled in with the ascii IP# */ void SOCKnetnames(int sockfd, char *host_name, char *ipnum) { struct sockaddr_in sa; socklen_t length; struct hostent *hp; length = sizeof(sa); if (getpeername(sockfd, (struct sockaddr *)&sa, &length)) /** May fail if sockfd has been closed **/ return; if (ipnum != NULL) strcpy(ipnum, inet_ntoa(sa.sin_addr)); if (host_name != NULL) strcpy(host_name, inet_ntoa(sa.sin_addr)); #ifdef LOG_IP_ONLY hp = NULL; #else hp = gethostbyaddr((char *) &sa.sin_addr,sizeof (sa.sin_addr), AF_INET); #endif if (hp != NULL && host_name != NULL) (void) strcpy(host_name, hp->h_name); } #endif /** CMUIP etal **/ gopher-3.0.15/object/Sockets.h0000664000000000000000000000557610762617110013024 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2002/03/19 20:42:48 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Sockets.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Sockets.h * Socket protos etc. ********************************************************************* * Revision History: * $Log: Sockets.h,v $ * Revision 1.2 2002/03/19 20:42:48 jgoerzen * * Removed the DOMAIN configure support, DOMAIN_NAME in gopherd, * backupdomain in Socket.c, etc. This should prevent the no.domain.name * problem that people have been seeing. Regenerated configure stuff. * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.7 1995/09/25 22:07:21 lindner * Ansification * * Revision 3.6 1995/02/13 19:09:45 lindner * Add sys/param.h * * Revision 3.5 1994/04/08 20:05:54 lindner * gcc -Wall fixes * * Revision 3.4 1994/03/31 21:03:36 lindner * Use better, more descriptive return codes for socket routines * * Revision 3.3 1994/03/17 04:35:04 lindner * Move definitions from gopherd.h here * * Revision 3.2 1994/01/21 04:14:31 lindner * Add forward declaration for SOCKnetnames() * * Revision 3.1 1993/07/07 19:27:27 lindner * Socket functions * * *********************************************************************/ #ifndef SOCKETS_H #define SOCKETS_H /* Socket specific stuff, ugh! */ #ifdef VMS # if !defined(CMUIP) && !defined(NETLIB) # include # include # include # include # include # include iodef # include ssdef # else # include iodef # include ssdef # include errno # include perror # endif /* if !CMUIP && !NETLIB */ #else /* VMS */ # include # include # include # include # include # ifndef hpux # include # endif # include #endif /* not VMS */ #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN (64) #endif void SOCKlinger(int sockfd, boolean onoff); int SOCKbind_to_port(int port); int SOCKconnect(char *hostname, int port); int SOCKlisten(struct sockaddr_in * We); int SOCKaccept(int s, struct sockaddr_in we); void SOCKnetnames(int sockfd, char *host_name, char *ipnum); char *SOCKgetDNSname(char *gdchost); int SOCKgetPort(int fd); #define ErrSocketGetService -1 #define ErrSocketGetHost -2 #define ErrSocketCall -3 #define ErrSocketConnect -4 #define ErrSocketNullHost -5 #define ErrSocketInterrupted -6 #endif /* SOCKETS_H */ gopher-3.0.15/object/STRstring.c0000664000000000000000000001070510762617110013271 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/STRstring.c,v $ * $Status: $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: STRstring.c * Implement dynamic string library functions ********************************************************************* * Revision History: * $Log: STRstring.c,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.11 1995/09/25 22:07:19 lindner * Ansification * * Revision 3.10 1995/06/30 20:32:04 lindner * start protoing * * Revision 3.9 1994/03/17 05:52:49 lindner * Fix for multiple STRinits * * Revision 3.8 1994/03/04 17:31:39 lindner * Don't assume a char is one byte long * * Revision 3.7 1994/02/20 16:23:13 lindner * Optimize STRinit so that memory isn't freed then reallocated * * Revision 3.6 1993/10/27 18:53:23 lindner * don't forget \0 * * Revision 3.5 1993/10/22 20:15:52 lindner * Remove superfulous declaration of len (Fote) * * Revision 3.4 1993/10/19 20:46:00 lindner * Better, tighter STRstring stuff (Fote) * * Revision 3.3 1993/08/16 19:35:09 lindner * Return a correct value for STRcpy * * Revision 3.2 1993/03/24 17:07:52 lindner * STRset with a NULL value will STRinit() the string * * Revision 3.1.1.1 1993/02/11 18:03:03 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #include "STRstring.h" #include "String.h" #include "Malloc.h" /* * Make a new string, don't set anything for default yet. */ String * STRnew(void) { String *temp; temp = (String *) malloc(sizeof(String)); temp->data = NULL; temp->len = 0; return(temp); } /* * Destroy a string */ void STRdestroy(String *st) { if (st != NULL) { if (st->data != NULL) free(st->data); free(st); } else perror("STRdestroy: non existant string!\n"); } /* * Don't free the memory. Instead, negate the length value and keep the * memory for later use. More efficient that way. */ void STRinit(String *st) { if (st != NULL) { if (st->len > 0) st->len = - st->len; /* if (st->data != NULL) { free(st->data); st->data = NULL; }*/ } else perror("STRinit, non existant string!"); } /* * Set a string value */ void STRset(String *st, char *str) { register int len; /* To set a null value, STRinit the item */ if (str == NULL) { STRinit(st); return; } /* Negative value for len means memory is initialized, reset to positive value so the rest of the code works well. */ if (st->len < 0) st->len = -st->len; if (*str == '\0') len = 1; else len = strlen(str)+1; /** Don't forget the '\0' **/ /* Uninitialized data... */ if (st->data == NULL) { st->data = (char *) malloc(sizeof(char*) * len); st->len = len; } /** Something's already there... **/ else if (STRsize(st) < len) { char *temp; temp = (char *) realloc(st->data, sizeof(char) * len); /*** Should check for NULL ... ***/ if (temp == NULL) perror("realloc failed..."); st->data = temp; st->len = len; } /* space is ok and st->len is set, so copy in the new string */ strcpy(st->data, str); } /* * Add a string to the end of the string that's there already */ String* STRcat(String *st, char *cp) { int len; char *temp; if (cp == NULL) return(NULL); if (STRlen(st) == 0) { STRset(st, cp); return(st); } len = strlen(cp) + STRlen(st); temp = (char *) malloc(sizeof(char) * len); strcpy(temp, STRget(st)); strcat(temp, cp); STRset(st, temp); free(temp); return(st); } int STRcmp(String *st1, String *st2) { register char *cp1, *cp2; cp1 = STRget(st1); cp2 = STRget(st2); if (cp1 == NULL) return(- !0); else if (cp2 == NULL) return( !0); else return(strcmp(cp1, cp2)); } String* STRcpy(String *s1, String *s2) { STRset(s1, STRget(s2)); return(s1); } gopher-3.0.15/object/Regex.h0000664000000000000000000001420010762617110012443 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.17 $ * $Date: 2002/03/19 20:57:55 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Regex.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Regex.h * Portable method of doing regular expressions ********************************************************************* * Revision History: * $Log: Regex.h,v $ * Revision 1.17 2002/03/19 20:57:55 jgoerzen * Modified #warn -> #warning to use correct syntax. * * Revision 1.16 2002/03/19 20:37:28 jgoerzen * Updated configure stuff with regcomp and regfree checks. * Made Regex.h more robust with regcomp stuff. * * Revision 1.15 2002/03/19 20:07:16 jgoerzen * GSgopherobj.c: Moved Regex.h include up. * * Regex.c, Regex.h: continuing full rewrites. * * Revision 1.14 2002/03/19 19:58:12 jgoerzen * More updates. This is part of a major rewrite. * * Revision 1.13 2002/03/19 19:53:31 jgoerzen * *** empty log message *** * * Revision 1.12 2002/03/19 18:07:42 jgoerzen * Fixed regex stuff for Solaris -- I hope! * * Updated changelog. * * More notes in Platforms. * * Revision 1.11 2002/02/12 20:57:18 jgoerzen * Fixed an incorrect comment and added parens * * Revision 1.10 2002/02/12 20:50:21 jgoerzen * Beginning of MacOS X (Darwin) support. * Many modifications to Regex.[ch], see debian/changelog for details. * * Revision 1.9 2002/02/12 19:54:18 jgoerzen * Updated with regex fixes * * Revision 1.8 2002/01/10 18:48:31 jgoerzen * Fix for Linux * * Revision 1.7 2002/01/10 18:43:18 jgoerzen * * Changes to work with Solaris: * * configure.in: Now looks for strings.h and string.h * * object/Regex.h: Now include re_comp.h if available. * Include regex.h only if re_comp.h is unavailable. * Define the SYSVREGEX stuff only if HAVE_RE_COMP_H is not defined * * object/String.h: Include string.h and strings.h based on configure * test. * * Revision 1.6 2002/01/08 18:28:02 jgoerzen * * object/Regex.h: now conditionally includes sys/types.h for regex.h * * Revision 1.5 2002/01/08 17:36:14 jgoerzen * Finally builds! * * Changes: * * * config.h.in: rebuilt by autoheader * * * configure: rebuilt by autoconf * * * configure.in: * * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * * Added checkes for term.h, re_comp.h, regex.h * * * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * * * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * * Use REGEXLIBS * * * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * * * object/GSgopherobj.c: Removed #include, now use * "Regex.h" that has proper regex determining logic * * * object/Regex.h: Moved regex.h include to here. Make it conditional * based on configure test. Add conditional re_comp.h include. * * Revision 1.4 2001/02/26 21:22:08 jgoerzen * Updated * * Revision 1.3 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.7 1994/07/25 13:56:54 lindner * First crack at POSIX regular expressions * * Revision 3.6 1994/07/21 17:29:13 lindner * Fix typo * * Revision 3.5 1994/03/08 04:04:16 lindner * add regex.h for NeXT systems * * Revision 3.4 1994/03/04 17:42:00 lindner * Fix for SCO machines * * Revision 3.3 1994/02/20 16:24:02 lindner * no message * * Revision 3.2 1993/10/27 18:50:38 lindner * Support for more sysv platforms * * Revision 3.1 1993/10/19 20:48:26 lindner * Portable versions of Regular expression routines for System V and BSD.. * * *********************************************************************/ #ifndef __GOPHER_REGEX_H__ #define __GOPHER_REGEX_H__ #include "config.h" /***************** Basic POSIX support detection */ #ifdef HAVE_SYS_TYPES_H /* POSIX and Linux regex.h implementations want sys/types.h */ #include #endif #ifdef HAVE_REGEX_H #include #endif #if defined(HAVE_REGCOMP) && defined(HAVE_REGFREE) #define REGEX_POSIX #endif /************* OK, handle the POSIX case. */ #ifdef REGEX_POSIX /* Try including files until we get REG_EXTENDED. */ #ifndef REG_EXTENDED #ifdef HAVE_UNISTD_H #include #endif #endif #ifndef REG_EXTENDED #ifdef HAVE_REGEXP_H #include #endif #endif #ifndef REG_EXTENDED #warning REGEX_POSIX defined but REG_EXTENDED not found. #endif /* These are named posix_re_comp and then #defined to the original names because MacOS X is nice enough to typedef re_comp and re_exec differently in unistd.h. Eww. */ char *posix_re_comp(char *regex); int posix_re_exec(char *string); #define re_comp(a) (posix_re_comp(a)) #define re_exec(a) (posix_re_exec(a)) #else /* ********** Try to figure out what else they have. */ #ifdef HAVE_RE_COMP /* This generally means that they have re_comp themselves. Just include it for them and leave it. */ #ifdef HAVE_RE_COMP_H #include #else #include #endif /* HAVE_RE_COMP_H */ #else #ifdef HAVE_REGEXP_H /* This means SYSV... */ #define SYSVREGEX #define REGEX_SYSV # include "Malloc.h" /** For NULL **/ # ifdef REGEX_CODEIT # define INIT register char *sp = instring; # define GETC() (*sp++) # define PEEKC() (*sp) # define UNGETC(c) (--sp) # define RETURN(c) return(NULL); # define ERROR(c) return("error") # include # endif /* REGEX_CODEIT */ /* Prototypes for Regex.c */ char *re_comp(char *expr); int re_exec(char *string); #else #error "Unsupported or no regexp support." #endif /* REGEX_SYSV */ #endif /* HAVE_RE_COMP */ #endif /* REGEX_POSIX */ #endif /* __GOPHER_REGEX_H__ */ gopher-3.0.15/object/GSgopherobj.h0000664000000000000000000002361210762617110013611 0ustar /******************************************************************** * $Author: s2mdalle $ * $Revision: 1.2 $ * $Date: 2000/12/26 22:48:54 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/GSgopherobj.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: GSgopherobj.h * Header file, abstraction of a gopher type ********************************************************************* * Revision History: * $Log: GSgopherobj.h,v $ * Revision 1.2 2000/12/26 22:48:54 s2mdalle * Changed prototype for GSsendHeader(int, int) => GSsendHeader(int, long) * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.25 1995/11/03 18:01:08 lindner * Coen: changes * * Revision 3.24 1995/09/25 22:07:18 lindner * Ansification * * Revision 3.23 1995/06/12 15:34:17 lindner * Add WORLD type to list of Gopher Objects * * Revision 3.22 1995/02/06 22:12:02 lindner * Make GSsetAbstract a define * * Revision 3.21 1994/12/05 22:40:11 lindner * add prototype for GSfromURL * * Revision 3.20 1994/11/17 06:34:00 lindner * Fixes for VMS internationalization * * Revision 3.19 1994/10/24 22:15:54 lindner * Add PDF type * * Revision 3.18 1994/08/19 16:18:14 lindner * Bitty fix from Alan * * Revision 3.17 1994/07/21 22:25:06 lindner * GINTERNATIONAL stuff * * Revision 3.16 1994/06/29 06:53:21 lindner * ifdef GINTERNATIONAL, use a function instead of a macro for * GSgetModDate(), so we can localize the date string * * Move GSfromURL() return code definitions from code so other * files can call it. (Coopersmith) * * Revision 3.15 1994/06/29 05:45:57 lindner * Mods to pump tickets to the net * * Revision 3.14 1994/04/01 04:38:08 lindner * Fix for conditional macros * * Revision 3.13 1994/03/31 21:02:40 lindner * Add some error and NULL checking to GS macros * * Revision 3.12 1993/12/27 16:22:43 lindner * Added more prototypes for GS functions * * Revision 3.11 1993/11/02 06:15:27 lindner * HTML additions * * Revision 3.10 1993/10/22 20:03:32 lindner * Add Movie (;) and Info (i) type support * * Revision 3.9 1993/09/18 04:44:43 lindner * Additions to fix caching of Multiple view items * * Revision 3.8 1993/09/11 06:33:06 lindner * URL support * * Revision 3.7 1993/07/27 20:18:09 lindner * Sorry can't take address of conditionals... * * Revision 3.6 1993/07/27 05:30:25 lindner * Mondo Debug overhaul from Mitra * * Revision 3.5 1993/07/27 00:30:11 lindner * plus patch from Mitra * * Revision 3.4 1993/07/23 04:50:59 lindner * Additional stored askdata * * Revision 3.3 1993/04/15 17:55:18 lindner * GSgetAdmin fix, plus more protos * * Revision 3.2 1993/03/24 17:09:42 lindner * Additions for Localfile for each GopherObj * * Revision 3.1.1.1 1993/02/11 18:03:03 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:47:54 lindner * Added new def GSSfindBlock * * Revision 1.2 1993/01/31 00:31:12 lindner * Gopher+ structures and macros. * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #ifndef GSGOPHEROBJ_H #define GSGOPHEROBJ_H #include "boolean.h" #include "STRstring.h" #include "STAarray.h" typedef struct g_struct GopherObj; #include "BLblock.h" #include "VIews.h" #include "url.h" #include "Locale.h" #include "compatible.h" #include "fileio.h" #define A_FILE '0' /* Types of objects */ #define A_DIRECTORY '1' #define A_CSO '2' #define A_ERROR '3' #define A_MACHEX '4' #define A_PCBIN '5' #define A_INDEX '7' #define A_TELNET '8' #define A_UNIXBIN '9' #define A_SOUND 's' #define A_EVENT 'e' #define A_CALENDAR 'c' #define A_GIF 'g' #define A_HTML 'h' #define A_TN3270 'T' #define A_MIME 'M' #define A_IMAGE 'I' #define A_INFO 'i' #define A_MOVIE ';' #define A_PDF 'P' #define A_WORLD 'v' #define A_APP '!' #define A_EOI '.' /*** Formats for GStoNet() ***/ #define GSFORM_G0 0 #define GSFORM_GPLUS 1 #define GSFORM_HTML 2 /*** Part codes for GSfromLink() & GSfromURL() ***/ #define G_PATH 1 #define G_TYPE 2 #define G_NAME 4 #define G_PORT 8 #define G_HOST 16 #define G_ALL (G_PATH | G_TYPE | G_NAME | G_PORT | G_HOST) typedef int GSformat; /*** Our gopher+ attributes structure ***/ struct gplus_struct { /** Abstract Block **/ /* String *abstract; Superceeded by BlockArray */ /** Admin Block **/ String *Admin; String *ModDate; VIewArray *Views; /** Others Blocks**/ BlockArray *OtherBlocks; /** Filled in askdata **/ char **Askdata; }; typedef struct gplus_struct GplusObj; /** Our Gopher Object Type **/ struct g_struct { char sFileType; /* The type of object (A_FILE, A_CSO, etc)*/ String *Title; /* User displayable title */ String *Selstr; /* Selector string on host... */ String *Host; /* Internet name of host */ int iPort; /* Port number on host */ int Itemnum; /* The number of the item in the directory*/ int weight; /* The weight, expressed as a # from 0-1000 */ int ttl; /* The Time-To-Live, how long the item is good */ String *Localfile; /* The local file of the item */ String *Localview; /* The view of the local file of the item */ boolean isgplus; /* Item can be queried gopher+ style */ boolean isask; /* Item contains an ASK block */ GplusObj *gplus; /* Gopher + attributes */ Url *url; /* The Unix^H^H^Hniversal Resource Locator */ }; typedef struct g_struct GopherStruct; #define GSgetType(a) ((a)->sFileType) #define GSsetType(a,b) (a)->sFileType=(b) #define GSgetTitle(a) ((STRget((a)->Title))) #define GSsetTitle(a,b) ((STRset((a)->Title, b))) #define GSgetPath(a) ((STRget((a)->Selstr))) #define GSsetPath(a,b) ((STRset((a)->Selstr, b))) #define GSgetHost(a) ((STRget((a)->Host))) #define GSsetHost(a,b) ((STRset((a)->Host, b))) #define GSgetPort(a) ((a)->iPort) #define GSsetPort(a,b) (a)->iPort=(b) #define GSgetNum(a) ((a)->Itemnum) #define GSsetNum(a,b) ((a)->Itemnum=(b)) #define GSgetWeight(a) ((a)->weight) #define GSsetWeight(a,b) ((a)->weight=(b)) #define GSgetTTL(a) ((a)->ttl) #define GSsetTTL(a,b) ((a)->ttl=(b)) #define GSgetLocalFile(a) ((STRget((a)->Localfile))) #define GSsetLocalFile(a,b) ((STRset((a)->Localfile, (b)))) #define GSgetLocalView(a) ((STRget((a)->Localview))) #define GSsetLocalView(a,b) ((STRset((a)->Localview, (b)))) /****************** Gopher Plus attributes *******************/ #define GSisGplus(a) ((a)->isgplus) #define GSsetGplus(a,b) ((a)->isgplus=(b)) #define GSisAsk(a) ((a)->isask) #define GSsetAsk(a,b) ((a)->isask=(b)) #define GSgplusInited(a) ((a)->gplus != NULL) #define GSgetAdmin(a) (((a)->gplus == NULL) ? NULL : (STRget((a)->gplus->Admin))) #if defined(VMS) || (defined(GINTERNATIONAL) && !defined(NO_STRFTIME)) char *GSgetModDate(GopherObj *); #else # define GSgetModDate(a) (((a)->gplus == NULL) ? NULL : (((a)->gplus->ModDate == NULL) ? NULL : (STRget((a)->gplus->ModDate)))) #endif #define GSgetOtherBlocks(a) (BlockArray*)(((a)->gplus == NULL) ? NULL : ((a)->gplus->OtherBlocks)) #define GSgetAskdata(a) (GSgplusInited(a) ? (a)->gplus->Askdata : NULL) #define GSsetAbstract(g,b) (GSsetBlock(g,"ABSTRACT",b,TRUE)) /*** Real live functions defined in GSgopherobj.c ***/ GopherObj *GSnew(); void GSdestroy(GopherObj *gs); void GSinit(GopherObj *gs); void GSplusnew(GopherObj *); void GStoNet(GopherObj *gs, int sockfd, GSformat fmt, char *ticket); void GStoNetHTML(); int GSfromNet(GopherObj *gs, int sockfd); int GSplusfromNet(GopherObj *gs, int fd); int GSfromLink(GopherObj *, FileIO *, char*, int, char *, char*); void GStoLink(GopherObj *gs, int fd, BOOLEAN AddInfo); void GScpy(GopherObj *dest, GopherObj *orig); void GScpy(); void GSsetBlock(GopherObj *gs, char *blockname, char *text, boolean); void GSsetURL(GopherObj *, char *url); void GSsetAdmin(GopherObj *gs, char *admin); void GSsetModDate(GopherObj *gs, char *str); void GSaddView(GopherObj *gs, char *view, char *language, int estsize); void GSaddBlock(GopherObj *gs, char *Blockname, char *file); void GSmerge(GopherObj *gs, GopherObj *overlay); void GSgetginfo(GopherObj *gs, boolean savename); boolean GSisText(GopherObj *gs, char *view); char *GSgetURL(GopherObj *gs, char *ticket); char *GSgetURLhtml(GopherObj *gs, char *ticket); struct tm *GSgetModDateTM(GopherObj *); int GSgetNumViews(GopherObj *); VIewobj *GSgetView(GopherObj *, int); int GSgetNumBlocks(GopherObj *); Blockobj *GSgetBlock(GopherObj *, int); Blockobj *GSfindBlock(GopherObj *gs, char *blockname); int GSfromURL(GopherObj *gs, char *urltxt, char *host, int port, int doneflags); /****** Protocol transmission functions *******/ int GSconnect(GopherObj*); void GStransmit(GopherObj *gs, int sockfd, char *search, char *, char *); void GSsendHeader(int, long); void GSsendErrorHeader(GopherObj *gs, int sockfd, int errortype, char *); int GSrecvHeader(GopherObj *gs, int sockfd); void GStransmit(); /******Gopher+ functions *******/ void GSplusnew(); void GSplusdestroy(GopherObj*); void GSplusInit(GopherObj*); void GSplustoNet(GopherObj *gs, int sockfd, char **filter, char *ticket); void GSpluscpy(GopherObj *dest, GopherObj *orig); char **GSsetAskdata(GopherObj *gs, char **askdata); /***** Debugging functions *******/ void GSplusPrint(GopherObj *gs, char *head); #endif /*GSGOPHEROBJ_H*/ gopher-3.0.15/object/getopt.c0000664000000000000000000000310110762617110012664 0ustar /* ** GETOPT PROGRAM AND LIBRARY ROUTINE ** ** I wrote main() and AT&T wrote getopt() and we both put our efforts into ** the public domain via mod.sources. ** Rich $alz ** Mirror Systems ** (mirror!rs, rs@mirror.TMC.COM) ** August 10, 1986 ** ** This is the public-domain AT&T getopt(3) code. Hacked by Rich and by Jim. */ #include "String.h" /*LINTLIBRARY*/ #include #define ERR(s, c) if(opterr){\ extern int write();\ char errbuf[2];\ errbuf[0] = c; errbuf[1] = '\n';\ (void) write(2, argv[0], (unsigned)strlen(argv[0]));\ (void) write(2, s, (unsigned)strlen(s));\ (void) write(2, errbuf, 2);} extern char *strchr(); int opterr = 1; int optind = 1; int optopt; char *optarg; int getopt(argc, argv, opts) int argc; char **argv, *opts; { static int sp = 1; register int c; register char *cp; if(sp == 1) if(optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0') return(EOF); else if(strcmp(argv[optind], "--") == 0) { optind++; return(EOF); } optopt = c = argv[optind][sp]; if(c == ':' || (cp=strchr(opts, c)) == NULL) { ERR(": illegal option -- ", c); if(argv[optind][++sp] == '\0') { optind++; sp = 1; } return('?'); } if(*++cp == ':') { if(argv[optind][sp+1] != '\0') optarg = &argv[optind++][sp+1]; else if(++optind >= argc) { ERR(": option requires an argument -- ", c); sp = 1; return('?'); } else optarg = argv[optind++]; sp = 1; } else { if(argv[optind][++sp] == '\0') { sp = 1; optind++; } optarg = NULL; } return(c); } gopher-3.0.15/object/DAarray.c0000664000000000000000000001226210762617110012715 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2001/01/17 21:16:35 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/DAarray.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: DAarray.c * Dynamic Array Implementation ********************************************************************* * Revision History: * $Log: DAarray.c,v $ * Revision 1.2 2001/01/17 21:16:35 jgoerzen * More psinrtf -> snprintf changes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.4 1996/01/04 18:24:01 lindner * Updates for autoconf * * Revision 3.3 1995/09/26 05:16:31 lindner * more fixes... * * Revision 3.2 1993/03/26 19:52:10 lindner * Fixed off by one prob in DApop * * Revision 3.1.1.1 1993/02/11 18:03:01 lindner * Gopher+1.2beta release * * Revision 1.3 1992/12/21 21:14:57 lindner * Fixed bug in DAcpy, initfn wasn't being copied right. * * Revision 1.2 1992/12/21 20:04:04 lindner * Added DAcpy() * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #include "DAarray.h" #include "Malloc.h" /* * Create a new dynamic array * * size -- the initial number of elements * newfn -- creates new object * initfn -- initializes the object * destroyfn -- performs clean up and frees objs memory * copyfn -- copys one obj to the other, like strcpy */ DynArray * DAnew( int size, char * (*newfn)(), void (*initfn)(), void (*destroyfn)(), char * (*copyfn)()) { DynArray *temp; int i; temp = (DynArray*) malloc(sizeof(DynArray)); temp->objects = (char **) malloc(size * sizeof(char *)); temp->newfn = newfn; temp->initfn = initfn; temp->destroyfn = destroyfn; temp->copyfn = copyfn; temp->Top = 0; if (copyfn == NULL) /** Can't work without this!!! ***/ perror("Egad, no copy function in DAnew()!!"); if (newfn != NULL) for (i = 0; i < size; i++) temp->objects[i] = (char *) newfn(); temp->maxsize = size; return(temp); } void DAdestroy(DynArray *da) { int i; if (da->destroyfn != NULL) for (i = 0; i< da->maxsize; i++) da->destroyfn(da->objects[i]); free(da->objects); free(da); } void DAinit(DynArray *da) { int i; if (da->initfn!=NULL) for (i=0; imaxsize; i++) da->initfn(DAgetEntry(da, i)); DAsetTop(da, 0); } void DAgrow(DynArray *da, int size) { char **temp; int i; if (size < da->maxsize) return; /** Size is smaller than requested **/ temp = (char **) realloc(da->objects, size*sizeof(char*)); if (temp == NULL) perror("Out of memory!!!\n"), exit(-1); if (temp != da->objects) { da->objects = temp; } /** Initialize the new objects. **/ for (i= da->maxsize; i< size; i++) da->objects[i] = da->newfn(); da->maxsize = size; return; } /* * Tacks an item on the end of the array, grows it if necessary.. */ void DApush(DynArray *da, char *obj) { int top; top = DAgetTop(da); if (top == da->maxsize) DAgrow(da, da->maxsize*2); da->copyfn(DAgetEntry(da, top), obj); DAsetTop(da, top+1); /* update end of list */ } char * DApop(DynArray *da) { int top; char *newobj; top = DAgetTop(da); if (top == 0) return(NULL); /** Nothing to pop! **/ newobj = da->newfn(); da->initfn(newobj); top--; da->copyfn(newobj, DAgetEntry(da, top)); DAsetTop(da, top); return(newobj); } void DAsort(DynArray *da, int (*sortfn)()) { char *moo; moo = (char *) &((da->objects)[0]); qsort(moo, da->Top, sizeof(char *), sortfn); } void DAcpy(DynArray *dest, DynArray *orig) { int i; DAsetTop(dest, 0); dest->newfn = orig->newfn; dest->initfn = orig->initfn; dest->destroyfn = orig->destroyfn; dest->copyfn = dest->copyfn; for (i=0; i #include "String.h" char *makespace() { return(malloc(256)); } int DEBUG = 1; int moostrcmp(char **s1, char **s2) { printf("Comparing %s, %s\n", *s1,*s2); return(strcmp(*s1,*s2)); } void main() { DynArray *test; int i; char tempstr[100]; printf("Testing Dynamic Arrays...\n\n"); test = DAnew(5, makespace, NULL, NULL, strcpy); DApush(test, "ziggy\n"); DApush(test, "iggy\n"); for (i= 10; i >0; i--) { snprintf(tempstr, sizeof(tempstr), "Moocow #%d\n", i); printf(tempstr); DApush(test, tempstr); } for (i=0; i< 10; i++) { printf(DAgetEntry(test, i)); } DAsort(test, moostrcmp); for (i=0; i< 10; i++) { printf(DAgetEntry(test, i)); } } #endif gopher-3.0.15/object/Locale.h0000664000000000000000000000353610762617110012602 0ustar /* * These routines make using the international messages facilities easier. * * This interface could be applied to methods other than X/Open coding * (VMS etc..) * * Copyright (c) 1994 University of Minnesota */ #ifndef GLOCALE_H #define GLOCALE_H #if defined(_XOPEN_SOURCE) || defined(_AIX) || defined(__osf__) # define GINTERNATIONAL #endif #ifdef VMS # define LC_ALL "" void setlocale(char *, char *); void rsetlocale(int); char *Gtxt(char *, int); int Gtxtopen(char *,int); char *catgets(int, int, int, char *); # define A_LANGUAGE '\001' # define GINTERNATIONAL # define NL_SETD 0 typedef int nl_catd; #else /* Unix: */ # ifndef GINTERNATIONAL /* Only use i18n routines if we're sure */ # define Gtxtlocale(a,b) # define setlocale(a,b) # define Gtxtopen(a,b) # define Gtxt(a,b) a # else # include "compatible.h" # if !defined(HAVE_LOCALE_H) # undef NO_LOCALE # define NO_LOCALE # undef NO_XPGCAT /** Can't use X/Open message catalogs **/ # define NO_XPGCAT /** without setlocale() **/ # define LC_ALL 0 # define LC_MESSAGES 1 # else # include # endif /** Figure out which systems have catopen() etal **/ # if !defined(__svr4__) && !defined(_XOPEN_SOURCE) && !defined(_XOPEN_VERSION) # undef NO_XPGCAT # define NO_XPGCAT # endif # ifndef NO_XPGCAT # include # else typedef int nl_catd; # endif # ifndef NL_SETD # define NL_SETD 0 /* SunOS 4.1.3 with xpg2bin/cc compiler */ # endif /*** Define some nice convenience routines ***/ /** It would sure be nice to use gettext() routines... oh well...***/ extern nl_catd Gcatd; char *Gtxtlocale(); char *Gtxt(); nl_catd Gtxtopen(); # endif /* GINTERNATIONAL */ #endif /* VMS */ #endif /* GLOCALE_H */ gopher-3.0.15/object/Dirent.h0000664000000000000000000000427510762617110012631 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Dirent.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Dirent.h * Portably include dir.h dirent.h, etc. ********************************************************************* * Revision History: * $Log: Dirent.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.10 1996/01/04 18:25:27 lindner * Updates for autoconf * * Revision 3.9 1995/02/01 21:43:13 lindner * Put back an AIX dirent fix.. * * Revision 3.8 1994/12/12 17:43:27 lindner * Hack around AIX * * Revision 3.7 1994/11/18 21:43:35 lindner * Fix error msgs on NeXTstep * * Revision 3.6 1994/03/17 04:37:12 lindner * Lame VMS port * * Revision 3.5 1993/12/27 16:12:07 lindner * Mods for Apollo Domain systems * * Revision 3.4 1993/09/30 23:18:25 lindner * pl8 * * Revision 3.3 1993/07/13 04:03:59 lindner * added 386BSD * * Revision 3.2 1993/05/25 22:02:10 lindner * Fix problems with CDC epix systems * * Revision 3.1.1.1 1993/02/11 18:03:02 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #if !defined(GDIRENT_H) && !defined(VMS) #define GDIRENT_H #include #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) #else # define dirent direct # define NAMLEN(dirent) (dirent)->d_namlen # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif #include "Stat.h" #ifndef S_ISDIR # define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif #ifndef S_ISREG # define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) #endif #endif /* GDIRENT_H */ gopher-3.0.15/object/link.com0000664000000000000000000000130310762617110012655 0ustar $ vo = 'f$verify(0)' $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $! $ IF P2 .eqs. "DEBUG $ THEN $ vo1 = f$verify(1) $ library/create libgopher_debug compatible.objd,daarray.objd,- gdgopherdir.objd,gsgopherobj.objd,locale.objd,- strstring.objd,blblock.objd,views.objd,util.objd,- getopt.objd,sockets.objd,Debug.objd,url.objd,fileio.objd $! $ vo1 = 'f$verify(0)' $ ELSE $ vo1 = f$verify(1) $ library/create libgopher compatible.obj,daarray.obj,- gdgopherdir.obj,gsgopherobj.obj,locale.obj,- strstring.obj,blblock.obj,views.obj,util.obj,- getopt.obj,sockets.obj,Debug.obj,url.obj,fileio.obj $! $ vo1 = 'f$verify(0)' $ ENDIF $ CLEANUP: $ vo1 = f$verify(vo) $exit gopher-3.0.15/object/ranlib0000664000000000000000000000026210762617110012415 0ustar #!/bin/sh echo "Hmmm, looks like your system doesn't have ranlib.." echo "or you have dot in your path before ranlib" echo " " echo "Delete the file object/ranlib if the latter" gopher-3.0.15/object/Regex.c0000664000000000000000000000514610762617110012447 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/03/19 20:07:16 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Regex.c,v $ * $Status: $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Regex.c * Portable method of doing regular expressions ********************************************************************* * Revision History: * $Log: Regex.c,v $ * Revision 1.5 2002/03/19 20:07:16 jgoerzen * GSgopherobj.c: Moved Regex.h include up. * * Regex.c, Regex.h: continuing full rewrites. * * Revision 1.4 2002/03/19 19:53:31 jgoerzen * *** empty log message *** * * Revision 1.3 2002/02/12 20:50:21 jgoerzen * Beginning of MacOS X (Darwin) support. * Many modifications to Regex.[ch], see debian/changelog for details. * * Revision 1.2 2002/02/12 19:54:18 jgoerzen * Updated with regex fixes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.2 1994/07/25 13:56:53 lindner * First crack at POSIX regular expressions * * Revision 3.1 1993/10/19 20:48:23 lindner * Portable versions of Regular expression routines for System V and BSD.. * * *********************************************************************/ #define __GOPHER_REGEX_C__ /* * If you're using gcc on Solaris you might need to copy /usr/include/regexp.h * to /opt/whatever/regexp.h */ #define REGEX_CODEIT /* only include sysv regex code once.. */ #include "config.h" #include "Regex.h" #include "Malloc.h" /************************************************** POSIX **************************************************/ #ifdef REGEX_POSIX regex_t preg; int pregallocated = 0; char *posix_re_comp(char *regex) { if (pregallocated) { regfree(&preg); } pregallocated = 1; return regcomp(&preg, regex, REG_NOSUB) ? "regcomp error" : NULL; } int posix_re_exec(char *string) { return ! regexec(&preg, string, 0, NULL, 0); } #endif /* REGEX_POSIX */ /************************************************** SYSV **************************************************/ #ifdef REGEX_SYSV #define ESIZE 512 static char expbuf[ESIZE]; char * re_comp(char *expr) { char *result; result = compile(expr, expbuf, &expbuf[ESIZE], '\0'); return(NULL); } int re_exec(char *string) { return(step(string, expbuf)); } #endif /* REGEX_SYSV */ gopher-3.0.15/object/BLblock.c0000664000000000000000000002276110762617110012707 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2001/01/17 21:16:35 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/BLblock.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992, 1993 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: BLblock.c * Implementation of Block handling routines. ********************************************************************* * Revision History: * $Log: BLblock.c,v $ * Revision 1.3 2001/01/17 21:16:35 jgoerzen * More psinrtf -> snprintf changes * * Revision 1.2 2000/12/20 01:19:20 jgoerzen * Added patches from David Allen * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.14 1995/09/25 22:07:15 lindner * Ansification * * Revision 3.13 1995/04/15 06:50:46 lindner * check error return on BLblock * * Revision 3.12 1995/02/17 18:29:36 lindner * Abstract display support * * Revision 3.11 1994/08/08 20:26:35 lindner * fix bug for Abstract= lines. * * Revision 3.10 1994/06/29 05:45:24 lindner * Mods for tickets * * Revision 3.9 1994/02/20 21:49:09 lindner * deal with malformed views lines better * * Revision 3.8 1993/11/02 06:13:36 lindner * Fix for HTML mods * * Revision 3.7 1993/07/29 19:59:23 lindner * Removed extraneous variables * * Revision 3.6 1993/07/27 05:30:17 lindner * Mondo Debug overhaul from Mitra * * Revision 3.5 1993/06/15 06:10:34 lindner * Moved string.h include * * Revision 3.4 1993/04/27 20:54:32 lindner * really fixed BLtoNet() * * Revision 3.3 1993/04/23 20:14:48 lindner * Fix for BltoNet(), using wrong datatype * * Revision 3.2 1993/03/26 19:49:34 lindner * More comments, memory leak fix, etc * * Revision 3.1.1.1 1993/02/11 18:03:06 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:45:54 lindner * Fixes for retrieving from the net. New BLAsearch * * Revision 1.1 1993/01/31 00:22:51 lindner * Initial revision * * *********************************************************************/ #include "String.h" #include "BLblock.h" #include "Malloc.h" #include /* * Make a new Block Object */ Blockobj * BLnew() { Blockobj *temp; temp = (Blockobj *) malloc(sizeof(Blockobj)); temp->btype = BLOCK_UNKNOWN; temp->Blockname = STRnew(); temp->datatype = BDATA_NONE; return(temp); } /* * Initialize the block structure */ void BLinit(Blockobj *bl) { STRinit(bl->Blockname); switch (BLgetDatatype(bl)) { case BDATA_FILE: STRinit(bl->data.filename); break; case BDATA_GREF: GSinit(bl->data.gs); break; case BDATA_TEXT: STAinit(bl->data.text); break; case BDATA_NONE: break; } } /* * Calls the right destory fcn depending on the object in the union. * * wouldn't c++ be nice right here? :-) */ static void BLdatadestroy(Blockobj *bl) { switch (BLgetDatatype(bl)) { case BDATA_FILE: STRdestroy(bl->data.filename); break; case BDATA_TEXT: STAdestroy(bl->data.text); break; case BDATA_GREF: GSdestroy(bl->data.gs); break; case BDATA_NONE: break; } } /* * Free memory of BlockObj */ void BLdestroy(Blockobj *bl) { STRdestroy(bl->Blockname); BLdatadestroy(bl); free(bl); } void BLcpy(Blockobj *dest, Blockobj *orig) { BLsetName(dest,BLgetName(orig)); dest->btype = orig->btype; switch (BLgetDatatype(orig)) { case BDATA_FILE: BLsetFile(dest, STRget(orig->data.filename)); break; case BDATA_GREF: BLsetGref(dest, orig->data.gs); break; case BDATA_TEXT: BLsetText(dest, orig->data.text); break; case BDATA_NONE: break; } } /* * BLgetNumLines() returns the number of lines for the Text record * It returns -1 if this isn't the type of record. */ int BLgetNumLines(Blockobj *bl) { switch (BLgetDatatype(bl)) { case BDATA_TEXT: return(STAgetTop(bl->data.text)); default: return(-1); } ; } /* * BLgetLine() returns a character pointer to the line for the Text data type */ char* BLgetLine(Blockobj *bl, int lineno) { switch (BLgetDatatype(bl)) { case BDATA_TEXT: return(STRget(STAgetEntry(bl->data.text, lineno))); case BDATA_NONE: case BDATA_FILE: case BDATA_GREF: break; } return(NULL); } /* * BLsetFile() sets up a block to contain a file reference. * Really handy for the server. */ void BLsetFile(Blockobj *bl, char *filename) { /** Reset data field and put in new values **/ BLdatadestroy(bl); bl->datatype = BDATA_FILE; bl->data.filename = STRnew(); STRset(bl->data.filename, filename); } /* * BLsetText sets everything up for storing text, if the optional parameter * sta is set, it copies it in. */ void BLsetText(Blockobj *bl, StrArray *sta) { /** Reset data field and put in new values **/ if (BLgetDatatype(bl) != BDATA_TEXT) { BLdatadestroy(bl); bl->datatype = BDATA_TEXT; bl->data.text = STAnew(10); } if (sta != NULL) { STAcpy(bl->data.text, sta); } } /* * Keep data in memory, text is a line to be added to the text */ void BLaddText(Blockobj *bl, char *text) { String *tempstr; BLsetText(bl, NULL); tempstr = STRnew(); STRset(tempstr, text); STApush(bl->data.text, tempstr); STRdestroy(tempstr); } /* * Make the block a gopher-reference */ void BLsetGref(Blockobj *bl, GopherObj *gs) { /** Reset data field and put in new values **/ BLdatadestroy(bl); bl->datatype = BDATA_GREF; bl->data.gs = GSnew(); GScpy(bl->data.gs, gs); GSdestroy(gs); } /* * BLtoNet() transmits the block as per gopher+ protocol * if the data field is a file, it opens it and sends it out */ void BLtoNet(Blockobj *bl, int fd, boolean showheader) { FILE *infile; int i; char outputline[512]; /** Switch on data type **/ if (showheader) { snprintf(outputline, sizeof(outputline), "+%s:", BLgetName(bl)); writestring(fd, outputline); } switch (BLgetDatatype(bl)) { case BDATA_GREF: writestring(fd, " "); GStoNet(bl->data.gs,fd, GSFORM_G0, NULL); break; case BDATA_TEXT: writestring(fd, "\r\n"); for (i=0; idata.text); i++) { writestring(fd, " "); writestring(fd, STRget(STAgetEntry(bl->data.text, i))); writestring(fd, "\r\n"); } break; case BDATA_FILE: writestring(fd, "\r\n"); if ((infile = fopen(STRget(bl->data.filename), "r"))==NULL) break; while (fgets(outputline, sizeof(outputline), infile)!=NULL) { ZapCRLF(outputline); writestring(fd, " "); writestring(fd, outputline); writestring(fd, "\r\n"); } fclose(infile); break; case BDATA_NONE: break; } } /* * BLfromNet() assumes that the initial '+' in the data stream has been read, * along with the blockname, up to the ':', but not anything after.. * * It then executes most of the state diagram, it returns when it has * encountered EOF, or encounters the next '+', or '.' * * Returns the following: * 0 for EOF encountered, block retrieved successfully * 1 for successful retrieve, and another block coming * neg value for error conditions from read routines and botched block vals */ int BLfromNet(Blockobj *bl, int fd, char *blockname) { char inputline[512]; int err; /*** State: _GotBlockName_ ***/ BLsetName(bl, blockname); /** Find out if there's a gopher reference **/ if ((err = readrecvbuf(fd, inputline, 1)) <=0) { return(err); } if (*inputline == ' ') { /** GREF coming up, State: _GotBnameSpace_ **/ GopherObj *gs; gs = GSnew(); GSfromNet(gs, fd); BLsetGref(bl, gs); /** read up to the next \r\n+ **/ while (1) { if ((err= readrecvbuf(fd, inputline, 1)) <= 0) return(err); if (*inputline == '+') return(1); else { err = readline(fd, inputline, sizeof(inputline)); if (err <= 0) return(err); /*** Error ***/ } } } /** Okay, let's just stick the text in verbatim **/ /** get rid of remaining newline **/ readline(fd, inputline, sizeof(inputline)); /** State: _FirstChar_ **/ while (1) { /** Check for plus **/ if ((err= readrecvbuf(fd, inputline, 1)) <=0) return(err); if (*inputline == '+') return(1); /*** Return to state _NewBlock_ ***/ if (*inputline == '.') { readline(fd, inputline, sizeof(inputline)); return(0); } if (*inputline == ' ') { /** add a line otherwise State: _Addline_ **/ readline(fd, inputline, sizeof(inputline)); ZapCRLF(inputline); BLaddText(bl, inputline); } else { /** malformed block line received proceed as if it was OK, but don't add the line **/ readline(fd, inputline, sizeof(inputline)); } } } int BLAsearch(BlockArray *bla, char *bname) { int i; if (bla == NULL) return(-1); for (i=0; i * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.25 1996/01/04 18:24:24 lindner * Updates for autoconf * * Revision 3.24 1995/09/25 22:07:25 lindner * Ansification * * Revision 3.23 1995/08/29 07:12:06 lindner * Turn off annoying debug stmt * * Revision 3.22 1995/05/01 05:41:46 lindner * compatibility fixes * * Revision 3.21 1995/04/15 07:07:39 lindner * Add ControlC handling feature... * * Revision 3.20 1995/02/02 17:14:47 lindner * Fix for memory leaks and accesses * * Revision 3.19 1994/10/19 03:34:39 lindner * Dynamically allocate acceptable array * * Revision 3.18 1994/08/19 16:12:11 lindner * Sanity check for Tohexstr * * Revision 3.17 1994/07/21 22:07:52 lindner * none * * Revision 3.16 1994/04/25 03:37:01 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.15 1994/03/31 21:04:36 lindner * Mitra's 2.011 debug patch * * Revision 3.14 1994/03/08 15:56:22 lindner * gcc -Wall fixes * * Revision 3.13 1994/02/20 16:25:58 lindner * Optimize readline and friends to use fileio routines * * Revision 3.12 1993/12/27 16:14:54 lindner * prettify debug output * * Revision 3.11 1993/09/21 01:52:54 lindner * Fixes for NETLIB * * Revision 3.10 1993/08/16 19:41:23 lindner * Fix for DECC/Alpha * * Revision 3.9 1993/08/09 20:17:13 lindner * Fixes for CMULIB and NETLIB for VMS * * Revision 3.8 1993/08/05 03:23:40 lindner * Changes for CMUIP and NETLIB * * Revision 3.7 1993/07/27 05:30:30 lindner * Mondo Debug overhaul from Mitra * * Revision 3.6 1993/07/23 04:49:24 lindner * none * * Revision 3.5 1993/06/22 05:49:39 lindner * *** empty log message *** * * Revision 3.4 1993/04/23 20:11:56 lindner * Fixed misdeclaration of DEBUG * * Revision 3.3 1993/04/15 17:53:12 lindner * Debug stuff from Mitra * * Revision 3.2 1993/03/18 22:28:27 lindner * changed hex routines around for admit1 * * Revision 3.1.1.1 1993/02/11 18:03:05 lindner * Gopher+1.2beta release * * Revision 2.5 1993/01/31 00:31:12 lindner * New functions, readword() and readtotoken() * * Revision 2.4 1993/01/12 21:12:23 lindner * Reverted to old readfield behavior() \n is now ignored again. * * Revision 2.3 1993/01/08 23:29:21 lindner * More mods from jqj. * * Revision 2.2 1992/12/31 04:58:41 lindner * merged 1.1.1.1 and 2.1 * * Revision 2.1 1992/12/21 19:41:14 lindner * Added check for null in writestring * Added function skip_whitespace * * Revision 1.1.1.1 1992/12/31 04:52:01 lindner * Changes for VMS * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ #include #include #include #include #include "boolean.h" #include "util.h" #include "String.h" #include "Debug.h" #include "fileio.h" #if defined(VMS) && (defined(UCX) || defined(CMUIP) || defined(NETLIB)) #include #endif static FileIO *Gfio = NULL; static int Oldsockfd = -1; boolean ControlCpressed = 0; jmp_buf Jmpenv; /* Save environment for jump from ctrlc */ RETSIGTYPE controlc(int sig) { ControlCpressed = TRUE; reprimeControlc(); } RETSIGTYPE controlcJmp(int sig) { Debug("controlcJmp",NULL); controlc(sig); longjmp(Jmpenv,1); } int interruptable_read(int fd, char *ptr, int nbytes) { int retval; if (ControlCpressed) { /* Already interrupted */ Debug("interruptable_read:already interrupted\r\n",NULL); return(1); } if (signal(SIGINT, controlcJmp) == SIG_ERR) perror("signal died:\n"), exit(-1); if (setjmp(Jmpenv)) { /* Note controlcJmp will reprime controlc and set flag*/ Debug("interruptable_read triggered\r\n",NULL); return(-1); } retval = read(fd, ptr, nbytes); reprimeControlc(); return(retval); } /* Place this after the code to be interruptable*/ void reprimeControlc() { if (signal(SIGINT, controlc) == SIG_ERR) perror("signal died:\n"), exit(-1); } #if defined(VMS) && (defined(WOLLONGONG) || defined(MULTINET) ||defined(CMUIP)||defined(NETLIB)) /* Multinet and Wollongong,etc. (non UCX-emulation) use channel numbers */ /* for sockets, which are small multiples of 16. The first 5 */ /* channels can be assumed to be already used, so we assume that */ /* sockets start at 64, and that only 64 VAXC fds are simultaneously */ /* open in the program. Actually, the first socket is likely to be */ /* more like 176! */ #define IS_SOCKET(s) ((s)>=64) /* Close a socket. * Note that in old Wollongong and Multinet implementations close() * works only on fds, not sockets. * For UCX and Unix, closenet() is #defined to be close() */ int closenet(int s) { #ifdef DEBUGGING if (s == stderr) { fprintf(stderr, "YUK - closing stderr"); } #endif if (IS_SOCKET(s)) { #ifdef MULTINET return (socket_close(s)); #else /* WOLLONGONG, CMUIP, NETLIB */ return (netclose(s)); #endif } else close(s); /* shouldn't be calling this routine */ } #else /* WOLLANGONG or MULTINET */ #define IS_SOCKET(a) 1 #endif static void CheckGfio(int fd) { if (Gfio == NULL || Oldsockfd != fd) { Oldsockfd = fd; if (Gfio != NULL) FIOdestroy(Gfio); Gfio = FIOopenfd(fd, IS_SOCKET(fd)); } } /* Read "n" bytes from a descriptor. * Use in place of read() when fd is a stream socket * * Returns the number of total bytes read. */ int readn(int fd, char *ptr, int nbytes) { int nleft, nread; nleft = nbytes; while (nleft > 0) { #if defined(VMS) && (defined(WOLLONGONG) || defined(CMUIP) || defined(NETLIB)) nread = IS_SOCKET(fd) ? netread(fd, ptr, nleft) : read(fd, ptr, nleft); #else #if defined(VMS) && defined(MULTINET) nread = IS_SOCKET(fd) ? socket_read(fd, ptr, nleft) : read(fd, ptr, nleft); #else nread = read(fd, ptr, nleft); #endif #endif #if defined(VMS) && (defined(UCX) || defined(CMUIP) || defined(NETLIB)) if (nread < 0 && errno == EPIPE) break; #endif if (nread < 0) return(nread); /* error, return <0 */ else if (nread == 0) /* EOF */ break; nleft -= nread; ptr += nread; } return(nbytes - nleft); /* return >= 0) */ } /* * Write "n" bytes to a descriptor. * Use in place of write() when fd is a stream socket * * We return the number of bytes written */ int writen(int fd, char *ptr, int nbytes) { int nleft, nwritten; nleft = nbytes; while(nleft > 0) { #if defined(VMS) && (defined(WOLLONGONG) || defined(CMUIP) || defined(NETLIB)) nwritten = IS_SOCKET(fd) ? netwrite(fd, ptr, nleft) : write(fd, ptr, nleft); #else #if defined(VMS) && defined(MULTINET) nwritten = IS_SOCKET(fd) ? socket_write(fd, ptr, nleft) : write(fd, ptr, nleft); #else nwritten = write(fd, ptr, nleft); #endif #endif if (nwritten <= 0) return(nwritten); /* error */ nleft -= nwritten; ptr += nwritten; } return(nbytes - nleft); } /* * Writestring uses the writen and strlen calls to write a * string to the file descriptor fd. If the write fails * a -1 is returned. Otherwise zero is returned. */ int writestring(int fd, char *stringptr) { int length; /* Debug("writing: %s\n",stringptr);*/ if (stringptr == NULL) return(0); length = strlen(stringptr); if (writen(fd, stringptr, length) != length) { Debugmsg("writestring: writen failed\n"); return(-1); } else return(0); } /* * Read from the socket into a buffer. Mucho more efficent in terms of * system calls.. * * returns bytes read, or <0 for an error */ int readrecvbuf(int sockfd, char *buf, int len) { int bytesread; CheckGfio(sockfd); if (Gfio == NULL) return(-1); bytesread = FIOreadbuf(Gfio, buf, len); return(bytesread); } /* * Read a line from a descriptor. Read the line one byte at a time, * looking for the newline. We store the newline in the buffer, * then follow it with a null (the same as fgets(3)). * We return the number of characters up to, but not including, * the null (the same as strlen(3)) */ int readline(int fd, char *ptr, int maxlen) { int n; CheckGfio(fd); if (Gfio == NULL) return(-1); n = FIOreadline(Gfio, ptr, maxlen); Debug("readline: %s\n", ptr); return(n); } /* * Read a line from the file/socket, Read the line one byte at a time, * looking for the token. We nuke the token from the returned string. * We return the number of characters up to, but not including, * the null (the same as strlen(3)) */ int readtoken(int fd, char *ptr, int maxlen, char zechar) { int bytesread; CheckGfio(fd); if (Gfio == NULL) return(-1); bytesread = FIOreadtoken(Gfio, ptr, maxlen, zechar); Debug("readtoken: %s\n", (ptr-bytesread)); return(bytesread); } int sreadword(char *input, char *output, int maxlen) { int n; char c; for (n=0; n < maxlen; n++) { c = *input++; *output++ = c; if (isspace(c)) { *(output - 1) = '\0'; break; } if (c == '\0') { break; } } *output = '\0'; /* Tack a NULL on the end */ return(n); } /* * ZapCRLF removes all carriage returns and linefeeds from the end of * a C-string. */ void ZapCRLF(char *inputline) { int len; len = strlen(inputline); if (len == 0) return; inputline += len; inputline--; if (*inputline == '\n' || *inputline == '\r') { *inputline = '\0'; if (len > 1) { inputline--; if (*inputline == '\n' || *inputline == '\r') *inputline = '\0'; } } } /* * Utilities for dealing with HTML junk */ static boolean *acceptable; static boolean acceptable_inited = FALSE; static void init_acceptable() { unsigned int i; char * good = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_$"; acceptable = (boolean*) malloc(sizeof(boolean) * 256); for(i=0; i<256; i++) acceptable[i] = FALSE; for(;*good; good++) acceptable[(unsigned int)*good] = TRUE; acceptable_inited = TRUE; } static char hex[17] = "0123456789abcdef"; static char from_hex(char c) { return (c>='0')&&(c<='9') ? c-'0' : (c>='A')&&(c<='F') ? c-'A'+10 : (c>='a')&&(c<='f') ? c-'a'+10 : 0; } /* * return a hex encoding of the char, */ #if 0 /* unused */ static char * to_hex(char c) { static char out[4]; out[0] = '\0'; out[0]='%'; out[1]=hex[c >> 4]; out[2]=hex[c & 15]; out[3]='\0'; return(out); } #endif /* 0 */ /* * Replace hex escape sequences with the proper codes... * * input and output can be the same if you want */ void Fromhexstr(char *input, char *output) { char c; unsigned int b; while (*input) { if (*input == '%') { input++; c = *input++; b = from_hex(c); c = *input++; if (!c) break; *output++ = (b<<4) + from_hex(c); } else *output++ = *input++; } *output = '\0'; } void Tohexstr(char *input, char *output) { if ( (input == NULL) || (output == NULL) ) return; if (acceptable_inited == FALSE) init_acceptable(); while (*input) { if (acceptable[(int)*input] == TRUE) { *output++ = *input++; } else { *output++ = '%'; *output++ = hex[*input >> 4]; *output++ = hex[*input & 15]; input++; } } *output = '\0'; } /* * This fcn hexifies everything */ void Hexall(char *input, char *output) { while (*input) { *output++ = hex[*input >> 4]; *output++ = hex[*input & 15]; input++; } *output = '\0'; } /* * String insensitive strstr */ #ifndef HAVE_STRCASESTR char * strcasestr(char *inputline, char *match) { int matchlen=0; int i, inlen; matchlen = strlen(match); inlen = strlen(inputline); for(i=0; i 1500) length = 1500; buffer_desc.len = length; buffer_desc.adr = buffer; SYS$CLREF (0); status = TCP_RECEIVE (&channel, &buffer_desc, &netlib_iosb, netlib_ast, 0); if ((status & 1) == 0) return (-1); SYS$WAITFR (0); if ((netlib_iosb.status & 1) == 0) { if ((netlib_iosb.status == SS$_ABORT && netlib_iosb.xxx == 0x086380da) /* CMUIP Connection Closing */ || netlib_iosb.status == SS$_LINKDISCON) /* UCX link disconnecting */ errno = EPIPE; return (-1); } return (netlib_iosb.size); } int netwrite (channel, buffer, length) int channel; char *buffer; int length; { struct { long len; char *adr; } buffer_desc; int status; buffer_desc.len = length; buffer_desc.adr = buffer; SYS$CLREF (0); status = TCP_SEND (&channel, &buffer_desc, 6, &netlib_iosb, netlib_ast, 0); if ((status & 1) == 0) return (-1); SYS$WAITFR (0); if ((netlib_iosb.status & 1) == 0) { return (-1); } return (netlib_iosb.size); } #endif /* NETLIB */ #if defined(VMS) && defined(CMUIP) /* * netclose, netread, and netwrite for CMUIP */ #include iodef #include ssdef static struct { short status; short size; long xxx; } cmu_iosb; globalvalue NET$_CC; /* Connection Closing */ int netclose (channel) int channel; { int status; status = SYS$QIOW (0, channel, IO$_DELETE, &cmu_iosb, 0, 0, 0, 0, 0, 0, 0, 0); status = SYS$DASSGN (channel); return (0); } int netread (channel, buffer, length) int channel; char *buffer; int length; { int status; if (length > 1500) length = 1500; status = SYS$QIOW (0, channel, IO$_READVBLK, &cmu_iosb, 0, 0, buffer, length, 0, 0, 0, 0); if ((status & 1) == 0) return (-1); if ((cmu_iosb.status & 1) == 0) { if (cmu_iosb.status == SS$_ABORT && cmu_iosb.xxx == NET$_CC) errno = EPIPE; return (-1); } return (cmu_iosb.size); } int netwrite (channel, buffer, length) int channel; char *buffer; int length; { int status; status = SYS$QIOW (0, channel, IO$_WRITEVBLK, &cmu_iosb, 0, 0, buffer, length, 0, 1, 0, 0); if ((status & 1) == 0) return (-1); if ((cmu_iosb.status & 1) == 0) return (-1); return (cmu_iosb.size); } #endif /* CMUIP */ gopher-3.0.15/object/VIews.h0000664000000000000000000000563310762617110012440 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/VIews.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: VIews.h * Header file, abstraction of a gopher+ view. ********************************************************************* * Revision History: * $Log: VIews.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.5 1995/09/26 05:16:33 lindner * more fixes... * * Revision 3.4 1995/09/25 22:07:22 lindner * Ansification * * Revision 3.3 1993/07/23 04:49:07 lindner * Added PrettyView fcn * * Revision 3.2 1993/02/19 21:33:24 lindner * Gopher1.2b2 release * * Revision 3.1.1.1 1993/02/11 18:03:07 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:48:34 lindner * Changes for multilingual views * * Revision 1.1 1993/01/31 00:34:40 lindner * Initial revision * * *********************************************************************/ #ifndef VIEWS_H #define VIEWS_H #include "STRstring.h" #include "boolean.h" struct view_struct { String *Type; String *Lang; String *Size; String *comments; }; typedef struct view_struct VIewobj; #define VIgetType(a) ((STRget((a)->Type))) #define VIgetLang(a) ((STRget((a)->Lang))) #define VIgetSize(a) ((STRget((a)->Size))) #define VIgetComments(a) ((STRget((a)->comments))) #define VIsetType(a,b) (STRset((a)->Type,(b))) #define VIsetLang(a,b) (STRset((a)->Lang,(b))) #define VIsetSize(a,b) (STRset((a)->Size,(b))) #define VIsetComments(a,b) (STRset((a)->comments,(b))) /** Real view functions in VIews.c **/ VIewobj *VInew(); void VIinit(VIewobj *vi); void VIcpy(VIewobj *videst, VIewobj *viorig); void VIdestroy(VIewobj *vi); void VItoLine(VIewobj *vi, char *tmpstr); boolean VIfromLine(VIewobj *vi, char *line); char *VIgetViewnLang(VIewobj *vi, char *line); char *VIgetPrettyView(VIewobj *vi, char *line); char *VIprettyLang(VIewobj *vi, char *currentlang); /*******************************************************/ /** This stuff is for a dynamic array of VIewobjs **/ #include "DAarray.h" typedef DynArray VIewArray; #define VIAnew(a) (DAnew((a),VInew,VIinit,VIdestroy,VIcpy)) #define VIAinit(a) (DAinit((a))) #define VIAgetTop(a) (DAgetTop(a)) #define VIAgetEntry(a,b) (VIewobj*)(DAgetEntry(a,b)) #define VIApush(a,b) (DApush((DynArray*)(a),(char*)(b))) #define VIAdestroy(a) (DAdestroy(a)) #define VIAcpy(a,b) (DAcpy(a,b)) #include "BLblock.h" void VIAfromBL(VIewArray *via, Blockobj *bl); #endif gopher-3.0.15/object/compatible.c0000664000000000000000000003316310762617110013514 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.2 $ * $Date: 2001/01/17 21:16:35 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/compatible.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: compatible.c * Compatibility routines ********************************************************************* * Revision History: * $Log: compatible.c,v $ * Revision 1.2 2001/01/17 21:16:35 jgoerzen * More psinrtf -> snprintf changes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.19 1996/01/04 18:25:48 lindner * Updates for autoconf * * Revision 3.18 1995/09/25 22:18:20 lindner * Next update * * Revision 3.17 1995/09/25 22:07:22 lindner * Ansification * * Revision 3.16 1995/02/06 22:14:22 lindner * Remove const * * Revision 3.15 1994/12/15 17:30:16 lindner * A replacement fgetpwent * * Revision 3.14 1994/07/21 22:18:45 lindner * Add putenv() compat code * * Revision 3.13 1994/04/25 03:34:34 lindner * Put back alpha patch (Fote) * * Revision 3.12 1994/04/08 20:05:55 lindner * gcc -Wall fixes * * Revision 3.11 1994/04/01 04:44:28 lindner * Fix for alpha VMS * * Revision 3.10 1994/03/30 21:38:39 lindner * Remove some VMS code * * Revision 3.9 1994/03/17 04:38:45 lindner * VMS weird directory routines * * Revision 3.8 1994/03/08 03:24:09 lindner * Waitpid for vms * * Revision 3.7 1993/10/27 18:51:10 lindner * Updates for VMS files/records * * Revision 3.6 1993/09/03 03:26:39 lindner * Better VMS tempnam() implementation * * Revision 3.5 1993/06/22 05:53:17 lindner * Added getdtablesize() option * * Revision 3.4 1993/04/15 21:36:30 lindner * Emulation of geteuid calls for HPs * * Revision 3.3 1993/03/18 22:27:46 lindner * better portable tempnam() * * Revision 3.2 1993/02/19 21:33:27 lindner * Gopher1.2b2 release * * Revision 3.1.1.1 1993/02/11 18:03:05 lindner * Gopher+1.2beta release * * Revision 1.4 1993/01/17 03:46:12 lindner * Fixed tempnam for VMS * * Revision 1.3 1993/01/08 23:13:55 lindner * Added more VMS mods from jqj * * *********************************************************************/ /* * Some functions that aren't implemented on every machine on the net * * definitions should be in the form "NO_FNNAME" * compatible.h looks at preprocessor symbols and automatically defines * many of the NO_FNNAME options * */ #include "String.h" #include #include "Malloc.h" /*** For NULL ***/ #include "compatible.h" /*** For machines that don't have strstr ***/ #if !defined(HAVE_STRSTR) char * Gopher_strstr(char *host_name, char *cp) { int i, j; for (i = 0; i < strlen(host_name); i++) { j = strncmp(host_name+i, cp, strlen(cp)); if (j == 0) return(host_name+i); } return(NULL); } #endif #if !defined(HAVE_VPRINTF) #include vsprintf(va_alist) va_dcl { ; } vfprintf(va_alist) va_dcl { ; } #endif #if !defined(HAVE_TEMPNAM) /* A tip of the hat to the developers of elm 2.4pl17, from whence the non-VMS portion of this routine comes. */ /* and a tempnam for temporary files */ static int cnt = 0; char *tempnam(char *dir, char *pfx) { char space[512]; char *newspace; #ifdef VMS if (dir == NULL) { dir = "sys$scratch:"; } else if (*dir == '\0') { dir = "sys$scratch:"; } if (pfx == NULL) { pfx = "gopher.$"; } else if (*pfx == '\0') { pfx = "gopher.$"; } snprintf(space, sizeof(space), "%s%s%d%d", dir, pfx, getpid(), cnt); #else if (dir == NULL) { dir = "/usr/tmp"; } else if (*dir == '\0') { dir = "/usr/tmp"; } if (pfx == NULL) { pfx = ""; } snprintf(space, sizeof(space), "%s/%s%d.%d", dir, pfx, getpid(), cnt); #endif cnt++; newspace = (char *)malloc(strlen(space) + 1); if (newspace != NULL) { strcpy(newspace, space); } return newspace; } #endif #if !defined(HAVE_STRDUP) char *goph_strdup(char *str) { int len; char *temp; if (str == NULL) return(NULL); len = strlen(str); temp = (char *) malloc(sizeof(char) * len + 1); strcpy(temp, str); return(temp); } #endif #if !defined(HAVE_TZSET) void tzset() { ; } #endif #if !defined(HAVE_STRCASECMP) /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * Modified for use on VMS by Earl Fogel, University of Saskatchewan * Computing Services, January 1992 */ typedef unsigned char u_char; /* * This array is designed for mapping upper and lower case letter * together for a case independent comparison. The mappings are * based upon ascii character sequences. */ static u_char charmap[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', }; int strcasecmp(const char *s1, const char *s2) { register const u_char *cm = charmap, *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; while (cm[*us1] == cm[*us2++]) if (*us1++ == '\0') return (0); return (cm[*us1] - cm[*--us2]); } int strncasecmp(const char *s1, const char *s2, size_t n) { if (n != 0) { register const u_char *cm = charmap, *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; do { if (cm[*us1] != cm[*us2++]) return (cm[*us1] - cm[*--us2]); if (*us1++ == '\0') break; } while (--n != 0); } return (0); } #endif #if defined(NEED_GETDTABLESIZE) int getdtablesize() { struct rlimit rlp; rlp.rlim_cur = rlp.rlim_max = RLIM_INFINITY; if (getrlimit( RLIMIT_NOFILE, &rlp ) ) return(-1); fds = rlp.rlim_cur; } #endif #if defined(VMS) /* In all versions of VMS, fopen() and open() are needlessly inefficient. * Define jacket routines to do file opens with more sensible parameters * than the VAXCRTL default. * [Should we really be doing this for EVERY fopen() and open()?] */ #ifdef fopen #undef fopen #endif #ifdef open #undef open #endif FILE *fopen_VAR (char *name, char *mode) { return fopen ( name, mode, "rfm=var","rat=cr","mbc=32" ); } FILE *fopen_FIX (char *name, char *mode) { return fopen ( name, mode, "rfm=fix","mrs=512","mbc=32" ); } FILE *fopen_VMSopt (char *name, char *mode) { return fopen ( name, mode, "mbc=32" ); } int open_VMSopt (char *name, int flags, unsigned int mode) { return open ( name, flags, mode, "mbc=32"); } #endif #if defined(VMS) || defined(NO_WAITPID_WAIT3) # include "Wait.h" pid_t waitpid(pid_t pid, int *status, int options) { int zepid; while ((zepid = wait(status)) != pid && pid != -1) /** Should check and make sure process exited... **/ ; return(zepid); } #endif /* * This is an ugly hack for now, since we only use strftime in one * place..... so far.. */ #if !defined(HAVE_STRFTIME) # include int strftime(char *buf, int bufsize, char *fmt, struct tm *tm) { sprintf(buf, "%4d%02d%02d%02d%02d%02d\n", tm->tm_year, tm->tm_mon+1,tm->tm_mday, tm->tm_hour, tm->tm_mon, tm->tm_sec); } #endif /* * This code was stolen from cnews. Modified to make "newenv" static so * that realloc() can be used on subsequent calls to avoid memory leaks. * * We only need this if Configure said there isn't a putenv() in libc. */ #ifndef HAVE_PUTENV /*{*/ /* peculiar return values */ #define WORKED 0 #define FAILED 1 int putenv(char *var) /* put var in the environment */ { register char **envp; register int oldenvcnt; extern char **environ; static char **newenv = NULL; /* count variables, look for var */ for (envp = environ; *envp != 0; envp++) { register char *varp = var, *ep = *envp; register int namesame; namesame = 0; for (; *varp == *ep && *varp != '\0'; ++ep, ++varp) if (*varp == '=') namesame = 1; if (*varp == *ep && *ep == '\0') return WORKED; /* old & new var's are the same */ if (namesame) { *envp = var; /* replace var with new value */ return WORKED; } } oldenvcnt = envp - environ; /* allocate new environment with room for one more variable */ if (newenv == NULL) newenv = (char **)malloc((unsigned)((oldenvcnt+1+1)*sizeof(*envp))); else newenv = (char **)realloc((char *)newenv, (unsigned)((oldenvcnt+1+1)*sizeof(*envp))); if (newenv == NULL) return FAILED; /* copy old environment pointers, add var, switch environments */ (void) bcopy((char *)environ, (char *)newenv, oldenvcnt*sizeof(*envp)); newenv[oldenvcnt] = var; newenv[oldenvcnt+1] = NULL; environ = newenv; return WORKED; } #endif /* NO_PUTENV */ #ifndef HAVE_FGETPWENT struct passwd * fgetpwent(FILE *f) { static char input[256]; static struct passwd *p = NULL; char *cp, *cp2; if (p == NULL) { p = (struct passwd *) malloc(sizeof(struct passwd)); } if (fgets(input, 256, f) == NULL) return(NULL); /* Username */ cp = strchr(input, ':'); if (cp == NULL) return(NULL); *cp = '\0'; cp++; p->pw_name = input; /* Password */ cp2 = strchr(cp, ':'); if (cp2 == NULL) return(NULL); *cp2 = '\0'; cp2++; p->pw_passwd = cp; /* UID */ cp = strchr(cp2, ':'); if (cp == NULL) return(NULL); *cp = '\0'; cp++; p->pw_uid = atoi(cp2); /* GID */ cp2 = strchr(cp, ':'); if (cp2 == NULL) return(NULL); *cp2 = '\0'; cp2++; p->pw_gid = atoi(cp); /* GECOS */ cp = strchr(cp2, ':'); if (cp == NULL) return(NULL); *cp = '\0'; cp++; p->pw_gecos = cp2; /* Home dir */ cp2 = strchr(cp, ':'); if (cp2 == NULL) return(NULL); *cp2 = '\0'; cp2++; p->pw_dir = cp; /* Shell */ p->pw_shell = cp2; return(p); } #endif /* NO_FGETPWENT */ gopher-3.0.15/object/boolean.h0000664000000000000000000000213610762617110013015 0ustar /******************************************************************** * lindner * 3.1.1.1 * 1993/02/11 18:03:05 * /home/mudhoney/GopherSrc/CVS/gopher+/object/boolean.h,v * $Status: $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: boolean.h * Header file that defines a boolean type. ********************************************************************* * Revision History: * boolean.h,v * Revision 3.1.1.1 1993/02/11 18:03:05 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ /* * Simple boolean type */ #ifndef BOOLEAN_H #define BOOLEAN_H #undef boolean /** Just in case it's defined **/ typedef int boolean; typedef int BOOLEAN; #if !defined(TRUE) && !defined(FALSE) #define TRUE (1) #define FALSE (0) #endif #endif /* BOOLEAN_H */ gopher-3.0.15/object/Debug.c0000664000000000000000000000251010762617110012413 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Debug.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 92, 93 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: Debug.c * Debugging utilities.. ********************************************************************* * Revision History: * $Log: Debug.c,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.3 1994/01/21 04:07:21 lindner * Update function declaration (alanc) * * Revision 3.2 1993/07/29 20:00:22 lindner * Added Debugf * * *********************************************************************/ #include int DEBUG = 0; #ifdef __STDC__ #include #else #include #endif #ifdef __STDC__ void Debugf(const char *fmt, ...) #else /* !__STDC__ */ void Debugf(fmt, va_alist) char *fmt; va_dcl #endif /* __STDC__ */ { va_list args; #ifdef __STDC__ va_start(args, fmt); #else va_start(args); #endif (void) vfprintf(stderr, fmt, args); } gopher-3.0.15/object/VIews.c0000664000000000000000000001575110762617110012435 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/VIews.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992, 1993 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: VIews.c * Various functions to handle gopher+ views ********************************************************************* * Revision History: * $Log: VIews.c,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.13 1995/09/25 22:07:21 lindner * Ansification * * Revision 3.12 1994/10/13 05:26:38 lindner * Compiler complaint fixes * * Revision 3.11 1994/07/21 22:33:38 lindner * Update for Language strings * * Revision 3.10 1994/06/29 06:55:25 lindner * made VIprettyLang non-case-sensitive when checking lang codes * * Accept views without sizes (since the Gopher+ protocol docs say * they're acceptable) (Coopersmith) * * Revision 3.9 1994/03/08 17:24:03 lindner * View language strangeness fixes from Dave Shield * * Revision 3.8 1994/03/04 17:44:21 lindner * Fix for size processing * * Revision 3.7 1994/01/21 04:09:29 lindner * Fix for bad VIEWS blocks * * Revision 3.6 1993/12/27 16:21:58 lindner * Fix bug where no language in gopherd.conf would crash the server * * Revision 3.5 1993/08/24 21:03:52 lindner * Fix spelling typo * * Revision 3.4 1993/07/29 20:00:06 lindner * none * * Revision 3.3 1993/07/23 04:49:06 lindner * Added PrettyView fcn * * Revision 3.2 1993/03/24 17:09:01 lindner * Fixed a memory leak * * Revision 3.1.1.1 1993/02/11 18:03:01 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:48:50 lindner * Changes for multilingual views * * Revision 1.1 1993/01/31 00:31:12 lindner * Initial revision * * *********************************************************************/ #include "VIews.h" #include "Malloc.h" #include "String.h" #include "BLblock.h" static char *ANSILangs[] = { "Da_DK", "Nl_BE", "Nl_NL", "En_GB", "En_US", "Fi_FI", "Fr_BE", "Fr_CA", "Fr_CH", "Fr_FR", "De_CH", "De_DE", "El_GR", "Is_IS", "It_IT", "Jp_JP", "No_NO", "Pt_PT", "Es_ES", "Sv_SE", "Tr_TR", NULL }; static char *ANSILangEn[] = { "Danish", "Dutch (Belgium)", "Dutch", "English (Great Britain)", "English (USA)", "Finnish", "Français (Belgium)", "Français (Canada)", "Français (Suisse)", "Français", "Deutsch (Suisse)", "Deutsch", "Greek", "Icelandic", "Italiano", "Japanese", "Norwegian", "Portugues", "Español", "Swedish", "Turkish", NULL }; char * VIprettyLang(VIewobj *vi, char *currentlang) { int i; char *cp = VIgetLang(vi); if (VIgetLang(vi) == NULL) return(NULL); for (i=0; ;i++) { if (ANSILangs[i] == NULL) return(NULL); if (strcasecmp(ANSILangs[i], cp) == 0) return(ANSILangEn[i]); } } VIewobj * VInew() { VIewobj *temp; temp = (VIewobj *) malloc(sizeof(VIewobj)); temp->Type = STRnew(); temp->Lang = STRnew(); temp->Size = STRnew(); temp->comments = STRnew(); VIinit(temp); return(temp); } /*** Initialize the VIewobj ***/ void VIinit(VIewobj *vi) { STRinit(vi->Type); STRinit(vi->Lang); STRinit(vi->Size); STRinit(vi->comments); } /** Destroy the VIewobj ***/ void VIdestroy(VIewobj *vi) { STRdestroy(vi->Type); STRdestroy(vi->Lang); STRdestroy(vi->Size); STRdestroy(vi->comments); free(vi); } /** copy a VIewobj **/ void VIcpy(VIewobj *videst, VIewobj *viorig) { STRcpy(videst->Type, viorig->Type); STRcpy(videst->Lang, viorig->Lang); STRcpy(videst->Size, viorig->Size); STRcpy(videst->comments, viorig->comments); } /** Put a VIewobj in a line according to G+ protocol **/ void VItoLine(VIewobj *vi, char *tmpstr) { char *cp; tmpstr[0] = ' '; tmpstr[1] = '\0'; strcat(tmpstr, VIgetType(vi)); cp = VIgetLang(vi); if (cp != NULL && *cp != '\0') { strcat(tmpstr, " "); strcat(tmpstr, cp); } /** Size **/ cp = VIgetSize(vi); if (cp != NULL && *cp != '\0') { strcat(tmpstr, ": <"); strcat(tmpstr, VIgetSize(vi)); strcat(tmpstr, ">"); } else { strcat(tmpstr, ": "); } /** Comments **/ cp = VIgetComments(vi); if (cp != NULL && *cp != '\0') { strcat(tmpstr, " "); strcat(tmpstr, cp); } } /** Siphon a G+ view line into a VIewobj **/ boolean VIfromLine(VIewobj *vi, char *line) { char tmpstr[256], *cp; int i; if (strlen(line) >= 200) /* Security: make sure the incoming data won't exceed the buffer. Pick 200 since that's already larger than any legit data. */ return (FALSE); /** Okay, read until the next space, put the result in tmpstr **/ for (cp = line,i=0; (*cp != ' '&&*cp!='\0'&&*cp!=':'); cp++,i++) tmpstr[i] = *cp; tmpstr[i]='\0'; line = cp+1; VIsetType(vi, tmpstr); if (*line == '\0') return(FALSE); /** Parse language **/ if (*line != ':') { for (cp = line,i=0; (*cp != ' '&&*cp!='\0'&& *cp!=':'); cp++,i++) tmpstr[i] = *cp; tmpstr[i]='\0'; line = cp+1; VIsetLang(vi, tmpstr); } if (*line == '\0') return(FALSE); /** Okay, parse off the size (if present) **/ cp = strchr(line,'<'); if (cp != NULL) { for (cp++,i=0; (*cp!='\0'&& *cp!='>'); cp++,i++) tmpstr[i] = *cp; tmpstr[i]='\0'; line = cp+1; VIsetSize(vi, tmpstr); } if (*line != '\0') VIsetComments(vi, line); return(TRUE); } char * VIgetViewnLang(VIewobj *vi, char *line) { char *cp; if (VIgetType(vi) == NULL) return(""); strcpy(line, VIgetType(vi)); cp = VIgetLang(vi); if (cp != NULL && *cp != '\0') { strcat(line, " "); strcat(line, VIgetLang(vi)); } return(line); } /* * Generates a View Array from a Block */ void VIAfromBL(VIewArray *via, Blockobj *bl) { int i; char *cp; VIewobj *vi; if (strcasecmp(BLgetName(bl),"VIEWS")!=0) return; vi = VInew(); for (i=0; i #undef __USE_GNU #undef _GNU_SOURCE #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_MALLOC_H #include #endif struct string_struct { int len; char *data; }; typedef struct string_struct String; /** VMS doesn't like multiple case blech! **/ #ifdef VMS # define STRcpy GSTRcpy # define STRcmp GSTRcmp # define STRcat GSTRcat #endif String *STRnew(void); String *STRcpy(String*, String*); void STRinit(String*); void STRset(String*, char*); void STRdestroy(String*); #define STRget(s) ((char *)(((s)->len<0) ? NULL : (s)->data)) #define STRlen(s) (((s)->len > 0) ? (s)->len : 0) #define STRsize(s) ((s)->len) String* STRcat(String *, char*); int STRcmp(String *, String*); #endif gopher-3.0.15/object/compile.com0000664000000000000000000000527310762617110013362 0ustar $ vo = 'f$verify(0)' $!******************************************************************** $! lindner $! 3.2 $! 1993/05/18 15:06:34 $! /home/mudhoney/GopherSrc/CVS/gopher+/object/compile.com,v $! Exp $! $! Paul Lindner, University of Minnesota CIS. $! $! Copyright 1991, 1992 by the Regents of the University of Minnesota $! see the file "Copyright" in the distribution for conditions of use. $!******************************************************************** $! MODULE: compile.com $! compiling script for VMS $!********************************************************************* $! Revision History: $! compile.com,v $! Revision 3.2 1993/05/18 15:06:34 lindner $! Fixed CVS/RCS comment leaders... $! $! Revision 3.1 1993/05/05 18:44:07 lindner $! new VMS files $! $! Revision 1.1 1992/12/31 05:19:12 lindner $! Initial revision $! $! $!********************************************************************/ $ IF P1 .EQS. "" $ THEN $ type/nopage sys$input: Usage: @compile UCX @compile WOLLONGONG @compile MULTINET @compile CMUIP @compile NETLIB @compile TCPWARE $ exit $ ENDIF $ IF P2 .EQS. "DEBUG" $ THEN $ write sys$output "Compiling library with DEBUG..." $ debug := "/debug/noopt" $ ELSE $ debug := "" $ ENDIF $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $! $ IF P1 .eqs. "TCPWARE" $ THEN $ write sys$output "Compiling library with UCX emulation..." $ transport := "UCX" $ ELSE $ transport := "''P1'" $ ENDIF $! $ IF f$trnlnm("VAXCMSG") .eqs. "DECC$MSG" .or. - f$trnlnm("DECC$CC_DEFAULT") .eqs. "/DECC" $! $ THEN $ vo1 = f$verify(1) $! DECC: $ vo1 = 'f$verify(0)' $ IF transport .eqs. "UCX" $ THEN $ vo1 = f$verify(1) $ cc := cc/prefix=(all,except=(setlocale))- /warning=(disable=implicitfunc)- /define=('transport'=1,__VMS_CURSES)'debug' $ vo1 = 'f$verify(0)' $ ELSE $ vo1 = f$verify(1) $ cc := cc/prefix=(all,except=(connect,gethostbyname,htons,inet_addr,- setsockopt,socket,setlocale))- /warning=(disable=implicitfunc)- /define=('transport'=1,__VMS_CURSES)'debug' $ vo1 = 'f$verify(0)' $ ENDIF $ ELSE $ vo1 = f$verify(1) $! VAXC: $ cc := cc/define=('transport'=1)'debug' $ vo1 = 'f$verify(0)' $ ENDIF $ vo1 = f$verify(1) $! $ cc compatible.c $ cc daarray.c $ cc gdgopherdir.c $ cc gsgopherobj.c $ cc strstring.c $ cc util.c $ cc blblock.c $ cc VIews.c $ cc Sockets.c $ cc Debug.c $ cc url.c $ cc fileio.c $ cc locale.c $! $ cc getopt.c $! $ vg1 = 'f$verify(0)' $ IF P2 .eqs. "DEBUG" $ THEN $ vg1 = f$verify(1) $ rename/nolog/noconf *.obj; *.objd $ vg1 = 'f$verify(0)' $ ENDIF $! $ CLEANUP: $ vo1 = f$verify(vo) $exit gopher-3.0.15/object/compatible.h0000664000000000000000000002252010762617110013514 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/compatible.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: compatible.h * Header file to make things compatible and define stuff in compatible.c ********************************************************************* * Revision History: * $Log: compatible.h,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.39 1996/01/04 18:25:48 lindner * Updates for autoconf * * Revision 3.38 1995/10/04 22:31:54 lindner * Add stdio for FILE* defs. * * Revision 3.37 1995/09/25 22:18:21 lindner * Next update * * Revision 3.36 1995/09/25 22:07:23 lindner * Ansification * * Revision 3.35 1995/05/01 05:41:45 lindner * compatibility fixes * * Revision 3.34 1995/02/01 21:46:25 lindner * Remove f from fgetpwent prototype * * Revision 3.33 1995/02/01 21:43:55 lindner * Add ultrix to machines that don't have fgetpwent * * Revision 3.32 1994/12/15 17:30:16 lindner * A replacement fgetpwent * * Revision 3.31 1994/11/24 08:09:53 lindner * Back to regular * * Revision 3.30 1994/11/18 22:04:33 lindner * Fix for FreeWAIS on NeXT machines * * Revision 3.29 1994/10/13 05:26:58 lindner * Add case for sequents * * Revision 3.28 1994/08/19 16:27:07 lindner * mktime() addition, sequent handling * * Revision 3.27 1994/07/22 17:19:08 lindner * AUX doesn't have strcoll * * Revision 3.26 1994/07/21 22:18:07 lindner * Add NO_PUTENV, NO_STRCOLL * * Revision 3.25 1994/07/06 02:59:12 lindner * DECC has strftime() * * Revision 3.24 1994/06/29 06:40:57 lindner * ifndef NO_UNISTD_H, include it so we can use POSIX stuff * use POSIX alternatives for getdtablesize() * ifdef _POSIX_SOURCE use POSIX functions like getcwd(), etc. (Coopersmith) * * Revision 3.23 1994/05/14 04:14:40 lindner * Fix for svr4.2 on unisys * * Revision 3.22 1994/05/11 02:41:57 lindner * Automagically define NO_VFORK for SCO * * Revision 3.21 1994/04/25 03:36:17 lindner * eliminate redefinition of open to open_vmsopt() for ALPHA (Fote) * * Revision 3.20 1994/04/08 20:05:56 lindner * gcc -Wall fixes * * Revision 3.19 1994/04/01 04:44:49 lindner * Fix for VMS * * Revision 3.18 1994/03/17 04:38:21 lindner * VMS weird directory routines * * Revision 3.17 1994/03/08 07:28:42 lindner * Fix for vfork on Aix * * Revision 3.16 1994/03/08 03:23:50 lindner * Waitpid for vms * * Revision 3.15 1994/03/07 04:43:54 lindner * Add pid_t, vfork * * Revision 3.14 1993/11/05 07:24:15 lindner * Fixes for NeXTs * * Revision 3.13 1993/10/27 18:51:12 lindner * Updates for VMS files/records * * Revision 3.12 1993/09/28 19:23:56 lindner * update for VMS getwd() * * Revision 3.11 1993/08/16 19:40:58 lindner * Fixes for Sequent Dynix * * Revision 3.10 1993/08/03 20:57:42 lindner * Really fix it for hocky pucks * * Revision 3.9 1993/08/03 06:43:48 lindner * Compatibility fix for hpux and seteguid * * Revision 3.8 1993/07/27 05:30:29 lindner * Mondo Debug overhaul from Mitra * * Revision 3.7 1993/07/20 23:33:27 lindner * Fix for NeXTs and pid_t * * Revision 3.6 1993/07/14 20:37:40 lindner * Fixes for VMS * * Revision 3.5 1993/07/07 19:29:19 lindner * Added LINGER compatibility option * * Revision 3.4 1993/06/22 05:53:19 lindner * Added getdtablesize() option * * Revision 3.3 1993/06/15 06:12:14 lindner * Updates for Solaris * * Revision 3.2 1993/04/15 21:36:33 lindner * Emulation of geteuid calls for HPs * * Revision 3.1.1.1 1993/02/11 18:03:05 lindner * Gopher+1.2beta release * * Revision 1.7 1993/01/14 21:58:02 lindner * Added #define that makes compatible compile fine under UCX * * Revision 1.6 1993/01/11 19:56:20 lindner * Fixed prototype for strcasecmp * * Revision 1.5 1993/01/09 02:25:57 lindner * Added definition for SIG_ERR for systems that don't have it. * * Revision 1.4 1993/01/08 23:17:20 lindner * Added more mods for VMS. * * Revision 1.3 1993/01/06 23:09:44 lindner * Added definition for AIX370 for strdup() * * Revision 1.2 1992/12/31 04:42:02 lindner * Changes for VMS, new switch NO_STRCASECMP * * Revision 1.1 1992/12/10 23:27:52 lindner * gopher 1.1 release * * *********************************************************************/ /* * Protoize a little */ #ifndef compatible_h_ #define compatible_h_ #include /* Import autoconf variables */ /******************** get Unix standard definitions **/ #if defined(HAVE_UNISTD_H) # include #endif /******************** for SIG_ERR **/ #include #if !defined(SIG_ERR) && defined(sequent) && defined(BADSIG) # define SIG_ERR BADSIG #endif #ifndef SIG_ERR # if defined(sequent) && defined(BADSIG) # define SIG_ERR BADSIG # else # ifdef __STDC__ # define SIG_ERR ((void (*) (int))-1) # else # define SIG_ERR ((void (*) ())-1) # endif /* __STDC__ */ # endif #endif /* SIG_ERR */ /******************** for strstr() **/ #if !defined(HAVE_STRSTR) char *Gopher_strstr(char *, char *); # define strstr Gopher_strstr #endif /******************** for tempnam() **/ #if !defined(HAVE_TEMPNAM) char *tempnam(char *dir, char *pfx); #endif /******************************** for strdup() **/ #if !defined(HAVE_STRDUP) char *goph_strdup(char *); # define strdup goph_strdup #endif /********************** For bzero()/bcopy() etc */ #if !defined(HAVE_BZERO) #define bzero(a,b) memset(a,'\0',b) #define bcopy(a,b,c) memcpy(b,a,c) #endif /********************* For getwd() */ #if !defined(HAVE_GETWD) # define getwd(a) getcwd(a,sizeof(a)) #endif /********************* For tzset() */ #if !defined(HAVE_TZSET) void tzset(); #endif /******************** For strcasecmp() */ #if defined(NO_STRCASECMP) || defined(VMS) || defined(__USLC__) # undef NO_STRCASECMP # define NO_STRCASECMP int strcasecmp(const char *, const char *); int strcasecmp(const char *, const char *, size_t); #endif /******************** For geteuid() */ #if !defined(HAVE_SETEUID) # if defined (__hpux) # define seteuid(x) setresuid(-1,x,-1) # define setegid(x) setresgid(-1,x,-1) # endif # if defined(_SEQUENT_) # define seteuid(x) setreuid(-1,x) # define setegid(x) setregid(-1,x) # endif #endif /********************* For getdtablesize() **/ #if !defined(HAVE_GETDTABLESIZE) # if defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE) || defined(HAVE_SYSCONF) # ifdef _SC_OPEN_MAX /* prefered POSIX method */ # define getdtablesize() sysconf(_SC_OPEN_MAX) # else /* if !defined(systems_without_limits.h) */ # include # ifdef _POSIX_OPEN_MAX /* alternate POSIX method */ # define getdtablesize() (_POSIX_OPEN_MAX) # else # define NEED_GETDTABLESIZE 1 int getdtablesize(); # endif # endif # endif #else # define NEED_GETDTABLESIZE 1 int getdtablesize(); #endif /********************* For VMS */ #if defined(VMS) # include # define popen(a,b) fopen(a,b) # define pclose(a) fclose(a) # define unlink delete # define fopen fopen_VMSopt FILE *fopen_VMSopt(); #ifndef __ALPHA # define open open_VMSopt int open_VMSopt(); #endif # if defined(UCX) # define closenet close # endif FILE *fopen_VAR(); FILE *fopen_FIX(); #else /* non-VMS systems don't need a special netclose either */ # define closenet close #endif /** VMS **/ /********** For linger setsockopt() ***/ #if defined(linux) || defined(_SEQUENT_) # define NO_LINGER #endif /********** For NeXTs **************/ #ifdef NeXT # define ANSI_LIKE /** freeWAIS bastards! **/ #endif /********* Systems that can't set proctitles *******/ #if defined(_AUX_SOURCE) || defined(__svr4__) || defined(apollo) # undef SETPROCTITLE #endif /********* Fix for old stat.h stuff on bsd (I think) ******/ #if defined(NeXT) || defined(sequent) || defined(NO_NEWSTATDOTH) #define S_IXUSR S_IEXEC #endif /* Now fixed by autoconf... #if defined(VMS) || defined(NeXT) || defined(sequent) || defined(NO_PID_T) typedef int pid_t; #endif */ /********* strftime() - should be present in ANSI C libraries ******/ #ifndef __DECC #if defined(sequent) || defined(NO_STRFTIME) || defined(VMS) # undef HAVE_STRFTIME int strftime(char *buf, int bufsize, char *fmt, struct tm *tm); #endif #endif /* __DECC */ /********* mktime() - should be present in ANSI C libraries ******/ #if defined(NO_MKTIME) || defined(sequent) # undef NO_MKTIME # define NO_MKTIME #endif /********* strcoll - should be present in ANSI C libraries ******/ #include "String.h" /* include this here for broken strcolls */ #if !defined(HAVE_STRCOLL) # define strcoll strcmp #endif /******** putenv, in most systems except old BSD... *********/ #if !defined(HAVE_PUTENV) int putenv(char *); #endif /******* fgetpwent(), sortof non-standard BSD derived fcn *******/ #if !defined(HAVE_FGETPWENT) # include # include struct passwd *fgetpwent(FILE *); #endif #endif /* compatible_h_ */ gopher-3.0.15/doc/0000775000000000000000000000000012621233142010515 5ustar gopher-3.0.15/doc/gophfilt.10000664000000000000000000000674110762617110012430 0ustar .TH GOPHFILT 1 .SH NAME gophfilt \- oneshot connection to gopher document server .SH SYNOPSIS .B gophfilt .RI [ -t .IR type] .RI [ -p .IR path] .RI [ -h .IR host] .RI [ -s .IR port] .RI [ -i .IR item] .SH DESCRIPTION The gophfilt program is a oneshot command line driven version of a gopher client, suitable for use in shell- or awk-scripts. .PP The Internet Gopher is a distributed document delivery service. It allows a neophyte user to access various types of data residing on multiple hosts in a seamless fashion. This is accomplished by presenting the user a hierarchical arrangement of documents and by using a client-server communications model. The Internet Gopher Server accepts simple queries, and responds by sending the client a document. .PP Gophfilt can operate in either of two modes. The first one is in the spirit of unix filters, in that it accepts requests on stdin and writes results to stdout. The request is in the form of a tab-delimited .cache item. For example: .PP .RS 3 1Master Gopher at UMN 1/ gopher.tc.umn.edu 70 .RE .PP (Or in string notation) .PP .RS 3 "1Master Gopher at UMN\\t1/\\tgopher.tc.umn.edu\\t70\\n" .RE .PP This example would result in the retrieval of the root directory from the Master Gopher. .PP Gophfilt's other mode permits the construction of a gopher request from arguments provided on the command line. In this "manual" mode, at least the path and type items must be provided. The default host and port are taken from the file conf.h at module build time. .PP -p specifies the path to the requested data. From our "filter" example above, the field "1/" is the path. .PP -t specifies the type of the requested data. From our example above, the leading "1" character is the type (directory, in this case). .PP -h specifies the name of the host where the server is to be found. The default host (CLIENT1_HOST from file conf.h) is used if not provided. .PP -s specifies the service (port) that the server is monitoring. The default port (CLIENT1_PORT from file conf.h) is used if not provided. .PP -i specifies a search item. This field immediately follows the path field in the transmitted request. .PP -T specifies a receiver timeout in seconds. This is the maximum time that gophfilt will wait for more data. If the "timeout" return value is noticed by the calling program, any data received to that point should be considered suspect. .PP To recreate using manual operation the request from our example, one would execute the following command. .PP gophfilt -t 1 -p 1/ -h gopher.tc.umn.edu -s 70 .PP .SH MORE EXAMPLES .PP Here is an example that demonstrates the usefulness of the gophfilt. This specific example only works on the Rutgers campus, but illustrates the point .PP gophfilt -t 0 -p "webster default SPELL" -i flatulence .RS 2 -h hangout.rutgers.edu -s 770 | gophfilt .RE .PP This example requests a selector item from the Webster's Dictionary, and then pipes that item to gophfilt for subsequent retrieval of the actual definition. The result is available on stdout for use. .SH RETURNS Gophfilt returns the following completion codes on exit: .RS 4 .PP 0 Successful completion. .RE .RS 3 .PP -1 Error in parsing command line arguments. .PP -2 Manual operation and insufficient parameters were provided. .PP -3 Piped operation and unable to read selector from stdin. .PP -4 Unsupported item type requested. .PP -5 Unable to connect to specified host and port combination. .PP -6 Error encountered writing to stdout. .PP -7 Timeout occurred while waiting for more data. .RE gopher-3.0.15/doc/gopherrc.50000664000000000000000000000521410762617110012423 0ustar .TH GOPHERRC 5 .SH NAME gopherrc \- configuration file for gopher(1) .SH DESCRIPTION .LP The .B gopherrc file contains a list of directives that alter the behaviour of the .BR gopher(1) client. It is composed of lines of the form: .IP .I Token:\ Value .LP Tokens are case insensitive and the value field will change, depending on the token. A pound sign ("#") at the beginning of a line signifies a comment line. Gopherrc files are used in a number of places. There is a global gopherrc file (called gopherrc). This is usually placed in a systemwide directory. A file with the same format called remotegopher.rc is also used by the gopher client when using the -r switch. Also, an individual has their own customized version of this file in their home directory in the file .gopherrc. On VMS this file is called GOPHERRC. All of these files use the format described below. Most people will set the values in this file by pressing the 'O' key to set options in the curses gopher client, rather than editing this file directly. People considering editing this file on VMS should make sure their editor preserves the Stream_LF format of the file. .I Quick pseudo grammar .IP .nf map: ,, SearchBolding: Bookmarks: .fi .LP The following tokens are recognized .TP 12 .I map: .LP maps a content type (such as text/plain, or image/gif) to commands to execute for displaying the document or printing the document, i.e. 'more -d %s' or 'lpr %s'. The content type, display command, and printing command are separated by commas. The sequence of %s is replaced with the filename of a temporary file containing the document to be printed or viewed. If the command starts with the vertical bar (|) the command will be executed immediately and the document will be sent to the commands standard input. Note this feature does not work on VMS. If the display command is set to 'builtin', then the text file pager inside the gopher client will be used to display the item. .TP 12 .I SearchBolding: .LP controls the clients display of search terms. If the value is 'yes', then search words will be bolded. Otherwise they'll be left alone. .TP 12 .I Bookmarks: .LP The bookmarks in .link format follow. For more information on the format of a .link file, consult the gopherd(8) manual page. .I Sample gopherrc file: map: text/plain,builtin,lpr %s map: image/gif,xv %s, Bookmarks: Type=1 Name=Bookmark #1 Host=gopher.tc.umn.edu Port=70 Path= # Type=0+ Name=textfile Host=foo.com Path=0/readme Port=70 . .SH "SEE ALSO" .IR "Media Type Registration Procedure" ", March 1994, RFC 1590" .IR gopher(1), gopherd(8) gopher-3.0.15/doc/PLATFORMS0000664000000000000000000000445410762617110012023 0ustar $Id: PLATFORMS,v 1.13 2002/03/20 02:44:51 jgoerzen Exp $ These are the platforms on which gopher is known to work. Gopher should also work on any Unix/Posix platform (Solaris, SunOS, *BSD, Linux, MacOS X, etc). Please let us know if you have troubles compiling or running gopher on your platform by e-mailing gopher@complete.org. The second column in the list below indicates the latest version of gopher that someone has reported about. Thanks! jgoerzen@complete.org Platform Gopher Notes --------------------------- ------ ----------------------------------- FreeBSD/i386 ?.? 3.0.1 requires gmake FreeBSD/i386 4.4 3.0.3 OK -- Kevin Griffin Linux/alpha 2.2 (Debian sid) 3.0.3 verified for each release by jgoerzen Linux/i386 2.2 (Debian sid) 3.0.3 OK -- John Goerzen Linux/ppc 2.4 (Debian sid) 3.0.3 OK -- John Goerzen Linux/i386 ?.? (Slackware) 3.0.1 MacOSX/ppc 10.1 (Darwin) 3.0.4 use gnumake instead of gmake Build on UFS partition SEE NOTES BELOW OK -- John Goerzen NetBSD/i386 1.5ZA (-current) 3.0.4 verified for each release by jgoerzen requires gmake Solaris/i386 2. 3.0.2 OK -- Don Fike ----------- If you want to use gopher on older platforms (VMS, Ultrix, etc), please check out the UMN gopher 2.3.1 distribution. Gopher 3 is not currently supporting VMS, though we have not removed the VMS support from the tree. (VMS hackers: help us out!) ** Special notes for Mac OS X / Darwin: Darwin appears to have some compatibility problems. Note that you must have the developer pack installed to build gopher. You must also use gnumake instead of make. Now here's the kicker -- If you are building on a HFS+ partition rather than a UFS one, the case-insensitivity in the operating system can cause problems. Build instead on a UFS partition. You can try this by using the Disk Copy tool to create a UFS playground within your HFS partition. Untar the gopher source tree on this UFS volume and build it there. Clint Paden reports that this will work. gopher-3.0.15/doc/client.changes0000664000000000000000000011520510762617110013336 0ustar $Id: client.changes,v 1.1 2000/08/19 00:28:56 jgoerzen Exp $ Gopher 2.3 patchlevel 0 ----------------------- * Entire source tree modified to use GNU autoconf. Gopher 2.2 patchlevel 0 ----------------------- * Entire source tree converted to ANSI C. * New interrupt routines. * Prevent sending "gripe" messages that might have just been accidental typing of 'g', by requiring a minimum size message * Added an environment variable GOPHERMENUSTYLE for sites that might want to display the menu differently than as "[%d] title..." * Klingon messages, for folks who get into that sort of thing.. Gopher 2.1 Client patchlevel 3 ------------------------------ * Replaced Gopher Object Initializer routines. This fixes some problems on some systems (VMS in particular) Gopher 2.1 Client patchlevel 2 ------------------------------ * *IMPORTANT* Fix for binary file retrievals on certain machines. * Word wrapping now works in ASK forms. Thanks go to Pacific Bell Knowledge Network for these patches. * Client can now use SOCKS for sites behind firewalls. See Makefile.config for more configuration information * Added Danish Gopher Messages and Help file. * New Espanol Help file * Added Danish as a default choice for VMS clients, more hlp and hlp_secure comments for folks customizing their message files. * Use VARIABLE length records for text on VMS * Don't add the default gopher server when using the -b option. * Fixes for jpeg, tiff display in the default gopher.rc file. * Remove hard limit of 5 AskL items per form. Patch provided by Pacific Bell Knowledge Network. * Dynamic screen position code, long title fix from Allan L. Bazinet * Fix for VMS language build procedures. * Fix memory leaks. * Fix for UCX menu ordering Gopher 2.1 Client patchlevel 1 ------------------------------ * Fixed a major problem with launching telnet in the fileio routines. Some operating systems would get hung in FIOwaitpid forever. * Added VMS code from F. Macrides for specifying the default language via the GOPHERMSGS_DEFAULT definition in conf.h, for when a series of languages have been made available by setting the DCL logical LC_MESSAGES to the * wildcard. * Added code for specifying the device where shared images of message files will be found, via the GOPHERMSGS_DEV definition in conf.h. * Better VMS TPU language build script. * Indicate 'D'ownload as an option on exit from the pager in SecureMode and NoShellMode. * Don't auto exit paging at the end of the file * Fixes for French messages from Eddy Beliveau * JL Wilkinson 16-Jul-1994 Merged in TGV's syslog() functions to allow the CLIENT_LOGGER and TELNET_TRACE functionality to work with Multinet. * Fix for folks with non gopher port of 70 in conf.h * DEBUG compile option for VMS * Fix prototype for DCLspawn_exception * Better VMS make, compile and link com files. Gopher 2.1 Client patchlevel 0 ------------------------------ * New Language files for Italian, German and piglatin. * Added support for Adobe Portable Document Format, PDF. * Bug fix: adding a text file to the bookmark list doesn't make the file inaccessable. * Start to support the IETF URL format partially. * Client can now print to ANSI attached printers in the built in pager. * Features from Alan and JL for Language Definitions and Gripes F.Macrides 27-May-1994 Added option to allow 'd'elete only for bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * Add INTLOPTS, add locales dir target for clean * Add parenenthesis to illegal chars * Add internal upload and download options to code (no docs yet..) * Skip over type 'i' items. * Added code from J. Lance and Alan C. to do better internationalization * Pause after telnet/tn3270 to permit reading of any error messages. * Added telnet and tn3270 to prompt for a URL via the 'w' command. * Gopher can use some URLs on the command line (without the -w flag..) * NEVERSETOPTIONS compilation symbol disables ability to set options via SetOptions() and issues an appropriate message. * NEVERSPAWN compilation symbol disables the spawn command and issues an appropriate message. * On VMS, the NEVERSETOPTIONS and NEVERSPAWN symbols can be used to create a gopher image for CAPTIVE accounts which still permits functions that would be disabled by the -s or -S switch, but issues an appropriate message (rather than a DCL error message) on spawn attempt and precludes "creative" modifications of the display software and print command mappings. * make searchbolding the default, add note for vms admins * Fix problem with NO_MAPS.. define, add code to check for new config file * Allow 'home' gopher server in gopherrc files. * Define, add code to check for new config file in the global gopher.rc. The user can choose whether to merge the new definitions in. * Define Gopher type '!' as an application. Applications are launched based on the gopher+ view type. Documents aren't tranferred and there isn't any prompting. * (F.Macrides) Fixed PagerNextPage() and PagerSearch() to not add extra blank lines following lines that are exactly equal to the screen width on VMS. Added code to disallow 'm'ail if SecureMode or NoShellMode and the NOMAIL symbol was defined on compilation. * New message base for Latin American Spanish. * French Gopher Help file Gopher+2.0 patchlevel 16 ------------------------ * F.Macrides 27-May-1994 Added option to allow 'd'elete only for bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * Added option to not read maps from the user rc file (i.e., only from the system rc file) in SecureMode or NoShellMode, via the compilation symbol SECURE_MAPS_GLOBALRC_ONLY. * Put back -force_html %s for the lynx command in the VMS section (really *is* needed with the current text/html code when foo.html files are supplied by a gopher+ server from it's own data tree; other Web browsers don't have that switch, and won't work right with gopher+ servers until they can use the gopher+ extra stuff to determine the mime type. * Better Man pages * Remove hymoo.c from VMS compilation script * Added option to allow 'd'elete only for bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * Fix for SetOptions() on VMS * better gopher help file * make searchbolding the default, add note for vms admins * (F.Macrides) Added option for not reading maps from a Bookmark file when the client is running in SecureMode or NoShellMode, implemenented via the compilation symbol SECURE_MAPS_GLOBALRC_ONLY * Fix for VMS linking problem * Added Gerd.Boehm@physik.uni-regensburg.de patch for off-by-one line counts in AskL blocks. * Fix for CSO dashes mania.. * (F.Macrides) Fixed PagerNextPage() and PagerSearch() to not add extra blank lines following lines that are exactly equal to the screen width on VMS. Added code to disallow 'm'ail if SecureMode or NoShellMode and the NOMAIL symbol was defined on compilation. Fix for redisplay after using help * Add Swedish messages from Johan Svensson * Fix for NO_FREEWAIS switch Gopher+2.0 patchlevel 15 ------------------------ * Many modifications for internationalization. Gopher can now use message catalogs for French and Spanish. Adding other languages is fairly easy. * Fix for Forms with multiple AskL items, or AskL items not as the last item. * Don't allow users with rsh to specify a shell as an display or print application. * Added documentation on the new URL= option in .link file from Alan Coopersmith * New manual page for gopherrc. * Fix for bad free() in CURrequest() * Fixed ^_ mislabel of the ^- help command. * Added prompt for RETURN in VMSExit(), to enable reading of ACCVIO tracebacks * Changed return values of DCLSystem() to be compatible with the for-Unix code. * Fixed spawns to work with OpenVMS/AXP v6.1 (still doesn't have the TRUSTED flag). * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * Fix for last line without newline * Mods for TCPWARE on VMS * Use fast malloc routines on VMS VAXC. * Fix for binhex downloads on vms and use dump command for binary files * Fix for bad free() in SetOptions() * Added code for mapping telnet and/or tn3270 commands to "- none -" for disabling them and having the client issue "Sorry, not implemented" messages on efforts to use Type 8 or T tuples. * Added FIOsystem() failure messages for both VMS and Unix. (all from F.Macrides) * Allow VMS environment variable reading routines to be used on Unix systems. * eliminate redefinition of open to open_vmsopt() for ALPHA (Macrides) * Fixed break of open() for Alpha. (all From F.Macrides) Gopher+2.0 patchlevel 14 ------------------------ * Fix for the problem of vanishing bookmarks Gopher+2.0 patchlevel 13 ------------------------ * Fix for bug when mailing items that caused a most certain crash.. * Fixed definitions for HTML browsers. * Added support for AskL: items in ASK forms. Currently you're limited to a maximum of ten lines. * All remaining dangerous system calls were replaced with FIOsystem() calls. (i.e. the secure system call) * Fixed a few rare bugs with ASK blocks where whatever you typed was wiped out. * Should compile on more systems probably pyramids.. Gopher+2.0 patchlevel 12 ------------------------ * Fix for big bad telnet security whole, plus many more additions for secure process i/o * Forms now use new screen management functions. Any size form can be scrolled through, this includes other forms, like the CSO search screen. * Boxes and alternate character sets are used in a much more sane manner. The problem of garbage on OSF/1 systems and others should be remedied * The Help file has been improved. * Improved Gripe command, improved signal handling * Client now compiles correctly for Data General * text/html viewer support for lynx 2.1 & CERN's www-linemode client * Added anonymous ftp type 'f' option * Better sanity checks for box drawing characters * Fix bug in gcc for Solaris 2.x for curses routines * New memory management routines for strings improves performance quite a bit for large directories * More robust routines that deal with malformed VIEWS blocks * Better GDdeleteGS method, allow ignoring of items by doing a Type=X in a .names file * Allow bangs in Domain= lines, to negate classes of hosts * Portions of the code now use the new non sh routines for starting processes. More will follow. * Much better URL handling from Alan Coopersmith Gopher+2.0 patchlevel 11 ------------------------ * Better method of drawing box characters dependent on terminal type. Terminal types supported: vt100, z29, others. * Don't allow downloads of type 'i' items. * 'v' no longer does anything if user is already viewing bookmarks. * Fix the 'm' command so that it deletes the current menu's cache files. Also prevent 'm' from destroying bookmarks. (Beckett) * In describe_gopher(), add TRUE argument to GStoLink() so that the Admin and ModDate information are displayed ('=' and '^'). (Macrides) * Prevent describe_gopher() from destroying the cache file for the current item. (Beckett, Wolfe) * More stable file caching, subject line chopping in Gripe * Fix improper include of sys/fcntl.h in gopherrc.c * Prettier Info items in gopher directories, removed dot from the end of files In DisplayTitle(), menu items now fit properly when the line is too long for the screen. (Beckett) * filter out more characters when saving files for VMS * In Save_file(), disallow saving of type since this is fetched as a set of indexed fields instead of as a savable file. Also disallow saving of info and error types since there's nothing to save. (Wolfe, Beckett, Macrides) * Clarified help/messages, mods for box display In PagerInitGlobal(), initialize 'currentpage' to 0 in order to correct problems with the page-up command ('b') that are due to the static nature of 'currentpage' and 'positions[]'. Remove static initialization of 'currentpage' since it may be misleading. (Wolfe) * In PagerBuiltin(), fix page-up ('b') command to not execute if the currently displayed page is the first page of the text. (Wolfe) * In PagerBuiltin(), fix search command ('/') to begin searching at the top of the currently displayed page. This allows search to successfully find and highlight text on this page. (Wolfe) * In PagerBuiltin(), modify search command ('/') to not search for a null string. (Wolfe) * In PagerBuiltin(), modify repeat search ('n') to display an error message when attempted without a defined search string. This is consistent with the behavior of 'n' at the menu level. (Wolfe) * In PagerBuiltin(), clean up deleted subwindows when doing searches. This affects AIX, Ultrix, and perhaps others. (Beckett) * Add q to exit out of pager for completeness Gopher+2.0 patchlevel 10 ------------------------ * Fix for segmentation fault when saving or downloading * Fix for osf curses line drawing characters * Fix for people trying to download the help file * Move screen refresh stuff to CURwgetch() * Add optional client logging * Cleanup on a SIGHUP signal * Use $HOME instead of password routines to read .gopherrc * Allow saving to variable length record VMS files (see conf.h) * Add Movie (;) and Info (i) type support * Add q to exit out of pager for completeness * Now possible to print via builtin pager. Gopher+2.0 patchlevel 9 ----------------------- * Add early searching.. tag for CSO, better ui * Fixed spawned process error checking on Unix, add third arg to Save_File * Cleanup on a SIGHUP signal * Fixes for empty bookmark addition problem * Fix for segvs when exiting early * In the 'o' command, allocate memory for the form based on screen width. * Don't redraw the screen if we attempt to go up a directory level from the root level. * In Gripe(), allocate memory for the form based on screen width. Fix email parsing under VMS. Fix problem where gopher did not delete mail temp files under VMS. (Becket) * In process_request(), make the status "Receiving xxxx..." a bit more descriptive for images, MIME files, and other files. (Becket) * In Save_file(), choose a view BEFORE opening the file -- user may change mind and cancel, which left a zero-length file previously. * In Save_file(), check to see if a view has already been chosen. * Redraw the screen after e-mailing a document. User may be emailing to himself or get an error message. * Backing past the top of document no longer brings up help. Text screen no longer redraws after the help screen disappears. * The gopher: url shouldn't have that extra slash Gopher+2.0 patchlevel 8 ----------------------- * The built in pager can now mail/save/download. * Add [space to cycle] prompt *before* you entered a choice item in an ask block. * Bolding of searched words in the pager is now a changeable option. * Pressing the DEC HELP key/KEY_HELP will get help * Fixed lots of memory allocation errors in AskBlocks code. Shouldn't dump core no more.. * Client will clean up transfered files on more abnormal occasions. * Last bookmark can now be deleted. Gopher+2.0 patchlevel 7 ----------------------- * Make sun shared libraries optional * Add support for DEC HELP key/KEY_HELP * Exit on error reading from terminal (kills spinning processes) * Implement all remaining ASK block items (Select, Choose). * Some Spelling corrections * Modified CURGetOneOption() to have a Title field. Serveral other routines modified for improved line editing and to show all available commands while answering prompts. If dialog box has only one prompt, as for search query entries, start user entry on new line so more of the screen is available for the entry (useful for search terms with booleans). * Add Funky cool builtin pager (also changed defaults to use builtin pager.) * Fix core dumps when exiting from bookmark screen. * Add support for tn3270 on oddball ports.. * Add command-line searching * Fix for caching of alternate view items. * Don't allow null applications to be added with the options code. * Getting info displays the URL of the item. * Inform user about mal-configuration if view has Unix piping on VMS. * Added code for mailing gripes from VMS systems, and fixed memory leak in the Unix code. * Added v1.12b 'S' command for saving titles in a directory. * Added titles to CURGetOneOption() calls. * Don't connect if nothing typed in 'o' * Add a sample TPU file/pager for VMS * Add Environment variable processing for VMS, plus add support for HTML * Moved GLOBALRC definition to conf.h for VMS * Use and external browser for html * Add support for HTML and MIME on the menu displays * Fix for compiler error on Alpha Gopher+2.0 patchlevel 6 ----------------------- * Fix for problems when retrieving empty directories. * Fix for arrow updating. * Don't connect if nothing typed in 'o' * Selecting an Ask item more than once doesn't crash the client. * Many fixes for DEC Alpha AXPs running OpenVMS from F.Macrides: Added temporary code to work around DECC/AXP's problems with screen clearing and cursor homing (we'll get rid of that code if the problem goes away in the next version of DECC/AXP). It's bolding via standout() or wstandout(win) still doesn't work, but that's not a serious functional problem for gopher users on Alphas. Added exit block to ensure that the terminal characteristics are retored and cleanups are done on VMS. Added code for getting terminal characteristics from the terminal table on VMS. Replaced/modified Cruft for VMS with routines which handle both Control C and Control Y, enable use of ReallyQuit(), and restore all original terminal characteristics for spawns and intentional or unintentional exits. Did it in a way that should stay transparent to the otherwise "for-Unix" code, and should hold up with future mods or enhancements of that code. Standout() doesn't work at all and endwin() and delwin() are unreliable on Alphas (due to bugs in the Alpha's Curses library). Andrew Heyler is looking into workarounds, should DEC not fix the bugs soon. Code compiles with DECC on Alphas without warnings or error messages, but still get lots of "informational" messages due to incomplete prototyping (no problems or compiler messages with VAXC). * REMOTEUSER is now compiled in by default.. * More debugging output from Mitra. * secure patch from mitra. * Moved vms opt files into their own directory. Gopher+2.0 patchlevel 5 ----------------------- * Fix for really long strings in some menus * Get rid of the beep during a ^G in CURwgetstr(). * Make CURChoice() delete its window when it exits. * Fixes for CMULIB and NETLIB for VMS * Mods for VMS for telnet dialog, argv[0] * use x-troff instead of troff in gopher.rc Gopher+2.0 patchlevel 3 ----------------------- * Additional checking for mail address syntax from Wolfgang Ley. Gopher+2.0 patchlevel 3 ----------------------- * Should compile for CMUIP and NETLIB on VMS (not tested) * Fix for control-c on startup * Added warning comments in mail_file() Gopher+2.0 patchlevel 2 ----------------------- * Use /bin/mail instead of ucbmail * Rebuild client if patchlevel.h changes * Fix for problems with '=' and '?' and /bin/mail Gripe mods Gopher+2.0 patchlevel 1 ----------------------- * Bigger Better Badder Options, inspired by jqj * Audio file fix from jqj * Don't allow securemode types to use o * Bigger Better Badder Options, inspired by jqj * Fix for VMS unresolved variables * Change audio/mulaw to audio/basic for MIME Gopher+2.0 ---------- * Client supports AskL: and AskP: * Mitra mods.. More secure downloads. Optional Autoexit feature. * Mods from Dirk Herr-Hoyman: Add default to gopher client view selection. This includes making Text/plain the default view. Make view types "pretty" in view selection. Fixed a nasty bug view selection. When you choose an item that does not have a viewer, a previous view type was used. Don't EVER use static again :-) Various error checks. Mostly adding error checking. * Interrupts are now handled cleanly. Pressing control-c and then selecting "n' for no will leave you back where you started.. * Client now compiles on VMS cleanly. * ASK blocks now work for all Gopher items, not just documents.. * Fixed problems with CSO caching of search results. Also changed the way CSO searches are done, you return to the search dialog after each search instead of returning to the directory view. * Kermit binary downloads now work. * Fixed problem in gripe with messed displays.. * Fixed VMS telnet's using Multinet so they work correctly for ports other than 23. * CleanupandExit() now works better with some signal() implementations. * Added ^R and ^W as aliases for redraw for VMS * Added the 'o' command to open a new gopher session to any host/port * Fixed problem with 'A' command, it was adding the wrong directory. * Added '!' to do a shell escape. (or '$' on VMS..) * Ctrl-Z does an unconditional quit on VMS. * Fixed bug with '=' on systems without a tempnam() (i.e. NeXTs etc.) Changes from 1.2b3 to 1.2b4 --------------------------- * Fixed problem with signals in subprocs.c * Fixed bug in Ask routines * Made having m to mail an option for CLIENTOPTS * Removed extraneous wattron/wattroff in CURBox() * Added mods for REMOTEUSER from Mitra. * Added better error messages for non-connecting sockets (jqj). * Added client option for not including MAILing for a secure client. Changes from 1.2b2 to 1.2b3 --------------------------- * Added support for Note: block in ASK blocks. * Default ASK values now appear in the ASK form. * Removed many memory leaks. Thanks purify! * Enhanced caching of retrieved files. The client saves any file that is viewed just in case you want to see it later. Destroys them when you're finished with a directory. * Mail Save and print are now available again, but bolding is being reworked. * Screen doesn't blink when you choose an item by number (Mitra). * Memory leaks are gone, plus many more bug fixes. Changes from 1.12 to 1.2b2 -------------------------- * Client now works with Gopher+ servers. * Fixed problems with freeing memory on NeXT systems (and any systems that have tmpnam() instead of tempnam() * Fixed problems with Gopher+ bookmarks. * Options screen is still broken, in the process of replacing it with something much better. * Can now directly pipe into commands. Can even set the pager to "|more" for instantaneous viewing of big files. * Global gopher.rc file installed in CLIENTLIB * Long filenames are now truncated. Changes from 1.11b to 1.12 -------------------------- * Added ^R to redisplay keys for those VMS types. * Fixed window-memory leak in CURChoice(); * Fixed problem with pagers that don't leave the cursor at the beginning of the line. * Now compiles cleanly under UCX. * Save_file now generates "pretty" VMS default file names. * Fixed bug with one item directories not showing up correctly. Changes from 1.11 to 1.11b -------------------------- * Save_file now filters for directories and searches. * Removed \n from system() calls for VMS. * Reverted to old behavior in readfield() This is especially important for sites that stuff \n's in their titles/paths. * Bugs!!! Fixed problem with 's' for saving at a menu. Also fixed function calling to Save_file. * Secure mode now actually lets people view documents. * VMS users can now see the bytes per second on their transfers. Changes from 1.1 to 1.11 ------------------------ * Added file downloading command 'D'. Right now it's hard coded for kermit, sz, sb, and sx download commands. This can be customized easily by editing download.c. * Client no longer trys to display images when in secure mode. An error message is displayed instead. * Added command line option -T to set the initial type of object being displayed. * Improved behaviour when executing an item by typing it's number The arrow and screen are updated to reflect the item being retrieved. * Fixed display problems with directory title searching. * Client now compiles underneath VMS. See README.VMS in the top level for more information. (Thanks Earl and JQ!) * Should compile on UNICOS now. (Hal Peterson, hrp@cray.com) * CSO searches now gather fields that have the "Lookup" attribute instead of the "Indexed" attribute. * Name of the CSO popup is now the name of the gopher item being searched. * CSO dialog cancels automatically if no search data is entered. * Saving a file after a search doesn't save the highlighting codes now at the expense of retransferring the file. * Fixed initial display message to "Press RETURN to continue". Initial gopherrc file now has sane file permissions. Changes from 1.03 to 1.1 ------------------------ * Processing of overly long titles is now better dealt with. * By popular demand, typing a number "enter's" the item, instead of just moving you there. * Copyright notice is displayed when you enter gopher for the first time. * Added support for GIF files. * Fixed bug where you can't change the Mail command. * Now can save direct from the menu, press 's', doesn't put icky bolding characters into your data... * You can now save into pipes, i.e. "| uncompress| xloadimage -" will do the right thing... Can't do it in securemode though.. * Can now save in ~/ and ~username. * Removed dead code, blew away error.c. * Fixed error processing for cso queries. (JQ Johnson) jqj@ns.uoregon.edu * Changed prompt for mailing a document to "Mail current document to:" Mod from dhgo@midway.uchicago.edu (donald goldhamer) * Some of the error messages are more descriptive (unknown host etc.) * Client distinguishes between 3270 and Telnet types. Marie-Christine * Fixed problem with line positioning when a failure to connect occurs. * Fixed bug when deleting last bookmark in a directory. Also fixed screen updating problem when deleting last bookmark in a list. * Added additional input processing, ^u now kills the entire line. Cursor keys can move within any entry dialog. * Fixed problem with backspace key on certain system V systems. * Cursor keys now wrap around the main gopher menu. * Added snazzy dialog boxes everywhere. Experimented with Character graphics. Should be much easier to use. * File/socket I/O is greatly improved. read() system calls reduced 1000 times or more. * Fixed problems with leftover files in /tmp. * The client now allows you to specify more than one server on the command line. Do it like this: gopher gopher 70 gopher2 70 It will randomly choose either server, this is useful for duplicated servers. Changes from v1.02 to v1.03 --------------------------- The client can now interrupt searches using Control-c. However this can be buggy. The current position on the screen isn't quite updated properly, and things will probably break if you're reading a long directory.... Gopher now looks in the "Name" instead of the "path" to find a default name to save in.. Works for WAIS docid things. Client can now view images. There is a new environment variable GOPHER_IMAGE. It's a little different than the patch that's already out there. Searches in a menu (the / command) are now case insensitive. PagerCommand is now saved. PAGER still takes precedence, though. Fixed bogus out of memory error when mailing a file. Added casts to each and every malloc(); Changed name of PC binary files to PCBIN instead of HQX, confusing at best... Changes from v1.01 to v1.02 --------------------------- Fixed problems with input handling and core dumps on Ultrix machines. Added a new option -b, it starts the client on the bookmark page. Fixed problem with 'm' key. It didn't update the current cursor line. Caused core dumps too. Fixed problem with getting moved to the first item of a directory when choosing not to search a search type. Fixed problem with cbreak redefinition on some Sequent systems. (Sellens) Changed o to O in the gopher help file. Fixed problems with input handling in Ultrix. keypad() was the culprit. Client now deals with MIME stuff correctly. (Mark Whidby) Client now deals with window size change signals and suspend signals better. Client now also doesn't update screen size if it receives a window size change signal and the screen size hasn't actually changed. (which can happen in a Sun cmdtool window) (jqj@duff.uoregon.edu) Added searching functionality in menus, press '/' to search for a string, 'n' afterwards will search for more items of that name. (David Datta) Changes from v1.0 to v1.01 -------------------------- Fixed problem with compilation on NeXTs. Fixed problem with telnet and port 0 error messages. Changes from v0.9 to v1.0 ------------------------- Experimental MIME type is now supported. (Type 'M'). TN3270 type is now supported (Type 'T'). User can now escape from the Telnet/TN3270 connection screen. Ctrl-g will abort you out of all prompts, ala emacs. Added bookmark support and gopherrc file support. Bookmarks can be defined with the 'a' or 'A' key. The first marks the item under the cursor, the other marks the current directory. Bookmarks are stored in ~/.gopherrc, along with other configuration parameters. Client now does nifty twirl output to let you know it's up to something. It currently does this for directorys (one twirl per entry) and textfiles/cso searches (one twirl per 25 lines) This stuff is adapted from the panda code. Added more information on connections. It displays "connecting..." before it displays "retrieving directory..." Client beeps at you if you press the wrong keys now. The client doesn't redisplay the menu when an invalid key is pressed. Nice for people dialing in on 2400 bps lines. Now linking in the new swanky gopher library. I got tired of having many different versions of the same code lying around. Added fix from John Sellens that allows the user to escape from a CSO query. Fixed problem with titles not being updated when moving back a level. The client checks for environment variables for its configuration information. The following variables can be used: GOPHER_MAIL The program to send mail with (must understad -s option) GOPHER_TELNET The program to contact telnet services with. GOPHER_PLAY The program to play sound from a pipe. GOPHER_PRINTER The program to print from a pipe. This was all suggested and coded by Timothy M. Sigmon. Fixed typos in error.c relating to vprintf and err_init, patch from Jim Meyering. Cleaned up the SYSVCURSES stuff. You no longer need to specify whether or not you're using System V curses. Also fixed a problem relating to Newline and KEY_ENTER confusion. All in all the curses code is cleaned up quite a bit. Made the interface more consistent. Pressing 'l' will let you enter into and item (just like return and the right arrow..) (Glenn F. Leavell) Changes from v0.8 to v0.9 ------------------------- Gopher the Cache!! This version of the client caches the previous directories indefinitely.... Perhaps should add timeouts. Reduced memory usage ~4 times. Implemented data structures in pseudo C++ fashion. All memory for character strings is dynamically allocated. No more hard limits! Directories can be as large as your available memory! Cool! Removed bogus calls to strstr in gopher.c relating to bolding of output words. (Pointed out by Tim Perala) Fixed conf.h so that it doesn't bogusly set IS_BSD for an Encore Multimax. (Pointed out by Tim Perala) Bug: The prompt when viewing a file allows for mailing in secure mode. The actual code however doesn't let you do this. Fixed it. (Pointed out by Ed Symanzik) Fixed security hole. Don't allow people to change options using the O command when secure mode is active. (Fix from Rickard Schoultz) Also disabled saving hqxs and binaries.. Fixed annoyance. If you selected a directory and it couldn't connect, the cursor would jump to the first item. (Fix from Edward Symanzik) Fixed -t option parsing. Pointed out by Andreas Haug & John Sellens. Added Binhex and PChex compatibility. (Tweaks from John Sellens) Fixed problem with page up, it didn't go up all the way. It was 12 lines off. (Fix from Edward Symanzik) Changes from v0.7 to v0.8 ------------------------- Added fix from John Sellens: The client was opening a connection at the beginning of every session and not doing anything with it. A simple fix was all that was needed. Added enhancement from John Sellens: client now supports "Type 9" binary files. Fixed typo in help file, thanks to Nelson Beebe. The client can now send files using mail, in addition to printing and saving. (This was originally suggested by Julio Perez) Added the -p option (for "path"). This will let you point the gopher Client at a specific selector string on the server. Suggested by Prentiss Riddle. Also added -t option to override the "Root Directory" title that's normally displayed. (These flags will mostly be used for special purpose uses of gopher). Added key bindings for left and right arrow keys. The Left arrow key moves you "up" a directory (just like 'u'), the right arrow key moves you "into" an item (just like ). (from William Roberts). Fixed problem with char definitions/SYSVCURSES in manager.c. (from William Roberts.) Allowed ESC 0 [abcd] as well as ESC [ [abcd] when VTKEYS are defined. (Also from William Roberts). Changed default pager from more to more -d. (Suggested by Julio Perez) Upped the sizes of the structures for the selector string, title, etc. Should work better with those nasty WAIS docids... Changed almost all of the code to the GS{set,get}Type calls. Look in gopherstruct.[hc] if you plan on modifying the client... Changes from v0.6 to v0.7 ------------------------- Fixed problem with mysterious 2s appearing when bolding words. I did things the correct way with tputs() instead of the hackish method. Fixed problems with phonebook database searches that return more than ten hits. Dash insertion will now work correctly in this case. Fixed problems with large directories causing core dumps. Added fixes from John Sellens Fix for race condition when trying to retrieve a non-existant item. Added fixes from Craig Rice Client checks to see if the root server is up before starting. If it's down it exits and prints an error message. Fixed improper prompting when saving files. Added fix from Mic ... Removed the EOF that gets written out to files when you save them. Changes from v0.5 to v0.6 ------------------------- Fixes for the undocumented + next_page command. I changed the keystrokes to ">" for page down and "<" for pageup. Thanks go to Pekka Kytolaakso for the patch. Client now cleans up files in /tmp when control-c is typed, patch courtesy of Craig Rice . A whole slew of changes from Mic Kaczmarczik: Some versions of make have a predefined macro called ``MACHINE'', changed it to ``MACHDEFS'' to avoid conflicts. Provide a way to override the default host in the Makefile. Make clean deletes the executable program as well as object files. Allow definitions of DEFAULT_HOST & GOPHER_PORT in the Makefile. Try to guess the IS_A_ Machine type automatically. Added the '=' command to show information about the current item in the .Link format. Fixed #include file ordering problem in gopher.h. Don't include if on a NeXT system. Disabled the keypad call for Ultrix machines. (Fails under Ultrix 4.0) Changes from v0.4 to v0.5 ------------------------- The client now remembers the path you took through the menus. It sticks the pointer of the directory you were in when you move up a level or when you view a file. Fixed problem with the getopt variables in being in the wrong place. This caused problems with strict C compilers. Fixed type problem with getopt() (c should have been an int) Thanks go to BugStomper Russell Fulton . Spiffed up the makefile. Typing "make install" now installs the helpfile in the right place. Added changes from Craig Rice The key 'm' or 'M' now takes you back to the root level. A lowercase 'q' now quits the program too. A "Searching Text..." Message is displayed when searching text. I modified his idea of stripping off long titles. Instead of removing all directory information I strip off just enough directories to fit the tile the screen. (This really isn't very portable though, not all long titles will have slashes necessarily...) Changes from v0.32 to v0.4 -------------------------- Client now handles control-c gracefully (no more raw terminals.) Added signal handler for window size changes. (Thanks to Rick Watson r.watson@utexas.edu for the hints and tips) Option setup no longer uses full paths for commands. conf.h is now much simpler VT100 cursor keys now work on all platforms, not just System V curses machines. (Thanks go to Pekka Kytolaakso ) Now compiles on Convex OS 9.1 using -DIS_BSD (Pekka again...) Now compiles using System V curses on Ultrix machines. (Thanks go to Earl Fogel ) Now using getopt() command line parsing. Added option -s that disables saving and printing, very useful for public access terminals. Changes from v0.31 to v0.32 --------------------------- Fixed stupid refrest() typo. (That'll teach me to do hack and burn jobs!) Changes from v0.3 to v0.31 -------------------------- Added more messages that tell you when the client is doing stuff. (receiving directory, receiving sound, etc...) Fixed definition problem of SIGCLD/SIGCHLD. Changes from v0.2 to v0.3 ------------------------- Fixed undefined PLAY_COMMAND on machines that don't have a sound player. Added an option for compiling gopher for people that are using ANET from a VM/CMS system (STUPID_TERM). Niggly Makefile changes. Fixed problems with long lines. The client shows the end part of the title (which is probably the most interesting) instead of the first part. The titles are also lined up properly now. Changes from v0.1 (original unversioned release) to v0.2 -------------------------------------------------------------- Added highlighting of text in index retrievals. Fixed strange memory allocation problems. Added support for sounds on Sun Sparcstations and Nexts. Fixed problem with really long lines. Client prompts the user with an error message if an empty directory is found. Screen title is now intact when the user scrolls up a page. gopher-3.0.15/doc/Makefile.in0000664000000000000000000000065410762617110012574 0ustar include ../Makefile.config TARGET = gopher.1 \ gophfilt.1 gopherrc.5 install: $(TARGET) @INSTALL@ -d -m 0755 $(MAN1DIR) @INSTALL@ -d -m 0755 $(MAN5DIR) @INSTALL@ -m 0644 gopher.1 $(MAN1DIR) @INSTALL@ -m 0644 gophfilt.1 $(MAN1DIR) @INSTALL@ -m 0644 gopherrc.5 $(MAN5DIR) all: $(NROFF) gopher.1 >gopher.cat $(NROFF) gophfilt.1 >gophfilt.cat $(NROFF) gopherrc.5 >gopherrc.cat clean: -rm -f *~ gopher-3.0.15/doc/FAQ0000664000000000000000000000511410762617110011055 0ustar ---------------------------------------------- Gopher/Gopherd FAQ $Id: FAQ,v 1.5 2002/03/19 17:51:18 jgoerzen Exp $ This is the FAQ for gopher and UMN gopher. The latest version may be found at: gopher://quux.org/1m/devel/gopher/Downloads/LiveSource/gopher/doc/FAQ ---------------------------------------------- What is Gopher? Well, it's a bit complicated. Gopher is all of these: 1. A protocol for an Internet world-wide hierarchial filesystem; 2. A client for using that protocol; 3. A site containing information in that protocol. Let's elaborate: #1. Gopher is a way to exchange information, similar to HTTP that is used for the web. Unlike HTTP, Gopher is simple and flexible yet rigid. Gopher mandates a hierarchial view of things -- just like you get on your own system with files and folders. Gopher extends your desktop file/folder concept to include the entire Internet. You could have a folder whose contents come from 20 different countries, and it would all be transparent. Modern gopher browsers such as Nautilus support this very feature. #2. The "UMN Gopher" client was developed at the University of Minnesota, the home of gopher. Currently, the UMN Gopher client and UMN Gopherd server are maintained by John Goerzen and the Gopher Project; see gopher://quux.org/ for details. #3. When you publish information with Gopher, you're said to run a "gopher site" similar to running a "web site". ---------------------------------------------- Where can I find gopher software? gopher://gopher.quux.org/11/Software/Gopher/Downloads If you do not already have Gopher, try: http://quux.org/hurg/hurg?selector=1%2FSoftware%2FGopher%2FDownloads&port=70&type=1&host=gopher.quux.org&username=Clients%2C+Servers%2C+and+Downloads Downloads of UMN gopher and other gopher projects hosted at quux.org are available at: gopher://gopher.quux.org/11/devel/gopher/Downloads http://quux.org/give-me-gopher/ ---------------------------------------------- Is there a mailing list? Yes. See gopher://gopher.quux.org/00/devel/gopher/Mailing%20List.txt for details. Or: To subscribe, send the text "Subscribe" in the subject of a mail to gopher-request@complete.org. To post, send the message to gopher@complete.org. Archives are at http://www.complete.org/mailinglist/archives/ and at gopher://gopher.quux.org/1/Archives/Mailing%20Lists/gopher. ---------------------------------------------- [UMN] I'm having trouble compiling gopher(d) Where's gopherd? As of version 3.0.6, gopherd is deprecated. Please use PyGopherd instead. Information about PyGopherd is at http://quux.org/devel/gopher/pygopherd gopher-3.0.15/doc/clientlogging.vms0000664000000000000000000002261410762617110014103 0ustar README for VMS Client Logging using Multinet 16 July 1994 VMS Gopher Client 2.016 - J.Lance Wilkinson TGV's MULTINET_SERVER internally implements a syslogd daemon, but the multinet user runtime library does not include the syslog(), openlog() closelog() and setlogmask() functions normally used by applications to communicate with it. Discussion with TGV technical support yielded the functions provided in the [.GOPHER]OURUTILS.C source file which are compiled when either CLIENT_LOGGING or TELNET_TRACE are defined in CONF.H. These functions are not currently supported by TGV and you should *NOT* request support from TGV for their use. There did seem to be an intent to make the syslog()/syslogd facility a supported part of the product, but not in the immediate future. Inclusion of this facility for Multinet is intended to allow TGV customers using the VMS version of the Gopher Client to make use of the CLIENT logging facilities. It is also intended to be a guide for users of other TCP/IP agents in making use of the CLIENT logging facilities. Pre-Compilation SYSLOG setup ---------------------------- At compilation time you must decide if you're going to want to use either the standard Unix-style client logging or telnet/tn3270 connection tracing or both. The standard logging tends to be a debugging tool more than anything else, while telnet/tn3270 connection tracing is more a management/security tool. In CONF.H, define CLIENT_LOGGER to activate the standard Unix-style logging; define TELNET_TRACE to activate telnet/tn3270 connection tracing. Edit CONF.H to remove the prefixing comment tokens as appropriate: /* * Client logging via syslog() code has been ported to VMS systems * with MULTINET. See [.doc]clientlogging.vms for more information. * Check out the code in [.gopher]ourutils.c if you think you might * be able to port it to other TCPIP packages. * * Define CLIENT_LOGGER to log client requests issued to servers. * Define TELNET_TRACE to trace and log telnet connections by the client. */ /* #define CLIENT_LOGGER /* */ /* #define TELNET_TRACE /* */ If either definition is un-commented, and your compilation is for Multinet, the syslog() code in OURUTILS.C will be compiled, as well as code appropriate to the feature(s) selected which will use the syslog() code. TGV Multinet SYSLOG configuration --------------------------------- If you define CLIENT_LOGGER, then calls to logrequest() throughout the gopher client will cause messages to be sent to syslogd under the facility DAEMON. If you define TELNET_TRACE, then *actual attempts* to connect to *specific* telnet/tn3270 hosts will cause messages to be sent to syslogd under the facility LOCAL7. All use the keyword INFO. For example: local7.* /gopher$root:[log]_telnet.log daemon.info /gopher$root:[log]_client_debug.log Understand that other applications which use syslog at your site may already have these specific items directed to other files. At present it is not possible to define new facilities within the TGV Multinet implementation of syslog()/syslogd, or it would be fairly simple to code other values and select other facilities and/or keywords. Read the documentation for SYSLOG in the TGV Multinet Administrator's Guide (section 4.6 in the version for Multinet v3.3). First provide entries in your system's MULTINET:SYSLOG.CONFIGURATION file for the selectors "daemon.info" and/or "local7.info" to direct the log entries to appropriate destinations. Define a logical on the system where you'll be running the client that will be subject to logging, as follows: $ DEFINE/SYSTEM/EXEC/NOLOG MULTINET_SYSLOG_DESTINATION 1 This may or may not appear in the version of the TGV documentation for v3.3. It *does not* appear in the bookreader version of the TGV documentation for v3.3, but was provided through a tech service call and indeed seems to be required. Finally, enable the syslog service using the Multinet SCU: $ MULTINET CONFIGURE /SERVER SERVER-CONFIG> ENABLE SYSLOG SERVER-CONFIG> RESTART SERVER-CONFIG> EXIT If you change the content of your MULTINET:SYSLOG.CONFIGURATION file, make sure you restart your MULTINET_SERVER to have the changes take effect. CLIENT_LOGGER to the daemon.info selector ------------------------------------------ If the CLIENT_LOGGER definition is provided in CONF.H, the logrequest() function calls throughout the client will include code which write an event log. This is useful for debugging purposes. The output log entries for daemon.info will appear as individual lines containing a date/time stamp, the host of the client's user, the text "gopher" and the PID of the user, and the event being logged. Some events will include a URL for the relevant item. For example: Jul 14 16:44:41 PONGO.PSU.EDU gopher[Pid 0x40a00269]: EXIT Jul 14 18:20:00 psulias.psu.edu gopher[Pid 0x2060f10d]: ARRIVED AT TELNET_TRACE to the local7.info selector ---------------------------------------- If the TELNET_TRACE definition is provided in CONF.H, the Telnet_Trace() function will be called immediately prior to attempting any telnet/tn3270 connection. The Telnet_Trace() function, compiled only if TELNET_TRACE is defined, tests the host string in the link tuple being used for the telnet or tn3270 connection to see if it appears in the logical GOPHER_TELNET_LOG. If, and only if, the string appears (there is no IP number/host name translation attempted) in the logical, the URL for the telnet/tn3270 connection is logged, and then the chain of current entries in the current gopher directory, back through to the root directory, is displayed as well. This allows the path used by the user, through GopherSpace, which culminated in the telnet/tn3270 offering they are now attempting, to be recorded. The output log entries for local7.info will appear as sets of lines as follows; the intent is to provide a list representation of the path used through GopherSpace to reach the telnet/tn3270 host in question. Each line contains the same timestamp, client host, "gopher" text and PID fields as the standard Unix CLIENT_LOGGER entries discussed above, followed by a "GopherSpace depth indicator" (the length of the arrow indicates how deep within the gopher menus the user was), the URL for the telnet/tn3270 link, and the title by which the host where that link was found named the link: *----------> telnet://any name not in use@marble.bu.edu:2010 "Foothills" +---------> gopher://spinaltap.micro.umn.edu:70/11/fun/Games/MUDs/Links/Talker "Talker" +--------> gopher://spinaltap.micro.umn.edu:70/11/fun/Games/MUDs/Links "Links to MUDs via Telnet" +------->gopher://spinaltap.micro.umn.edu:70/11/fun/Games/MUDs "MUDs" +------>gopher://spinaltap.micro.umn.edu:70/11/fun/Games "Games - University of Minnesota" +-----> gopher://cwis.usc.edu.:70/11/Other_Gophers_and_Information_Resources /Gophers_by_Subject/Gopher_Jewels/Fun_Stuff_Multimedia "Fun stuff and multimedia" +----> gopher://gopher.princeton.edu:70/11/.explore "Explore the Internet (from Princeton Gopher)" +---> gopher://genesis.ait.psu.edu:70/11/netinfo/internet "Information about the Internet" +--> gopher://genesis.ait.psu.edu:70/11/netinfo "About Gophers and the Internet" +-> gopher://info.psu.edu:70/1 "Penn State University Gopher (The University's Gateway Gopher)" Define the GOPHER_TELNET_LOG logical with the host names and/or ip numbers (since no translation is done, if you know both you should probably include both) of the telnet/tn3270 hosts to which you wish to track Gopher client access: $ DEFINE/SYSTEM/EXEC/NOLOG GOPHER_TLENT_LOG "marble.bu.edu",- "muscle.rai.kcl.ac.uk", "freenet.hsc.colorado.edu",- ... The logical is consulted dynamically whenever a telnet/tn3270 connection is about to be attempted, so you can change it as new hosts become of interest and old hosts are no longer of any concern. Why trace Telnet/TN3270 connections? ------------------------------------ This facility was developed to allow us to determine which hosts were of legitimate use to our library patrons here @psulias.psu.edu, and which hosts were simply play areas (MUDDs, etc.) to which we should block telnet access from our host. We identify the hosts we'll add to the logical by consulting our monthly telnet connection logs (generated by MULTINET using a USER_ACCESS sharable image). Hosts we aren't yet familiar with, which have significant connection levels, are added to the logical in the belief that users may be finding them in their travels through GopherSpace. Once the resource is understood, those which the Libraries deem beneficial are discarded from the list; those which the Libraries do not deem beneficial may be added to the list of hosts to which our USER_ACCESS sharable image denies outgoing access. [A note to the more "open" sites reading this -- our specific host, psulias.psu.edu, is for LIBRARY patrons requiring LIBRARY resources. Denying access to MUDDs from our host is not considered a serious hampering of the open nature of the network; there are other, unrestricted hosts (even a laboratory within our walls) where users who are so inclined may access these resources via gopher and/or telnet subject to no restrictions except those imposed by the owners of those facilities. We have people waiting in line to find books at our terminals, so we frown on people tying them up for recreational usage.] gopher-3.0.15/doc/INSTALL0000664000000000000000000002070010762617110011552 0ustar $Id: INSTALL,v 1.4 2002/04/26 13:33:33 jgoerzen Exp $ Installation Instructions for Unix Gopher. ------------------------------------------ PLEASE NOTE: If you have any problems, please read the PLATFORMS file! In fact, you should read it for hints BEFORE reading this file. Almost all configuration is now done using the 'configure' shell script at the top level of the distribution. To get a list of options that configure supports, type the following command configure --help Parameters that used to be hand edited into Makefile.config can now be set with command line switches. For full text indexing consult the section at the end of this document. Basic Installation ================== The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. ---------------------------------------------------------------------- Setting up a multi-lingual gopher client ---------------------------------------- If you have any users who don't speak English fluently, you may want to check out the gopher client's multiple language support. To do this you need to turn on the -DGINTERNATIONAL option in the Makefile.config before compiling, and then follow the directions in the gopher/locales/README to install the language data files for the client. Installing external programs for the gopher client -------------------------------------------------- The gopher client depends on certain external programs for some functionality. Most of these will be present on any good unix system. However you may need to install the following: For tn3270 connections you'll need tn3270 or a version of telnet that understands tn3270 control streams. For downloading in the client you'll need two distributions, kermit and zmodem. The binaries are "kermit", "sz", "sb", and "sx". To view metamail documents you'll need mm.tar.Z available from thumper.bellcore.com. To view graphics you'll X windows and xloadimage or xv or any other generic graphics program. To listen to sounds you can use the "play" command on SunOS or the play command in the misc directory for the NeXT Full Text Indexing Setup for NeXTs (NeXTos 2.0, 2.1, 2.2) --------------------------------------------------------- First get the libtext and btree libraries. (Available as a separate tar file called NeXTtext.tar.Z). The files libbtree.a and libtext.a are in this tar file, along with two directories "btree" and "text". Copy the library (.a) files to /usr/local/lib and type ranlib /usr/local/lib/libbtree.a ranlib /usr/local/lib/libtext.a Then copy the directories btree and text into /usr/include Full Text Indexing Setup for WAIS --------------------------------- First get the wais distribution. If you don't have wais, ftp to "gopher.boombox.micro.umn.edu" and get /pub/gopher/Unix/freeWAIS-sf-2.0.tar.gz Untar this and edit the makefiles appropriate for your system. After you untar the distribution, go into the top level WAIS directory and make the distribution. Refer to the instructions in the WAIS distribution. Now go to the top level of the gopher distribution and do the following: % cd {GopherSrc} % ln -s {WaisTop} wais If you've compiled an older version of gopherd, make sure to type "make clean" first. gopher-3.0.15/doc/object.changes0000664000000000000000000000345010762617110013324 0ustar Changes from 1.2b2 to 1.2b5 --------------------------- * libgopher can now be built as Sun Shared Libraries. Changes from 1.2b1 to 1.2b2 --------------------------- * Fixed problems with tmpnam() and warning for VIprettyLang() Changes from 1.03 to 1.1 ------------------------ * Made a new object DynArray. It's a neato dynamic array. I'll be using it more in other objects soon. Right now it's used in GopherDirObjs and the new site and ext code. * Fixed GDfromLink() It wasn't re-initializing after each GSfromLink(). * GDsort() now does the comparisions for numbered entries. Much faster and cleaner looking code. * #undef boolean first in case we're building with WAIS (which has already #defined it). * Filenames are now less than 14 characters for those sysvr3 people. * Really revamped the way compatible.h and compatible.c work. Changes from 1.01 to 1.03 ------------------------- In accordance with the new Gopher+ the server doesn't tack scores on the end of directory listings resulting from searches. Changes from 1.0 to 1.01 ------------------------ Fixed problem with GDfromNet not returning the right number of items. Changes to 1.0 -------------- Fixed problem in GDfromNet() and GSfromNet() that didn't deal with directories that don't have objects of any known type. Fix from David Woodgate. Fixed problem in STRset() that could potentially cause crashes. The stored length was one greater than the actual length. Fix from Alan Tuchman. Fixed problem in sreadword() that compared a character with NULL, naughty naughty, it should have been '\0'. GDfromNet now takes an optional function parameter. Used by the nifty twirl code. Fixed problem in STRset() freeing blocks leftover from realloc is bad bongos. Removed most, if not all memory leaks. Yeah to support@purify.com!!gopher-3.0.15/doc/gopher.10000664000000000000000000001642010762617110012073 0ustar .TH GOPHER 1 .SH NAME gopher \- connect to gopher document server .SH SYNOPSIS .B gopher .RI [ -sSbDr ] .RI [ "-t title" ] .RI [ "-p path" ] .RI [ "-T type" ] .RI [ "-i search term" ] .RI [ hostname or url ] .RI [ port ] .SH DESCRIPTION The gopher client is used to talk to gopher servers. Once you have started the gopher client, help on using it is available by pressing the .B "?" key. .PP The Internet Gopher is a distributed document delivery service. It allows a neophyte user to access various types of data residing on multiple hosts in a seamless fashion. This is accomplished by presenting the user a hierarchical arrangement of documents and by using a client-server communications model. The Internet Gopher Server accepts simple queries, and responds by sending the client a document. .PP The [hostname] of a gopher server may be specified at startup; if omitted, the default server for your site is used. You may also specify a URL (Uniform Resource Locator) for this argument. .PP The [Port_number] of the server host may be specified at startup; if omitted you will use the default port specified at your site. The more or less standard and accepted Gopher port number on the Internet is 70. .PP .SH OPTIONS .TP -b starts the client on the bookmark page. .PP The next few options are for more advanced users who want to start at a location other than the default, or to set up special aliases or shell-scripts to point the gopher client to seperate places. .TP .BI -p " path" specify a specific selector string to send to the gopher server on startup. .TP .BI -T " type" let the client know what type of object the .I -p option is pointing at. .TP .BI -i " search term" tell the client what to search for in the object defined by the .IR "-p " and " -T 7" options. .TP .BI -t " title" set the title of the initial screen for the gopher client. .PP The last few options aren't really of interest to regular users, but are provided for system administrators who waht to provide a secure client, or who need to debug a client. .TP .BR -s " or " -S "secure mode" which means that you can't save or print the files that you browse. -s is for users without an account, while -S assumes the user has an account on this machine. One security feature is forced on, regardless of the state of these options, if the name of the user's shell ends in rsh; the 'O' (options) command is disabled so the user cannot select a shell as an application. .TP .B -r tells the client that its user is remote. .TP .B -D turns on the copius debugging output .SH In-Session Options .PP Press return or the right arrow key on the mini keypad to view a document or enter a directory. .PP Press Control/W, Control/R, or Control/L to repaint your menu at any time. .PP At any time, you may press ? to see a help file of commands available. .SH BOOKMARKS Bookmarks allow users to create their own personallized menus from those available on the variety of Gopher servers available worldwide. The following list of keystrokes aids in developing and maintaining the bookmarks. .IP a : Add current item to the bookmark list. A : Add current directory/search to bookmark list. v : View bookmark list. d : Delete a bookmark/directory entry. .EP .SH MOVING AROUND .PP Use the arrow keys to move around. .IP Use the Arrow Keys to move around. Up, k ...............: Move to previous line. Down, j .............: Move to next line. Right, Return .......: "Enter"/Display current item. Left, u ............: "Exit" current item/Go up a level. >, +, Pgdwn, space ..: View next page. <, -, Pgup, b .......: View previous page. 0-9 .................: Go to a specific line. m .................: Go back to the main menu. .EP .SH OTHER COMMANDS .IP s : Save current item to a file. S : Save current list of items to a file. D : Download a file. q : Quit with prompt. Q : Quit unconditionally (also Control/Z). r : goto root menu of current item. R : goto root menu of current menu. = : Display Technical information about current item. ^ : Display technical information about current directory. o : Open a new gopher server w : Open a new gopher server or item by URL O : Change options. f : Connect to an anonymous FTP host / : Search for an item in the menu. g : "Gripe" via email to administrator of current item. n : Find next search item. $, ! : Spawn to subprocess (use "logout" to return to session) Ctrl-T : Show host's local date and time. .EP .SH GOPHER OBJECTS .PP Menu entries ending with "/" are directories; additional characteristics for files (such as binary, sound, image, and others) are identified within angle brackets. .IP Item tag Type Description -------------------------------------------- (none) 0 file / 1 directory <) s sound file I,g image file ; movie file 4 BinHexed Macintosh file 9 binary file 5 DOS binary file 2 CSO (ph/qi) phone-book server 8 telnet connection <3270> T telnet connection (IBM 3270 emulation) M Multi-purpose Internet Mail Extensions file h HyperText Markup Language file 7 index-search item (none) ASK form .EP .SH EXAMPLES .TP gopher gopher.tc.umn.edu Connect to the gopher server running on the computer .I gopher.tc.umn.edu .TP gopher -p "1/Information About Gopher" gopher.tc.umn.edu 70 Connect to the gopher server running on port 70 of the computer .I gopher.tc.umn.edu and start at the menu retrieved with the selector string .I "1/Information About Gopher" .TP gopher -p 7/indexes/Gopher-index/index -T 7 -i FAQ mudhoney.micro.umn.edu Connect to the gopher server running on the computer .I mudhoney.micro.umn.edu and start at the menu of items matching the string .I FAQ in the index specified by the selector string .I "7/indexes/Gopher-index/index" .SH CONFIGURATION FILE FORMAT The client gets configuration data from the system gopher.rc file and the user's .gopherrc files. The options in these files may be set by using the .B O key in the client. .PP See the manual page for gopherrc for more information about these options. .SH ENVIRONMENT VARIABLES The client also checks for environment variables for its configuration information. The following variables can be used: .TP GOPHER_TELNET: The program used to connect to telnet services .TP GOPHER_TN3270: The program used to connect to TN3270 services .TP GOPHER_HTML: The program used to read HyperText Markup Language documents. .TP GOPHER_PRINTER: The program used to print from a pipe. .SH FILES .TP $HOME/.gopherrc user bookmarks and configuration information .TP /usr/local/lib/gopher.rc system default configuration information (default location - may be somewhere else on your system) .TP /usr/local/lib/gopher.hlp client help file displayed by the '?' command (default location - may be somewhere else on your system) .SH COPYRIGHT .PP The Internet Gopher(tm) software and documentation is copyright (c) 1991, 1992, 1993, 1994 by the University of Minnesota. Gopher has limitations on its use and comes without a warranty. Please refer to the file 'Copyright' included in the distribution. gopher-3.0.15/doc/TODO0000664000000000000000000000131610762617110011213 0ustar --docs Make better documentation and man pages. Add docs about the hazards of chroot(). --client Option for append, rather than overwriting saved files.. Figure out exactly how to get line drawing characters on hpux and Ultrix... Add support for cursor keys for non vt100 on non System V curses machines Fix the telnet option so that it says Control-T on the RS/6k. Add 'L'anguage choice menu to non-VMS versions. Finish ANSI printing options --server Try to eliminate more lookups. Make SIGHUP reread the gopherd.conf file. Fix problems with .cap for -t para files. Fix problems with a viewext .doc and WAIS searches. Add caching and proxy code --index server Allow search on dates and date ranges. gopher-3.0.15/copyright0000664000000000000000000000170110762617110011707 0ustar Gopher software distribution for UNIX Copyright (C) 1991-2000 University of Minnesota Copyright (C) 2000-2005 John Goerzen and other developers This package (Gopher software distribution for UNIX) originally had different copying restrictions. It is now distributed under the GPL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA gopher-3.0.15/MANIFEST0000664000000000000000000002434210762617110011113 0ustar gopher-3.0.5/MANIFEST gopher-3.0.5/COPYING gopher-3.0.5/announcements/3.0.0.html gopher-3.0.5/announcements/3.0.0.txt gopher-3.0.5/announcements/3.0.4.html gopher-3.0.5/Makefile.config.in gopher-3.0.5/Makefile.in gopher-3.0.5/README gopher-3.0.5/conf.h gopher-3.0.5/config.guess gopher-3.0.5/config.h.in gopher-3.0.5/config.sub gopher-3.0.5/configure gopher-3.0.5/configure.in gopher-3.0.5/copyright gopher-3.0.5/install-sh gopher-3.0.5/make.com gopher-3.0.5/patchlevel.h gopher-3.0.5/debian/changelog gopher-3.0.5/debian/conffiles gopher-3.0.5/debian/control gopher-3.0.5/debian/copyright gopher-3.0.5/debian/cron.d.ex gopher-3.0.5/debian/dirs gopher-3.0.5/debian/docs gopher-3.0.5/debian/emacsen-install.ex gopher-3.0.5/debian/emacsen-remove.ex gopher-3.0.5/debian/emacsen-startup.ex gopher-3.0.5/debian/ex.doc-base.package gopher-3.0.5/debian/gopherd.README.Debian gopher-3.0.5/debian/gopherd.conffiles gopher-3.0.5/debian/gopherd.dirs gopher-3.0.5/debian/gopherd.docs gopher-3.0.5/debian/gopherd.files gopher-3.0.5/debian/gopherd.init.d gopher-3.0.5/debian/gopherd.logrotate gopher-3.0.5/debian/gopherd.postinst gopher-3.0.5/debian/init.d.ex gopher-3.0.5/debian/manpage.1.ex gopher-3.0.5/debian/manpage.sgml.ex gopher-3.0.5/debian/menu.ex gopher-3.0.5/debian/postrm.ex gopher-3.0.5/debian/preinst.ex gopher-3.0.5/debian/prerm.ex gopher-3.0.5/debian/rules gopher-3.0.5/debian/startopts gopher-3.0.5/debian/watch.ex gopher-3.0.5/doc/INSTALL gopher-3.0.5/doc/FAQ gopher-3.0.5/doc/Makefile.in gopher-3.0.5/doc/PLATFORMS gopher-3.0.5/doc/TODO gopher-3.0.5/doc/client.changes gopher-3.0.5/doc/clientlogging.vms gopher-3.0.5/doc/gindexd.changes gopher-3.0.5/doc/gindexd.doc gopher-3.0.5/doc/gopher.1 gopher-3.0.5/doc/gopherd.8 gopher-3.0.5/doc/gopherd.conf.5 gopher-3.0.5/doc/gopherindex.8 gopher-3.0.5/doc/gopherrc.5 gopher-3.0.5/doc/gophfilt.1 gopher-3.0.5/doc/object.changes gopher-3.0.5/doc/server.changes gopher-3.0.5/doc/server.doc gopher-3.0.5/gopher/locales/De_DE.msg gopher-3.0.5/gopher/locales/Dk.msg gopher-3.0.5/gopher/locales/En_US.msg gopher-3.0.5/gopher/locales/Es_ES.msg gopher-3.0.5/gopher/locales/Es_MX.msg gopher-3.0.5/gopher/locales/Fr.msg gopher-3.0.5/gopher/locales/It.msg gopher-3.0.5/gopher/locales/Makefile.in gopher-3.0.5/gopher/locales/README gopher-3.0.5/gopher/locales/README.VMS gopher-3.0.5/gopher/locales/Sv.msg gopher-3.0.5/gopher/locales/gopher.hlp.Dk gopher-3.0.5/gopher/locales/gopher.hlp.Es gopher-3.0.5/gopher/locales/gopher.hlp.Fr gopher-3.0.5/gopher/locales/gopher.hlp.It gopher-3.0.5/gopher/locales/klingon.msg gopher-3.0.5/gopher/locales/make.com gopher-3.0.5/gopher/locales/message.tpu gopher-3.0.5/gopher/locales/piglatin.msg gopher-3.0.5/gopher/CURcurses.c gopher-3.0.5/gopher/CURcurses.h gopher-3.0.5/gopher/Makefile.in gopher-3.0.5/gopher/compile.com gopher-3.0.5/gopher/cso.c gopher-3.0.5/gopher/cso.h gopher-3.0.5/gopher/download.c gopher-3.0.5/gopher/download.h gopher-3.0.5/gopher/form.c gopher-3.0.5/gopher/form.h gopher-3.0.5/gopher/globals.c gopher-3.0.5/gopher/globals.h gopher-3.0.5/gopher/gopher.c gopher-3.0.5/gopher/gopher.h gopher-3.0.5/gopher/gopher.hlp gopher-3.0.5/gopher/gopher.rc gopher-3.0.5/gopher/gopher.tpu gopher-3.0.5/gopher/gopherrc.c gopher-3.0.5/gopher/gopherrc.h gopher-3.0.5/gopher/gopherremote.rc gopher-3.0.5/gopher/html2.c gopher-3.0.5/gopher/html2.h gopher-3.0.5/gopher/link.com gopher-3.0.5/gopher/makefile.vms gopher-3.0.5/gopher/manager.c gopher-3.0.5/gopher/manager.h gopher-3.0.5/gopher/ourutils.c gopher-3.0.5/gopher/ourutils.h gopher-3.0.5/gopher/pager.c gopher-3.0.5/gopher/pager.h gopher-3.0.5/gopher/subprocs.c gopher-3.0.5/gopher/upload.c gopher-3.0.5/gopher/upload.h gopher-3.0.5/gopher/version.h gopher-3.0.5/gopher/vmsopts/cmuip_decc.opt gopher-3.0.5/gopher/vmsopts/cmuip_vaxc.opt gopher-3.0.5/gopher/vmsopts/multinet_decc.opt gopher-3.0.5/gopher/vmsopts/multinet_vaxc.opt gopher-3.0.5/gopher/vmsopts/netlib_decc.opt gopher-3.0.5/gopher/vmsopts/netlib_vaxc.opt gopher-3.0.5/gopher/vmsopts/tcpware_decc.opt gopher-3.0.5/gopher/vmsopts/tcpware_vaxc.opt gopher-3.0.5/gopher/vmsopts/ucx_decc.opt gopher-3.0.5/gopher/vmsopts/ucx_vaxc.opt gopher-3.0.5/gopher/vmsopts/wollongong_decc.opt gopher-3.0.5/gopher/vmsopts/wollongong_vaxc.opt gopher-3.0.5/gopherd/GGroup.c gopher-3.0.5/gopherd/AUTH.c gopher-3.0.5/gopherd/AUTH.h gopher-3.0.5/gopherd/icons/Makefile gopher-3.0.5/gopherd/icons/htmlicon.0 gopher-3.0.5/gopherd/icons/htmlicon.1 gopher-3.0.5/gopherd/icons/htmlicon.2 gopher-3.0.5/gopherd/icons/htmlicon.5 gopher-3.0.5/gopherd/icons/htmlicon.6 gopher-3.0.5/gopherd/icons/htmlicon.7 gopher-3.0.5/gopherd/icons/htmlicon.8 gopher-3.0.5/gopherd/icons/htmlicon.9 gopher-3.0.5/gopherd/icons/htmlicon.: gopher-3.0.5/gopherd/icons/htmlicon.I gopher-3.0.5/gopherd/icons/htmlicon.P gopher-3.0.5/gopherd/icons/htmlicon.g gopher-3.0.5/gopherd/icons/htmlicon.h gopher-3.0.5/gopherd/icons/htmlicon.s gopher-3.0.5/gopherd/GGroup.h gopher-3.0.5/gopherd/Makefile.in gopher-3.0.5/gopherd/NeXTindex.c gopher-3.0.5/gopherd/Waisindex.c gopher-3.0.5/gopherd/authenticate.c gopher-3.0.5/gopherd/authenticate.h gopher-3.0.5/gopherd/command.c gopher-3.0.5/gopherd/command.h gopher-3.0.5/gopherd/daemon.c gopher-3.0.5/gopherd/daemon.h gopher-3.0.5/gopherd/dedot.c gopher-3.0.5/gopherd/dedot.h gopher-3.0.5/gopherd/error.c gopher-3.0.5/gopherd/error.h gopher-3.0.5/gopherd/ext.c gopher-3.0.5/gopherd/ext.h gopher-3.0.5/gopherd/ftp.c gopher-3.0.5/gopherd/ftp.h gopher-3.0.5/gopherd/globals.c gopher-3.0.5/gopherd/globals.h gopher-3.0.5/gopherd/gopherd.c gopher-3.0.5/gopherd/gopherd.conf.in gopher-3.0.5/gopherd/gopherd.h gopher-3.0.5/gopherd/gopherdconf.c gopher-3.0.5/gopherd/gopherdconf.h gopher-3.0.5/gopherd/gopherdlocal.conf gopher-3.0.5/gopherd/gopherindex.raw gopher-3.0.5/gopherd/gopherusers gopher-3.0.5/gopherd/index.c gopher-3.0.5/gopherd/index.h gopher-3.0.5/gopherd/kernutils.c gopher-3.0.5/gopherd/kernutils.h gopher-3.0.5/gopherd/makegopherindex gopher-3.0.5/gopherd/mindexd.c gopher-3.0.5/gopherd/openers.c gopher-3.0.5/gopherd/openers.h gopher-3.0.5/gopherd/pid.c gopher-3.0.5/gopherd/pid.h gopher-3.0.5/gopherd/serverutil.c gopher-3.0.5/gopherd/serverutil.h gopher-3.0.5/gopherd/site.c gopher-3.0.5/gopherd/site.h gopher-3.0.5/gopherd/special.c gopher-3.0.5/gopherd/special.h gopher-3.0.5/gopherd/wais.h gopher-3.0.5/gopherd/waisgopher.c gopher-3.0.5/gopherd/scripts/gateways/g2archie.ask gopher-3.0.5/gopherd/scripts/gateways/.names gopher-3.0.5/gopherd/scripts/gateways/g2archie.abstract gopher-3.0.5/gopherd/scripts/gateways/g2archie.gd gopher-3.0.5/gopherd/scripts/gateways/g2areacode gopher-3.0.5/gopherd/scripts/gateways/g2areacode.abstract gopher-3.0.5/gopherd/scripts/gateways/g2areacode.ask gopher-3.0.5/gopherd/scripts/gateways/g2finger.abstract gopher-3.0.5/gopherd/scripts/gateways/g2finger.ask gopher-3.0.5/gopherd/scripts/gateways/g2finger.gd gopher-3.0.5/gopherd/scripts/gateways/g2ftphack.abstract gopher-3.0.5/gopherd/scripts/gateways/g2ftphack.ask gopher-3.0.5/gopherd/scripts/gateways/g2ftphack.gd gopher-3.0.5/gopherd/scripts/gateways/g2geo.abstract gopher-3.0.5/gopherd/scripts/gateways/g2geo.ask gopher-3.0.5/gopherd/scripts/gateways/g2geo.gd gopher-3.0.5/gopherd/scripts/gateways/g2netfind gopher-3.0.5/gopherd/scripts/gateways/g2netfind.abstract gopher-3.0.5/gopherd/scripts/gateways/g2netfind.ask gopher-3.0.5/gopherd/scripts/gateways/g2netfind.gd gopher-3.0.5/gopherd/scripts/gateways/g2nntp.abstract gopher-3.0.5/gopherd/scripts/gateways/g2nntp.gd gopher-3.0.5/gopherd/scripts/gateways/g2webster.abstract gopher-3.0.5/gopherd/scripts/gateways/g2webster.ask gopher-3.0.5/gopherd/scripts/gateways/g2webster.gd gopher-3.0.5/gopherd/scripts/gateways/g2whois.abstract gopher-3.0.5/gopherd/scripts/gateways/g2whois.ask gopher-3.0.5/gopherd/scripts/gateways/g2whois.gd gopher-3.0.5/gopherd/scripts/Makefile gopher-3.0.5/gopherd/scripts/add-account gopher-3.0.5/gopherd/scripts/add-account.ask gopher-3.0.5/gopherd/scripts/autoabstract gopher-3.0.5/gopherd/scripts/autokeywords gopher-3.0.5/gophfilt/Makefile.in gopher-3.0.5/gophfilt/gophfilt.c gopher-3.0.5/gophfilt/make_gophfilt.com gopher-3.0.5/gophfilt/tryit.com gopher-3.0.5/object/BLblock.c gopher-3.0.5/object/BLblock.h gopher-3.0.5/object/DAarray.c gopher-3.0.5/object/DAarray.h gopher-3.0.5/object/Debug.c gopher-3.0.5/object/Debug.h gopher-3.0.5/object/Dirent.h gopher-3.0.5/object/GDgopherdir.c gopher-3.0.5/object/GDgopherdir.h gopher-3.0.5/object/GSgopherobj.c gopher-3.0.5/object/GSgopherobj.h gopher-3.0.5/object/Locale.c gopher-3.0.5/object/Locale.h gopher-3.0.5/object/Makefile.in gopher-3.0.5/object/Malloc.h gopher-3.0.5/object/RBTree.c gopher-3.0.5/object/RBTree.h gopher-3.0.5/object/Regex.c gopher-3.0.5/object/Regex.h gopher-3.0.5/object/STAarray.h gopher-3.0.5/object/STRstring.c gopher-3.0.5/object/STRstring.h gopher-3.0.5/object/Sockets.c gopher-3.0.5/object/Sockets.h gopher-3.0.5/object/Stat.h gopher-3.0.5/object/Stdlib.h gopher-3.0.5/object/String.h gopher-3.0.5/object/VIews.c gopher-3.0.5/object/VIews.h gopher-3.0.5/object/Wait.h gopher-3.0.5/object/boolean.h gopher-3.0.5/object/compatible.c gopher-3.0.5/object/compatible.h gopher-3.0.5/object/compile.com gopher-3.0.5/object/fileio.c gopher-3.0.5/object/fileio.h gopher-3.0.5/object/getopt.c gopher-3.0.5/object/link.com gopher-3.0.5/object/ranlib gopher-3.0.5/object/url.c gopher-3.0.5/object/url.h gopher-3.0.5/object/util.c gopher-3.0.5/object/util.h gopher-3.0.5/test/data/auxconf/testfile gopher-3.0.5/test/data/.names gopher-3.0.5/test/data/About gopher-3.0.5/test/data/decode-n-scripts/shell-script gopher-3.0.5/test/data/decode-n-scripts/shell-script.abstract gopher-3.0.5/test/data/decode-n-scripts/shell-script.tar gopher-3.0.5/test/data/ftp-horrors/.Links gopher-3.0.5/test/data/links/.Links gopher-3.0.5/test/data/views/t-shirt.gif gopher-3.0.5/test/data/views/t-shirt gopher-3.0.5/test/data/views/t-shirt.abstract gopher-3.0.5/test/Makefile gopher-3.0.5/test/otheradmin.conf gopher-3.0.5/test/test.raw gopher-3.0.5/test/good-results/aux-info gopher-3.0.5/test/good-results/aux gopher-3.0.5/test/good-results/aux-long gopher-3.0.5/test/good-results/links gopher-3.0.5/test/good-results/links-info gopher-3.0.5/test/good-results/links-long gopher-3.0.5/test/good-results/root gopher-3.0.5/test/good-results/root-info gopher-3.0.5/test/good-results/root-long gopher-3.0.5/test/good-results/views gopher-3.0.5/test/good-results/views-info gopher-3.0.5/test/good-results/views-long gopher-3.0.5/test/good-results/views-txt gopher-3.0.15/config.h.in0000664000000000000000000001646212621233174012011 0ustar /* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define to empty if the keyword does not work. */ #undef const /* Define for DGUX with . */ #undef DGUX /* Define if the `getloadavg' function needs to be run setuid or setgid. */ #undef GETLOADAVG_PRIVILEGED /* Define to `int' if doesn't define. */ #undef gid_t /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if your system has its own `getloadavg' function. */ #undef HAVE_GETLOADAVG /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define if you have the strcoll function and it is properly defined. */ #undef HAVE_STRCOLL /* Define if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define if you have . */ #undef HAVE_VFORK_H /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF /* Define if your struct nlist has an n_un member. */ #undef NLIST_NAME_UNION /* Define if you have . */ #undef NLIST_STRUCT /* Define to `int' if doesn't define. */ #undef pid_t /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE /* Define to `unsigned' if doesn't define. */ #undef size_t /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define on System V Release 4. */ #undef SVR4 /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME /* Define to `int' if doesn't define. */ #undef uid_t /* Define for Encore UMAX. */ #undef UMAX /* Define for Encore UMAX 4.3 that has instead of . */ #undef UMAX4_3 /* Define vfork as fork if vfork does not work. */ #undef vfork /* Define if you have the bzero function. */ #undef HAVE_BZERO /* Define if you have the connect function. */ #undef HAVE_CONNECT /* Define if you have the fgetpwent function. */ #undef HAVE_FGETPWENT /* Define if you have the get_current_dir_name function. */ #undef HAVE_GET_CURRENT_DIR_NAME /* Define if you have the getcwd function. */ #undef HAVE_GETCWD /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME /* Define if you have the getloadavg function. */ #undef HAVE_GETLOADAVG /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE /* Define if you have the getwd function. */ #undef HAVE_GETWD /* Define if you have the madvise function. */ #undef HAVE_MADVISE /* Define if you have the mkdir function. */ #undef HAVE_MKDIR /* Define if you have the mkstemp function. */ #undef HAVE_MKSTEMP /* Define if you have the mktime function. */ #undef HAVE_MKTIME /* Define if you have the putenv function. */ #undef HAVE_PUTENV /* Define if you have the re_comp function. */ #undef HAVE_RE_COMP /* Define if you have the regcomp function. */ #undef HAVE_REGCOMP /* Define if you have the regfree function. */ #undef HAVE_REGFREE /* Define if you have the select function. */ #undef HAVE_SELECT /* Define if you have the seteuid function. */ #undef HAVE_SETEUID /* Define if you have the setsid function. */ #undef HAVE_SETSID /* Define if you have the socket function. */ #undef HAVE_SOCKET /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP /* Define if you have the strcasestr function. */ #undef HAVE_STRCASESTR /* Define if you have the strcspn function. */ #undef HAVE_STRCSPN /* Define if you have the strdup function. */ #undef HAVE_STRDUP /* Define if you have the strerror function. */ #undef HAVE_STRERROR /* Define if you have the strftime function. */ #undef HAVE_STRFTIME /* Define if you have the strspn function. */ #undef HAVE_STRSPN /* Define if you have the strstr function. */ #undef HAVE_STRSTR /* Define if you have the strtol function. */ #undef HAVE_STRTOL /* Define if you have the sysconf function. */ #undef HAVE_SYSCONF /* Define if you have the tempnam function. */ #undef HAVE_TEMPNAM /* Define if you have the tzset function. */ #undef HAVE_TZSET /* Define if you have the wait3 function. */ #undef HAVE_WAIT3 /* Define if you have the waitpid function. */ #undef HAVE_WAITPID /* Define if you have the wattroff function. */ #undef HAVE_WATTROFF /* Define if you have the wattron function. */ #undef HAVE_WATTRON /* Define if you have the wstandend function. */ #undef HAVE_WSTANDEND /* Define if you have the wstandout function. */ #undef HAVE_WSTANDOUT /* Define if you have the header file. */ #undef HAVE_CRYPT_H /* Define if you have the header file. */ #undef HAVE_CTYPE_H /* Define if you have the header file. */ #undef HAVE_DIRENT_H /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_LIBGEN_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you have the header file. */ #undef HAVE_MACH_MACH_H /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_NDIR_H /* Define if you have the header file. */ #undef HAVE_RE_COMP_H /* Define if you have the header file. */ #undef HAVE_REGEX_H /* Define if you have the header file. */ #undef HAVE_REGEXP_H /* Define if you have the header file. */ #undef HAVE_STDLIB_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_STRINGS_H /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H /* Define if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_SYSLOG_H /* Define if you have the header file. */ #undef HAVE_TERM_H /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the curses library (-lcurses). */ #undef HAVE_LIBCURSES /* Define if you have the dgc library (-ldgc). */ #undef HAVE_LIBDGC /* Define if you have the inet library (-linet). */ #undef HAVE_LIBINET /* Define if you have the m library (-lm). */ #undef HAVE_LIBM /* Define if you have the malloc library (-lmalloc). */ #undef HAVE_LIBMALLOC /* Define if you have the nsl library (-lnsl). */ #undef HAVE_LIBNSL /* Define if you have the nsl_s library (-lnsl_s). */ #undef HAVE_LIBNSL_S /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define if you have the termcap library (-ltermcap). */ #undef HAVE_LIBTERMCAP gopher-3.0.15/patchlevel.h0000664000000000000000000000026010762617110012253 0ustar /* * The minor and major version numbers... */ #define GOPHER_MAJOR_VERSION "3" #define GOPHER_MINOR_VERSION "0" #define PATCHLEVEL 12 #define GOPHER_NICKNAME "FurryTerror" gopher-3.0.15/Makefile.config.in0000664000000000000000000002161111363667255013304 0ustar #------------------------------------------------ # This is where most of the configuration parameters are defined # also see conf.h # #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.10 $ # $Date: 2002/04/26 13:33:33 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/Makefile.config.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile.config.dist # Parameters for the gopher distribution #********************************************************************* # Revision History: # $Log: Makefile.config.in,v $ # Revision 1.10 2002/04/26 13:33:33 jgoerzen # Removed glib MIME stuff. We'll move to Pygopherd first. # # Revision 1.8 2002/03/19 20:42:48 jgoerzen # * Removed the DOMAIN configure support, DOMAIN_NAME in gopherd, # backupdomain in Socket.c, etc. This should prevent the no.domain.name # problem that people have been seeing. Regenerated configure stuff. # # Revision 1.7 2002/01/11 15:55:59 jgoerzen # * Using $(INSTALL) from subdirectories broke on systems # where install-sh was used because $(INSTALL) would always # resolve to ./install-sh. Replaced all instances of # $(INSTALL) with @INSTALL@ (autoconf would provide the correct # path) and removed INSTALL from Makefile.config. Reported # by Don Fike on Solaris 2.6. # * Updated our copy of install-sh with the one from # a current automake. # # Revision 1.6 2002/01/09 16:29:26 jgoerzen # More tweaks. # # Revision 1.5 2002/01/09 16:25:35 jgoerzen # Updated. # # Revision 1.4 2002/01/09 15:54:48 jgoerzen # Modifications to assist with installations # # Revision 1.3 2000/08/23 00:20:25 jgoerzen # Use -Wall # # Revision 1.2 2000/08/19 01:40:26 jgoerzen # Fix some pathnames # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 3.1 1996/01/04 18:52:31 lindner # Updates for autoconf # # Revision 3.22 1995/01/25 23:10:56 lindner # Modifications to use SOCKS # # Revision 3.21 1994/12/11 18:44:04 lindner # make /gopher-data the gopher-data directory # # Revision 3.20 1994/11/30 00:05:40 lindner # Use cp to do installs, much more portable # # Revision 3.19 1994/11/18 23:01:56 lindner # Add location of freewais-sf # # Revision 3.18 1994/11/18 22:45:24 lindner # don't make freewais-sf the default # # Revision 3.17 1994/11/18 22:08:46 lindner # Add better FreeWAIS code # # Revision 3.16 1994/11/07 20:00:48 lindner # Modifications to use FreeWAIS-sf package # # Revision 3.15 1994/08/19 17:02:48 lindner # Add message about NO_MKTIME # # Revision 3.14 1994/08/03 19:34:51 lindner # Better docs.. # # Revision 3.13 1994/05/27 04:56:29 lindner # Use -O # # Revision 3.12 1994/03/08 15:54:06 lindner # Add item for VFORK # # Revision 3.11 1994/01/20 06:43:07 lindner # support for systems that have flock() instead of fcntl()-locking # # Revision 3.10 1994/01/12 22:23:46 lindner # Fixes for Data General # # Revision 3.9 1994/01/06 06:58:40 lindner # Additions for client logging # # Revision 3.8 1993/11/03 15:02:26 lindner # pl10 # # Revision 3.7 1993/09/22 04:32:32 lindner # Doc fixes # # Revision 3.6 1993/09/03 03:26:12 lindner # Make sun shared libraries optional # # Revision 3.5 1993/07/30 14:21:42 lindner # A/UX mods, and Mitra autoexit mods # # Revision 3.4 1993/07/27 05:33:51 lindner # Mitra mondo debug overhaul # # Revision 3.3 1993/04/15 22:02:32 lindner # CLIENTOPTS added # # Revision 3.2 1993/03/19 19:41:46 lindner # updates for sco # # Revision 3.1.1.1 1993/02/11 18:02:49 lindner # Gopher+1.2beta release # # Revision 1.7 1993/02/09 21:34:03 lindner # New MAN5DIR line, changed install to install -c # # Revision 1.6 1993/01/19 04:52:22 lindner # Renamed Makefile.config to Makefile.config.dist # # Revision 1.5 1993/01/13 16:19:58 lindner # Changes for SVR4 (add -lnsl to libs line..) # # Revision 1.4 1992/12/28 21:45:48 lindner # Removed trailing slash on CLIENTLIB # # Revision 1.3 1992/12/21 20:38:05 lindner # Added warning about -DBIO (from dgg) # # Revision 1.2 1992/12/13 06:10:26 lindner # Fixed SVR4LIBS line (didn't need bsd stuff anymore) also removed HPLIBS # # Revision 1.1 1992/12/10 22:57:05 lindner # Initial revision # # #********************************************************************/ #------------------------------------------------ # Your favorite C compiler.. # CC = @CC@ #------------------------------------------------ # Optimization level. # #OPT=-g #OPT=-g -Wunused -W OPT=@OPT@ -Wall #------------------------------------------------ # The ranlib command on your system. Systems without it should still survive RANLIB = @RANLIB@ #------------------------------------------------ # The install command on your system. cp works in most cases... #------------------------------------------------- # Where shall we install stuff? # PREFIX = $(DESTDIR)@prefix@ prefix = $(DESTDIR)@prefix@ SYSCONFDIR = $(DESTDIR)@sysconfdir@ CLIENTDIR = $(PREFIX)/bin CLIENTLIB = $(SYSCONFDIR) SERVERDIR = $(PREFIX)/sbin # On SCO manuals are in /usr/man but its easiest to do a # symbolic link from /usr/local/man to /usr/man for this and other packages MAN1DIR = @mandir@/man1 MAN5DIR = @mandir@/man5 MAN8DIR = @mandir@/man8 #----------------------------------------------------------------- # DEBUGGING control... # # Comment this to make a slimmer executable... DEBUGGING = @DEBUGGING@ #------------------------------------------------ # Uncomment out the following lines to use SOCKS SOCKSFLAGS=@SOCKSFLAGS@ SOCKSLIBS=@SOCKSLIBS@ #----------------------------------------------------------------- # Optional server features. # # Add -DADD_DATE_AND_TIME to add dates and times to the gopher titles # # Add -DLOADRESTRICT if you want to restrict access based on load avg. # (Note you'll need to add -lkvm in SERVERLIBS) Note also that this has # only been tested under SunOS 4.1.1 # # Add -DBIO if you're using the biology portion of Don Gilbert's modified # wais8b5 that supports boolean and phrase searching. # PLEASE NOTE: the -DBIO option is NOT needed nor recommended for use # of the boolean and phrase searching portion of this modified wais, # just the symbol searching. But, you must compile wais and gopher with # the same option setting (-DBIO or NOT). # The source can be gotten from: # # ftp.bio.indiana.edu # # Add -DDL and define DLPATH and DLOBJS if you want to include support # for Tim Cook's 'dl' databases You will also have to have a # working copy the program with source code in the DLPATH # directory. The files getdesc.o and enddesc.o must be there. # Source for dl can be gotten from: # # ftp.deakin.edu.au # pub/describe/describe-1.8.tar.Z or higher... # # Add -DCAPFILES if you want compatibility with the older .cap directory # # Add -DSETPROCTITLE if you want to set the process title displayed # by the 'ps' command (only works on bsdish systems...) # # Add -DFREEWAIS_0_4 to WAISTYPE to use FreeWAIS version 0.4, this release # had a number of changes to the base release. # #SERVEROPTS = -DSETPROCTITLE -DCAPFILES #-DBIO -DDL -DLOADRESTRICT SERVEROPTS = @SERVEROPTS@ WAISTYPE = @WAISTYPE@ DLPATH = @DLPATH@ DLOBJS = @DLOBJS@ #----------------------------------------------------------------- # Optional client features. # # Add -DNOMAIL if you don't want remote users mailing documents # # Add -DAUTOEXITONU if you want to treat q and u as the same, and automatically # exit from the top menu - usefull if Gopher called from another app. # # Add -DNOBANNER if you don't want the banner across the top. # CLIENTOPTS = -DNOBANNER -DCTRLCPROMPTS -DCONTROLX #-DNOMAIL -DREMOTEUSER -D #----------------------------------------------------------------- # Optional localization and internationalization features # # Add -DGINTERNATIONAL if you want localized messages in the client. # You may need to check the settings of -DNO_LOCALE and -DNO_XPGCAT # if your system does not have ANSI C or X/Open libraries respectively. # You will also need to follow the directions in gopher/locales/README # to generate and install the localized messages. INTLOPTS = @GINTERNATIONAL@ # # Uncomment out this line to use shared libraries on Sun systems # #SHAREDLIB = sun #================================================================= #================================================================= # Stuff that follows shouldn't be changed # OBJINCLUDES = -I@top_srcdir@/object OTHERINCLUDES = -I@top_srcdir@ WAISINCLUDES = -I@top_srcdir@/wais -I../ui INCLUDES = -I@top_srcdir@ -I@top_srcdir@/object LDFLAGS = -L../object SHELL = /bin/sh gopher-3.0.15/configure.in0000664000000000000000000001264610762617110012277 0ustar # configure.in for gopher # Process this file with autoconf to produce a configure script. dnl dnl MACROS dnl define(UP_ASK_FOR, [echo "$2 ($3)?"; read $1; if test "$$1" = "" ; then $1="$3"; fi])dnl AC_INIT(gopher/gopher.c) echo "----------------------------------------------------------------------" echo "You are about to build the Gopher system for Unix" echo "Please read the file doc/INSTALL for full information on" echo "building Gopher" echo " " echo "Gopher is copyrighted software, see the file Copyright in" echo "the distribution for more information and limitations." echo "----------------------------------------------------------------------" echo " " dnl AC_CANONICAL_HOST AC_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_MAKE_SET dnl Checks for libraries. AC_CHECK_LIB(m, main) ###################################################################### AC_SUBST(DEBUGGING) AC_ARG_ENABLE(debug, [ --disable-debug controls whether debug text is compilied in], DEBUGGING=$enableval, DEBUGGING="") if test "$DEBUGGING" = yes; then DEBUGGING="-DDEBUGGING" fi ###################################################################### AC_SUBST(SOCKSLIBS) AC_SUBST(SOCKSFLAGS) HAVE_SOCKS=0 AC_ARG_ENABLE(socks, [ --enable-socks use socks library, requires -lsocks], HAVE_SOCKS=1, HAVE_SOCKS=0) if test "$HAVE_SOCKS" = 1; then AC_CHECK_LIB(socks, main, SOCKSLIBS="-lsocks"; SOCKSFLAGS="-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect") fi ###################################################################### AC_SUBST(GINTERNATIONAL) GINTERNATIONAL="" AC_ARG_ENABLE(locale, [ --enable-locale use international localized msgs for the client], GINTERNATIONAL="-DGINTERNATIONAL", GINTERNATIONAL="") ###################################################################### AC_SUBST(GOPHER_DATA) GOPHER_DATA="/gopher-data" AC_ARG_ENABLE(datadir, [ --enable-datadir=dir enable custom datadir (/gopher-data)], GOPHER_DATA="$enableval", GOPHER_DATA="/gopher-data") ###################################################################### AC_SUBST(GOPHER_PORT) GOPHER_PORT=70 AC_ARG_ENABLE(port, [ --enable-port=portnum enable custom port (70)], GOPHER_PORT="$enableval", GOPHER_PORT=70) ###################################################################### AC_SUBST(DLPATH) AC_SUBST(DLOBJS) AC_ARG_ENABLE(dl, [ --enable-dl=dlpathname use Tim Cook's dl databases], DLPATH="$enableval";DLOBJS="$enableval/getdesc.o $enableval/enddesc.o";SERVEROPTS="$SERVEROPTS -DDL",:) ###################################################################### AC_SUBST(OPT) AC_ARG_ENABLE(opt, [ --enable-opt=args Special optimization flags to pass to the compiler], OPT="$enableval",OPT="$CFLAGS") ###################################################################### dnl dnl LIBRARIES dnl # If we can't find connect, try looking in -lsocket, -lnsl, and -linet. # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has # libsocket.so which has a bad implementation of gethostbyname (it # only looks in /etc/hosts), so we only look for -lsocket if we need # it. unset ac_cv_func_connect AC_CHECK_FUNC(connect, :, [case $LIBS in *-lnsl*) ;; *) AC_CHECK_LIB(nsl_s, main) ;; esac case $LIBS in *-lnsl*) ;; *) AC_CHECK_LIB(nsl, main) ;; esac case $LIBS in *-lsocket*) ;; *) AC_CHECK_LIB(socket, connect) ;; esac case $LIBS in *-linet*) ;; *) AC_CHECK_LIB(inet, connect) ;; esac unset ac_cv_func_connect AC_CHECK_FUNCS(connect)]) AC_CHECK_FUNC(gethostname, :, LIBOBJS="$LIBOBJS hostname.o") ###################################################################### dnl Check for WAIS with_wais=1 AC_ARG_WITH(wais,[ --without-wais Don't try using WAIS (default: try)], with_wais=1, with_wais=0) AC_SUBST(REGEXLIBS) AC_SUBST(WAISTYPE) AC_SUBST(SEARCH) LDFLAGS=$OLDLDFLAGS AC_CHECK_LIB(compat, re_comp, REGEXLIBS="$REGEXLIBS -lcompat") ###################################################################### AC_CHECK_LIB(malloc, main) AC_SUBST(CLIENTLIBS) AC_CHECK_LIB(curses, main, CLIENTLIBS="$CLIENTLIBS -lcurses") AC_CHECK_LIB(termcap, main, CLIENTLIBS="$CLIENTLIBS -ltermcap") dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(strings.h string.h sys/param.h term.h re_comp.h regex.h crypt.h fcntl.h time.h ctype.h limits.h locale.h sys/types.h sys/stat.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h stdlib.h libgen.h regexp.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_UID_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MMAP dnl AC_FUNC_SETVBUF_REVERSED AC_TYPE_SIGNAL AC_FUNC_STRCOLL AC_FUNC_VFORK AC_FUNC_VPRINTF AC_FUNC_GETLOADAVG dnl Do this again so the AC_CHECK_FUNCS works. AC_CHECK_LIB(curses, main) AC_CHECK_LIB(termcap, main) AC_CHECK_FUNCS(bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mkstemp mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree wattron wattroff wstandout wstandend) AC_TRY_LINK([#include ], [getdtablesize();]) AC_OUTPUT(Makefile Makefile.config object/Makefile gopher/Makefile gopher/locales/Makefile doc/Makefile gophfilt/Makefile) gopher-3.0.15/conf.h0000664000000000000000000004331510762617110011061 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2002/01/08 21:35:49 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/conf.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: conf.h * More configuration parameters. ********************************************************************* * Revision History: * $Log: conf.h,v $ * Revision 1.3 2002/01/08 21:35:49 jgoerzen * Many changes: * Revved the version number * updated greeting * updated copyright notices * * Revision 1.2 2000/12/20 01:19:15 jgoerzen * Added patches from David Allen * * Revision 1.1.1.2 2000/12/18 11:05:07 mdallen * Removed ~50 instances of nested comments for commented out #define's * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.23 1995/02/25 06:45:33 lindner * Add write time out * * Revision 3.22 1995/01/04 18:35:18 lindner * Added Danish as a default, more hlp and hlp_secure comments * * Revision 3.21 1994/12/07 23:54:20 lindner * mods for default language behavior on VMS * * Revision 3.20 1994/08/19 17:01:44 lindner * Fixes from Alan * * Revision 3.19 1994/07/18 19:04:40 lindner * Features from Alan and JL for Language Definitions and Gripes * * Revision 3.18 1994/06/09 04:06:28 lindner * F.Macrides 27-May-1994 Added option to allow 'd'elete only for * bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * * Added option to not read maps from the user rc file (i.e., only from * the system rc file) in SecureMode or NoShellMode, via the compilation * symbol SECURE_MAPS_GLOBALRC_ONLY. * * Added info about the NOMAIL compilation symbol in the VMS section. * * Put back -force_html %s for the lynx command in the VMS section * (really *is* needed with the current text/html code when foo.html * files are supplied by a gopher+ server from it's own data tree; other * Web browsers don't have that switch, and won't work right with gopher+ * servers until they can use the gopher+ extra stuff to determine the * mime type. * * Revision 3.17 1994/05/11 02:48:16 lindner * fix for VMS gopherprint defines * * Revision 3.16 1994/04/14 17:03:02 lindner * fix for html command * * Revision 3.15 1994/01/20 06:43:51 lindner * text/html viewer support for lynx 2.1 & CERN's www-linemode client * * Revision 3.14 1994/01/14 16:24:22 lindner * Added anonymous ftp type 'f' option * * Revision 3.13 1993/11/03 03:36:35 lindner * Mod for variable records * * Revision 3.12 1993/10/13 16:46:51 lindner * Updates for %s on defaults, vms mods * * Revision 3.11 1993/09/22 04:30:31 lindner * Add option to conf.h for Max WAIS documents * * Revision 3.10 1993/09/11 07:08:50 lindner * Mucho stuff for VMS, callable HTML stuff * * Revision 3.9 1993/08/28 04:59:03 lindner * Moved GLOBALRC definition to conf.h for VMS * * Revision 3.8 1993/08/19 20:32:59 lindner * add default remoterc, change read timeout to 1 minute * * Revision 3.7 1993/08/12 06:35:08 lindner * Don't override CONF_FILE definition, use mail instead of /bin/mail for VMS * * Revision 3.6 1993/08/04 22:07:42 lindner * Use /bin/mail instead of ucbmail * * Revision 3.5 1993/07/27 05:35:30 lindner * reading material for VMS, dead code removal * * Revision 3.4 1993/04/15 22:08:51 lindner * Remote user mods (Mitra) * * Revision 3.3 1993/03/18 23:11:16 lindner * 1.2b3 release * * Revision 3.2 1993/02/19 21:25:03 lindner * Updated pager command for gopher+ stuff. * * Revision 3.1.1.1 1993/02/11 18:02:49 lindner * Gopher+1.2beta release * * Revision 1.7 1993/02/09 22:49:34 lindner * Fixes for new mapping thing * * Revision 1.6 1993/01/08 23:04:48 lindner * Changed TN3270_COMMAND for Multinet * * Revision 1.5 1992/12/31 05:32:43 lindner * Added mods for VMS * * Revision 1.4 1992/12/22 21:45:26 lindner * Fixed bug with that zcat code I just added... * * Revision 1.3 1992/12/21 20:27:25 lindner * Added #ifdef to make zcat changable.. * * Revision 1.2 1992/12/13 05:56:32 lindner * Added options for connection time-out code in the server (mtm) * * Revision 1.1 1992/12/11 19:01:58 lindner * Gopher1.1 Release * *********************************************************************/ /* * Defaults for the client program * On startup the client will contact either the gopher server * CLIENT1_HOST or CLIENT2_HOST randomly. * * Set CLIENT2_PORT to 0 if you only want one root machine */ #define CLIENT1_HOST "gopherproject.org" #define CLIENT1_PATH "/Software/Gopher" #define CLIENT1_PORT 70 #define CLIENT2_HOST "nonexistant" #define CLIENT2_PATH "nonexistant" #define CLIENT2_PORT 0 /* define CLIENT1_HOST "gopher.tc.umn.edu" define CLIENT2_HOST "gopher2.tc.umn.edu" define CLIENT1_PORT 70 define CLIENT2_PORT 70 */ /* * Defaults for the client's Gopher server aFTP gateway. * * On command 'f' the client will prompt for an aFTP Host * and create a directory for it via the gateway. * You can optionally enter a selector for a particular * directory on the aFTP Host, and the gateway will return * that instead of the Host's root directory. * * Set AFTP_HOST to your Gopher server with the gateway implemented * * Set AFTP_PORT to its port number */ #define AFTP_HOST "gopher-gw.micro.umn.edu" #define AFTP_PORT 70 /* * Default language for client when multiple language views are available * * (This is a gopher+ language code - see object/VIews.c for more examples) */ #define DEFAULT_LANG "En_US" /* English (US) */ /* #define DEFAULT_LANG "Da_DK" Danish */ /* #define DEFAULT_LANG "De_DE" German */ /* #define DEFAULT_LANG "En_GB" English (UK) */ /* #define DEFAULT_LANG "Es_ES" Spanish */ /* #define DEFAULT_LANG "Fr_FR" French */ /* #define DEFAULT_LANG "It_IT" Italian */ /* #define DEFAULT_LANG "Jp_JP" Japanese */ /* #define DEFAULT_LANG "No_NO" Norwegian */ /* #define DEFAULT_LANG "Sv_SE" Swedish */ /* * Define this if you want the 'd'elete command restricted to bookmarks */ /* #define DELETE_BOOKMARKS_ONLY */ /* * Define this if you want only the system rc file read for maps when * the client is invoked in SecureMode or NoShellMode (bookmarks in the * user account's gopherrc will still be read. */ /* #define SECURE_MAPS_GLOBALRC_ONLY */ /* * Define this if you want the spawn to shell command disabled regardless * of whether SecureMode or NoShellMode are set. */ /* #define NEVERSPAWN */ /* * Define this if you want to disable access to the Options menus under all * circumstances. */ /* #define NEVERSETOPTIONS */ /* * Define this if you want the link's tuple and URL decription (as created * by decribe_gopher() for the '=' command) inserted at the tops of gripe * messages. */ #define DESCRIBE_GOPHER_GRIPE /* */ /* * Define this if you want a To: prompt containing the administrator's * address included for the gripe command. If included, the user can * modify it to have the gripe sent to a different address. */ /* #define MODIFIABLE_GRIPE_TO */ /* * Define this if you want gripes disabled in SecureMode and NoShellMode */ /* #define NOGRIPE_SECURE */ /* Define LOCAL_GRIPE_ADMINISTRATOR and use your site's Gopher Administrator * address if you want gripes sent there for Gopher0 servers (or Gopher+ * servers without Admin info for the link). If DOMAIN_FOR_LOCAL_GRIPES is * also defined, only items on hosts with domain names containing that string * will generate mail to your LOCAL_GRIPE_ADMINISTRATOR. If * LOCAL_GRIPE_ADMINISTRATOR is not defined, or the item being griped about * isn't on a server in the DOMAIN_FOR_LOCAL_GRIPES, the user will get a * screen message that the link's administrator is unknown (unless * MODIFIABLE_GRIPE_TO is on, in which case the address field is set to ""). */ /* #define LOCAL_GRIPE_ADMINISTRATOR "" */ /* #define DOMAIN_FOR_LOCAL_GRIPES "host.domain" */ /* #define DOMAIN_FOR_LOCAL_GRIPES CLIENT1_HOST */ /* * Override some defaults for various platforms */ #if defined(sun) #define PLAY_COMMAND "play -v 40 -" #endif #if defined(NeXT) #define NO_VPRINTF #define PLAY_COMMAND "play -v 40 -" #endif #if defined(_SEQUENT_) #define PRINTER_COMMAND "lp" #endif #if defined(VMS) /* * VMS systems use VARIABLE length records for text files and * FIXED 512 records for binary files that are saved or cached. * Comment this out if you want to use stream_LF format instead. * The Bookmark (sys$login:gopherrc.) and configuration * (GopherP_Dir:gopher.rc and GopherP_Dir:gopherremote.rc, see * below) files are stream_LF regardless of how this program * logical is set. */ #define VMSRecords /* */ /* * Define this if you have an old version of VAXC/OpenVMS * which lacks the mktime() function. */ /* #define NO_MKTIME */ /* * The "builtin" pager is the default VMS utility for displaying text. * Alternatively, define "TPU" for invoking callable TPU. Its /READ_ONLY * and /NOJOURNAL qualifiers are added internally by the software. * A still better alternative is to acquire MOST, optimized for Gopher and * C SWING, via anonymous FTP from narnia.memst.edu. Define it with the -n * and +s switches. */ #define PAGER_COMMAND "builtin" /* */ /* #define PAGER_COMMAND "TPU/NOINI/COM=GopherP_Dir:GOPHER.TPU %s" */ /* #define PAGER_COMMAND "most -n +s %s" */ /* * MAIL_COMMAND is the program logical for the mail verb. * MAIL_ADRS is the argument for an sprintf() command that can add * "prefix%""ADDRESS""" to the Internet mail address given by the * user. It is structured for PMDF's IN%"INTERNET_ADDRESS" * scheme. The %s is replaced with the address given by the * user. No conversion will be done if a DECNET or simple * VMS MAIL address is given. The default definition of "%s" for * MAIL_ADRS does not provide translation. If you want to use * PMDF's prefix of IN%, Message Exchange's (MX's) prefix of MX%, * MultiNet's prefix of SMTP%, or Wollongong's prefix of WINS%, * comment out the default definition of MAIL_ADRS and uncomment * the appropriate line below to your selected system. */ #define MAIL_COMMAND "mail" #define MAIL_ADRS "%s" /* */ /* #define MAIL_ADRS "\"IN%%\"\"%s\"\"\"" */ /* #define MAIL_ADRS "\"MX%%\"\"%s\"\"\"" */ /* #define MAIL_ADRS "\"WINS%%\"\"%s\"\"\"" */ /* #define MAIL_ADRS "\"SMTP%%\"\"%s\"\"\"" */ /* * Use MultiNet's command verb for telnet and tn3270, so that it can * co-exist with other TCPIP transports on VMS systems. */ #if defined(MULTINET) # define TELNET_COMMAND "multinet telnet" # define TN3270_COMMAND "multinet telnet/tn3270" #else # define TELNET_COMMAND "telnet" # define TN3270_COMMAND "tn3270" #endif /* * The Printer Command may be setup to use a command procedure to save the * file before printing it. This avoids the problem of Gopher removing the * temporary file before it can be printed. For example set up a command * procedure in a public place (e.g., GopherP_Dir:GOPHERPRINT.COM) containing: * $ file="sys$scratch:gopher_"+f$extract(21,2,f$time())+".tmp" * $ copy 'p1' 'file' * $ print 'f$trnlnm("GOPHERQUEUE")' /delete/noidentify 'file' * (Note that the logical GOPHERQUEUE can be used to set options like * default queue name or form type eg DEFINE/JOB GOPHERQUEUE "/queue=que1") * and then define the Printer Command appropriately */ #define PRINTER_COMMAND "print %s" /* */ /* #define PRINTER_COMMAND "@GopherP_Dir:GOPHERPRINT %s" */ /* * Sounds are not implemented on VMS. * They can only be 's'aved or 'D'ownloaded. */ #define PLAY_COMMAND "- none -" /* * If IMAGE_COMMAND is defined as "- none -" * a print command is not added to its default map, * and images can only be 's'aved or 'D'ownloaded. */ #define IMAGE_COMMAND "xv %s" /* */ /* #define IMAGE_COMMAND "- none -" */ /* * The builtin HTML browser is not yet functional. * * Lynx is a Curses-based HTML browser, available from ftp2.cc.ukans.edu, * which was initially designed to use Gopher as its server and still works * well with this software (on both VMS and Unix platforms). * * The WWW Line-Mode browser is avaialble from info.cern.ch * */ #define HTML_COMMAND "- none -" /* #define HTML_COMMAND "lynx -force_html %s" lynx 2.2 or greater */ /* #define HTML_COMMAND "www" WWW Line-Mode client */ /* * Point these to the default configuration files for view command maps: * $ define/system "GopherP_Dir" "device:[directory]" * Make sure the files have commands mapped appropriately for VMS, * and have any maps which don't apply commented out. * */ #define GLOBALRC "GopherP_Dir:gopher.rc" #define REMOTERC "GopherP_Dir:gopherremote.rc" /* * Define the *device* where shared images of message files will be * found. Since these are architecture-specific, __ALPHA versions * need to be different than VAX versions, so if you have both on your * cluster and need a client for each of them, you'll need to compile * code for each, with a different directory for each one. The ":.EXE" * *must* be present; the device specification may be changed (no directory * allowed). */ #ifdef __ALPHA #define GOPHERMSGS_DEV "GopherP_Dir:.EXE" /* */ #else #define GOPHERMSGS_DEV "GopherP_Dir:.EXE" /* */ #endif /* * Define the default language to use when LC_MESSAGES selects multiple * message files. If the default language is one of the multiple message * files selected, then no choice is offered to start the client (as in * the case when no message files or only one is detected), but the list * of possible languages is retained and can be invoked with the L keystroke. * * If multiple message files are selected but no default language is defined, * a menu of available languages always will be displayed at startup of the * gopher client. * * Note this is the language code imbedded in the default message file's * *filename* -- it is not necessarily a gopher+ language code as in the * DEFAULT_LANG definition above. * * See [.GOPHER.LOCALES]README.VMS for more information. */ #define GOPHERMSGS_DEFAULT "EN_US" /* English_US */ /* #define GOPHERMSGS_DEFAULT "DE_DE" German_DE */ /* #define GOPHERMSGS_DEFAULT "DK" Danish */ /* #define GOPHERMSGS_DEFAULT "ES_ES" Spanish_ES */ /* #define GOPHERMSGS_DEFAULT "ES_MX" Spanish_MX */ /* #define GOPHERMSGS_DEFAULT "IT" Italian */ /* #define GOPHERMSGS_DEFAULT "FR" French */ /* #define GOPHERMSGS_DEFAULT "PIGLATIN" Oy-vay */ /* #define GOPHERMSGS_DEFAULT "SV" Swedish */ /* * Point this to the on-line Gopher+ help file. It will be used if * a message catalog is not implemented, or if the implemented message * catalog does not yet have a help file for the corresponding language. */ #define GOPHERHELP "GopherP_Dir:gopher.hlp" /* * Define this and point it to an edited version of the gopher.hlp file * which has the commands disabled in SecureMode deleted. Otherwise, the * file pointed to by GOPHERHELP will be used. If any message catalogs are * to be implemented and they have help files for the corresponding language, * edit those, and make sure each message number 224 (226 for Unix) points to * the correct help file location and name, so that it will be used instead. */ /* #define GOPHERHELP_SECURE "GopherP_Dir:gopher.hlp_secure" */ /* * Define this if you want to disable mailing of documents in SecurMode (-s) * and NoShellMode (-S). Printing and saving to disk are always disabled for * those ("remote user") modes. */ /* #define NOMAIL */ /* * Client logging via syslog() code has been ported to VMS systems * with MULTINET. See [.doc]clientlogging.vms for more information. * Check out the code in [.gopher]ourutils.c if you think you might * be able to port it to other TCPIP packages. * * Define CLIENT_LOGGER to log client requests issued to servers. * Define TELNET_TRACE to trace and log telnet connections by the client. */ /* #define CLIENT_LOGGER */ /* #define TELNET_TRACE */ #endif /* VMS (Have you noticed how verbose VMSers tend to be?!?!?) */ /* * Now set the parameters, only if not set above... */ #ifndef PAGER_COMMAND #define PAGER_COMMAND "builtin" #endif #ifndef MAIL_COMMAND #define MAIL_COMMAND "/bin/mail" #endif #ifndef TELNET_COMMAND #define TELNET_COMMAND "telnet" #endif #ifndef TN3270_COMMAND #define TN3270_COMMAND "tn3270" #endif #ifndef PRINTER_COMMAND #define PRINTER_COMMAND "lpr" #endif #ifndef PLAY_COMMAND #define PLAY_COMMAND "/bin/false" #endif #ifndef MIME_COMMAND #define MIME_COMMAND "metamail -P" #endif #ifndef IMAGE_COMMAND /* #define IMAGE_COMMAND "xloadimage -fork %s"*/ #define IMAGE_COMMAND "xv %s" #endif #ifndef HTML_COMMAND /*** See the VMS HTML section for info on obtaining lynx or www ***/ #define HTML_COMMAND "- none -" /* */ /* #define HTML_COMMAND "lynx -force_html %s" lynx 2.1 or greater */ /* #define HTML_COMMAND "www" WWW Line-Mode client */ #endif #ifndef REMOTERC #define REMOTERC "/usr/local/lib/gopherrc.remote" #endif /****************** gopherd configuration ***********************/ /* * The maximum number of hits to return from a query to a * WAIS index. */ #define WAISMAXHITS 40 /* * The load average at which to restrict connections */ #define MAXLOAD 10.0 /* * Return type for signal() */ #define SIGRETTYPE void /* * Timeout for network reads (1 minute) */ #define READTIMEOUT (1 * 60) /* * Timeout for network writes (3 minute) */ #define WRITETIMEOUT (3 * 60) /* We need to define this since inetd.conf can only have a few arguments, and we need lots of them */ #if !defined(CONF_FILE) # define CONF_FILE "/usr/local/etc/gopherd.conf" #endif gopher-3.0.15/install-sh0000664000000000000000000001273610762617110011767 0ustar #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 gopher-3.0.15/config.guess0000664000000000000000000003736110762617110012304 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:V*:*) # After 1.2, OSF1 uses "V1.3" for uname -r. echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` exit 0 ;; alpha:OSF1:*:*) # 1.2 uses "1.2" for uname -r. echo alpha-dec-osf${UNAME_RELEASE} exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; Pyramid*:OSx*:*:*) if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; sun4*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; mips:*:4*:UMIPS) echo mips-mips-riscos4sysv exit 0 ;; mips:*:5*:RISCos) echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i[34]86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[3478]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/7?? | 9000/8?[79] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*C90:*:*:*) echo c90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; i[34]86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0 elif test "${UNAME_MACHINE}" = "alpha" ; then echo alpha-unknown-linux ; exit 0 else # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout. test ! -d /usr/lib/ldscripts/. \ && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0 # Determine whether the default compiler is a.out or elf cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i[34]86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; i[34]86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL else echo ${UNAME_MACHINE}-unknown-sysv32 fi exit 0 ;; Intel:Mach:3*:*) echo i386-unknown-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M680[234]0:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3 && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m680[234]0:LynxOS:2.[23]*:*) echo m68k-lynx-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i[34]86:LynxOS:2.[23]*:*) echo i386-lynx-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.[23]*:*) echo sparc-lynx-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.[23]*:*) echo rs6000-lynx-lynxos${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; *:A/UX:3.*:*) echo "${UNAME_MACHINE}-apple-aux${UNAME_RELEASE}" exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-unknown-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 gopher-3.0.15/README0000664000000000000000000000505610762617110010643 0ustar $Id: README,v 1.5 2002/02/12 21:30:03 jgoerzen Exp $ This is the Gopher+ distribution based on the University of Minnesota's Internet Gopher+ distribution for UNIX machines. University of Minnesota actively developed this software until 1995. In 2000, they released it to the public under the GNU General Public License. This represents the latest version of their tree, as adopted by a group of programmers. A client for VMS is included but is not currently supported. Here's a breakdown by directory: announcements: Release notes, public announcements about Gopher, etc. Preserved here for posterity. coders: Files of note to Gopher developers. debian: Files to build gopher on Debian. Also, debian/changelog is the place to look for all recent changes. doc: The documentation for all parts of the distribution. Look here *first*. Important files: INSTALL -- Installation instructions *.changes -- Stuff that's changed from version to version man pages, etc. PLATFORMS -- Info on support of different platforms LOOK HERE IF YOU HAVE PROBLEMS COMPILING! gopher: The Internet Gopher+ Curses client. gophfilt: A Gopher "filter" program. test: A regression testing package, include sample data. Please look in the directory "doc" for more information about installing the various portions of the Internet Gopher. Specifically refer to the file INSTALL. This software is Copyright 1991-2000 by the Regents of the University of Minnesota. This software is Copyright (C) 2000-2002 by John Goerzen and the gopher developers. Please refer to the file "Copyright" for more information on restrictions of use. Bug reports, patches and comments may be sent to gopher@complete.org. The UMN team wishes recognize the help and code from the following people: UNIX network Programming W. Richard Stevens (For socket functions and error routines, now unrecognizeable :-) ) elm Copyrighted by the USENET trust. (For UI cloning) WAIS Brewster and co. at Thinking Machines (er, now WAIS Inc.) (For our UNIX generic indexing stuff) and all of our users for their great suggestions and patches! See the files doc/*.changes for a long list of people who have submitted patches and code. gopher-3.0.15/gopher/0000775000000000000000000000000012621233142011234 5ustar gopher-3.0.15/gopher/gopherrc.c0000664000000000000000000005334710762617110013232 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2002/01/08 21:35:49 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/gopherrc.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * Copyright 2000-2005 by John Goerzen and the Gopehr developers * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: gopherrc.c * Utilities to read and write the .gopherrc file ********************************************************************* * Revision History: * $Log: gopherrc.c,v $ * Revision 1.3 2002/01/08 21:35:49 jgoerzen * Many changes: * Revved the version number * updated greeting * updated copyright notices * * Revision 1.2 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.38 1995/11/03 21:18:19 lindner * ANSIfication * * Revision 3.37 1995/03/09 05:23:52 lindner * F.Macrides 03-Mar-1995: Ensure that files are closed on errors in * RCisGlobalNew(), else the user's RC file updates will fail on exit. * * Revision 3.36 1994/10/21 04:41:07 lindner * Add ANSI attached printer code.. * * Revision 3.35 1994/07/19 20:19:14 lindner * Fix for globalrc checking... * * Revision 3.34 1994/07/06 15:41:12 lindner * gopherrc.c * * Revision 3.33 1994/06/29 05:12:47 lindner * Fix problem with NO_MAPS.. define, add code to check for new config file * * Revision 3.32 1994/06/09 22:13:39 lindner * More language conversions * * Revision 3.31 1994/06/09 04:24:50 lindner * (F.Macrides) Added option for not reading maps from a * Bookmark file when the client is running in SecureMode or NoShellMode, * implemenented via the compilation symbol SECURE_MAPS_GLOBALRC_ONLY * * Revision 3.30 1994/05/17 05:47:59 lindner * Massive internationalization change * * Revision 3.29 1994/05/14 04:13:42 lindner * Internationalization... * * Revision 3.28 1994/05/06 02:28:53 lindner * Allow getenv code to be used on Unix systems * * Revision 3.27 1994/04/19 14:31:36 lindner * Fix for the problem of vanishing bookmarks * * Revision 3.26 1994/04/01 04:48:57 lindner * Conversion to FIO routines for gopherrc i/o * * Revision 3.25 1994/03/04 23:35:49 lindner * fix for SCO compiler * * Revision 3.24 1993/12/28 17:30:06 lindner * added options for GDfromLink * * Revision 3.23 1993/11/29 01:01:10 lindner * getenv addition for mips * * Revision 3.22 1993/11/15 07:34:26 lindner * Fix stoopid fcntl include * * Revision 3.21 1993/11/05 07:26:11 lindner * fix for Solaris * * Revision 3.20 1993/11/02 06:45:14 lindner * Use /home/mudhoney/lindner instead of password routines to read gopherrc * * Revision 3.19 1993/10/22 20:25:51 lindner * Fix for VMS logicals in RCfromENV() (Fote) * * Revision 3.18 1993/10/11 16:57:40 lindner * Fote's mods for appending %s in display command handling, application/html becomes text/html * * Revision 3.17 1993/09/30 22:42:09 lindner * Add option for bolding of searched words * * Revision 3.16 1993/09/21 01:47:36 lindner * Fix for builtin pager... * * Revision 3.15 1993/09/08 01:23:46 lindner * Add Environment variable processing for VMS, plus add support for HTML * * Revision 3.14 1993/08/28 04:58:50 lindner * Moved GLOBALRC definition to conf.h for VMS * * Revision 3.13 1993/08/16 18:04:15 lindner * Add a purge to gopherrc on VMS * * Revision 3.12 1993/08/16 17:58:22 lindner * Removed REMOTEUSER ifdefs * * Revision 3.11 1993/08/03 20:00:00 lindner * Change audio/mulaw to audio/basic for MIME * * Revision 3.10 1993/07/29 17:23:41 lindner * eliminate non-used variables * * Revision 3.9 1993/07/27 05:28:51 lindner * Mondo Debug overhaul from Mitra * * Revision 3.8 1993/07/26 15:37:27 lindner * fix warning message for hosed gopher.rc lines. * * Revision 3.7 1993/07/20 23:12:34 lindner * Mods to use patchlevel.h * * Revision 3.6 1993/07/07 19:44:27 lindner * Better MIME compatibility, now accepts text/plain * * Revision 3.5 1993/06/09 22:14:42 lindner * VMS updates * * Revision 3.4 1993/04/15 21:21:30 lindner * Code for remote users (Mitra) * * Revision 3.3 1993/03/24 16:58:47 lindner * Added RCprintCommand() * * Revision 3.2 1993/02/19 21:10:17 lindner * Generalized some routines. Added global rc file. * * Revision 3.1.1.1 1993/02/11 18:03:00 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:35:15 lindner * Lots of changes. RC processing now holds the global variables inside * its container. Much more objecty * * Revision 1.8 1993/01/12 21:16:44 lindner * Fixed gopherrc for good! * * Revision 1.7 1993/01/09 02:53:55 lindner * Fixed spelling error on it's * * Revision 1.6 1993/01/09 02:31:09 lindner * Added #define to check for MAXPATHLEN * * Revision 1.5 1992/12/31 05:46:52 lindner * Merged 1.2.1.1 in main code sequence * * Revision 1.4 1992/12/15 16:54:38 lindner * Fixed typo in initial display message. Also changed message * "Press any key to continue" to "Press RETURN to continue", since * we're not in raw() mode. * * Revision 1.3 1992/12/14 20:41:00 lindner * .gopherrc was being created with a random permissions mask. Fixed it * Also made it so that gopherrc is created with mode 0644 * * Revision 1.2.1.1 1992/12/31 05:42:26 lindner * VMS mods. * * Revision 1.2 1992/12/11 19:52:59 lindner * Added copyright notices when the users starts the client the first time. * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * * Revision 1.1 1992/12/10 06:16:51 lindner * Initial revision * * *********************************************************************/ #include "gopherrc.h" #include "CURcurses.h" #include "conf.h" #include "globals.h" #include "Malloc.h" #include "patchlevel.h" #include "compatible.h" #include "fileio.h" #include "Stat.h" /* For testing times of globalrc file */ #include #include "Locale.h" #ifdef VMS #include #define MAXPATHLEN FILENAME_MAX #include #else #include #include #endif #ifdef M_XENIX #include #endif #ifndef MAXPATHLEN #define MAXPATHLEN 256 #endif #ifdef mips char *getenv(); #endif /* * Definitions for the mapping object */ RCMapObj * RCMnew(void) { RCMapObj *rcm; rcm = (RCMapObj*) malloc(sizeof(RCMapObj)); rcm->view = STRnew(); rcm->displaycmd = STRnew(); rcm->printcmd = STRnew(); return(rcm); } void RCMdestroy(RCMapObj *rcm) { STRdestroy(rcm->view); STRdestroy(rcm->displaycmd); STRdestroy(rcm->printcmd); free(rcm); } void RCMinit(RCMapObj *rcm) { STRinit(rcm->view); STRinit(rcm->displaycmd); STRinit(rcm->printcmd); } void RCMcpy(RCMapObj *dest, RCMapObj *orig) { STRcpy(dest->view, orig->view); STRcpy(dest->displaycmd, orig->displaycmd); STRcpy(dest->printcmd, orig->printcmd); } /* * Substitue filename for %s in zeline and return the command in "line", * */ static void RCMsubst_percent_s(RCMapObj *rcm, char *filename, char *line, char *zeline) { while (1) { if (*zeline=='\0') { *line = '\0'; return; } else if (*zeline == '%') { if (*(zeline+1) == 's') { strcpy(line, filename); line += strlen(filename); zeline+=2; } else { *line = *zeline; line++; zeline++; } } else { *line = *zeline; line++; zeline++; } } } /* * Construct a command line for displaying. */ void RCMdisplayCommand(RCMapObj *rcm, char *filename, char *line) { char *zeline; zeline = RCMgetDisplaycmd(rcm); RCMsubst_percent_s(rcm, filename, line, zeline); } /* * Construct a command line for printing. */ void RCMprintCommand(RCMapObj *rcm, char *filename, char *line) { char *zeline; zeline = RCMgetPrintcmd(rcm); RCMsubst_percent_s(rcm, filename, line, zeline); } /* * Find the item that contains "view" */ int RCMAviewSearch(RCMAarray *rcma, char *view) { int i; RCMapObj *temp; char viewstowage[64]; char *tempview, *cp; tempview = view; if ((cp = strchr(view, ' ')) != NULL) { strcpy(viewstowage, view); viewstowage[cp - view] = '\0'; tempview = viewstowage; } /*** Linear search. Ick. ***/ for (i=0; i< RCMAgetNumEntries(rcma); i++) { temp = RCMAgetEntry(rcma,i); if (strcasecmp(tempview, RCMgetView(temp))==0) return(i); } return(-1); } /* * Map: "view","display command","print command" */ boolean RCMAfromLine(RCMAarray *rcma, char *line) { char *cp; RCMapObj *rcm; char *view, *dcmd, *pcmd; int num; view = line; cp = strchr(line, ','); if (cp == NULL) return(FALSE); *cp = '\0'; dcmd = cp+1; cp = strchr(dcmd, ','); if (cp == NULL) return(FALSE); *cp = '\0'; pcmd = cp+1; if ((num = RCMAviewSearch(rcma, view)) >=0) rcm = RCMAgetEntry(rcma, num); else rcm = RCMnew(); RCMsetView(rcm, view); RCMsetDisplaycmd(rcm, dcmd); RCMsetPrintcmd(rcm, pcmd); if (num <0) { RCMAadd(rcma, rcm); RCMdestroy(rcm); } return(TRUE); } /* * Writes out the .gopherrc file. */ void RCMAtoFile(RCMAarray *rcma, FileIO *fio) { int i; RCMapObj *rcm; char tmpstr[512]; for (i = 0 ; icommands = RCMAnew(); rc->Bookmarks = NULL; rc->Home = NULL; rc->ChangedDefs = FALSE; rc->SearchBolding = TRUE; rc->ANSIprinter = FALSE; #ifdef SECURE_MAPS_GLOBALRC_ONLY SettingRCdefs = TRUE; #endif RCsetdefs(rc); #ifdef SECURE_MAPS_GLOBALRC_ONLY SettingRCdefs = FALSE; #endif return(rc); } static FileIO * rcopen(int flags) { char rcfilename[MAXPATHLEN]; FileIO *fio; #ifndef VMS char *home; home = getenv("HOME"); if (home == NULL) return(NULL); /** First, let's find out if there is a bookmark file **/ strcpy(rcfilename,home); /* Home directory */ strcat(rcfilename,"/.gopherrc"); #else strcpy(rcfilename,"sys$login:gopherrc"); #endif /* VMS */ fio = FIOopenUFS(rcfilename, flags, 0644); return(fio); } void RCfromFile(RCobj *rc, FileIO *rcfio) { char inputline[512]; while (FIOreadline(rcfio, inputline, sizeof(inputline))) { if (*inputline == '#') continue; ZapCRLF(inputline); if (strncasecmp(inputline, "bookmarks:", 9)==0) { if (RCgetBookmarkDir(rc) == NULL) RCinitBookmarkDir(rc, 32); GDfromLink(RCgetBookmarkDir(rc), rcfio, "localhost", 70, "","localhost"); GDsetTitle(RCgetBookmarkDir(rc), Gtxt("Bookmarks",67)); } else if (strncasecmp(inputline, "home:",5)==0) { if (RCgetHome(rc) == NULL) { RCsetHome(rc, GSnew()); GSfromLink(RCgetHome(rc), rcfio, "localhost", 70, "","localhost"); } } else if (strncasecmp(inputline, "searchbolding: ",15)==0) { if (strcasecmp(inputline+15, "yes")==0) RCsetSearchBolding(rc, TRUE); else RCsetSearchBolding(rc, FALSE); } else if (strncasecmp(inputline, "useansiprinter: ", 16) == 0) { if (strcasecmp(inputline+16, "yes") == 0) RCsetANSIprinter(rc, TRUE); else RCsetANSIprinter(rc, FALSE); #ifdef SECURE_MAPS_GLOBALRC_ONLY } else if (strncasecmp(inputline, "map: ", 5)==0 && (SettingRCdefs || !(SecureMode || NoShellMode))) { #else } else if (strncasecmp(inputline, "map: ", 5)==0) { #endif if (RCMAfromLine(rc->commands, inputline+5) == FALSE) { /** Error parsing **/ printf(Gtxt("Warning, bad line in gopherrc: %s\n",215), inputline); sleep(2); } } else ; } ; } /* * Permit key environement logicals on VMS: * Printer and pager for text files. * Telnet and tn3270 commands. * External HTML browser. * Set up other views appropriately for VMS via * gopher.rc or gopherremote.rc (defined in conf.h), * and via the User's gopherrc. */ void RCfromENV(RCobj *rc) { char tmpstr[512], Printer[128], PrinterP[128], Pager[128], PagerP[128]; boolean PrinterFlag = FALSE; if (getenv("GOPHER_PRINTER") != NULL) { PrinterFlag = TRUE; strcpy(Printer, getenv("GOPHER_PRINTER")); strcpy(PrinterP, Printer); } else { if(RCprintCommand(GlobalRC,"Text","",Printer)) { if (Printer[strlen(Printer)-1] == ' ') Printer[strlen(Printer)-1] = '\0'; } else strcpy(Printer, PRINTER_COMMAND); if(RCprintCommand(GlobalRC,"Text/plain","",PrinterP)) { if (PrinterP[strlen(PrinterP)-1] == ' ') PrinterP[strlen(PrinterP)-1] = '\0'; } else strcpy(PrinterP, PRINTER_COMMAND); } if (getenv("PAGER") != NULL) { sprintf(tmpstr, "Text,%s %%s,%s %%s", getenv("PAGER"),Printer); RCMAfromLine(rc->commands, tmpstr); sprintf(tmpstr, "Text/plain,%s %%s,%s %%s", getenv("PAGER"),PrinterP); RCMAfromLine(rc->commands, tmpstr); } else if (PrinterFlag) { if (RCdisplayCommand(GlobalRC,"Text","",Pager)) { if (Pager[strlen(Pager)-1] == ' ') Pager[strlen(Pager)-1] = '\0'; } else strcpy(Pager, PAGER_COMMAND); if (strncasecmp(Pager, "builtin", 7) == 0) sprintf(tmpstr, "Text,%s,%s %%s", Pager, Printer); else sprintf(tmpstr, "Text,%s %%s,%s %%s", Pager, Printer); RCMAfromLine(rc->commands, tmpstr); if(RCdisplayCommand(GlobalRC,"Text/plain","",PagerP)) { if (PagerP[strlen(PagerP)-1] == ' ') PagerP[strlen(PagerP)-1] = '\0'; } else strcpy(PagerP, PAGER_COMMAND); if (strncasecmp(PagerP, "builtin", 7) == 0) sprintf(tmpstr, "Text/plain,%s,%s %%s", PagerP, PrinterP); else sprintf(tmpstr, "Text/plain,%s %%s,%s %%s", PagerP, PrinterP); RCMAfromLine(rc->commands, tmpstr); } if (getenv("GOPHER_TELNET") != NULL) { sprintf(tmpstr, "Terminal/telnet,%s %%s,", getenv("GOPHER_TELNET")); RCMAfromLine(rc->commands, tmpstr); } if (getenv("GOPHER_TN3270") != NULL) { sprintf(tmpstr, "Terminal/tn3270,%s %%s,", getenv("GOPHER_TN3270")); RCMAfromLine(rc->commands, tmpstr); } if (getenv("GOPHER_HTML") != NULL) { sprintf(tmpstr, "text/html,%s,", getenv("GOPHER_HTML")); RCMAfromLine(rc->commands, tmpstr); } } /* * Process the User's .gopherrc file and read it into rc * Then call RCfromENV() for VMS */ void RCfromUser(RCobj *rc) { FileIO *rcfile; #ifndef VMS char *home; home = getenv("HOME"); if (home == NULL) return; #endif rcfile = rcopen(O_RDONLY); if (rcfile == NULL) { /*** Make the .gopherrc file ***/ if (!NoShellMode) { /* No point in telling a user with no shell about a file they cant get at! */ rcfile = rcopen(O_CREAT); FIOclose(rcfile); printf(Gtxt("Welcome to the wonderful world of Gopher!\n\n",1)); printf(Gtxt("Gopher has limitations on its use and comes without\n",2)); printf(Gtxt("a warranty. Please refer to the file 'Copyright' included\n",3)); printf(Gtxt("in the distribution.\n\n",4)); printf(Gtxt("Internet Gopher Information Client %s.%s patch%d (%s)\n",6), GOPHER_MAJOR_VERSION, GOPHER_MINOR_VERSION, PATCHLEVEL, GOPHER_NICKNAME); printf(Gtxt("Copyright (C) 1991-2000 by the Regents of the University of Minnesota\nCopyright (C) 2000-2005 John Goerzen and the gopher developers\n\n",5)); printf(Gtxt("Press RETURN to continue\n",7)); while ('\n' != getchar()) ; } /*NoShellMode*/ return; /*** No such file ***/ } else { RCfromFile(GlobalRC, rcfile); } FIOclose(rcfile); #ifdef VMS RCfromENV(rc); #endif } void RCreadGlobalRC(RCobj *rc) { FileIO *rcfile; if (RemoteUser) rcfile = FIOopenUFS(REMOTERC, O_RDONLY, 0); else rcfile = FIOopenUFS(GLOBALRC, O_RDONLY, 0); if (rcfile != NULL) { RCfromFile(rc, rcfile); FIOclose(rcfile); } } /* * Set up some useful definitions for RCfiles */ void RCsetdefs(RCobj *rc) { char tmpstr[512]; sprintf(tmpstr, "Text,%s,%s %%s", PAGER_COMMAND, PRINTER_COMMAND); RCMAfromLine(rc->commands, tmpstr); sprintf(tmpstr, "Text/plain,%s,%s %%s", PAGER_COMMAND, PRINTER_COMMAND); RCMAfromLine(rc->commands, tmpstr); sprintf(tmpstr, "Audio/basic,%s,", PLAY_COMMAND); RCMAfromLine(rc->commands, tmpstr); if (strncasecmp(IMAGE_COMMAND, "- none -", 8) == 0) sprintf(tmpstr, "Image,%s,", IMAGE_COMMAND); else sprintf(tmpstr, "Image,%s,%s %%s", IMAGE_COMMAND, PRINTER_COMMAND); RCMAfromLine(rc->commands, tmpstr); sprintf(tmpstr, "Terminal/telnet,%s %%s,", TELNET_COMMAND); RCMAfromLine(rc->commands, tmpstr); sprintf(tmpstr, "Terminal/tn3270,%s %%s,", TN3270_COMMAND); RCMAfromLine(rc->commands, tmpstr); sprintf(tmpstr, "text/html,%s,", HTML_COMMAND); RCMAfromLine(rc->commands, tmpstr); RCreadGlobalRC(rc); } void RCtoFile(RCobj *rc) { FileIO *rcfile; char rcfilename[512]; char oldrcfilename[512]; #ifndef VMS char *home; home = getenv("HOME"); if (home == NULL) return; #endif /* not VMS */ /* In NoShellMode we just stop writing of map: stuff */ if (SecureMode) return; /** First, let's find out if there is a rc file **/ #ifndef VMS strcpy(rcfilename,home); /* Home directory */ strcat(rcfilename,"/.gopherrc"); strcpy(oldrcfilename,home); strcat(oldrcfilename,"/.gopherrc~"); rcfile = FIOopenUFS(rcfilename, O_RDONLY, 0); if (rcfile != NULL) if (rename(rcfilename, oldrcfilename)<0) { CursesErrorMsg(Gtxt("Aborting gopher configuration save!!",216)); return; } FIOclose(rcfile); #else strcpy(rcfilename,"sys$login:gopherrc"); #endif rcfile = FIOopenUFS(rcfilename, O_WRONLY|O_CREAT|O_TRUNC, 0644); if (rcfile ==NULL) { #ifdef VMS fprintf(stderr,Gtxt("Can't write gopher configuration file!!",8)); #else CursesErrorMsg(Gtxt("Can't write gopher configuration file!!",8)); #endif return; } FIOwritestring(rcfile, "RCversion: 1.1\n"); if (!NoShellMode) RCMAtoFile(rc->commands, rcfile); if (!NoShellMode) { FIOwritestring(rcfile, "SearchBolding: "); if (RCsearchBolding(rc)) FIOwritestring(rcfile, "yes\n"); else FIOwritestring(rcfile, "no\n"); } if (!NoShellMode) { FIOwritestring(rcfile, "UseANSIprinter: "); if (RCuseANSIprinter(rc)) FIOwritestring(rcfile, "yes\n"); else FIOwritestring(rcfile, "no\n"); } if (RCgetHome(rc) != NULL) { FIOwritestring(rcfile, "\nhome:\n"); GStoLink(RCgetHome(rc), FIOgetfd(rcfile), FALSE); } if (RCgetBookmarkDir(GlobalRC) != NULL) { FIOwritestring(rcfile, "\nbookmarks:\n"); GDtoLink(RCgetBookmarkDir(GlobalRC), FIOgetfd(rcfile)); } FIOwritestring(rcfile, "\n"); FIOclose(rcfile); #ifdef VMS while (unlink("sys$login:gopherrc.;-1") == 0) ; /* purge/keep=1 */ rename("sys$login:gopherrc.;","sys$login:gopherrc.;1");/* reset version */ #endif } /* * This makes a display command for the client. * It returns FALSE if it finds a method of displaying the item * * It returns TRUE and fills line with a command if one is found */ boolean RCdisplayCommand(RCobj *rc, char *view, char *filename, char *line) { int num; num = RCMAviewSearch(rc->commands, view); if (num >=0) { RCMdisplayCommand(RCMAgetEntry(rc->commands, num), filename, line); return(TRUE); } else return(FALSE); } /* * This makes a display command for the client. * It returns FALSE if it finds a method of printing the item * * It returns TRUE and fills line with a command if one is found */ boolean RCprintCommand(RCobj *rc, char *view, char *filename, char *line) { int num; num = RCMAviewSearch(rc->commands, view); if (num >=0) { RCMprintCommand(RCMAgetEntry(rc->commands, num), filename, line); return(TRUE); } else return(FALSE); } /* * This function tests to see whether the global gopherrc file has changed... */ boolean RCisGlobalNew(void) { FileIO *fiolocal; FileIO *fioglobal; struct stat lbuf, gbuf; fiolocal = rcopen(O_RDONLY); if (fiolocal == NULL) return(FALSE); fioglobal = FIOopenUFS(GLOBALRC, O_RDONLY, 0644); if (fioglobal == NULL) { FIOclose(fiolocal); return(FALSE); } if (fstat(FIOgetfd(fiolocal), &lbuf)) { FIOclose(fiolocal); FIOclose(fioglobal); return(FALSE); } if (fstat(FIOgetfd(fioglobal), &gbuf)) { FIOclose(fiolocal); FIOclose(fioglobal); return(FALSE); } FIOclose(fioglobal); FIOclose(fiolocal); if (gbuf.st_mtime > lbuf.st_mtime) return(TRUE); else return(FALSE); } gopher-3.0.15/gopher/pager.h0000664000000000000000000000142310762617110012510 0ustar /* pager.h * Written by David Allen * Simple prototypes for functions in pager.c */ #define PAGER_H 1 void PagerHelp(CursesObj *cur); void PagerInitGlobals(void); void PagerTitles(CursesObj *cur, GopherObj *gs, int totalbytes); int PagePosAlloc(void); int PagePosRealloc(void); void PagePosFree(void); void PagerPercent(int bytes, int totalbytes); void PagerParseSearchstring(void); void PagerPrintLine(char *inputline); void PagerSeekPage(FILE *thefile, int gotopage, int *bytecount); void PagerNextPage(CursesObj *cur, FILE *thefile, char *theline, int *bytecount, int totalbytes); boolean PagerSearch(FILE *thefile, char *theline, int *bytecount, char *search); void PagerBuiltin(CursesObj *cur, GopherObj *gs); gopher-3.0.15/gopher/download.c0000664000000000000000000002531710762617110013224 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/01/08 20:57:49 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/download.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: download.c * Functions relating to downloading data ********************************************************************* * Revision History: * $Log: download.c,v $ * Revision 1.5 2002/01/08 20:57:49 jgoerzen * Modified to use HAVE_STRERROR * * Revision 1.4 2002/01/08 18:05:33 jgoerzen * * download.c: Added cast to long for some *printf's * * Revision 1.3 2001/01/03 22:27:44 s2mdalle * Several compiler warning fixes. * * Revision 1.2 2000/12/27 21:23:31 s2mdalle * Added a few #include's for compilation warnings, and changed a few * long args within sprintf's %d => %ld * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.26 1995/11/03 21:18:16 lindner * ANSIfication * * Revision 3.25 1994/11/17 18:05:52 lindner * Update text string numbers * * Revision 3.24 1994/11/17 18:02:28 lindner * Add estimates for download time * * Revision 3.23 1994/10/13 05:29:38 lindner * Compiler complaint fixes * * Revision 3.22 1994/07/25 15:01:23 lindner * Add parens to illegal chars * * Revision 3.21 1994/07/25 02:54:18 lindner * VMS updates * * Revision 3.20 1994/07/03 23:11:23 lindner * Add internal download feature * * Revision 3.19 1994/05/17 05:47:54 lindner * Massive internationalization change * * Revision 3.18 1994/05/14 04:13:39 lindner * Internationalization... * * Revision 3.17 1994/05/06 02:26:31 lindner * Fix for binhex downloads on vms and use dump command for binary files * * Revision 3.16 1994/04/25 20:48:19 lindner * Proper casts * * Revision 3.15 1994/04/01 04:48:10 lindner * Use FIOsystem() for downloading * * Revision 3.14 1993/11/29 01:10:26 lindner * Do not let user attempt to download an 'i' (Info) menu item. (Beckett) * * Revision 3.13 1993/10/26 18:44:12 lindner * Fix for people trying to download the help file * * Revision 3.12 1993/10/07 05:11:00 lindner * Fixed spawned process error checking on Unix, add third arg to Save_File * * Revision 3.11 1993/09/21 03:38:50 lindner * change getcwd to getwd * * Revision 3.10 1993/09/03 03:30:40 lindner * The test for spawn success should be !system(). Restore initial * default directory, and related mods, to circumvent problems in the * logic of this module. These are preliminary mods, simply to make it * actually work. They do not yet cache temporary files under every * circumstance in which the 'D' command might be used, but do for the * typical patterns of use. (F.Macrides) * * Revision 3.9 1993/08/16 17:57:58 lindner * Fix for sys$scratch for VMS * * Revision 3.8 1993/08/09 20:39:55 lindner * fix for VMS * * Revision 3.7 1993/07/30 17:36:54 lindner * More secure download in /tmp * * Revision 3.6 1993/07/29 17:21:05 lindner * eliminate non-used variables * * Revision 3.5 1993/07/23 04:36:03 lindner * LocalFile mods * * Revision 3.4 1993/07/20 23:11:25 lindner * downloading now caches the downloaded file too * * Revision 3.3 1993/04/30 16:01:19 lindner * kermit binary mods * * Revision 3.2 1993/03/24 16:57:37 lindner * Fixes for new SaveFile() * * Revision 3.1.1.1 1993/02/11 18:02:57 lindner * Gopher+1.2beta release * * Revision 1.4 1993/01/14 21:59:30 lindner * Filenames generated for zmodem now are a bit better.. should work better * on VMS * * Revision 1.3 1993/01/12 20:42:04 lindner * Added stuff for VMS, also changed text download for VMS from * cat to type * * Revision 1.2 1993/01/11 19:26:56 lindner * Mods to make it work under VMS * * Revision 1.1 1993/01/07 22:47:20 lindner * Initial revision * * *********************************************************************/ #include "gopher.h" #include "Stat.h" #include "download.h" #ifdef HAVE_TIME_H # include #endif /* HAVE_TIME_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_SYS_PARAM_H # include #endif #include "fileio.h" /* For FIOsystem() */ static char *DLnames[] = { "Zmodem", "Ymodem", "Xmodem-1K", "Xmodem-CRC", "Kermit", "Text", NULL }; static char *DLcmds[] = { /* Cmds for ascii files: FILE */ "sz ", "sb ", "sx -k ", "sx ", "kermit -q -s ", #ifdef VMS "type ", #else "cat -v ", #endif NULL }; static char *DLcmdB[] = { /* Cmds for binary files */ "sz ", "sb ", "sx -k ", "sx ", "kermit -q -i -s ", #ifdef VMS "dump ", #else "cat -v ", #endif NULL }; void Download_file(GopherObj *gs) { int choice; char tmpfilename[512], *cp; char command[512]; char *curcwd; int start, end; struct stat buf; #if defined(HAVE_GETCWD) && !defined(HAVE_GET_CURRENT_DIR_NAME) curcwd = (char *) malloc(MAXPATHLEN + 2); if (!curcwd) { CursesErrorMsg("Out of memory."); return; } #endif switch (GSgetType(gs)) { case A_DIRECTORY: case A_CSO: case A_ERROR: case A_INDEX: case A_TELNET: case A_TN3270: case A_INFO: case A_APP: CursesErrorMsg(Gtxt("Sorry, can't download that!",150)); return; } choice = CURChoice(CursesScreen, GSgetTitle(gs), DLnames, Gtxt("Choose a download method",74), -1); if (choice == -1) return; /*** Get a reasonable tmp file name ***/ cp = GSgetPath(gs); if (cp != NULL) { if ((cp = strrchr(cp,'/')) != NULL) strcpy(tmpfilename, cp+1); else strcpy(tmpfilename,GSgetTitle(gs)); } else { strcpy(tmpfilename,GSgetTitle(gs)); } #ifdef VMS VMSfile(tmpfilename); #else UNIXfile(tmpfilename); #endif for (cp=tmpfilename; *cp != '\0'; cp++) { switch (*cp) { case ' ': case '\"': case '\'': case '(': case ')': *cp = '_'; } } #ifdef HAVE_GETCWD getcwd(curcwd, MAXPATHLEN); #else #ifdef HAVE_GET_CURRENT_DIR_NAME curcwd = get_current_dir_name(); #else getwd(curcwd); #endif #endif /* HAVE_GET_CURRENT_DIR_NAME */ #ifdef VMS if (chdir("SYS$SCRATCH")!=0) { CursesErrorMsg(Gtxt("Can't write to SYS$SCRATCH!",69)); return; } #else if (chdir("/tmp")!=0) { CursesErrorMsg(Gtxt("Can't write to the /tmp directory!",70)); return; } #endif /** Make sure we don't overwrite an existing file ... **/ while (stat(tmpfilename, &buf) == 0) { int len = strlen(tmpfilename); if (tmpfilename[len-1] == '-') { tmpfilename[len] = tmpfilename[len] + 1; } else strcat(tmpfilename, "-1"); } /*** Retrieve the file ***/ Save_file(gs, tmpfilename, NULL); /*** Check to see which method they're using to download ***/ if (stat(tmpfilename, &buf) < 0) { CursesErrorMsg(Gtxt("File didn't transfer successfully",88)); return; } /*** Now start the download ... ***/ if (GSisText(gs, NULL)) strcpy(command, DLcmds[choice]); else strcpy(command, DLcmdB[choice]); strcat(command, tmpfilename); CURexit(CursesScreen); printf(Gtxt(" Downloading %d bytes",233), (int)buf.st_size); printf(Gtxt(" 1200bps: %ld minutes\n",234), (long) (buf.st_size/(120*60))); printf(Gtxt(" 2400bps: %ld minutes\n",235), (long) (buf.st_size/(240*60))); printf(Gtxt(" 14400bps: %ld minutes\n\n",236), (long) (buf.st_size/(1440*60))); if (choice == 5) { printf(Gtxt("Start your capture now...\n\n",171)); printf(Gtxt("Press when you're ready\n",121)); fflush(stdout); getchar(); } else { printf(Gtxt("Start your download now...\n",172)); fflush(stdout); } start = time(NULL); if (FIOsystem(command)) printf(Gtxt("\nDownload could not be completed, sorry... \n",183)); else { end = time(NULL); if (end == start) end++; printf(Gtxt("\nDownload Complete. %d total bytes, %d bytes/sec\n",182), (int)buf.st_size, ((int)buf.st_size)/(end-start)); } unlink(tmpfilename); chdir(curcwd); printf(Gtxt("Press to continue",121)); fflush(stdout); getchar(); CURenter(CursesScreen); #if defined(HAVE_GETCWD) || !defined(HAVE_GET_CURRENT_DIR_NAME) free(curcwd); #endif } #ifndef VMS #include "Dirent.h" void BuiltinDownload(char *dirname) { char *names[99]; DIR *thedir; struct dirent *entry = NULL; struct stat buf; int fcount=0, choice; char *tmppath; GopherObj *gs; #if defined(HAVE_GETCWD) && !defined(HAVE_GET_CURRENT_DIR_NAME) tmppath = (char*)malloc(MAXPATHLEN * 3 + 2); if ( !tmppath ) { CursesErrorMsg("Cannot allocate memory"); return; } #endif thedir = opendir(dirname); chdir(dirname); if (thedir == NULL) { CursesErrorMsg("Cannot Open the directory"); return; } for (entry = readdir(thedir); entry != NULL; entry = readdir(thedir)) { stat(entry->d_name, &buf); if (*(entry->d_name) != '.' && !S_ISDIR(buf.st_mode)) names[fcount++] = strdup(entry->d_name); } names[fcount] = NULL; choice = CURChoice(CursesScreen, "Choose a File to Download", names, "Choose a File to Download", 0); if (choice ==-1) return; gs = GSnew(); GSplusnew(gs); GSsetPath(gs, names[choice]); #ifdef HAVE_GETCWD getcwd(tmppath,MAXPATHLEN); #else #ifdef HAVE_GET_CURRENT_DIR_NAME tmppath = get_current_dir_name(); if ( sizeof(tmppath) <= (strlen(tmppath) + strlen(names[choice]) + 1) ) tmppath = realloc(tmppath,sizeof(tmppath) + strlen(names[choice] + 1)); if ( !tmppath ) { CursesErrorMsg("Out of memory"); return; } #else getwd(tmppath); #endif #endif strcat(tmppath, "/"); strcat(tmppath, names[choice]); GSsetLocalFile(gs, tmppath); GSsetLocalView(gs, "application/octet-stream"); GSsetTitle(gs, names[choice]); GSsetType(gs, '9'); GSaddView(gs, "application/octet-stream", "", 0); Download_file(gs); for (fcount = 0; names[fcount] != NULL;) { free(names[fcount++]); } #if defined(HAVE_GETCWD) || !defined(HAVE_GET_CURRENT_DIR_NAME) free(tmppath); #endif } #else void BuiltinDownload() { ; } #endif gopher-3.0.15/gopher/vmsopts/0000775000000000000000000000000010762617110012754 5ustar gopher-3.0.15/gopher/vmsopts/tcpware_decc.opt0000664000000000000000000000006410762617110016123 0ustar tcpware:ucx$ipc_shr.exe/share sys$share:vaxcrtl/lib gopher-3.0.15/gopher/vmsopts/netlib_vaxc.opt0000664000000000000000000000012310762617110015772 0ustar identification = "NETLIB-2.0x" netlib_shrxfr/shareable sys$share:vaxcrtl/shareable gopher-3.0.15/gopher/vmsopts/wollongong_decc.opt0000664000000000000000000000007210762617110016642 0ustar twg$tcp:[netdist.lib]twglib.olb/lib sys$share:vaxcrtl/lib gopher-3.0.15/gopher/vmsopts/wollongong_vaxc.opt0000664000000000000000000000010010762617110016675 0ustar twg$tcp:[netdist.lib]twglib.olb/lib sys$share:vaxcrtl.exe/share gopher-3.0.15/gopher/vmsopts/cmuip_decc.opt0000664000000000000000000000010710762617110015571 0ustar identification="CMUIP-2.0x" sys$library:neterror sys$share:vaxcrtl/lib gopher-3.0.15/gopher/vmsopts/tcpware_vaxc.opt0000664000000000000000000000006010762617110016162 0ustar tcpware:ucx$ipc/lib sys$share:vaxcrtl.exe/share gopher-3.0.15/gopher/vmsopts/multinet_vaxc.opt0000664000000000000000000000007710762617110016366 0ustar multinet:multinet_socket_library/share sys$share:vaxcrtl/share gopher-3.0.15/gopher/vmsopts/ucx_decc.opt0000664000000000000000000000007010762617110015252 0ustar sys$library:ucx$ipc_shr.exe/share sys$share:vaxcrtl/lib gopher-3.0.15/gopher/vmsopts/cmuip_vaxc.opt0000664000000000000000000000011510762617110015633 0ustar identification="CMUIP-2.0x" sys$library:neterror sys$share:vaxcrtl.exe/share gopher-3.0.15/gopher/vmsopts/ucx_vaxc.opt0000664000000000000000000000006410762617110015320 0ustar sys$library:ucx$ipc/lib sys$share:vaxcrtl.exe/share gopher-3.0.15/gopher/vmsopts/netlib_decc.opt0000664000000000000000000000011510762617110015730 0ustar identification = "NETLIB-2.0x" netlib_shrxfr/shareable sys$share:vaxcrtl/lib gopher-3.0.15/gopher/vmsopts/multinet_decc.opt0000664000000000000000000000007510762617110016321 0ustar multinet:multinet_socket_library/share sys$share:vaxcrtl/lib gopher-3.0.15/gopher/upload.c0000664000000000000000000000654210762617110012700 0ustar #include "gopher.h" #include "fileio.h" #ifdef VMS #include #else #include #endif #ifdef HAVE_TIME_H # include #endif /* HAVE_TIME_H */ static char *DLnames[] = { "Zmodem", "Ymodem", "Xmodem-CRC", "Kermit", "Text", "WRQ - Reflection", NULL }; static char *textorbin[] = { "Binary", "ASCII", NULL }; static char *ULtextcmds[] = { "rz ", "rb -a ", "rx -ac ", "kermit -q -r ", "false ", "unixlnk2", NULL }; static char *ULbincmds[] = { "rz -b ", "rb ", "rx ", "kermit -q -r -i", "false ", "unxlink2", NULL }; extern Requestitem *REQitemnew(void); void BuiltinUploadfile(void) { Requestitem *ulmenu[6]; char filename[80]; boolean istext; int ulprotocol; char cmdline[512]; boolean iszmodem; int start, end; struct stat buf; filename[0] = '\0'; ulmenu[0] = REQitemnew(); ulmenu[0]->prompt = "Supply file information for Upload"; ulmenu[0]->thing = CUR_LABEL; ulmenu[1] = REQitemnew(); ulmenu[1]->prompt = ""; ulmenu[1]->thing = CUR_LABEL; ulmenu[2] = REQitemnew(); ulmenu[2]->thing = CUR_CHOICE; ulmenu[2]->prompt = "Download Protocol"; ulmenu[2]->choices = DLnames; ulmenu[2]->chooseitem = 0; ulmenu[3] = REQitemnew(); ulmenu[3]->thing = CUR_CHOICE; ulmenu[3]->prompt = "Type of File"; ulmenu[3]->choices = textorbin; ulmenu[3]->chooseitem = 0; ulmenu[4] = REQitemnew(); ulmenu[4]->prompt = "Save file as"; ulmenu[4]->thing = CUR_PROMPT; ulmenu[4]->stowage = filename; ulmenu[5] = NULL; if (!CURrequester(CursesScreen, "Upload File", ulmenu)) { ulprotocol = ulmenu[2]->chooseitem; istext = ulmenu[3]->chooseitem; iszmodem = (ulprotocol == 0); if (!iszmodem && filename[0] == '\0') { CursesErrorMsg("You must supply a filename"); return; } if (istext) { strcpy(cmdline, ULtextcmds[ulprotocol]); } else { strcpy(cmdline, ULbincmds[ulprotocol]); } if (!iszmodem) { strcat(cmdline, filename); } CURexit(CursesScreen); start = time(NULL); if (ulprotocol == 4) { /* Text */ FileIO *fio; char inputline[256]; printf("Send your text now, enter CTRL-D or a single period to complete upload\n"); fio = FIOopenUFS(filename, O_WRONLY|O_CREAT, 0600); if (fio == NULL) { printf("Couldn't open the file %s for writing\n", filename); CURenter(CursesScreen); return; } while(fgets(inputline,sizeof(inputline), stdin)) { ZapCRLF(inputline); if (strcmp(inputline, ".") == 0) break; FIOwritestring(fio, inputline); } FIOclose(fio); } else { printf("Executing the following command\n%s\n",cmdline); if (FIOsystem(cmdline)) printf("Upload failed, sorry...\n"); } end = time(NULL); if (stat(filename, &buf) < 0) printf("Upload failed, try again...\n"); else { printf(Gtxt("Upload complete. %d total bytes, %d bytes/sec\n",182), (int)buf.st_size, ((int)buf.st_size)/(end-start)); } printf(Gtxt("Press to continue",121)); fflush(stdout); getchar(); CURenter(CursesScreen); } return; } gopher-3.0.15/gopher/ourutils.c0000664000000000000000000014762210762617110013307 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.6 $ * $Date: 2002/01/10 17:41:40 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/ourutils.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992,1993 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: ourutils.c * stuff that doesn't really fit anywhere else. ********************************************************************* * Revision History: * $Log: ourutils.c,v $ * Revision 1.6 2002/01/10 17:41:40 jgoerzen * Made the text file handling better. * * Revision 1.5 2002/01/10 17:23:11 jgoerzen * * gopher: Removed processing of . at end of text files. It would stop * downloading when it would see ".\n" in a file. Will need to modify * gopher/ourutils.c:937 area to deal with this properly -- ignore * .\n if it's at the end of the file, otherwise preserve it. * Reported by Ashok Aiyar * * Revision 1.4 2002/01/08 17:36:14 jgoerzen * Finally builds! * * Changes: * * * config.h.in: rebuilt by autoheader * * * configure: rebuilt by autoconf * * * configure.in: * * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * * Added checkes for term.h, re_comp.h, regex.h * * * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * * * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * * Use REGEXLIBS * * * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * * * object/GSgopherobj.c: Removed #include, now use * "Regex.h" that has proper regex determining logic * * * object/Regex.h: Moved regex.h include to here. Make it conditional * based on configure test. Add conditional re_comp.h include. * * Revision 1.3 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.2 2001/01/03 22:31:08 s2mdalle * Inclusion of new header file. * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.77 1995/11/03 21:18:21 lindner * ANSIfication * * Revision 3.76 1995/11/03 20:50:51 lindner * Coen: fixes.. * * Revision 3.75 1995/04/15 07:10:13 lindner * New control C methods, CTRL-X mods * * Revision 3.74 1995/03/14 16:08:41 lindner * TPU fix * * Revision 3.73 1995/03/09 05:27:23 lindner * F.Macrides 08-Mar-1995: Use strncasecmp() for getting the AskLs value * in AskBlock(). * * F.Macrides 02-Mar-1995: Allow %s to be at the end of 'builtin' when * defining a viewer. * * Revision 3.72 1995/01/25 23:10:07 lindner * Remove hard limit of 5 AskL items per form * * Revision 3.71 1994/12/03 01:55:43 lindner * JL Wilkinson 16-Jul-1994 Merged in TGV's syslog() functions to allow * the CLIENT_LOGGER and TELNET_TRACE functionality to work with * Multinet. Not tested against other VMS TCP/IP agents, and *NOT * SUPPORTED* thru TGV -- please don't anybody ask TGV for help in using * this. Somebody who wants to use it can Email me or the * VMSGopher-L@trln.lib.unc.edu group and I'll try to assist them for * MULTINET only (JLW@psulias.psu.edu). Basic documentation is in * * Added Lance's post-pager RETURN synonyms. * * Indicate 'D'ownload as an option on exit from the pager in SecureMode * and NoShellMode. * * Revision 3.70 1994/10/24 22:14:38 lindner * Add pdf type * * Revision 3.69 1994/10/13 05:30:38 lindner * Compiler complaint fixes * * Revision 3.68 1994/09/29 19:25:57 lindner * More restrictive Unix file name filter * * Revision 3.67 1994/08/19 16:53:29 lindner * Add casts for malloc calls * * Revision 3.66 1994/07/25 02:55:17 lindner * Secure mode mods * * Revision 3.65 1994/07/19 20:18:36 lindner * Remove CLIENT_LOGGER, Add default language choice * * Revision 3.64 1994/07/03 23:11:26 lindner * Add internal download feature * * Revision 3.63 1994/06/29 07:04:41 lindner * Mods for A_APP and builtin upload * * Revision 3.62 1994/06/09 04:11:07 lindner * Added Gerd.Boehm@physik.uni-regensburg.de patch for off-by-one line * counts in AskL blocks. * * Revision 3.61 1994/06/03 06:11:46 lindner * Fix for big bad cso dashes * * Revision 3.60 1994/05/19 14:08:04 lindner * use fast malloc on VMS VAXC * * Revision 3.59 1994/05/17 05:48:03 lindner * Massive internationalization change * * Revision 3.58 1994/05/14 04:13:46 lindner * Internationalization... * * Revision 3.57 1994/04/29 15:13:17 lindner * Fix for items with multiple AskL items * * Revision 3.56 1994/04/25 18:40:05 lindner * Fix for uninited variable i * * Revision 3.55 1994/04/25 03:37:43 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.54 1994/04/13 19:14:03 lindner * AskL modifications * * Revision 3.53 1994/03/08 20:38:28 lindner * Fix for VMS compilation * * Revision 3.52 1994/03/08 15:55:16 lindner * gcc -Wall fixes * * Revision 3.51 1994/03/08 03:25:58 lindner * Fix for big bad telnet bug, additions for secure process i/o * * Revision 3.50 1994/03/04 23:31:32 lindner * Fix for askblock from beckett * * Revision 3.49 1994/02/20 16:32:58 lindner * Modify routines to use fileio routines for reading text files * * Revision 3.48 1993/12/28 17:33:00 lindner * filter out more VMS characters * * Revision 3.47 1993/11/29 01:12:26 lindner * In Save_file(), disallow saving of type since this is fetched as a * set of indexed fields instead of as a savable file. Also disallow * saving of info and error types since there's nothing to save. (Wolfe, * Beckett, Macrides) * * In Choose_View(), add case for A_MOVIE. (Macrides) * * Revision 3.46 1993/11/03 03:50:01 lindner * More fixes for VMSrecords * * Revision 3.45 1993/11/02 21:17:44 lindner * Better client side logging code * * Revision 3.44 1993/10/27 18:52:17 lindner * Simplify VMS fixed/variable file code * * Revision 3.43 1993/10/26 18:22:43 lindner * Mucho changes for VMS variable length records * * Revision 3.42 1993/10/22 20:33:17 lindner * Fixed bad code in Save_file() for choosing view (Fote) * * Revision 3.41 1993/10/22 20:06:46 lindner * Add optional client logging * * Revision 3.40 1993/10/11 17:20:43 lindner * Fix for data/time stripping, vms multidot files, no case comparision for builtin * * Revision 3.39 1993/10/07 05:08:22 lindner * In Choose_View(), remove unreachable statement. * * In AskBlock(), allocate memory for the form based on screen width. * * In Save_file(), choose a view BEFORE opening the file -- user may * change mind and cancel, which left a zero-length file previously. * * In Save_file(), check to see if a view has already been chosen. This * change requires that Save_file() have a third argument. Any call to * Save_file() will now need a third argument. The third argument should * be a pointer to the chosen view or NULL to indicate that one has yet to * be chosen. * * In GSdisplay(), add "view" as the third argument to the two "new" * Save_file() calls to prevent Save_file() from asking the user to choose * a view. It is redundant in both cases. * * Revision 3.38 1993/09/29 22:47:21 lindner * Fix for AskBlock memory cruft * * Revision 3.37 1993/09/29 21:30:29 lindner * Fix for memory probs with ask blocks * * Revision 3.36 1993/09/29 20:49:42 lindner * Remove dead code, fix for vms mail * * Revision 3.35 1993/09/26 09:20:54 lindner * Change to use GSmail() * * Revision 3.34 1993/09/22 19:57:52 lindner * fix for off by one and Select: * * Revision 3.33 1993/09/21 01:46:02 lindner * Implement all remaining ASK block items.. * * Revision 3.32 1993/09/18 04:44:23 lindner * Additions to fix caching of Multiple view items * * Revision 3.31 1993/09/18 03:29:02 lindner * Mucho fixes for ask block parsing.. * * Revision 3.30 1993/09/11 05:12:41 lindner * Many ask block fixes * * Revision 3.29 1993/09/08 05:23:19 lindner * Implement Builtin pager.. * * Revision 3.28 1993/09/08 01:12:33 lindner * Add support for HTML and MIME on the menu displays * * Revision 3.27 1993/09/01 21:47:37 lindner * Fix for compiler error on Alpha * * Revision 3.26 1993/08/19 20:51:52 lindner * secure patch from mitra * * Revision 3.25 1993/08/19 20:30:39 lindner * Fix problem with selecting ask item more than once * * Revision 3.24 1993/08/19 20:22:56 lindner * Mitra's Debug patch * * Revision 3.23 1993/08/16 18:01:10 lindner * Fix for VMSfile, mods for DEC alpha VMS * * Revision 3.22 1993/08/16 17:58:24 lindner * Removed REMOTEUSER ifdefs * * Revision 3.21 1993/08/06 14:39:57 lindner * One more small security patch * * Revision 3.20 1993/08/05 20:40:43 lindner * Added warning message.. * * Revision 3.19 1993/08/04 22:07:23 lindner * Use /bin/mail instead of ucbmail * * Revision 3.18 1993/08/03 04:43:59 lindner * Fix for VMS unresolved variables * * Revision 3.17 1993/07/30 17:31:56 lindner * Mods to support AskP:, AskL: * * Revision 3.16 1993/07/29 17:20:19 lindner * eliminate non-used variables * * Revision 3.15 1993/07/27 06:14:17 lindner * Bug fix, use readrecvbuf, not readn * * Revision 3.14 1993/07/27 05:28:57 lindner * Mondo Debug overhaul from Mitra * * Revision 3.13 1993/07/27 02:04:13 lindner * More comments * * Revision 3.12 1993/07/26 20:30:05 lindner * fix memory usage * * Revision 3.11 1993/07/26 15:35:28 lindner * Fix for Unixfile to remove parens * * Revision 3.10 1993/07/23 04:38:43 lindner * Mods to make client view selection pretty * * Revision 3.9 1993/07/20 23:14:59 lindner * Mods to cache askdata.. * * Revision 3.8 1993/07/07 19:43:42 lindner * Added TPU support for pager in VMS * * Revision 3.7 1993/06/29 06:18:52 lindner * recasting MIME types * * Revision 3.6 1993/04/15 21:27:26 lindner * NOMAIL option, Remote user stuff, and bug in Ask * * Revision 3.5 1993/03/26 19:44:36 lindner * Fix for CSO stuff and saving binary files * * Revision 3.4 1993/03/24 17:01:27 lindner * Major changes to the way things are displayed/saved * * Revision 3.3 1993/03/18 23:32:41 lindner * Added Note: support and default values to AskBlock * * Revision 3.2 1993/02/19 21:12:16 lindner * Generalized on gopher+ stuff, strip long filenames to reasonable length * * Revision 3.1.1.1 1993/02/11 18:02:58 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:37:50 lindner * Much new in the way of display routines. * *********************************************************************/ #include "gopher.h" #include "Stdlib.h" #include "util.h" #ifndef VMS #include #else #include #endif #ifdef mips char *getenv(); #endif #include "Debug.h" #include "fileio.h" #include "Malloc.h" #include "Locale.h" #include "String.h" #include "ourutils.h" #include #ifdef HAVE_TERM_H #include #endif void GSprompter(GopherObj *gs, char *view, char *command); int outchar(int c) { /** output the given character. From tputs... **/ /** Note: this CANNOT be a macro! **/ putc(c, stdout); return(c); } /* * Function that twirls on the screen.. * */ int twirl(void) { static int twirlnum = 0; static char *twirls = "-/|\\"; addch('\b'); addch(*(twirls + (twirlnum++ % 4 ))); refresh(); return(0); } /* ** This procedure sends a file through the mail. */ void GSmail(GopherObj *gs) { char *Filename = GSgetLocalFile(gs); char *Realname = GSgetTitle(gs); static char *SaveName = NULL; char command[512]; FileIO *infile, *mailit; char buf[512]; #ifdef VMS char MailAddress[512]; #endif if (SaveName==NULL) { if ((SaveName = (char *) malloc(sizeof(char)*256)) == NULL) perror("Out of memory!"); *SaveName = '\0'; } if (CURGetOneOption(CursesScreen, Realname, Gtxt("Mail current document to:",105), SaveName)<0) return; if (*SaveName == '\0') return; /* * You should be very careful when you add characters to this list.. * * It could create a nasty security hole! */ #define ACHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789%.@!-_" if (SecureMode || NoShellMode) if ( strspn(SaveName, ACHARS) != strlen(SaveName)|| *SaveName == '-') { Debugmsg("mail_file - beep - bad char") puts(CURgetBell(CursesScreen)); fflush(stdout); Draw_Status(Gtxt("Address syntax rejected...",65)); refresh(); return; } if (strchr(Realname, '\"') != NULL) Realname = Gtxt("Gopher File",91); Draw_Status(Gtxt("Mailing File...",106)); refresh(); #ifdef VMS /* encase any address with '@' in double-quotes and add transport */ /* if the user hasn't done it (based on code from Earl Fogel) */ if ((strchr(SaveName, '@') != NULL) && (strchr(SaveName, '\"') == NULL)) sprintf(MailAddress, MAIL_ADRS, SaveName); else strcpy(MailAddress, SaveName); sprintf(command, "%s/subject=\"%.70s\" %s %s", MAIL_COMMAND, Realname, Filename, MailAddress); CURexit(CursesScreen); printf(Gtxt("Mailing file to %s...",107), MailAddress); FIOsystem(command); CURenter(CursesScreen); #else sprintf(command, "%s %s", MAIL_COMMAND, SaveName); infile = FIOopenUFS(Filename, O_RDONLY, 0); mailit = FIOopenCmdline(command, "w"); if (mailit == NULL || infile == NULL) { CursesErrorMsg(Gtxt("System problem, unable to mail",173)); return; } if (strlen(Realname) > 70) Realname[70] = '\0'; FIOwritestring(mailit, "Subject: "); FIOwritestring(mailit, Realname); FIOwritestring(mailit, "\n\n"); while (FIOreadline(infile, buf, sizeof(buf))) { twirl(); FIOwritestring(mailit, buf); } FIOclose(mailit); FIOclose(infile); #endif } /* * This fcn allows one to choose a view out of a unlimited size list * returns false if fails */ #ifndef DEFAULT_LANG /* should be set in conf.h, but just in case */ #define DEFAULT_LANG "En_US" /* English (US) */ #endif char * Choose_View(GopherObj *gs) { int viewno; static char viewnlang[64]; char *view; if (GSisGplus(gs)) { GSgetginfo(gs, TRUE); if (GSgetNumViews(gs) >1) { int choice, default_choice = -1; int langChoice = -1, viewChoice = -1; char *default_lang = Gtxt(DEFAULT_LANG, 222); char **views = (char **) malloc((1 + GSgetNumViews(gs)) * sizeof(char *)); char **choices = (char **) malloc((1 + GSgetNumViews(gs)) * sizeof(char *)); if ( (views == NULL) || (choices == NULL) ) return NULL; for (viewno=0; viewno = 0) default_choice = viewChoice; else if (langChoice >= 0) default_choice = langChoice; else default_choice = 0; } choices[viewno] = NULL; choice = CURChoice(CursesScreen, GSgetTitle(gs), choices, Gtxt("Choose a document type",73), default_choice); Debug("Choice was %d\n", choice); if (choice == -1) return(NULL); sprintf(viewnlang, "%s", views[choice]); for (viewno = 0; viewno stowage = (char *) malloc(sizeof(char) * COLS); temp->stowage[0] = '\0'; temp->choices = NULL; temp->prompt = NULL; return(temp); } void REQitemdestroy(Requestitem *req) { int j; if (req->stowage != (char*) NULL) free(req->stowage); if (req->prompt != (char*) NULL) free(req->prompt); if (req->choices != (char**) NULL) { for (j=0; req->choices[j] != (char*) NULL; j++) free(req->choices[j]); free(req->choices); } free(req); } /* * Crude implementation of the ASK block stuff. */ char ** AskBlock(GopherObj *gs) { int Asknum, reqnum, AskLs = 0; Blockobj *bl; Requestitem **items; char **asktypes; char **responses = NULL; char askline[1024]; char *defaultval; int i; GSgetginfo(gs, TRUE); bl = GSfindBlock(gs, "ASK"); if (bl == NULL) return(NULL); /** Find out how many ASKL items we have... **/ for (Asknum=0; Asknum < BLgetNumLines(bl); Asknum++) { if (strncasecmp(BLgetLine(bl, Asknum), "AskL:", 5) == 0) AskLs++; } /** Can't guess how many askl things we'll have.. **/ items = (Requestitem **) malloc(sizeof(Requestitem*)* (BLgetNumLines(bl) + (AskLs * 10) + 1)); asktypes = (char **) malloc(sizeof(char*) * (BLgetNumLines(bl) + (AskLs * 10) + 1)); reqnum = 0; for (Asknum=0; Asknum prompt = strdup(""); items[reqnum]->thing = CUR_LABEL; asktypes[reqnum] = strdup("Note:"); continue; } *(askprompt+1) = '\0'; askprompt+=2; /*** Zap the tabs, and load it up.. ***/ cp = strchr(askprompt, '\t'); if (cp != NULL) { defaultval = cp+1; *cp = '\0'; } else defaultval = NULL; asktypes[reqnum] = strdup(askline); items[reqnum]->prompt = strdup(askprompt); if (strncasecmp(askline, "Note:", 5) == 0) items[reqnum]->thing = CUR_LABEL; else if (strncasecmp(askline, "Choose:", 7) == 0) { int cnum = 0; items[reqnum]->thing = CUR_CHOICE; items[reqnum]->chooseitem = 0; /*** CURChoice() has a limit of 99 choices ***/ items[reqnum]->choices = (char**) malloc(sizeof(char*)*100); /*** add list of choices to struct **/ while ((cp = strchr(defaultval, '\t')) != NULL) { *cp = '\0'; items[reqnum]->choices[cnum++] = strdup(defaultval); defaultval = cp+1; } if (defaultval != NULL) items[reqnum]->choices[cnum++] = strdup(defaultval); items[reqnum]->choices[cnum] = NULL; } else if (strncasecmp(askline, "Select:", 7) == 0) { items[reqnum]->thing = CUR_CHOICE; items[reqnum]->chooseitem = 0; items[reqnum]->choices = (char**) malloc(sizeof(char*)*3); cp = strrchr(items[reqnum]->prompt, ':'); if (cp != NULL) { *cp = '\0'; cp++; if (*cp == '1') items[reqnum]->chooseitem = 1; } items[reqnum]->choices[0] = strdup(Gtxt("No",111)); items[reqnum]->choices[1] = strdup(Gtxt("Yes",180)); items[reqnum]->choices[2] = NULL; } else if (strncasecmp(askline, "AskP:", 5)==0) items[reqnum]->thing = CUR_PASSWD; else if (strncasecmp(askline, "Choosef:", 8) == 0) items[reqnum]->thing = CUR_FNAME; else if (strncasecmp(askline, "AskL:", 5)==0){ int x; items[reqnum]->thing = CUR_LABEL; /** Add a bunch more... **/ for (x=0; x < 10; x++) { reqnum++; items[reqnum] = REQitemnew(); items[reqnum]->prompt = strdup(""); items[reqnum]->thing = CUR_ASKL; asktypes[reqnum] = NULL; } } else items[reqnum]->thing = CUR_PROMPT; if (defaultval != NULL) strncat(items[reqnum]->stowage, defaultval, COLS-1); } items[reqnum] = NULL; if (!CURrequester(CursesScreen, GSgetTitle(gs), items)) { int respnum = 0; responses = (char**) malloc(sizeof(char*)*(10+reqnum)); for (i=0; i = 0; alnum--) { if (*(items[alnum+i]->stowage) != '\0') break; } alnum++; sprintf(numlinestr, "%d", alnum); responses[respnum++] = strdup(numlinestr); extra = 10 - alnum; while (alnum) { responses[respnum++] = strdup(items[++i]->stowage); alnum--; } i += extra; } else if (asktypes[i] && strcasecmp(asktypes[i], "Select:")==0) { if (items[i]->chooseitem == 0) responses[respnum++] = strdup("0"); else responses[respnum++] = strdup("1"); } else if (items[i]->thing == CUR_CHOICE) { responses[respnum++] = strdup(items[i]->choices[items[i]->chooseitem]); } else if (items[i]->thing == CUR_PROMPT || items[i]->thing == CUR_PASSWD) responses[respnum++] = strdup(items[i]->stowage); } responses[respnum++] = NULL; } /*** Free memory ***/ for (i=0; i 0 && !ControlCpressed) { ZapCRLF(newbuf); if (line && !(GSgetType(gs) == A_CSO)) { /* Print out the line from last time through the loop */ fputs(buf, f); /* fprintf(f, "%d %s", line, buf); */ /** Don't cut long lines... **/ if (strlen(buf) < sizeof(buf)) putc('\n', f); } line++; strcpy(buf, newbuf); if (GSgetType(gs) == A_CSO) { if (*buf == '2') break; if ((*buf >= '3') && (*buf <= '9')) { fprintf(f, "%s\n", GSgetPath(gs)); fprintf(f, "%s\n", buf+4); break; } if (*buf == '-') { if (buf[1] >= '3' && buf[1] <= '9') { fprintf(f, "%s\n", GSgetPath(gs)); fprintf(f, "%s\n", buf+5); } else { char *colonpos = strchr(buf+5,':'); i = '\0'; if (colonpos != NULL && *(colonpos-1) != cso_click) { fprintf(f, "-------------------------------------------------------\n"); cso_click = *(colonpos-1); } fputs((colonpos ? colonpos+1 : buf+6), f); fputc('\n', f); } } } /* CSO */ if ((line % 25) == 0) twirlfn(); } /*** readline ***/ if (ControlCpressed) { CursesErrorMsg("Interrupted by User"); ControlCpressed = FALSE; } if (line && !(GSgetType(gs) == A_CSO) && !(*buf == '.' && *(buf+1) == '\0')) { /* Print out the line from last time through the loop */ fputs(buf, f); /* fprintf(f, "EOF %d: '%s'", line, buf); */ /** Don't cut long lines... **/ if (strlen(buf) < sizeof(buf)) putc('\n', f); } } else { #if defined(VMS) && defined(VMSRecords) while (((numread = readrecvbuf(sockfd, buf, 512)) > 0) && !ControlCpressed) { if (numread < 512) for (i = numread; i < 512; i++) buf[i] = 0; if (fwrite(buf, 512, 1, f) == 0) { #else while (((numread = readrecvbuf(sockfd, buf, sizeof buf)) > 0) && !ControlCpressed) { if (fwrite(buf, numread, 1, f) == 0) { #endif CursesErrorMsg(Gtxt("Problems Writing",123)); closenet(sockfd); return(FALSE); } twirlfn(); } if (ControlCpressed) { CursesErrorMsg("Interrupted by User"); ControlCpressed = FALSE; closenet(sockfd); return(FALSE); } } if (GSgetType(gs) == A_CSO) writestring(sockfd, "quit\r\n"); closenet(sockfd); return(TRUE); } /* * This function makes a nice vms filename. */ void VMSfile(char *fname) { #ifndef VMS return; #else char *cp, *dot, *end; int j, k; /*** Trim off date-size suffix, if present ***/ end = fname + strlen(fname); if ((*(end - 1) == ']') && ((cp = strrchr(fname, '[')) != NULL) && (cp > fname) && *(--cp) == ' ') *cp = '\0'; /*** Replace illegal or problem characters ***/ dot = fname + strlen(fname); for (cp = fname; cp < dot; cp++) { /** Replace with underscores **/ if (*cp == ' ' || *cp == '/' || *cp == ':' || *cp == '[' || *cp == ']' || *cp == '{' || *cp == '}') *cp = '_'; /** Replace with dashes **/ else if (*cp == '!' || *cp == '?' || *cp == '\'' || *cp == ',' || *cp == ':' || *cp == '\"' || *cp == '+' || *cp == '@' || *cp == '\\' || *cp == '(' || *cp == ')' || *cp == '=' || *cp == '<' || *cp == '>' || *cp == '#' || *cp == '%' || *cp == '*' || *cp == '`' || *cp == '~' || *cp == '^' || *cp == '|' || *cp == '/') *cp = '-'; } /** Collapse any serial underscores **/ cp = fname + 1; j = 0; while (cp < dot) { if (fname[j] == '_' && *cp == '_') cp++; else fname[++j] = *cp++; } fname[++j] = '\0'; /** Collapse any serial dashes **/ dot = fname + (strlen(fname)); cp = fname + 1; j = 0; while (cp < dot) { if (fname[j] == '-' && *cp == '-') cp++; else fname[++j] = *cp++; } fname[++j] = '\0'; /** Trim any trailing or leading **/ /** underscrores or dashes **/ cp = fname + (strlen(fname)) - 1; while (*cp == '_' || *cp == '-') *cp-- = '\0'; if (fname[0] == '_' || fname[0] == '-') { dot = fname + (strlen(fname)); cp = fname; while ((*cp == '_' || *cp == '-') && cp < dot) cp++; j = 0; while (cp < dot) fname[j++] = *cp++; fname[j] = '\0'; } /** Replace all but the last period with _'s, or second **/ /** to last if last is followed by a terminal Z or z, **/ /** e.g., convert foo.tar.Z to **/ /** foo.tar_Z **/ j = strlen(fname) - 1; if ((dot = strrchr(fname, '.')) != NULL) { if (((fname[j] == 'Z' || fname[j] == 'z') && fname[j-1] == '.') && (((cp = strchr(fname, '.')) != NULL) && cp < dot)) { *dot = '_'; dot = strrchr(fname, '.'); } cp = fname; while ((cp = strchr(cp, '.')) != NULL && cp < dot) *cp = '_'; /** But if the root is > 39 characters, move **/ /** the period appropriately to the left **/ while (dot - fname > 39) { *dot = '\0'; if ((cp = strrchr(fname, '_')) != NULL) { *cp = '.'; *dot = '_'; } else if ((cp = strrchr(fname, '-')) != NULL) { *cp = '.'; *dot = '_'; } else { *dot = '_'; j = strlen(fname); fname[j+1] = '\0'; while (j > 39) fname[j--] = fname[j]; fname[j] = '.'; } dot = strrchr(fname, '.'); } /** Make sure the extension is < 40 characters **/ if ((fname + strlen(fname) - dot) > 39) *(dot+40) = '\0'; /** Trim trailing dashes or underscores **/ j = strlen(fname) - 1; while (fname[j] == '_' || fname[j] == '-') fname[j--] = '\0'; } else { /** No period, so put one on the end, or after **/ /** the 39th character, trimming trailing dashes **/ /** or underscrores **/ if (strlen(fname) > 39) fname[39] = '\0'; j = strlen(fname) - 1; while ((fname[j] == '_') || (fname[j] == '-')) j--; fname[++j] = '.'; fname[++j] = '\0'; } /** Make sure the rest of the original string in nulled, **/ /** to avoid problems with the CURwgetstr() line editor **/ cp = fname + strlen(fname); while (cp < end) *cp++ = '\0'; #endif } /* * This function makes a nice UNIX filename */ void UNIXfile(char *fname) { char *cp; for (cp = fname; *cp != '\0'; cp++) { switch (*cp) { case '\'': case '\"': case '/': case ' ': case '(': case ')': case '&': *cp = '-'; break; case '[': case ']': case '{': case '}': case '|': case '!': case '?': case '*': case '`': case '\\': case '<': case '>': *cp = '_'; break; } } if (strlen(fname) >50) { fname[50] = '\0'; } /*** Don't allow '-' or '.' as first character of filename ***/ if (fname[0] == '-' || fname[0] == '.') fname[0] = '_'; } /* * This procedure prompts the user for a name, checks for pipe characters * and ~ characters in the filename and saves the file to disk. * * If infile is NULL then contact the server and get the file. * * If saveto is non-NULL then don't prompt the user for a filename * to save into, just "do it". */ void Save_file(GopherObj *gs, char *saveto, char *view) { char Title[128], Userfilename[128]; char *cp; char buf[1024]; boolean Openpipe = FALSE; boolean GS2FileSucceeded = TRUE; FILE *f; switch (GSgetType(gs)) { case A_CSO: case A_DIRECTORY: case A_ERROR: case A_INDEX: case A_INFO: case A_TELNET: case A_TN3270: if (saveto == NULL) { CursesErrorMsg(Gtxt("Sorry, can't save that item to a file!",154)); return; } } if (view == NULL) view = Choose_View(gs); if (view == NULL || view == "") return; /*** Get the Title ***/ strcpy(Title, GSgetTitle(gs)); /*** Construct a nice default filename ***/ if (saveto == NULL) { /* It shouldnt ever come here if Secure, but I've noticed calls to this in the code */ if (NoShellMode || SecureMode) { CursesErrorMsg(Gtxt("Sorry, you are not allowed to do this", 64)); return; } /*** Let them use the Title ***/ strcpy(Userfilename, Title); #ifdef VMS VMSfile(Userfilename); #else UNIXfile(Userfilename); #endif if (CURGetOneOption(CursesScreen, Title, Gtxt("Save in file:",136), Userfilename)<0) return; saveto = Userfilename; } if (*saveto == '\0') return; if (view == NULL) view = Choose_View(gs); if (view == NULL || view == "") return; #ifndef VMS if (*saveto == '|') { /** Open a pipe! **/ Openpipe = TRUE; saveto++; } if (*saveto == '~') { /*** Save in our home directory ***/ if (*(saveto + 1) == '/' && (cp = getenv("HOME")) != NULL) { /*** Expand ~ to the home directory ***/ strcpy(buf,cp); buf[strlen(cp)]='/'; strcpy(buf+strlen(cp) +1, saveto+2); strcpy(saveto, buf); } else { /*** Save in someone else's home directory ***/ struct passwd *pass; cp = strchr(saveto,'/'); *cp = '\0'; pass = getpwnam(saveto+1); if (pass != NULL) { /** align in prep for the home dir **/ strcpy(buf,pass->pw_dir); buf[strlen(pass->pw_dir)]='/'; strcpy(buf+strlen(pass->pw_dir)+1,cp+1); strcpy(saveto,buf); } else { char tmpstr[256]; sprintf(tmpstr, Gtxt("No such user '%s'",114), saveto+1); CursesErrorMsg(tmpstr); return; } } } #endif #if defined(VMS) && defined(VMSRecords) if (GSisText(gs, view)) /*** Save ASCII files as VARIABLE length records for VMS ***/ f = fopen_VAR(saveto, "w+"); else /*** Save binary files as FIXED 512 records for VMS ***/ f = fopen_FIX(saveto, "w+"); #else if (Openpipe) f = popen(saveto, "w+"); else f = fopen(saveto, "w+"); #endif if (f == NULL) { char tempstr[128]; sprintf(tempstr, Gtxt("Couldn't create '%s'",80), saveto); CursesErrorMsg(tempstr); return; } if (GSgetLocalFile(gs) != NULL && strcmp(view, GSgetLocalView(gs))==0) { /** We've already retrieved it, copy it over... **/ int oldfd, cc; oldfd = open(GSgetLocalFile(gs), O_RDONLY, 0); if (oldfd <0) { CursesErrorMsg(Gtxt("Can't open old file..",68)); if (Openpipe) pclose(f); else fclose(f); return; } while ( ((cc=read(oldfd, buf, sizeof buf)) > 0) && !ControlCpressed){ if (fwrite(buf, cc, 1, f) <= 0) CursesErrorMsg(Gtxt("Problems Writing",123)); twirl(); } if (ControlCpressed) { CursesErrorMsg("Save Interrupted by user"); ControlCpressed = FALSE; } if (Openpipe) pclose(f); else fclose(f); close(oldfd); return; } else { /** We don't have the file yet, let's get it... **/ GS2FileSucceeded = GStoFile(gs, f, view, twirl); /* false if fails */ if (Openpipe) pclose(f); else fclose(f); if (!GS2FileSucceeded) unlink(saveto); } } /* * This procedure saves a directory (menu) list to a file. * It prompts the user for a filename, checks for pipe characters * and ~ characters in the filename and saves the directory name * and the list of items in the file to disk. * * This is useful after searches for which the titles of hits * themselves contain the information one was seeking. */ void Save_list(GopherDirObj *gd) { char Title[256], Userfilename[128]; char *cp, *saveto; int numitems, j; char buf[128]; boolean Openpipe = FALSE; FILE *f; *Userfilename = '\0'; sprintf(Title,"%s", GDgetTitle(gd)); if (CURGetOneOption(CursesScreen, Title, Gtxt("Save list of items in file:",137), Userfilename)<0) return; saveto = Userfilename; if (*saveto == '\0') return; #ifndef VMS if (*saveto == '|') { /** Open a pipe! **/ Openpipe = TRUE; saveto++; } if (*saveto == '~') { /*** Save in our home directory ***/ if (*(saveto + 1) == '/' && (cp = getenv("HOME")) != NULL) { /*** Expand ~ to the home directory ***/ strcpy(buf,cp); buf[strlen(cp)]='/'; strcpy(buf+strlen(cp) +1, saveto+2); strcpy(saveto, buf); } else { /*** Save in someone else's home directory ***/ struct passwd *pass; cp = strchr(saveto,'/'); *cp = '\0'; pass = getpwnam(saveto+1); if (pass != NULL) { /** align in prep for the home dir **/ strcpy(buf,pass->pw_dir); buf[strlen(pass->pw_dir)]='/'; strcpy(buf+strlen(pass->pw_dir)+1,cp+1); strcpy(saveto,buf); } else { char tmpstr[256]; sprintf(tmpstr, Gtxt("No such user '%s'",114), saveto+1); CursesErrorMsg(tmpstr); return; } } } #endif #if defined(VMS) && defined(VMSRecords) f = fopen_VAR(saveto, "w+"); #else if (Openpipe) f = popen(saveto, "w+"); else f = fopen(saveto, "w+"); #endif if (f == NULL) { char tempstr[128]; sprintf(tempstr, Gtxt("Couldn't create '%s'",80), saveto); /** Should give better error messages here **/ CursesErrorMsg(tempstr); return; } /*** Write the Title, and put the Searchstring, ***/ /*** if present, on the next line. ***/ sprintf(buf," %s\n\n", GDgetTitle(gd)); if (Searchstring != NULL) if ((cp = strstr(buf, Searchstring)) != NULL) *(cp-1) = '\n'; if (fwrite(buf, strlen(buf), 1, f) <= 0) CursesErrorMsg(Gtxt("Problems Writing",123)); twirl(); /*** Write the Items ***/ numitems = GDgetNumitems(gd); for (j = 0; j < numitems; j++) { sprintf(buf, "%s\n", GSgetTitle(GDgetEntry(gd, j))); if (fwrite(buf, strlen(buf), 1, f) <= 0) { CursesErrorMsg(Gtxt("Problems Writing",123)); } twirl(); } if (Openpipe) pclose(f); else fclose(f); } /* ** This procedure exits out of the curses environment and ** displays the file indicated by pathname to the screen ** using a pager command of some sort */ void GSdisplay(GopherObj *gs) { char command[MAXSTR]; char *file = GSgetLocalFile(gs); char *view = GSgetLocalView(gs); #ifdef VMS char *cp; int return_status; /** Keep DECC from complaining **/ struct dsc$descriptor_s command_desc; command_desc.dsc$b_class = DSC$K_CLASS_S; command_desc.dsc$b_dtype = DSC$K_DTYPE_T; #endif /** Search for a helper application **/ RCdisplayCommand(GlobalRC, view, file, command); Debug("Displaying view %s ", view); Debug("command %s ", command); Debug("file %s", file); Debug("/%s \n", GSgetLocalFile(gs)); if (strlen(command) == 0) { if (SecureMode || NoShellMode) CursesErrorMsg(Gtxt("Sorry, no viewer for the file....",166)); else Save_file(gs, NULL, view); return; } #ifdef VMS if (strncasecmp("TPU",command,3) == 0) { CURexit(CursesScreen); /** Make sure we invoke TPU in /READ_ONLY/NOJOURNAL mode **/ for (cp = command; *cp; cp++) *cp = _toupper(*cp); if (strstr(command, "/READ") == NULL) strcat(command,"/READ"); if (strstr(command, "/NOJOU") == NULL) strcat(command,"/NOJOU"); /** Load the descriptor and call TPU **/ command_desc.dsc$w_length = strlen(command); command_desc.dsc$a_pointer = command; return_status = TPU$TPU(&command_desc); if (!return_status&1) { CURenter(CursesScreen); CursesErrorMsg(Gtxt("Error invoking callable TPU as a pager!!!",85)); return; } if (GSgetType(gs) != A_APP) { GSprompter(gs, view, command); } } else #endif if (strncasecmp(command, "builtin-upload", 14) == 0) { BuiltinUploadfile(); return; } else if (strncasecmp(command, "builtin-download", 14) == 0) { BuiltinDownload(getenv("HOME")); return; } else if (strncasecmp(command, "builtin", 7) == 0) { PagerBuiltin(CursesScreen, gs); return; } else { CURexit(CursesScreen); FIOsystem(command); if (GSgetType(gs) != A_APP) { GSprompter(gs, view, command); } } } /* * Display the prompt at the end of viewing a document */ void GSprompter(GopherObj *gs, char *view, char *command) { int ch; #ifdef VMS printf(Gtxt("\nPress %sRETURN%s to continue",184), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen)); if (!SecureMode && !NoShellMode) { if (COLS < 78) printf(",\n "); else printf(", "); printf(Gtxt("%sm%s to mail, %sD%s to download, %ss%s to save, or %sp%s to print:",61), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen)); } #ifndef NOMAIL else { printf(Gtxt(", %sm%s to mail, %sD%s to download:",62), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen)); } #else else { printf(Gtxt(", %sD%s to download:",237), CURgetHighon(CursesScreen), CURgetHighoff(CursesScreen)); } #endif #else /*** Unix: ****/ printf(Gtxt("\nPress to continue",185)); if (!SecureMode && !NoShellMode) printf(Gtxt(",\n to mail, to download, to save, or

to print:",64)); #ifndef NOMAIL else printf(Gtxt(", to mail, to download:",63)); #else else printf(Gtxt(", to download:",238)); #endif #endif fflush(stdin); fflush(stdout); noecho(); cbreak(); ch = 0; while (ch == 0) { ch=getchar(); #ifdef VMS if (HadVMSInt) break; #endif if (SecureMode || NoShellMode) { switch (ch) { case '\n': case '\r': case KEY_ENTER: case ' ': case 'q' : case 'Q' : #ifdef VMS case '\032': /* ^Z */ #endif break; #ifndef NOMAIL case 'm': #ifdef VMS (void) getchar(); #endif CURenter(CursesScreen); GSmail(gs); break; #endif case 'D': #ifdef VMS (void) getchar(); #endif CURenter(CursesScreen); Download_file(gs); break; default: puts(CURgetBell(CursesScreen)); fflush(stdout); ch=0; break; } } else { switch(ch) { case '\n': case '\r': case ' ' : case 'q' : case 'Q' : #ifdef VMS case '\032': /* ^Z */ #endif break; case 's': #ifdef VMS (void) getchar(); #endif CURenter(CursesScreen); Draw_Status(Gtxt("Saving File...",138)); refresh(); if (!(SecureMode || NoShellMode)) Save_file(gs,NULL, view); break; case 'p': #ifdef VMS (void) getchar(); #endif if (!RCprintCommand(GlobalRC, view, GSgetLocalFile(gs), command)) { CursesErrorMsg(Gtxt("Sorry, cannot print this document",155)); return; } FIOsystem(command); break; case 'm': #ifdef VMS (void) getchar(); #endif CURenter(CursesScreen); GSmail(gs); break; case 'D': #ifdef VMS (void) getchar(); #endif CURenter(CursesScreen); Download_file(gs); break; default: Debugmsg("GSdisplayAfter - beep\r\n"); puts(CURgetBell(CursesScreen)); fflush(stdout); ch=0; break; } } } tputs(CURgetCLS(CursesScreen),1,outchar); fflush(stdout); } /* * This displays a single line message using CUR routines */ void CursesMsg(char *Message, char *title) { char *mess[2]; mess[0] = Message; mess[1] = NULL; Debugmsg("CursesMsg - beep\r\n") CURBeep(CursesScreen); CURDialog(CursesScreen, title,mess); return; } /* * This does the same as above, but puts a window title on the mess */ void CursesErrorMsg(char *Message) { CursesMsg(Message, Gtxt("Gopher Error",90)); } #ifdef CLIENT_LOGGER #if defined(VMS) && defined(MULTINET) #include "syslog.h" #else #include #endif #endif int logrequest(char *msg, GopherObj *gs) { #ifdef CLIENT_LOGGER static boolean inited = FALSE; char *url = ""; if (inited == FALSE) { openlog("gopher", (LOG_PID), LOG_DAEMON); setlogmask(LOG_UPTO(LOG_INFO)); inited = TRUE; } if (gs != NULL) url = GSgetURL(gs, ""); syslog(LOG_INFO, "%s %s", msg, url ? url : ""); #endif return(0); } #if defined(VMS) && defined(MULTINET) && ( defined(CLIENT_LOGGER) || defined(TELNET_TRACE) ) /* * Copyright (C) 1992 TGV, Incorporated */ /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ #ifndef lint static char sccsid[] = "@(#)syslog.c 5.3 (Berkeley) 9/17/85"; #endif /* not lint */ /* * SYSLOG -- print message on log file * * This routine looks a lot like printf, except that it * outputs to the log file instead of the standard output. * Also: * adds a timestamp, * prints the module name in front of the message, * has some other formatting types (or will sometime), * adds a newline on the end of the message. * * The output of this routine is intended to be read by /etc/syslogd. * * Author: Eric Allman * Modified to use UNIX domain IPC by Ralph Campbell */ #include /* JDB */ #include /* JLW */ #include /* JLW */ #include #include #include #include #ifndef _sys_syslog_h #include "syslog.h" /* was -- JLW */ #endif #include #ifdef __ALPHA #include #endif /* __ALPHA */ #define MAXLINE 1024 /* max message size */ #define PRIMASK(p) (1 << ((p) & LOG_PRIMASK)) #define PRIFAC(p) (((p) & LOG_FACMASK) >> 3) #define IMPORTANT LOG_ERR static char logname[] = "/dev/log"; static char ctty[] = "/dev/console"; static int LogFile = -1; /* fd for log */ static int LogStat = 0; /* status bits, set by openlog() */ static char *LogTag = "syslog"; /* string to tag the entry with */ static int LogMask = 0xff; /* mask of priorities to be logged */ static int LogFacility = LOG_USER; /* default facility code */ static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */ #ifdef ORIG extern int errno; extern int sys_nerr; extern char *sys_errlist[]; #endif #ifndef VMS$TrnLNM /* JLW -- use SYS$TRNLNM() instead of VMS$TrnLNM() */ static int i, junk, buf_len; int no_case = LNM$M_CASE_BLIND; static $DESCRIPTOR(lname_desc,"MULTINET_SYSLOG_DESTINATION"); static $DESCRIPTOR(tabnam,"LNM$SYSTEM_TABLE"); char syslogging_status[256]; struct itmlst { short int buf_len; short int item_code; char *buffer; int *buf_length; }; static struct itmlst item_str[] = { {4,LNM$_INDEX,(char *)&i,&junk}, {0,LNM$_STRING,0,&buf_len}, {0,0,0,0}}; #endif char *vms_errno_string(); #ifdef __ALPHA syslog(va_alist) va_dcl #else /* __ALPHA */ syslog(pri, fmt, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9) int pri; char *fmt; #endif /* __ALPHA */ { char buf[MAXLINE + 1], outline[MAXLINE + 1]; register char *b, *f, *o; register int c; long now; int pid; #ifdef ORIG int pid, olderrno = errno; #endif #ifdef __ALPHA int pri, numargs; char *fmt; __int64 p0,p1,p2,p3,p4,p5,p6,p7,p8,p9; va_list ap; va_start(ap); va_count(numargs); pri = va_arg(ap, int); fmt = va_arg(ap, char *); if (numargs > 2) p0 = va_arg(ap, __int64); if (numargs > 3) p1 = va_arg(ap, __int64); if (numargs > 4) p2 = va_arg(ap, __int64); if (numargs > 5) p3 = va_arg(ap, __int64); if (numargs > 6) p4 = va_arg(ap, __int64); if (numargs > 7) p5 = va_arg(ap, __int64); if (numargs > 8) p6 = va_arg(ap, __int64); if (numargs > 9) p7 = va_arg(ap, __int64); if (numargs > 10) p8 = va_arg(ap, __int64); if (numargs > 11) p9 = va_arg(ap, __int64); #endif /* __ALPHA */ /* see if we should just throw out this message */ if (pri <= 0 || PRIFAC(pri) >= LOG_NFACILITIES || (PRIMASK(pri) & LogMask) == 0) return; if (LogFile < 0) openlog(LogTag, LogStat & ~LOG_ODELAY, 0); /* set default facility if none specified */ if ((pri & LOG_FACMASK) == 0) pri |= LogFacility; /* build the message */ o = outline; sprintf(o, "<%d>", pri); o += strlen(o); time(&now); sprintf(o, "%.15s ", ctime(&now) + 4); o += strlen(o); if (LogTag && strcmp(LogTag, "dprintf")) { strcpy(o, LogTag); o += strlen(o); } if (LogStat & LOG_PID) { sprintf(o, "[Pid 0x%x]", getpid()); o += strlen(o); } if (LogTag && strcmp(LogTag, "dprintf")) { strcpy(o, ": "); o += 2; } b = buf; f = fmt; while ((c = *f++) != '\0' && c != '\n' && b < &buf[MAXLINE]) { if (c != '%') { *b++ = c; continue; } if ((c = *f++) != 'm') { *b++ = '%'; *b++ = c; continue; } sprintf(b, "%s", vms_errno_string() ); b += strlen(b); } *b++ = '\n'; *b = '\0'; sprintf(o, buf, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); c = strlen(outline); if (c > MAXLINE) c = MAXLINE; /* output the message to the local logger */ #ifndef VMS$TrnLNM item_str[1].buf_len = 255; item_str[1].buffer = syslogging_status; i = 0; if (SS$_NORMAL == SYS$TRNLNM(&no_case,&tabnam,&lname_desc,0,&item_str)) { #else if (VMS$TrnLNM("MULTINET_SYSLOG_DESTINATION",0)) { #endif if (sendto(LogFile, outline, c, 0, &SyslogAddr, sizeof SyslogAddr) >= 0) { return 1; } } #ifdef Send_Oper if (!(LogStat & LOG_CONS) && (pri & LOG_PRIMASK) <= LOG_ERR) return -1; /* Output the message to the console, add the LogTag so it looks * like syslog(), even if syslog is disabled and we're using OPCOM. * make sure there is a newline. */ o = outline; if (LogTag && strcmp(LogTag, "dprintf")) { strcpy(o, LogTag); o += strlen(o); *o++ = ':'; *o++ = ' '; } sprintf(o, fmt, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); c = strlen(outline); if (c > MAXLINE) c = MAXLINE-1; if ( outline[c-1] != '\n' ) { outline[c] = '\n'; outline[c+1] = '\0'; } Send_Oper(outline); #endif return 1; } /* * OPENLOG -- open system log */ openlog(ident, logstat, logfac) char *ident; int logstat, logfac; { if (ident != NULL) LogTag = ident; LogStat = logstat; if (logfac != 0) LogFacility = logfac & LOG_FACMASK; if (LogFile >= 0) return; SyslogAddr.sa_family = AF_UNIX; strncpy(SyslogAddr.sa_data, logname, sizeof SyslogAddr.sa_data); if (!(LogStat & LOG_ODELAY)) { LogFile = socket(AF_UNIX, SOCK_DGRAM, 0); #ifdef ORIG fcntl(LogFile, F_SETFD, 1); #endif } } /* * CLOSELOG -- close the system log */ closelog() { (void) close(LogFile); LogFile = -1; } /* * SETLOGMASK -- set the log mask level */ setlogmask(pmask) int pmask; { int omask; omask = LogMask; if (pmask != 0) LogMask = pmask; return (omask); } #endif gopher-3.0.15/gopher/upload.h0000664000000000000000000000025110762617110012674 0ustar /* upload.h * Written by David Allen * Simple prototypes for the functions in upload.c */ #define UPLOAD_H 1 void BuiltinUploadfile(void); gopher-3.0.15/gopher/manager.h0000664000000000000000000000106710762617110013030 0ustar /* manager.h * Written by David Allen * Simple prototypes for functions in manager.c */ #define MANAGER_H 1 void Draw_Banner(void); void Draw_Status(char *textline); void DisplayTitle(GopherObj *gs, int maxlength, boolean dogplus); void Display_Dir_Page(GopherDirObj *gopherdir, int iNewLine, int nNewPage, int nMaxPages, int iPageLen, int iLastPageLen); int scline(int iOldGopher, int iNewGopher, GopherDirObj *gophersdir); int GetMenu(GopherDirObj *gd, int *typedchar, boolean redisplay); gopher-3.0.15/gopher/Makefile.in0000664000000000000000000001211710762617110013310 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.5 $ # $Date: 2002/01/11 15:55:59 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/Makefile.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile # Makefile for gopher client #********************************************************************* # Revision History: # $Log: Makefile.in,v $ # Revision 1.5 2002/01/11 15:55:59 jgoerzen # * Using $(INSTALL) from subdirectories broke on systems # where install-sh was used because $(INSTALL) would always # resolve to ./install-sh. Replaced all instances of # $(INSTALL) with @INSTALL@ (autoconf would provide the correct # path) and removed INSTALL from Makefile.config. Reported # by Don Fike on Solaris 2.6. # * Updated our copy of install-sh with the one from # a current automake. # # Revision 1.4 2002/01/09 16:35:25 jgoerzen # More bugfixing. # # Revision 1.3 2002/01/09 15:54:48 jgoerzen # Modifications to assist with installations # # Revision 1.2 2002/01/08 17:36:14 jgoerzen # Finally builds! # # Changes: # # * config.h.in: rebuilt by autoheader # # * configure: rebuilt by autoconf # # * configure.in: # * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat # * Added checkes for term.h, re_comp.h, regex.h # # * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check # # * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: # * Use REGEXLIBS # # * gopher/globals.h, gopher/gopher.c: Remove sys_errlist # # * object/GSgopherobj.c: Removed #include, now use # "Regex.h" that has proper regex determining logic # # * object/Regex.h: Moved regex.h include to here. Make it conditional # based on configure test. Add conditional re_comp.h include. # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 3.1 1996/01/04 18:29:18 lindner # Updates for autoconf # # Revision 3.14 1994/09/29 19:23:50 lindner # Make sure directories are made before installing # # Revision 3.13 1994/08/19 16:52:07 lindner # Make sure that gopher.o gets recompiled when patchlevel changes # # Revision 3.12 1994/07/19 19:29:40 lindner # Add INTLOPTS, add locales dir target for clean # # Revision 3.11 1994/07/03 21:35:42 lindner # Add upload option to code # # Revision 3.10 1994/05/26 19:41:14 lindner # Add yet another definition # # Revision 3.9 1994/04/25 20:47:22 lindner # Remove html stuff from menu # # Revision 3.8 1994/04/25 02:16:50 lindner # Fix for last line without newline # # Revision 3.7 1994/02/20 16:17:43 lindner # Add form object file # # Revision 3.6 1993/09/08 05:21:22 lindner # Add pager.c # # Revision 3.5 1993/08/04 22:06:35 lindner # Rebuild client if patchlevel.h changes # # Revision 3.4 1993/07/27 05:28:45 lindner # Mondo Debug overhaul from Mitra # # Revision 3.3 1993/04/15 21:28:25 lindner # Mods for remote access # # Revision 3.2 1993/02/19 21:03:13 lindner # Added stuff for global RC file. # # Revision 3.1.1.1 1993/02/11 18:02:57 lindner # Gopher+1.2beta release # # Revision 1.4 1993/02/09 21:34:47 lindner # Fixed install target # # Revision 1.3 1993/01/07 22:51:44 lindner # Added download.o to list of objects # # Revision 1.2 1992/12/31 04:01:06 lindner # moved html.c to html2.c for VMS # # Revision 1.1 1992/12/10 23:32:16 lindner # gopher 1.1 release # #********************************************************************/ include ../Makefile.config srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ OBJS = manager.o gopher.o globals.o ourutils.o cso.o \ subprocs.o html2.o CURcurses.o gopherrc.o \ download.o pager.o form.o upload.o CCFLAGS = $(OPT) $(DEBUGGING) -I.. -I$(top_srcdir) -I$(top_srcdir)/object \ $(INTLOPTS) $(CLIENTOPTS) -DGOPHERLIB=\"$(CLIENTLIB)\" \ -DGOPHERHELP=\"$(CLIENTLIB)/gopher.hlp\" \ -DGLOBALRC=\"$(CLIENTLIB)/gopher.rc\" \ -DREMOTERC=\"$(CLIENTLIB)/gopherremote.rc\" TARGET = gopher all: $(TARGET) .c.o: $(CC) $(CCFLAGS) -c $< globals.o : $(srcdir)/globals.h $(srcdir)/version.h ../object/libgopher.a: (cd ..; $(MAKE) $(MFLAGS) objects) $(TARGET) : $(OBJS) ../object/libgopher.a $(CC) $(LDFLAGS) -o $@ $(OBJS) ../object/libgopher.a @CLIENTLIBS@ @REGEXLIBS@ @LIBS@ install : all -mv $(CLIENTDIR)/$(TARGET) $(CLIENTDIR)/$(TARGET).old -mkdir $(CLIENTDIR) -mkdir $(CLIENTLIB) @INSTALL@ $(TARGET) $(CLIENTDIR) @INSTALL@ -d $(CLIENTLIB) @INSTALL@ gopher.rc $(CLIENTLIB) @INSTALL@ gopherremote.rc $(CLIENTLIB) @INSTALL@ gopher.hlp $(CLIENTLIB) clean: -rm -f $(TARGET) $(OBJS) *.out *~ core (cd locales; $(MAKE) $(MFLAGS) clean) $(OBJS): $(srcdir)/gopher.h $(top_srcdir)/conf.h globals.o: $(srcdir)/globals.h gopherrc.o: $(top_srcdir)/patchlevel.h manager.o: $(top_srcdir)/patchlevel.h gopher.o: $(top_srcdir)/patchlevel.h gopher-3.0.15/gopher/gopher.h0000664000000000000000000000601310762617110012676 0ustar /******************************************************************** * $Author: s2mdalle $ * $Revision: 1.3 $ * $Date: 2001/01/03 22:29:33 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/gopher.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: gopher.h * Header file for Gopher client. ********************************************************************* * Revision History: * $Log: gopher.h,v $ * Revision 1.3 2001/01/03 22:29:33 s2mdalle * Added a bunch of includes, prototypes, compiler warning fixes. * * Revision 1.2 2000/12/27 21:25:59 s2mdalle * Added CleanupandExit prototype and an include for CUR* functions * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.5 1995/02/27 17:09:51 lindner * Add Pacbell NOBANNER patch * * Revision 3.4 1994/05/02 07:40:17 lindner * Mods to use setlocale() * * Revision 3.3 1994/04/25 03:37:40 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.2 1993/09/29 20:52:08 lindner * remove dead code * * Revision 3.1.1.1 1993/02/11 18:02:58 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:34:58 lindner * Stuff for RC * * Revision 1.2 1992/12/31 04:30:03 lindner * mods for VMS * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * *********************************************************************/ /*** All our mongo include files ***/ #include /*** Set global configuration options early ***/ #include "conf.h" #ifdef VMS #include #define MAXPATHLEN FILENAME_MAX #endif #include "Stdlib.h" #include #include #include "String.h" #include "Locale.h" #include #include #ifdef VMS /** VMS does't do slashes **/ #include #else /* not VMS */ #include #include #include #ifdef M_XENIX /* SCO Xenix/UNIX */ #define MAXPATHLEN FILENAME_MAX #include #include #include #else #include #endif #endif /* not VMS */ #define HALFLINE 40 #define MAXSTR 200 /* Arbitrary maximum string length */ /** Include definitions for our psuedo-objects. **/ #include "CURcurses.h" #include "boolean.h" #include "STRstring.h" #include "GDgopherdir.h" #include "compatible.h" #include "util.h" #include "gopherrc.h" #ifdef NOBANNER # define TITLEPOS 0 #else # define TITLEPOS 2 #endif /* Prototypes */ RETSIGTYPE CleanupandExit(int exitval); void showfile(GopherObj *ZeGopher); /** Get the configuration variables **/ #include "globals.h" #include "gopherrc.h" #include "ourutils.h" #include "manager.h" #include "cso.h" #include "html2.h" #include "CURcurses.h" gopher-3.0.15/gopher/cso.h0000664000000000000000000000024310762617110012175 0ustar /* cso.h * Written by David Allen * Simple prototypes for functions in cso.c */ #define CSO_H 1 void do_cso(GopherStruct *ZeGopher); gopher-3.0.15/gopher/globals.c0000664000000000000000000000177210762617110013037 0ustar /******************************************************************** * lindner * 3.1.1.1 * 1993/02/11 18:02:57 * /home/mudhoney/GopherSrc/CVS/gopher+/gopher/globals.c,v * $Status: $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: globals.c * Where global variables are actually stuck into a .o file. See * globals.h for the actual variables. ********************************************************************* * Revision History: * globals.c,v * Revision 3.1.1.1 1993/02/11 18:02:57 lindner * Gopher+1.2beta release * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * * Revision 1.1 1992/12/10 06:16:51 lindner * Initial revision * * *********************************************************************/ #define EXTERN #include "gopher.h" gopher-3.0.15/gopher/CURcurses.h0000664000000000000000000002212510762617110013272 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.6 $ * $Date: 2002/04/26 13:33:33 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/CURcurses.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: CURcurses.h * Header file access methods for CURcurses.c ********************************************************************* * Revision History: * $Log: CURcurses.h,v $ * Revision 1.6 2002/04/26 13:33:33 jgoerzen * Removed glib MIME stuff. We'll move to Pygopherd first. * * Revision 1.4.2.1 2002/03/21 15:24:56 jgoerzen * Fixes for Solaris. Also commited on main branch. * * Revision 1.4 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.3 2001/01/03 22:26:27 s2mdalle * Code cleanups, addition of a few prototypes from CURcurses.c * * Revision 1.2 2000/12/27 21:24:04 s2mdalle * Added many function prototypes from CURcurses.c * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.24 1996/01/04 18:28:52 lindner * Updates for autoconf * * Revision 3.23 1995/11/03 21:18:15 lindner * ANSIfication * * Revision 3.22 1995/05/01 05:41:29 lindner * compatibility fixes * * Revision 3.21 1995/02/27 17:44:25 lindner * Change code to use enums * * Revision 3.20 1995/02/17 18:31:08 lindner * Fix for solaris curses routines * * Revision 3.19 1994/06/29 05:21:12 lindner * Start of AskF: * * Revision 3.18 1994/05/02 07:40:16 lindner * Mods to use setlocale() * * Revision 3.17 1994/04/13 19:14:31 lindner * AskL modifications * * Revision 3.16 1994/04/07 17:25:54 lindner * Fix for pyramids * * Revision 3.15 1994/03/04 23:39:48 lindner * Fix for log entries * * Revision 3.14 1994/03/04 23:36:30 lindner * figure out whether the terminal can do alternate character set. * * Revision 3.13 1994/02/20 21:45:20 lindner * Better sanity checks for box drawing characters * * Revision 3.12 1994/02/20 16:49:20 lindner * Fix bug in gcc for Solaris 2.x for curses routines * * Revision 3.11 1993/12/28 17:28:52 lindner * Better method of drawing box characters * * Revision 3.10 1993/11/29 01:09:46 lindner * Don't use the alternate character set for character graphics under AIX. * They don't work very well in xterms or aixterms. [However, it does work * if I use Mac NCSA Telnet to connect to our RS/6000....] (Beckett) * * Revision 3.9 1993/11/02 06:21:30 lindner * Fix for osf curses * * Revision 3.8 1993/09/26 09:19:21 lindner * Add bold #defines * * Revision 3.7 1993/09/22 15:44:36 lindner * Fix for sysv systems without KEY_HELP * * Revision 3.6 1993/09/22 01:15:47 lindner * Add support for DEC HELP key/KEY_HELP * * Revision 3.5 1993/09/21 01:46:08 lindner * Implement all remaining ASK block items.. * * Revision 3.4 1993/09/08 05:20:02 lindner * Fix for multiple CURcurses.h includes * * Revision 3.3 1993/07/30 17:31:39 lindner * Mods to support AskP: * * Revision 3.2 1993/04/15 21:25:20 lindner * Fixes for CURbox() definitions * * Revision 3.1.1.1 1993/02/11 18:02:56 lindner * Gopher+1.2beta release * * Revision 1.2 1992/12/31 05:57:38 lindner * Mods for VMS * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * * Revision 1.1 1992/12/10 06:16:51 lindner * Initial revision * * *********************************************************************/ #ifndef CURCURSES_H #define CURCURSES_H #include "Locale.h" #include #ifdef __svr4__ /* Fix bug in gcc for Solaris 2.x */ # define SYSV #endif #if defined(ultrix) # include #else # include #endif #include "boolean.h" #include "STRstring.h" #ifdef KEY_RIGHT # define SYSVCURSES #endif struct CursesStruct { WINDOW *Screen; String *Termtype; /** Termcap/terminfo stuff **/ String *Clearscreen; String *AudibleBell; String *Highlighton; String *Highlightoff; boolean canUseACS; boolean inCurses; int COLS; int ROWS; int Box_ul; int Box_ur; int Box_ll; int Box_lr; int Box_vline; int Box_hline; int Box_tt; int Box_bt; int Box_lt; int Box_rt; int Box_ct; void (*sigtstp)(); void (*sigwinch)(); }; typedef struct CursesStruct CursesObj; typedef struct CursesStruct *CursesObjp; #ifndef SYSVCURSES # define KEY_DOWN 0402 /* The four arrow keys ...*/ # define KEY_UP 0403 # define KEY_LEFT 0404 # define KEY_RIGHT 0405 # define KEY_NPAGE 0522 /* Next page */ # define KEY_PPAGE 0523 /* Previous page */ # define KEY_ENTER 0527 # define KEY_BACKSPACE 0407 # define KEY_HELP 0553 /* help key */ #endif /* * Definitions for character graphics */ #if defined(SYSVCURSES) && !defined(ultrix) && !defined(hpux) && !defined(_AUX_SOURCE) && !defined(__osf__) && !defined(_AIX) # define CUR_FANCY_BOXES #endif #if defined(VMS) || defined(__convex__) || defined(sequent) || defined(pyr) #if !defined(cbreak) #define cbreak crmode #endif #endif #if defined(__svr4__) # define CURS_MACROS #endif #ifndef KEY_HELP #define KEY_HELP 0553 /* help key */ #endif /* * Request types.... More to be added later.. */ enum curtype { CUR_LABEL =1, CUR_PROMPT =2, CUR_PASSWD =3, CUR_CHOICE =4, CUR_ASKL =5, CUR_FNAME =6 }; typedef enum curtype Curreqtype; struct Requestitem_struct { char *prompt; char *stowage; Curreqtype thing; int chooseitem; char **choices; }; typedef struct Requestitem_struct Requestitem; #define max(A, B) ((A) > (B) ? (A) : (B)) #define min(A, B) ((A) < (B) ? (A) : (B)) /* * access functions */ #define CURgetScreen(a) ((a)->Screen) #define CURgetTerm(a) (STRget((a)->Termtype)) #define CURgetCLS(a) (STRget((a)->Clearscreen)) #define CURgetBell(a) (STRget((a)->AudibleBell)) #define CURgetHighon(a) (STRget((a)->Highlighton)) #define CURgetHighoff(a) (STRget((a)->Highlightoff)) #ifdef VMS #define CURsetScreen(a,b) ((b),(a)->Screen=stdscr) #else #define CURsetScreen(a,b) ((a)->Screen=(b)) #endif #define CURsetTerm(a,b) (STRset((a)->Termtype, (b))) #define CURsetCLS(a,b) (STRset((a)->Clearscreen,(b))) #define CURsetBell(a,b) (STRset((a)->AudibleBell,(b))) #define CURsetHighon(a,b) (STRset((a)->Highlighton,(b))) #define CURsetHighoff(a,b) (STRset((a)->Highlightoff,(b))) #define CURsetSIGTSTP(a,b) ((a)->sigtstp=(b)) #define CURsetSIGWINCH(a,b) ((a)->sigwinch=(b)) #ifdef HAVE_WSTANDOUT #define wboldout(win) (wstandout(win)) #define wboldend(win) (wstandend(win)) #else #define wboldout(win) (wattron(win, A_BOLD)) #define wboldend(win) (wattroff(win, A_BOLD)) #endif #define CURgetBox_ul(a) ((a)->Box_ul) #define CURgetBox_ur(a) ((a)->Box_ur) #define CURgetBox_ll(a) ((a)->Box_ll) #define CURgetBox_lr(a) ((a)->Box_lr) #define CURgetBox_vline(a) ((a)->Box_vline) #define CURgetBox_hline(a) ((a)->Box_hline) #define CURgetBox_tt(a) ((a)->Box_tt) #define CURgetBox_bt(a) ((a)->Box_bt) #define CURgetBox_lt(a) ((a)->Box_lt) #define CURgetBox_rt(a) ((a)->Box_rt) #define CURgetBox_ct(a) ((a)->Box_cr) CursesObj *CURnew(void); void CURinit(CursesObj *cur); void CURcenterline(CursesObj *cur, WINDOW *win, char *theline, int yval, int windowidth, boolean bright); void CURrightline(CursesObj *cur, char *theline, int yval); void CURenter(CursesObj *cur); void CURexit(CursesObj *cur); int CURgetstr(); int CURgetch(CursesObj *cur); void CURresize(CursesObj *cur); int CURoutchar(int c); int CURGetOneOption(CursesObj *cur, char *Title, char *OptionName, char *Response); void CURBeep(CursesObj *cur); void CURwenter(CursesObj *cur, WINDOW *win); void CURsetGraphicsChars(CursesObj *cur, char *termtype); int CUROldGetOneOption(CursesObj *cur, char *OptionName, char *Response); int CURwgetch(CursesObj *cur, WINDOW *window); int CURrequester(CursesObj *cur, char *Wintitle, Requestitem **items); int CURDialog(CursesObj *cur, char *Wintitle, char **Message); void CURgetYesorNo(CursesObj *cur, char *OptionName, char *Response); int CURRequest(CursesObj *cur, char *Wintitle, char **Prompts, char **Stowages); int CURChoice(CursesObj *cur, char *WinTitle, char **Choices, char *Prompt, int DefaultChoice); void CURbutton(CursesObj *cur, WINDOW *win, char *Label, boolean bright); void CURbox(CursesObj *cur, WINDOW *win, int height, int width); int CURwgetstr(CursesObj *cur, WINDOW *win, char *inputline, int maxlength, boolean hidden); #endif /* CURCURSES_H */ gopher-3.0.15/gopher/gopherremote.rc0000664000000000000000000000342010762617110014266 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.1 $ # $Date: 2000/08/19 00:28:56 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/gopherremote.rc,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: gopher.rc # Global rc file for gopher client #********************************************************************* # Revision History: # $Log: gopherremote.rc,v $ # Revision 1.1 2000/08/19 00:28:56 jgoerzen # Initial revision # # Revision 3.2 1994/06/09 04:28:04 lindner # none # # Revision 3.1 1993/04/15 21:15:10 lindner # Remote gopherrc file # # Revision 3.3 1993/02/19 21:08:58 lindner # Added audio/mulaw, and changed defs for gif and ppm to use the '|' # command. # # Revision 3.2 1993/02/18 23:37:27 lindner # Added header info... # # # Map gopher+ types to local commands # # format is: # map: gplusview,view command,printcommand # # # make sure you eliminate piping and modify the printcommands on VMS # comment out maps which don't apply on your system, or set them to ",," # #map: Audio/mulaw,|play -v 40 -&, map: image/gif,DOWN,lpr %s #map: image/ppm,|xv,lpr %s #map: Text/dvi,xdvi %s,lpr %s #map: Text/postscript,gspreview %s,lpr %s #map: Text/troff,nroff %s|more -d,ptroff %s map: Text/richtext,richtext %s|Less -f -r,lpr %s # # Set the builtin's default for bolding of search terms # SearchBolding: yes # # Set preference values for each gopher+ type # # format is # # prefer: default|gplusview pref value # #prefer: default 5 #prefer: image/gif 10 #prefer: image/ppm 5 gopher-3.0.15/gopher/locales/0000775000000000000000000000000012621233142012656 5ustar gopher-3.0.15/gopher/locales/Sv.msg0000664000000000000000000001771610762617110013777 0ustar $ $ This Swedish Translation is made by Johan Svensson , $ EkonomiCentrum Software Development Group, Lund University, Sweden. $ Please send comments and suggestions to him about this file! $ 1994-06-08 $ --- $ This file may be used freely as long as the text above follows the work. $ $quote " $ $ Welcome message... $ 1 "Välkommen till Gophers underbara värld!\n\n" 2 "Gopher har begränsningar i sitt användningsområde och\n" 3 "har ingen garanti. Titta vänligen i filen 'Copyright'\n" 4 "som följer med distributionen.\n\n" 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\n\n" 6 "Internet Gopher Information Client %s.%s patch%d (%s)\n" 7 "Tryck RETURN för att fortsätta\n" $ $ Errors in .gopherrc $ 8 "Kan inte skriva till gophers inställningsfil!!" $ $ Help for command line $ 9 "Användning: %s [-sSbDr] [-T typ] [-p sökväg] [-t titel] [datorvärd port]+\n" 10 " -s Säkert läge, användare utan eget konto\n" 11 " -S Säkert läge, användare med eget konto\n" 12 " -p sökväg Sökväg till första objekt\n" 13 " -T typ Första objektets typ\n" 14 " -i Sökkriterium (för -T 7)\n" 15 " -b Bokmärken först\n" 16 " -r Fjärranvändare\n" 17 " -D Avlusningsläge\n" $ $ Pager help.. $ 18 "Bläddringshjälp" 19 "u, ^G, vänster : Återgå till meny" 20 "mellanslag, ner : Gå till nästa sida" 21 "b, upp : Gå till föregående sida" 22 "/ : Sök text" 23 "m : skicka aktuellt dokument med email" 24 "s : spara aktuellt dokument" 25 "p : skriv ut aktuellt dokument" 26 "D : ladda ner aktuellt dokument" $ $ New Application Menu $ 27 "Content-Type Namn" 28 "Applikation för visning" 29 "Applikation för utskrift" $ $ Top Level Options $ 30 "Allmänna inställningar" 31 "Ställ in applikationer för visning" 32 "Ställ in applikationer för utskrift" 33 "Definiera ny Content-Type" $ $ Telnet connection $ 34 "Varning!!!!!, du håller på att lämna Internet" 35 "Gopher programmet och koppla upp dig mot en annan datorvärd." 36 "Om du kör fast kan du hålla ner ctrl och" 37 "] tangenterna, och sedan skriva quit" 38 "^ tangenterna, och sedan skriva q." 39 "Kopplar upp %.40s, port %d med %s." 40 "Kopplar upp %.40s med %s." 41 "Använd kontonamnet \"%.40s\" för att logga in" $ $ HTML menu $ 42 "Varning!!!!!, du håller på att lämna Internet Gopher" 43 "Klienten och koppla upp dig mot en HTML Klient. Använd" 44 "klientens Hjälp om du inte kan programmets kommandon." 45 "När du lämnar programmet, kommer du tillbaks till" 46 "Internet Gopher Klienten." $ $ Other html msgs $ 47 "Tyvärr, denna klient stödjer inte HTML" $ $ gopher.c $ 48 "Kan tyvärr inte hitta en administratör för detta objekt!" $ $ Gripe form msgs $ 49 "Tryck på Enter för att skicka ditt meddelande." 50 "Tryck på Tab tangenten vid slutet av varje rad." 51 "Ämne" 52 "Problem" 53 "Kan inte skicka datorpost..." 54 "Skickar datorpost till %s..." 55 "Ord att leta efter" 56 " Sida: %d/%d" 57 " för Hjälp, " 58 " för att Avsluta" 59 " för att gå upp en meny" 60 "%s: Erhöll inget för huvudmenyn, kan inte fortsätta\n" 61 "%sm%s för datorpost, %sD%s för att ladda ner, %ss%s för att spara, eller %sp%s för utskrift:" 62 ", %sm%s för datorpost, %sD%s för att ladda ner:" 63 ", för datorpost, för att ladda ner:" 64 ",\n för datorpost, för att ladda ner, för att spara, eller

för utskrift:" 65 "Adress syntaxen felaktig..." 66 "Feta sökord i den inbyggda bläddraren" 67 "Bokmärken" 68 "Kan inte öppna gammal fil.." 69 "Kan inte skriva till SYS$SCRATCH!" 70 "Kan inte skriva till /tmp biblioteket!" 71 "Kan inte öppna begärd fil.." 72 "Kan inte koppla upp datorvärden %.40s, port %d." 73 "Välj en dokumenttyp" 74 "Välj en metod att ladda ner" 75 "Koppla upp en ny Gopher Server" 76 "Koppla upp anonymous FTP Server över en Gopher gateway" 77 "Kopplar upp..." 78 "Uppkoppling misslyckades: %s." 79 "Uppkoppling mot datorvärd misslyckades." 80 "Kunde inte skapa '%s'" 81 "Kunde inte exekvera %s" 82 "Kunde inte hitta text" 83 "Kunde inte skapa en temporär fil!\n" 84 "Det blev fel vid utskrift, ledsen..." 85 "Fel vid anrop av TPU som bläddrare!!!" 86 "Avsluta: u" 87 "Hämtar fält..." 88 "Filen överfördes inte korrekt" 89 "Gopher Biblioteks Information" 90 "Gopher Fel" 91 "Gopher Fil" 92 "Gopher Hjälp Fil" 93 "Gopher Objekt Information" 94 "Gopher Inställningar" 95 "Gopher Överföringsfel" 96 "Hjälp: ?" 97 "Hem Gopher server: %.59s" 98 "Datorvärd att fråga:" 99 "Datornamn" 100 "Datornamn är okänt." 101 "Jag kan inte förstå din terminal typ\n" 102 "Internet Gopher Information Klient v%s.%s.%d" 103 "Länk Information" 104 "Lokalt Datum och Tid" 105 "Skicka aktuellt dokument med datorpost:" 106 "Skickar fil..." 107 "Skickar fil till %s..." 108 "Att titta på video är inte implementerat" 109 "Namn på detta bokmärke:" 110 "Nätverksfel" 111 "Nej" 112 "Inga bokmärken definierade" 113 "Inget kommando för att titta på detta är definierat!" 114 "Användare '%s' finns ej" 115 "SidaNer: " 116 "SidaNer: Mellanslag" 117 "SidaUpp: b" 118 "Port" 119 "Tryck " 120 "Tryck för att fortsätta" 121 "Tryck när du är klar\n" 122 "Skriv ut aktuellt dokument" 123 "Problem vid Skrivning" 124 "Verkligen Avsluta (y/n) ?" 125 "Tar emot Bibliotek..." 126 "Tar emot Fil..." 127 "Tar emot HTML sida..." 128 "Tar emot Information..." 129 "Tar emot MIME Fil..." 130 "Tar emot Video..." 131 "Tar emot Ljud..." 132 "Tar emot Bild..." 133 "Hämtar Bibliotek..." 134 "Återgå till Meny: u" 135 "Huvudmeny: " 136 "Spara till fil:" 137 "Spara lista av objekt till fil:" 138 "Sparar Fil..." 139 "Sök i bibliotekstitlar:" 140 "Sökningen misslyckades..." 141 "Sök i text:" 142 "Söker i text..." 143 "Söker..." 144 "Avgränsare (valfritt)" 145 "Visa datorvärdens lokala datum och tid" 146 "Storlek Språk Dokumenttyp\n" 147 "---------- ------------- ----------------------------\n" 148 "Tyvärr, kan inte visa denna fil" 149 "Tyvärr, kan inte radera översta biblioteksnivån." 150 "Tyvärr, kan inte ladda ner det där!" 151 "Tyvärr, kan inte göra ett bokmärke av bokmärken" 152 "Tyvärr, kan inte spara filer med detta konto" 153 "Tyvärr, kan inte köra med detta konto" 154 "Tyvärr, kan inte spara objektet till en fil!" 155 "Tyvärr, kan inte skriva ut detta dokument" 156 "Tyvärr, det finns ingen metod att skriva ut detta dokument" 157 "Tyvärr, telnet är inte tillgängligt." 158 "Tyvärr, denna maskin stödjer inte bilder" 159 "Tyvärr, denna maskin stödjer inte ljud" 160 "Tyvärr, tn3270 är inte tillgängligt." 161 "Tyvärr, du har inte behörighet att skriva ut filer" 162 "Tyvärr, du har inte behörighet att spara filer" 163 "Tyvärr, du har inte behörighet att göra inställningar i Säkert Läge." 164 "Tyvärr, du har inte behörighet att göra detta" 165 "Tyvärr, denna maskin stödjer inte videos" 166 "Tyvärr, finns inget program för denna typ av fil...." 167 "Start av DCL misslyckades!" 168 "Start av standard kommandotolk (shell) misslyckades!" 169 "Startar DCL delprocess. Logga ut för att återvända till Gopher.\n" 170 "Startar din standard kommandotolk (shell). Skriv 'exit' för att återvända till Gopher.\n\n" 171 "Starta din \"fångst\" nu...\n\n" 172 "Starta nedladdningen nu...\n" 173 "Problem med systemet, kan inte skicka datorpost" 174 "Filnamnet är:" 175 "Kan inte skapa en nätverkskanal (socket)." 176 "Unix \"rörkommando\" (pipe) är begärt. Kontrollera dina inställningar!" 177 "Okänt fel." 178 "Använd '/' för att definiera en sökning först..." 179 "Titta på objekt nummer: " 180 "Ja" 181 "Ditt val" 182 "\nNedladdning klar. %d bytes totalt, %d bytes/s\n" 183 "\nNedladdning kunde inte slutföras, ledsen... \n" 184 "\nTryck %sRETURN%s för att fortsätta" 185 "\nTryck för att fortsätta" 186 "\n\nServer Information\n" 187 "anonymous FTP datorvärd" 188 "gopher: Erhöll inget för huvudmenyn, kan inte fortsätta\n" $ Default language/region gopher+ view to choose 222 "Sv_SV" 232 "Talar du svenska?" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sD%s för att ladda ner:" 238 ", för att ladda ner:" gopher-3.0.15/gopher/locales/It.msg0000664000000000000000000002753010762617110013756 0ustar $ $ Translation by Francesco Brunetta $ 23-SEP-1994 (Gopher Client for VMS, 2.0-16) $ Last upd. 04-MAY-1995 (Gopher Client for VMS 2.1.2) $ 09-MAY-1995 (Gopher Client for VMS 2.1.3) $ $ ------------------------------------------------------------------- $ Note: is my humble opinion that literal translation of some few words $ (like "bookmark", "file" and "server") is not always fair. So I $ choose to let them in English language. If you need, here's some $ literal translation: $ $ Bookmark ............... Segnalibro $ File ................ Archivio $ Server ................ Servitore, Servente $ Directory .............. Elenco, Direttorio $ $ Some other word has been translated not litterally, in order to make $ messages more readable (for examples: 'client' was translated to $ "Applicazione", although a literal translation would be: "Cliente"). $ ------------------------------------------------------------------- $ $ $ Welcome message... $ $quote " 1 "Benvenuto nel meraviglioso mondo di Gopher!\n\n" 2 "Sono previste limitazioni nell'uso di GOPHER, che\n" 3 "viene distribuito privo di garanzie. Pregasi consultare il\n" 4 "file 'Copyright' incluso nella distribuzione.\n\n" 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\n\n" 6 "Applicazione Informativa per Internet %s.%s revisione %d (%s)\n" 7 "Premere RETURN per continuare\n" $ $ Errors in .gopherrc $ 8 "Non posso accedere al file di configurazione di Gopher!!" $ $ Help for command line $ 9 "Utilizzo: %s [-sSbDr] [-T type] [-p path] [-t title] [hostname port]+\n" 10 " -s modalita` sicurezza, utenti senza proprio codice d'accesso\n" 11 " -S modalita` sicurezza, utenti con proprio codice d'accesso\n" 12 " -p path Percorso d'accesso all'elemento iniziale\n" 13 " -T type Tipo dell'elemento iniziale\n" 14 " -i Parametro da ricercare (per -T 7)\n" 15 " -b Prima i \n" 16 " -r Utente remoto\n" 17 " -D Modalita` ricerca errori\n" $ $ Pager help.. $ 18 "Aiuto per la paginazione" 19 "u, ^G, SINISTRA : Ritorno al menu" 20 "spazio, GIU : Passaggio a pagina successiva" 21 "b, SU : Passaggio a pagina precedente" 22 "/ : Ricerca un testo" 23 "m : Invia il corrente documento per posta elettronica" 24 "s : Salva il corrente documento" 25 "p : Stampa il corrente documento" 26 "D : Scarica il corrente documento" $ $ New Application Menu $ 27 "Nome del tipo di elemento" 28 "Comando per visualizzazione" 29 "Comando per stampa" $ $ Top Level Options $ 30 "Opzioni generali" 31 "Configurazione Comandi per Visualizzazione" 32 "Configurazione Comandi per Stampa" 33 "Definizione nuovi tipi di elemento" $ $ Telnet connection $ 34 "Attenzione!!!!!, stai per abbandonare il programma" 35 "Internet Gopher e per connetterti ad un altro host." 36 "Se hai problemi premi insieme i tasti Ctrl e" 37 "] e poi scrivi quit" 38 "^ e poi scrivi quit" 39 "Connessione a %.40s, porta %d usando %s." 40 "Connessione a %.40s usando %s." 41 "Usa il codice d'accesso \"%.40s\" per accedere al sistema" $ $ HTML menu $ 42 "Attenzione!!!!!, stai per abbandonare l'applicazione GOPHER" 43 "e connetterti a un lettore HTML. Usa l'Aiuto del lettore HTML" 44 "se non hai familiarita` con i suoi comandi." 45 "All'uscita dal lettore, tornerai automaticamente" 46 "all'applicazione Gopher." $ $ Other html msgs $ 47 "Spiacente, questa applicazione non supporta HTML" $ $ gopher.c $ 48 "Spiacente, non riesco a trovare un amministratore per questo elemento" $ $ Gripe form msgs $ 49 "Premi il tasto Enter per inviare il tuo messaggio." 50 "Premi il tasto Tab al termine di ogni linea che inserisci." 51 "Soggetto" 52 "Problema" 53 "Non posso inviare il messaggio..." 54 "Spedizione messaggio a %s..." 55 "Parole da ricercare" 56 " Pagina: %d/%d" 57 " per Aiuto, " 58 " per Chiudere" 59 " per menu precedente" 60 "%s: Non ho ricevuto niente per il menu principale, non posso proseguire\n" 61 "%sm%s per spedire per Posta, %sD%s per Scaricare, %ss%s per Salvare, %sp%s per Stampare:" 62 ", %sm%s per spedire per Posta, %sD%s per Scaricare:" 63 ", per spedire per Posta, per Scaricare:" 64 ",\n per spedire Posta, per Scaricare, per Salvare,

per Stampare:" 65 "Sintassi dell'indirizzo rifiutata..." 66 "Parole ricercate nel visualizzatore, in neretto:" 67 "" 68 "Non posso aprire il vecchio file..." 69 "Non posso scrivere in SYS$SCRATCH!!!" 70 "Non posso scrivere nella Directory /tmp !!!!" 71 "Non posso aprire il file richiesto..." 72 "Non posso connettermi al sistema %.40s, porta %d." 73 "Scegli un tipo di documento" 74 "Scegli un metodo per scaricare" 75 "Connessione ad un altro Gopher Server" 76 "Connessione a un Server FTP Anonimo tramite un sistema Gopher intermedio" 77 " Connessione in corso..." 78 "Connessione fallita: %s." 79 "Connessione a sistema remoto fallita." 80 "Non posso creare '%s'" 81 "Non posso eseguire %s" 82 "Non riesco a trovare il testo" 83 "Non riesco a creare un file temporaneo!\n" 84 "C'e` un problema di stampa, spiacente..." 85 "Errore durante invocazione di TPU come visualizzatore!!!" 86 "Uscita: u" 87 "Estrazione campi..." 88 "File non trasferito correttamente" 89 "Informazioni sulla Directory Gopher" 90 "Errore di Gopher" 91 "File di Gopher" 92 "File di Aiuto di Gopher" 93 "Informazioni su elemento di Gopher" 94 "Opzioni di Gopher" 95 "Errore di Trasmissione di Gopher" 96 "Aiuto: ?" 97 "Gopher Server di partenza: %.59s" 98 "Sistema da interrogare:" 99 "Nome del sistema" 100 "Nome del sistema sconosciuto." 101 "Non posso stabilire il tipo del tuo terminale\n" 102 "Applicazione GOPHER per Informazioni in Internet v%s.%s.%d" 103 "Informazioni sul documento" 104 "Data e Orario locali" 105 "Spedizione per Posta del corrente documento a:" 106 "Spedizione per Posta del file..." 107 "Spedizione per Posta del file a %s..." 108 "Visualizzazione animata non ancora implementata" 109 "Nome per questo :" 110 "Errore in rete" 111 "No" 112 "Nessun definito" 113 "Nessun comando di visualizzazione assegnato a questa opzione!" 114 "Utente '%s' inesistente" 115 "Pagina Seguente: " 116 "Pagina Seguente: Spazio" 117 "Pagina precedente: b" 118 "Porta" 119 "Premere " 120 "Premere per continuare" 121 "Premere quando pronti\n" 122 "Stampa del corrente documento in corso..." 123 "Problemi di scrittura" 124 "Vuoi davvero uscire (y=SI/n=NO) ?" 125 " Ricezione Directory in corso..." 126 " File..." 127 " Ricezione pagina HTML in corso..." 128 " Ricezione Informazioni in corso..." 129 " Ricezione file MIME in corso..." 130 " Ricezione File d'Animazione in corso ..." 131 " Ricezione Suono in corso..." 132 " Ricezione Immagine in corso..." 133 " Estrazione Directory in corso..." 134 "Ritorno al Menu: u" 135 "Menu principale: " 136 "Salva nel file:" 137 "Salva la lista di elementi nel file:" 138 " Salvataggio File in corso..." 139 "Ricerca tra i titoli della Directory: " 140 "Ricerca fallita..." 141 "Ricerca nel testo:" 142 " Ricerca nel testo in corso..." 143 " Ricerca in corso..." 144 "Selettore (Opzionale)" 145 "Mostra Data e Orario locali del sistema remoto" 146 "Dimensione Linguaggio Tipo documento\n" 147 "---------- ------------- ----------------------------\n" 148 "Spiacente, non posso visualizzare questo file:" 149 "Spiacente, non posso cancellare il menu di primo livello." 150 "Spiacente, non posso scaricare!" 151 "Spiacente, non posso fare un con dei !" 152 "Spiacente, non posso salvare files con questo codice d'accesso" 153 "Spiacente, non posso aprire sottoprocessi con questo codice d'accesso" 154 "Spiacente, non posso salvare questo elemento in un file!" 155 "Spiacente, non posso stampare questo documento" 156 "Spiacente, non conosco meccanismi per stampare questo documento" 157 "Spiacente, telnet non e` disponibile." 158 "Spiacente, questa macchina non supporta immagini" 159 "Spiacente, questa macchina non supporta suoni" 160 "Spiacente, tn3270 non e` disponibile" 161 "Spiacente, non ti e` concesso stampare files" 162 "Spiacente, non ti e` concesso salvare files" 163 "Spiacente, non ti e` concesso modificare opzioni in modalita` sicurezza" 164 "Spiacente, non ti e` concesso fare cio`" 165 "Spiacente, questa macchina non sopporta animazioni" 166 "Spiacente, niente visualizzatore per il file..." 167 "Fallita la creazione del sottoprocesso DCL!" 168 "Fallito l'accesso alla shell di default!" 169 "Attivazione sottoprocesso DCL. Usa Logout per tornare a Gopher.\n" 170 "Passaggio alla shell di default. Usa 'exit' per tornare a Gopher.\n\n" 171 "Comincia pure a recuperare il testo...\n\n" 172 "Comincia pure a scaricare...\n" 173 "Il sistema ha problemi, non posso inviare messaggio via Posta Elettronica" 174 "Il nome del file e`:" 175 "Allocazione impossibile" 176 "Necessario un Piping di Unix. Controlla la tua configurazione!" 177 "Errore sconosciuto." 178 "Usa prima '/' per dirmi cosa cercare..." 179 "Visita l'elemento numero:" 180 "Si`" 181 "La tua scelta" 182 "\nScaricamento Completo. %d bytes in totale , %d bytes/sec\n" 183 "\nNon posso completare lo scaricamento, spiacente...\n" 184 "\nPremere %sRETURN%s per continuare" 185 "\nPremerem per continuare" 186 "\n\nInformazioni sul Server\n" 187 "anonymous FTP Host" 188 "gopher: non ho ricevuto niente per il menu principale, non posso proseguire\n" 189 "Il comando 'd'elete (cancellazione) e` solo per i ." 190 "^G : Annulla" 191 "OK: Enter" 192 "Tab, ^N : Campo successivo" 193 "^P : Campo precedente" 194 "^F : Visualizza la prossima pagina" 195 "^B : Visualizza la pagina precedente" 196 "^- : Aiuto (forse funzionano anche ^/ o ^7)" 197 "Enter : Accetta" 198 "[Aiuto: ^-] [Annulla: ^G]" 199 "[Cicla i valori: Space] [Mostra i Valori: l]" 200 "Scegli un elemento" $ $ Choose menu.. $ 201 "Come usare questo modulo" 202 "^G : Annulla" 203 "Down, ^N : Vai al prossimo elemento" 204 "Up, ^P : Vai all'elemento precedente" 205 "Space, ^F : Mostra la prossima pagina" 206 "b, ^B : Mostra la pagina precedente" 207 "^ : Mostra la prima pagina" 208 "$ : Mostra l'ultima pagina" 209 "0-9 : Seleziona una scelta specifica" 210 "Enter : Seleziona l'elemento corrente" 211 "Annulla: ^G" 212 " (per default)" 213 "Aiuto per videata di scelte multiple:" 214 "Nessuna informazione disponibile" 215 "Attenzione, linea errata in gopherrc: %s\n" 216 "Interruzione del salvataggio della configurazione di Gopher!" 217 "Testo" $ $ Default language/region gopher+ view to choose $ 218 "Una nuova configurazione e` disponibile. La carico?" 219 "Stampante di sistema di default" 220 "Stampante ANSI" 221 "Stampa su" $ Default language/region gopher+ view to choose 222 "It_IT" $ $ Multilingual HELP files are now possible $ If CONF.H defines GOPHERHELP_SECURE, make sure you $ have a separate file for secure users' help that $ doesn't document features they're not allowed to use. $ For VMS: $ 223 "GopherP_Dir:gopher_hlp.It" 224 "GopherP_Dir:gopher_hlp_secure.It" $ $ For Unix: $ 225 "/usr/local/lib/gopher.hlp.It" 226 "/usr/local/lib/gopher.hlp_secure.It" $ $ Gripe Enhancements $ 227 "Spiacente, non posso inviare commenti in modalita` sicurezza" 228 "Non posso inviare messaggi per Posta a un indirizzo nullo..." 229 "Relativamente ai seguenti elementi Gopher:\n" 230 "A" 231 "" $ $ A message that asks the User if they speak this language.. $ 232 "Parliamo italiano?" 233 " Sto scaricando %d bytes" 234 " 1200bps: %d minuti\n" 235 " 2400bps: %d minuti\n" 236 " 14400bps: %d minuti\n\n" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sD%s per Scaricare:" 238 ", per Scaricare:" $ $ A message for when there is no language choice.. $ 239 "Spiacente, nessun linguaggio da scegliere" gopher-3.0.15/gopher/locales/make.com0000664000000000000000000000610410762617110014301 0ustar $ vg = 'f$verify(0)' $!******************************************************************** $! wilkinson/macrides $! 1.5 $! 1994/12/18 $! $! J.Lance Wilkinson, Penn State University C&IS - LCS. $! F. Macrides, Worcester Foundation for Expermimental Biology $!******************************************************************** $! MODULE: message.com $! compiling script for VMS "internationalized" messages $!********************************************************************* $! Revision History: $! message.com,v $! Revision 1.5 1994/12/18 macrides $! Pass the facility values to MESSAGE.TPU as incremental values in the range $! of 0 - 2047. This guarantees unique values for up to the maximum of $! 2048 shared image message files. $! $! Revision 1.4 1994/7/14 wilkinson $! Made MAKE.COM search out all .msg files and process them rather than hard- $! coding specific .msg files. $! $! Revision 1.3 1994/7/13 wilkinson/macrides $! Firmed up AXP support $! $! Revision 1.2 1994/7/12 wilkinson $! Attempted AXP support $! $! Revision 1.1 1994/5/31 wilkinson $! Initial revision $! $!********************************************************************/ $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $! $ vg1 = f$verify(1) $! $! Preprocess the .MSG files into VMS message files. $! $ vg1 = 'f$verify(0)' $ if f$getsyi("HW_MODEL").ge.1024 $ then $ vg1 = f$verify(1) $ platform := "AXP" $ preprocess := "edit/tpu/nosection/nodisplay/command=message.tpu" $! $ vg1 = 'f$verify(0)' $ else $ vg1 = f$verify(1) $ platform := "VAX" $ preprocess := "edit/tpu/nosection/nodisplay/command=message.tpu" $ vg1 = 'f$verify(0)' $ endif $ $ facility = 0 $ prep_loop: $ file = f$search("*.msg") $ if file .eqs. "" .or. facility .ge. 2048 then goto done_prep $ filename := 'f$parse(file,,,"name") $ initstring = "''platform'"'facility $ vg1 = f$verify(1) $! $ preprocess/init='initstring/output='filename.vms$msg 'filename.msg $ vg1 = 'f$verify(0)' $ facility = facility + 1 $ goto prep_loop $ done_prep: $ purge/nolog *.vms$msg $ purge/nolog *.opt $ vg1 = f$verify(1) $! $! Compile the resultant .VMS$MSG files into VMS message files. $! $ vg1 = 'f$verify(0)' $ msgs_loop: $ file = f$search("*.vms$msg") $ if file .eqs. "" then goto done_msgs $ filename := 'f$parse(file,,,"name") $ vg1 = f$verify(1) $ message 'filename.vms$msg $ vg1 = 'f$verify(0)' $ goto msgs_loop $ done_msgs: $ purge/nolog *.obj $ vg1 = f$verify(1) $! $! Create non-executable message files. These .EXE files should $! be copied from [.gopher.locales] to GopherP_Dir or the $! location referenced by GOPHERMSGS_DEV in conf.h $! $ vg1 = 'f$verify(0)' $ link_loop: $ file = f$search("*.obj") $ if file .eqs. "" then goto done_link $ filename := 'f$parse(file,,,"name") $ vg1 = f$verify(1) $ link/sharable=gopher_msg_'filename.exe 'filename.obj, 'filename.opt/opt $ vg1 = 'f$verify(0)' $ goto link_loop $ done_link: $ purge/nolog gopher_msg_*.exe $ delete/nolog *.obj;* $ delete/nolog *.vms$msg;* $ delete/nolog *.opt;* $! $ vg1 = 'f$verify(0)' $ CLEANUP: $ vg1 = f$verify(vg) $exit gopher-3.0.15/gopher/locales/En_US.msg0000664000000000000000000002171110762617110014346 0ustar $quote " $ $ Welcome message... $ 1 "Welcome to the wonderful world of Gopher!\n\n" 2 "Gopher has limitations on its use and comes without\n" 3 "a warranty. Please refer to the file 'Copyright' included\n" 4 "in the distribution.\n\n" 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\nCopyright (C) 2000-2002 John Goerzen and the gopher developers\n\n" 6 "Internet Gopher Information Client %s.%s patch%d (%s)\n" 7 "Press RETURN to continue\n" $ $ Errors in .gopherrc $ 8 "Can't write gopher configuration file!!" $ $ Help for command line $ 9 "Usage: %s [-sSbDr] [-T type] [-p path] [-t title] [hostname port]+\n" 10 " -s secure mode, users without own account\n" 11 " -S secure mode, users with own account\n" 12 " -p path specify path to initial item\n" 13 " -T type Type of initial item\n" 14 " -i Search argument (for -T 7)\n" 15 " -b Bookmarks first\n" 16 " -r Remote user\n" 17 " -D Debug mode\n" $ $ Pager help.. $ 18 "Pager Help" 19 "u, ^G, left : Return to menu" 20 "space, down : Move to the next page" 21 "b, up : Move to the previous page" 22 "/ : Search for text" 23 "m : mail current document" 24 "s : save current document" 25 "p : print current document" 26 "D : download current document" $ $ New Application Menu $ 27 "Content-Type Name" 28 "Display Application" 29 "Printing Application" $ $ Top Level Options $ 30 "General Options" 31 "Configure Display Applications" 32 "Configure Printing Applications" 33 "Define New Content-Type" $ $ Telnet connection $ 34 "Warning!!!!!, you are about to leave the Internet" 35 "Gopher program and connect to another host. If" 36 "you get stuck press the control key and the" 37 "] key, and then type quit" 38 "^ key, and then type q." 39 "Connecting to %.40s, port %d using %s." 40 "Connecting to %.40s using %s." 41 "Use the account name \"%.40s\" to log in" $ $ HTML menu $ 42 "Warning!!!!!, you are about to leave the Internet Gopher" 43 "Client and connect to an HTML Browser. Use the Browser" 44 "Help if you are not familiar with its commands." 45 "Upon quitting from the Browser, you will be returned to" 46 "the Internet Gopher Client." $ $ Other html msgs $ 47 "Sorry, this client does not support HTML" $ $ gopher.c $ 48 "Can't find an administrator for this item, sorry!" $ $ Gripe form msgs $ 49 "Hit the Enter key to send your message." 50 "Hit the Tab key at the end of each line you type." 51 "Subject" 52 "Problem" 53 "Cannot send mail..." 54 "Mailing gripe to %s..." 55 "Words to search for" 56 " Page: %d/%d" 57 " for Help, " 58 " to Quit" 59 " to go up a menu" 60 "%s: Nothing received for main menu, can't continue\n" 61 "%sm%s to mail, %sD%s to download, %ss%s to save, or %sp%s to print:" 62 ", %sm%s to mail, %sD%s to download:" 63 ", to mail, to download:" 64 ",\n to mail, to download, to save, or

to print:" 65 "Address syntax rejected..." 66 "Bold Search words in Builtin Pager" 67 "Bookmarks" 68 "Can't open old file.." 69 "Can't write to SYS$SCRATCH!" 70 "Can't write to the /tmp directory!" 71 "Cannot Open requested file.." 72 "Cannot connect to host %.40s, port %d." 73 "Choose a document type" 74 "Choose a download method" 75 "Connect to a new Gopher Server" 76 "Connect to an anonymous FTP Server via the Gopher gateway" 77 "Connecting..." 78 "Connection failed: %s." 79 "Connection to remote host failed." 80 "Couldn't create '%s'" 81 "Couldn't execute %s" 82 "Couldn't find text" 83 "Couldn't make a tmp file!\n" 84 "Encountered printing problem, sorry..." 85 "Error invoking callable TPU as a pager!!!" 86 "Exit: u" 87 "Fetching Fields..." 88 "File didn't transfer successfully" 89 "Gopher Directory Information" 90 "Gopher Error" 91 "Gopher File" 92 "Gopher Help File" 93 "Gopher Item Information" 94 "Gopher Options" 95 "Gopher Transmission Error" 96 "Help: ?" 97 "Home Gopher server: %.59s" 98 "Host to query:" 99 "Hostname" 100 "Hostname is unknown." 101 "I don't understand your terminal type\n" 102 "Internet Gopher Information Client v%s.%s.%d" 103 "Link Info" 104 "Local Date and Time" 105 "Mail current document to:" 106 "Mailing File..." 107 "Mailing file to %s..." 108 "Movie viewing not yet implemented" 109 "Name for this bookmark:" 110 "Network Error" 111 "No" 112 "No bookmarks are defined" 113 "No display command is mapped to this view!" 114 "No such user '%s'" 115 "PageDown: " 116 "PageDown: Space" 117 "PageUp: b" 118 "Port" 119 "Press " 120 "Press to continue" 121 "Press when you're ready\n" 122 "Print current document" 123 "Problems Writing" 124 "Really quit (y/n) ?" 125 "Receiving Directory..." 126 "Receiving File..." 127 "Receiving HTML page..." 128 "Receiving Information..." 129 "Receiving MIME File..." 130 "Receiving Movie..." 131 "Receiving Sound..." 132 "Receiving Image..." 133 "Retrieving Directory..." 134 "Return to Menu: u" 135 "Root menu: " 136 "Save in file:" 137 "Save list of items in file:" 138 "Saving File..." 139 "Search directory titles for:" 140 "Search failed..." 141 "Search text for:" 142 "Searching Text..." 143 "Searching..." 144 "Selector (Optional)" 145 "Show host's local date and time" 146 "Size Language Document Type\n" 147 "---------- ------------- ----------------------------\n" 148 "Sorry, cannot display this file" 149 "Sorry, can't delete top level directory." 150 "Sorry, can't download that!" 151 "Sorry, can't make a bookmark of bookmarks" 152 "Sorry, can't save files with this account" 153 "Sorry, can't spawn in with this account" 154 "Sorry, can't save that item to a file!" 155 "Sorry, cannot print this document" 156 "Sorry, no method to print this document" 157 "Sorry, telnet is not available." 158 "Sorry, this machine doesn't support images" 159 "Sorry, this machine doesn't support sounds" 160 "Sorry, tn3270 is not available." 161 "Sorry, you are not allowed to print files" 162 "Sorry, you are not allowed to save files" 163 "Sorry, you are not allowed to set options in secure mode." 164 "Sorry, you're not allowed to do this" 165 "Sorry, this machine doesn't support movies" 166 "Sorry, no viewer for the file...." 167 "Spawn to DCL failed!" 168 "Spawn to default shell failed!" 169 "Spawning DCL subprocess. Logout to return to Gopher.\n" 170 "Spawning your default shell. Type 'exit' to return to Gopher.\n\n" 171 "Start your capture now...\n\n" 172 "Start your download now...\n" 173 "System problem, unable to mail" 174 "The filename is:" 175 "Unable to allocate a socket." 176 "Unix piping requested. Check your configuration!" 177 "Unknown error." 178 "Use '/' to define a search first..." 179 "View item number: " 180 "Yes" 181 "Your Choice" 182 "\nDownload Complete. %d total bytes, %d bytes/sec\n" 183 "\nDownload could not be completed, sorry... \n" 184 "\nPress %sRETURN%s to continue" 185 "\nPress to continue" 186 "\n\nServer Information\n" 187 "anonymous FTP Host" 188 "gopher: Nothing received for main menu, can't continue\n" 189 "The 'd'elete command is only for bookmarks." 190 "^G : Cancel" 191 "OK: Enter" 192 "Tab, ^N : Move to next field" 193 "^P : Move to previous field" 194 "^F : Display next page" 195 "^B : Display previous page" 196 "^- : Help (^/ or ^7 may work)" 197 "Enter : Accept" 198 "[Help: ^-] [Cancel: ^G]" 199 "[Cycle Values: Space] [List Values: l]" 200 "Select an item" $ $ Choose menu.. $ 201 "Form Help" 202 "^G : Cancel" 203 "Down, ^N : Move to next choice" 204 "Up, ^P : Move to previous choice" 205 "Space, ^F : Display next page" 206 "b, ^B : Display previous page" 207 "^ : Display first page" 208 "$ : Display last page" 209 "0-9 : Select a specific choice" 210 "Enter : Select current choice" 211 "Cancel: ^G" 212 " (default)" 213 "Choice Dialog Help" 214 "Nothing available." 215 "Warning, bad line in gopherrc: %s\n" 216 "Aborting gopher configuration save!!" 217 "Text" 218 "A new configuration is available. Load it?" 219 "Default System Printer" 220 "ANSI attached Printer" 221 "Print to" $ Default language/region gopher+ view to choose 222 "En_US" $ $ Multilingual HELP files are now possible $ If CONF.H defines GOPHERHELP_SECURE, make sure you $ have a separate file for secure users' help that $ doesn't document features they're not allowed to use. $ For VMS: $ 223 "GopherP_Dir:gopher.hlp" 224 "GopherP_Dir:gopher.hlp_secure" $ $ For Unix: $ 225 "/usr/local/lib/gopher.hlp" 226 "/usr/local/lib/gopher.hlp_secure" $ $ Gripe Enhancements $ 227 "Sorry, can't submit gripes in secure mode" 228 "Cannot send mail to null address..." 229 "Regarding the following Gopher item:\n" 230 "To" 231 "" $ $ A message that asks the User if they speak this language.. $ 232 "Do you speak English?" 233 " Downloading %d bytes" 234 " 1200bps: %d minutes\n" 235 " 2400bps: %d minutes\n" 236 " 14400bps: %d minutes\n\n" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sD%s to download:" 238 ", to download:" gopher-3.0.15/gopher/locales/klingon.msg0000664000000000000000000002312110762617110015033 0ustar $quote " $ Translated by Mark E. Shoulson (shoulson@cs.columbia.edu). $ Welcome message... $ 1 " qo' Da'elpu'. maj. nuqneH?\n\n" 2 " lo'lu' net vuS, 'ej Qap 'e' lay' pagh.\n" 3 "jabbI'ID 'e' ngaSbogh De'ghom yIlaD.\n\n" 4 "" 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\n\n" 6 " De' SuqwI' %s.%s tI'ta'ghach %d (%s).\n" 7 "ruchmeH, yI'uy.\n" $ $ Errors in .gopherrc $ 8 " QapbeHmeH De' vIqonlaHbe'!!" $ $ Help for command line $ 9 "lo'meH: %s [-sSbDr] [-T Segh] [-p He] [-t pong] [De' nobwI' pong] [De'wI' lojmItHey]\n" 10 " -s Hung mIw, patlh ghajbe'bogh lo'wI'\n" 11 " -S Hung mIw, patlh ghajbogh lo'wI'\n" 12 " -p He jabbI'ID wa'DIch SuqmeH Hevam ghoSlu'nIS\n" 13 " -T Segh jabbI'ID wa'DIch Segh\n" 14 " -i nejmeH De'Hom (-T 7-vaD)\n" 15 " -b Daqtamey wa'DIch\n" 16 " -r lo'wI' Hop\n" 17 " -D lughmoHmeH mIw\n" $ $ Pager help.. $ 18 "De' HotlhwI' QaHbogh De'" 19 "u, ^G, poS : HIDjolevDaq yIchegh" 20 "Daq chIm, bIng : tlha'bogh De'jIH yIHotlh" 21 "b, Dung : nungbogh De'jIH yIHotlh" 22 "/ : mu'Hey yInej" 23 "m : jabbI'IDvam yIlab" 24 "s : jabbI'IDvam yIqon" 25 "p : navDaq jabbI'IDvam yIghItlh" 26 "D : jabbI'IDvam yISuq" $ $ New Application Menu $ 27 "De' Segh" 28 "HotlhmeH ghunlu'bogh mIw" 29 "ghItlhmeH ghunlu'bogh mIw" $ $ Top Level Options $ 30 "DuHmey motlh" 31 "HotlhmeH DuHmey choH" 32 "ghItlhmeH ghunlu'bogh mIw DuHmey choH" 33 "De' Segh chu' ngu'" $ $ Telnet connection $ 34 "yIghuH!!! tugh qo' Damej" 35 "'ej De'wI' latlh DaQumchoH." 36 "Qumbe'chuqchoHchugh De'wI', Da'uytaHvIS" 37 "] yI'uy, 'ej yIghItlh" 38 "^ yI'uy, 'ej yIghItlh." 39 "%.40s lojmItHey %d vIQummeH, %s vIlo'." 40 "%.40s vIQummeH, %s vIlo'." 41 "mungu'meH De'wI' Hop, pongvaD \"%.40s\" vInob." $ $ HTML menu $ 42 "yIghuH!!! tugh qo' Damej" 43 "'ej HTML HotlhwI' DaQumchoH. HotlhwI' QaH 44 "jabbI'ID yIlaD, lo'meH mIwDaj DaSovchu'be'chugh." 45 "HotlhwI' DamejDI', SIbI'" 46 " SuqwI'Daq DacheghmoHlu'." $ $ Other html msgs $ 47 "HTML yajbe' De'wI'vam. Do'Ha'." $ $ gopher.c $ 48 "De'vam loHwI' vItu'laHbe'. Do'Ha'." $ $ Gripe form msgs $ 49 "jabbI'IDlIj DalabmeH, yI'uy." 50 "jIH HeH DacholDI', bIghItlhtaHvIS, yI'uy." 51 "qech" 52 "qay' Dochvam" 53 "jabbI'ID vIlablaHbe'..." 54 "bIbep %s-vaD 'e' vIja'..." 55 "mu'meyvam yInej:" 56 " HaSta De' mI': %d/%d" 57 " DaQaHlu'meH, " 58 " bImevmeH" 59 " HIDjolev bIngDaq bIghoSmeH" 60 "%s: HIDjolev wa'DIch vIHevbe'. vItaHlaHbe'." 61 "jabbI'ID DalabmeH: %sm%s, De' DaSuqmeH: %sD%s, De' DachoqmeH: %ss%s, pagh De' ghItlhlu' 'e' DaqaSmoHmeH: %sp%s." 62 ", jabbI'ID DalabmeH: %sm%s, De' DaSuqmeH: %sD%s" 63 ", jabbI'ID DalabmeH: , De' DaSuqmeH: ." 64 ",\n jabbI'ID DalabmeH: , De' DaSuqmeH: , bIchoqmeH: , pagh De' ghItlhlu' 'e' DaqaSmoHmeH:

." 65 "Daq De' lajlu'." 66 "SuqwI' De' HotlhwI'Daq jaqlaw' mu'mey lunejlu'bogh" 67 "Daqtamey" 68 "De' ngo' vInaw'laHbe'" 69 "SYS$SCRATCH vIghItlhlaHbe'!" 70 "/tmp De'DaqDaq jIghItlhlaHbe'!" 71 "De' Datlhobpu'bogh vInaw'laHbe'.." 72 "%.40s De'wI', lojmItHey %d vInaw'laHbe'." 73 "De' Segh yIwIv" 74 "De' SuqmeH mIw yIwIv" 75 " ma'wI' chu' yInaw'" 76 " ma'wI' Danaw'meH (pagh pong DanoblaH), mIw yIlo'" 77 "naw'choHlI'..." 78 "jInaw' 'e' vInIDDI', jIluj: %s." 79 "De'wI' Hop vInaw'laHbe'." 80 "'%s' vIcherlaHbe'." 81 "'%s' vIpablaHbe'." 82 "mu'mey vItu'laHbe'." 83 "De' ru' vIchenmoHlaHbe'!\n" 84 "jIghItlh 'e' vInIDDI', qay'lu'. Do'Ha'..." 85 "De' HotlhmeH vIlo' 'e' vInIDDI', Qaghbej vay'!!!" 86 "mej: u" 87 "yotlhHey SuqlI'..." 88 "De' jIQay 'e' vInIDDI', jIQapbe'" 89 " De'ghom De'" 90 " Qagh" 91 " De'" 92 " QaH De'" 93 " De' De'" 94 " DuHmey" 95 " labmeH Qagh" 96 "QaH: ?" 97 "juH ma'wI': %.59s" 98 "De'wI' jIyu'nISbogh:" 99 "De'wI' pong" 100 "De'wI' pong jISovbe'." 101 "SeHlawlIj SeghHey vIyajbe'\n" 102 " De' SuqwI' v%s.%s.%d" 103 "rarwI' De'" 104 "DaqlIj jaj mI' poH De' je" 105 "HevwI'vamvaD De''e' DaH Hotlhlu'bogh yIlI':" 106 "De' vIlI'lI'..." 107 "%s-vaD De' vIlI'lI'..." 108 "wej vIHtaHbogh rurwI' vIcha'laH" 109 "Daqtavam pong:" 110 "jatlhchuqDI' De'wI' Qagh" 111 "ghobe'" 112 "pagh Daqtamey lucherlu'pu'" 113 "ghu'vamvaD jIcha'meH vIra'lu'pu' pagh!" 114 "lo'wI' <%s> tu'be'lu'" 115 "tlha'bogh HaSta De': " 116 "tlha'bogh HaSta De': Daq chIm" 117 "nungbogh HaSta De': b" 118 "lojmItHey" 119 "Dochvam yI'uy: " 120 "bItaHmeH, yI'uy" 121 "bItaHrupDI', yI'uy\n" 122 "De''e' DaH Holthlu'bogh yIghItlh" 123 "jIghItlhDI' qay'lu'" 124 "bIbup DaneHbej'a' (y/n) ?" 125 "De'ghom HevlI'..." 126 "De' HevlI'..." 127 " De' HevlI'..." 128 "De' HevlI'..." 129 " De' HevlI'..." 130 "vIHbogh rurwI' HevlI'..." 131 "chuSmeH De' HevlI'..." 132 "rurwI' HevlI'..." 133 "HIDjolev SuqlI'..." 134 "HIDjolevDaq yIchegh: u" 135 "HIDjolev wa'DIch: " 136 "De' vIchoqbogh pong:" 137 "HIDjolev vIchoqbogh pong:" 138 "De' choqlI'..." 139 "HIDjolevDaq Dochvam yInej:" 140 "jInejta' 'ach jIluj..." 141 "ghItlhDaq Dochvam yInej:" 142 "ghItlhDaq nejlI'..." 143 "nejlI'..." 144 "wIvwI' (DuH)" 145 "ma'wI' Daq jaj mI' poH De' je yIcha'" 146 "tIntaHghaH Hol ghItlh Segh\n" 147 "---------- ------------- ----------------------------\n" 148 "De'vam vIcha'laHbe'. Do'Ha." 149 "De' HIDjolev wa'DIch vIQaw'laHbe'. Do'Ha'." 150 "Dochvetlh vISuqlaHbe'! Do'Ha'." 151 "Daqtamey Daqta vIcherlaHbe'. Do'Ha'." 152 "De' choqlaHbe' Hung ghotHeyvam. Do'Ha'." 153 "De'wI' Qu' cherlaHbe' Hung ghotHeyvam. Do'Ha'." 154 "Dochvetlh De' vIchoqlaHbe'! Do'Ha'." 155 "ghItlhvam vIghItlhlaHbe'. Do'Ha'." 156 "ghItlhvam vIghItlhmeH mIw tu'be'lu'. Do'Ha'." 157 " Dalo'laHbe'. Do'Ha'." 158 "rurwI' cha'laHbe' De'wI'vam. Do'Ha'." 159 "chuSlaHbe' De'wI'vam. Do'Ha'." 160 " Dalo'laHbe'. Do'Ha'." 161 "De' DaghItlh net tuch. Do'Ha'." 162 "De' Dachoq net tuch. Do'Ha'." 163 "Hung mIw vIlo'taHvIS wIvmey DawIv net tuch. Do'Ha'." 164 "ta'vam Data' net tuch. Do'Ha'." 165 "vIHbogh rurwI' cha'laHbe' De'wI'vam. Do'Ha'." 166 "De'vamvaD cha'wI' tu'be'lu'. Do'Ha'." 167 " De'wI' Qu' vIcher 'e' vInIDDI' jIluj!" 168 "qalobmeH mIwlIj motlh vIcherlaHbe'!" 169 " De'wI' Qu' vIcherlI'. Daq bIcheghmeH, yIrarHa'.\n" 170 "qalobmeH De'wI' mIwlIj motlh vIcherlI'. Daq bIcheghmeH, 'exit' yIghItlh.\n\n" 171 "DaH yIqonchoH...\n\n" 172 "DaH HevchoH De'wI'lIj...\n" 173 "qay' pat. jabbI'ID vIlablaHbe'" 174 "De' pong:" 175 "De'He vItu'laHbe'." 176 "De' QaymeH mIw tlhoblu'. QapbeHchu''a' De'wI'?" 177 "qay' vay' Sovbe'lu'bogh." 178 "bIruchpa', bInejmeH '/' Dalo'nIS..." 179 "Doch vIlegh vIneHbogh mI': " 180 "HISlaH" 181 "wIvlIj" 182 "\nDe' lI'lu'chu'ta'. %d vIHevpu' (qaStaHvIS wa' lup %d vIHev)\n" 183 "\nDe' lI'laHbe'law' lI'wI'. Do'Ha'.\n" 184 "\nruchmeH, %sRETURN%s yI'uy" 185 "\nruchmeH, yI'uy" 186 "\n\nma'wI' De'\n" 187 "pong poQbe'bogh ma'wI'" 188 "gopher: HIDjolev wa'DIchvaD pagh vIHevpu'. jItaHlaHbe'.\n" 189 "Daqta neH DaQaw'laH ('d')." 190 "^G : yIqIl" 191 "lu': " 192 "Tab, ^N : tlha'bogh yotlhHey yIghoS" 193 "^P : nungbogh yotlhHey yIghoS" 194 "^F : tlha'bogh De'jIH yIHotlh" 195 "^B : nungbogh De'jIH yIHotlh" 196 "^- : HIQaH! (chaq Qap je ^/ ^7 joq)" 197 "Enter : yIlaj" 198 "[QaH: ^-] [qIl: ^G]" 199 "[DuHmey yIchoH: Daq chIm] [DuHmey yIcha': l]" 200 "Doch yIwIv" $ $ Choose menu.. $ 201 "wIvmeH QaH" 202 "^G : yIqIl" 203 "bIng, ^N : tlha'bogh DuHDaq yIghoS" 204 "Dung, ^P : nungbogh DuHDaq yIghoS" 205 "Daq chIm, ^F : tlha'bogh De'jIH yIHotlh" 206 "b, ^B : nungbogh De'jIH yIHotlh" 207 "^ : De'jIH wa'DIch yIHotlh" 208 "$ : De'jIH Qav yIHotlh" 209 "0-9 : wa' DuH yIwIv" 210 "Enter : DuHvam yIwIv" 211 "yIqIl: ^G" 212 " (motlh)" 213 "wIvDI' QummeH QaH" 214 "pagh vISuqlaH." 215 "yIghuH: Daq mu'tlhegh vIyajbe'bogh tu'lu': %s\n" 216 " QapbeHmeH De' vItoDbe'Aborting gopher configuration save!!" 217 "pIqaD" 218 "QapbeHmeH De' chu' tu'lu'. 'oH vIlo'nIS'a'?" 219 "De'wI' ghItlhwI' motlh" 220 " ghItlhwI'" 221 "ghItlhmeH ghItlhwI'vam yIlo':" $ $ Default language/region gopher+ view to choose $ 222 "Klingon" $ $ Multilingual HELP files are now possible $ If CONF.H defines GOPHERHELP_SECURE, make sure you $ have a separate file for secure users' help that $ doesn't document features they're not allowed to use. $ For VMS: $ 223 "GopherP_Dir:gopher.hlp" 224 "GopherP_Dir:gopher.hlp_secure" $ $ For Unix: $ 225 "/usr/local/lib/gopher.hlp" 226 "/usr/local/lib/gopher.hlp_secure" $ $ Gripe Enhancements $ 227 "bIbeplaHbe' Hung mIw Dalo'taHvIS. Do'Ha'." 228 "jabbI'ID vIlabmeH Daq De' tu'be'lu'! jabbI'ID vIlablaHbe'..." 229 "tlha'bogh De' vIbuS:\n" 230 "ghotvamvaD:" 231 "" $ $ A message that asks the User if they speak this language.. $ 232 "tlhIngan Hol wIjatlh." 233 " De' HevlI': %d" 234 " 1200bps: %d tup\n" 235 " 2400bps: %d tup\n" 236 " 14400bps: %d tup\n\n" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", De' DaHevmeH %sD%s:" 238 ", De' DaHevmeH :" $ $ Sorry, only this language is available $ -- msg # overlap in v2.13 !!! $221 "tlhIngan Hol neH vIjatlhlaH. Do'Ha'." gopher-3.0.15/gopher/locales/Makefile.in0000664000000000000000000000340710762617110014734 0ustar # Swedish support added by Johan Svensson , # EkonomiCentrum Software Development Group, Lund University, Sweden. # 1994-06-08 # .SUFFIXES: .SUFFIXES: .cat .msg $(SUFFIXES) include ../../Makefile.config LOCALES = De_DE.cat Es_ES.cat Es_MX.cat En_US.cat Fr.cat Sv.cat It.cat piglatin.cat # OSF systems #LOCALEDIR = /usr/lib/nls LOCALEDIR = /usr/lib/locale .msg.cat: rm -f $@ gencat $@ $< all : $(LOCALES) clean : rm -f *.cat *.cat.m *~ # # Since many vendors don't have standard directories for languages # we must have separate install scripts... # install_sol2 : install-help @INSTALL@ Fr.cat $(LOCALEDIR)/fr/LC_MESSAGES/gopher.cat @INSTALL@ Es.cat $(LOCALEDIR)/es/LC_MESSAGES/gopher.cat @INSTALL@ sv.cat $(LOCALEDIR)/sv/LC_MESSAGES/gopher.cat install_osf : install-help @INSTALL@ Fr.cat /usr/lib/nls/msg/fr_FR.iso8859-1/gopher.cat @INSTALL@ Es.cat /usr/lib/nls/msg/es_ES.iso8859-1/gopher.cat @INSTALL@ sv.cat /usr/lib/nls/msg/sv_SE.iso8859-1/gopher.cat # HP/Apollo Domain/OS 10.4 or newer install_domain: install-help @INSTALL@ En_US.cat /usr/nlslib/en_US.iso88591/gopher.cat @INSTALL@ Fr.cat /usr/nlslib/fr_FR.iso88591/gopher.cat @INSTALL@ Es_ES.cat /usr/nlslib/es_ES.iso88591/gopher.cat -mkdir /usr/nlslib/es_MX.iso88591 @INSTALL@ Es_MX.cat /usr/nlslib/es_MX.iso88591/gopher.cat @INSTALL@ Sv.cat /usr/nlslib/sv_SE.iso88591/gopher.cat # # Hacked install for sites that haven't set up locales correctly # install : install-help -mkdir $(CLIENTLIB)/gophernls cp *.cat* $(CLIENTLIB)/gophernls # Sites without X/Open use the raw message files install-msg: install-help -mkdir $(CLIENTLIB)/gophernls cp *.msg $(CLIENTLIB)/gophernls # Everyone keeps localized help files in the same place install-help: @INSTALL@ gopher.hlp.Fr $(CLIENTLIB) gopher-3.0.15/gopher/locales/piglatin.msg0000664000000000000000000002714710762617110015215 0ustar $quote " $ Translation courtesy of Tona Henderson $ Welcome message... $ 1 "elcome-Way o-tay e-thay onderful-way orld-way of-ay opher-Gay!\n\n" 2 "opher-Gay as-hay imitations-lay on-ay its-ay use-ay and-ay omes-cay ithout-way\n" 3 "a arranty-way. ease-play efer-ray o-tay e-thay ile-fay 'opyright-cay' included\n" 4 "in-ay e-thay istribution-day.\n\n" 5 "opyright-Cay 1991-2000 y-bay e-thay egents-Ray of-ay e-thay University-ay of-ay innesota-May\n\n" 6 "Internet-ay opher-Gay Information-ay ient-Clay %s.%s patch%d (%s)\n" 7 "ess-Pray ETURN-RAY o-tay ontinue-cay\n" $ $ Errors in .gopherrc $ 8 "an't-cay ite-wray o-tay opher-gay onfiguration-cay ile-fay!!" $ $ Help for command line $ 9 "Usage-ay: %s [-sSbDr] [-T ype-tay] [-p ath-pay] [-t itle-tay] [ostname-hay ort-pay]+\n" 10 " -s ecure-say ode-may, users-ay ithout-way own-ay account-ay\n" 11 " -S ecure-say ode-may, users-ay ith-way own-ay account-ay\n" 12 " -p path ecify-spay ath-pay o-tay initial-ay item-ay\n" 13 " -T type ype-Tay of-ay initial-ay item-ay\n" 14 " -i earch-Say argument-ay (for -T 7)\n" 15 " -b ookmarks-Bay irst-fay\n" 16 " -r emote-Ray user-ay\n" 17 " -D ebug-Day ode-may\n" $ $ Pager help.. $ 18 "ager-Pay elp-Hay" 19 "u, ^G, left : eturn-Ray o-tay enu-may" 20 "space, down : ove-May o-tay e-thay ext-nay age-pay" 21 "b, up : ove-May o-tay e-thay evious-pray age-pay" 22 "/ : earch-Say or-fay ext-tay" 23 "m : ail-may urrent-cay ocument-day" 24 "s : ave-say urrent-cay ocument-day" 25 "p : int-pray urrent-cay ocument-day" 26 "D : ownload-day urrent-cay ocument-day" $ $ New Application Menu $ 27 "ontent-Cay ype-Tay ame-Nay" 28 "isplay-Day Application-Ay" 29 "inting-Pray Application-Ay" $ $ Top Level Options $ 30 "eneral-Gay Options-Ay" 31 "onfigure-Cay isplay-Day Applications-Ay" 32 "onfigure-Cay inting-Pray Applications-Ay" 33 "efine-Day ew-Nay ontent-Cay ype-Tay" $ $ Telnet connection $ 34 "arning-Way!!!!!, ou-Yay are-ay about-ay o-tay eave-lay e-thay Internet-ay" 35 "opher-Gay ogram-pray and-ay onnect-cay o-tay another-ay ost-hay. If-ay" 36 "ou-yay et-gay uck-stay ess-pray e-thay ontrol-cay ey-kay and-ay e-thay" 37 "] ey-kay, and-ay en-thay ype-tay it-quay" 38 "^ ey-kay, and-ay en-thay ype-tay q." 39 "onnecting-cay o-tay %.40s, ort-pay %d using-ay %s." 40 "onnecting-cay o-tay %.40s using-ay %s." 41 "Use-ay e-thay account-ay ame-nay \"%.40s\" o-tay og-lay in-ay" $ $ HTML menu $ 42 "arning-Way!!!!!, ou-yay are-ay about-ay o-tay eave-lay e-thay Internet-ay opher-Gay" 43 "ient-Clay and-ay onnect-cay o-tay an-ay HTML owser-Bray. Use-ay e-thay owser-Bray" 44 "elp-Hay if-ay ou-yay are-ay ot-nay amiliar-fay ith-way its-ay ommands-cay." 45 "Upon-ay itting-quay om-fray e-thay owser-Bray, ou-yay ill-way e-bay eturned-ray o-tay" 46 "e-thay Internet-ay opher-Gay ient-Clay." $ $ Other html msgs $ 47 "orry-Say, is-thay ient-clay oes-day ot-nay upport-say HTML" $ $ gopher.c $ 48 "an't-cay ind-fay an-ay administrator-ay or-fay is-thay item-ay, orry-say!" $ $ Gripe form msgs $ 49 "it-Hay e-thay Enter-ay ey-kay o-tay end-say our-yay essage-may." 50 "it-Hay e-thay ab-Tay ey-kay at-ay e-thay end-ay of-ay each-ay ine-lay ou-yay ype-tay." 51 "ubject-Say" 52 "oblem-Pray" 53 "annot-Cay end-say ail-may..." 54 "ailing-may ipe-gray o-tay %s..." 55 "ords-Way o-tay earch-say or-fay" 56 " age-Pay: %d/%d" 57 " or-fay elp-Hay, " 58 " o-tay uit-Qay" 59 " o-tay o-gay up-ay a enu-may" 60 "%s: othing-Nay eceived-ray or-fay ain-may enu-may, an't-cay ontinue-cay\n" 61 "%sm%s o-tay ail-may, %sD%s o-tay ownload-day, %ss%s o-tay ave-say, or %sp%s o-tay int-pray:" 62 ", %sm%s o-tay mail, %sD%s o-tay ownload-day:" 63 ", o-tay ail-may, o-tay ownload-day:" 64 ",\n o-tay ail-may, o-tay ownload-day, o-tay ave-say, or

o-tay int-pray:" 65 "Address-ay yntax-say ejected-ray..." 66 "old-Bay earch-Say ords-way in-ay uiltin-Bay ager-Pay" 67 "ookmarks-Bay" 68 "an't-Cay open-ay old-ay ile-fay.." 69 "an't-Cay ite-wray o-tay SYS$SCRATCH!" 70 "an't-Cay ite-wray o-tay e-thay /tmp irectory-day!" 71 "annot-Cay Open-ay equested-ray ile-fay.." 72 "annot-Cay onnect-cay o-tay ost-hay %.40s, ort-pay %d." 73 "oose-Chay a ocument-day ype-tay" 74 "oose-Chay a ownload-day ethod-may" 75 "onnect-Cay o-tay a ew-nay opher-Gay erver-Say" 76 "onnect-Cay o-tay an anonymous-ay TP-Fay erver-Say ia-vay e-tahy opher-Gay ateway-gay" 77 "onnecting-Cay..." 78 "onnection-Cay ailed-fay: %s." 79 "onnection-Cay o-tay emote-ray ost-hay ailed-fay." 80 "ouldn't-Cay eate-cray '%s'" 81 "ouldn't-Cay execute-ay %s" 82 "ouldn't-Cay ind-fay ext-tay" 83 "ouldn't-Cay ake-may a tmp ile-fay!\n" 84 "Encountered-ay inting-pray oblem-pray, orry-say..." 85 "Error-ay invoking-ay allable-cay TPU as-ay a ager-pay!!!" 86 "Exit-ay: u" 87 "etching-Fay ields-Fay..." 88 "ile-Fay idn't-day ansfer-tray uccessfully-say" 89 "opher-Gay irectory-Day Information-ay" 90 "opher-Gay Error-ay" 91 "opher-Gay ile-Fay" 92 "opher-Gay elp-Hay ile-Fay" 93 "opher-Gay Item-ay Information-ay" 94 "opher-Gay Options-ay" 95 "opher-Gay ansmission-Tray Error-ay" 96 "elp-Hay: ?" 97 "ome-Hay opher-Gay erver-say: %.59s" 98 "ost-Hay o-tay uery-qay:" 99 "ostname-Hay" 100 "ostname-Hay is-ay unknown-ay." 101 "I on't-day understand-ay our-yay erminal-tay ype-tay\n" 102 "Internet-ay opher-Gay Information-ay ient-Clay v%s.%s.%d" 103 "ink-Lay Info-ay" 104 "ocal-Lay ate-Day and-ay ime-Tay" 105 "ail-May urrent-cay ocument-day o-tay:" 106 "ailing-May ile-Fay..." 107 "ailing-May ile-fay o-tay %s..." 108 "ovie-May iewing-vay ot-nay et-yay implemented-ay" 109 "ame-Nay or-fay is-thay ookmark-bay:" 110 "etwork-Nay Error-ay" 111 "o-Nay" 112 "o-Nay ookmarks-bay are-ay efined-day" 113 "o-Nay isplay-day ommand-cay is-ay apped-may o-tay is-thay iew-vay!" 114 "o-Nay uch-say user-ay '%s'" 115 "ageDown-Pay: " 116 "ageDown-Pay: Space" 117 "ageUp-Pay: b" 118 "ort-Pay" 119 "ess-Pray " 120 "ess-Pray o-tay ontinue-cay" 121 "ess-Pray en-whay ou're-yay eady-ray\n" 122 "int-Pray urrent-cay ocument-day" 123 "oblems-Pray iting-Wray" 124 "eally-Ray uit-qay (y/n) ?" 125 "eceiving-Ray irectory-Day..." 126 "eceiving-Ray ile-Fay..." 127 "eceiving-Ray HTML age-pay..." 128 "eceiving-Ray Information-ay..." 129 "eceiving-Ray MIME ile-Fay..." 130 "eceiving-Ray ovie-May..." 131 "eceiving-Ray ound-Say..." 132 "eceiving-Ray Image-ay..." 133 "etrieving-Ray irectory-Day..." 134 "eturn-Ray o-tay enu-May: u" 135 "oot-Ray enu-may: " 136 "ave-Say in-ay ile-fay:" 137 "ave-Say ist-lay of-ay items-ay in-ay ile-fay:" 138 "aving-Say ile-Fay..." 139 "earch-Say irectory-day itles-tay or-fay:" 140 "earch-Say ailed-fay..." 141 "earch-Say ext-tay or-fay:" 142 "earching-Say ext-Tay..." 143 "earching-Say..." 144 "elector-Say (Optional-ay)" 145 "ow-Shay ost's-hay ocal-lay ate-day and-ay ime-tay" 146 "ize-Say anguage-Lay ocument-Day ype-Tay\n" 147 "---------- ------------- ----------------------------\n" 148 "orry-Say, annot-cay isplay-day is-thay ile-fay" 149 "orry-Say, an't-cay elete-day op-tay evel-lay irectory-day." 150 "orry-Say, an't-cay ownload-day at-thay!" 151 "orry-Say, an't-cay ake-may a ookmark-bay of-ay ookmarks-bay" 152 "orry-Say, an't-cay ave-say iles-fay ith-way is-thay account-ay" 153 "orry-Say, an't-cay awn-spay in-ay ith-ay is-thay account-ay" 154 "orry-Say, an't-cay ave-say at-thay item-ay o-tay a ile-fay!" 155 "orry-Say, annot-cay int-pray is-thay ocument-day" 156 "orry-Say, o-nay ethod-may o-tay int-pray is-thay ocument-day" 157 "orry-Say, elnet-tay is-ay ot-nat available-ay." 158 "orry-Say, is-thay achine-may oesn't-day upport-say images-ay" 159 "orry-Say, is-thay achine-may oesn't-day upport-say ounds-say" 160 "orry-Say, tn3270 is-ay ot-nay available-ay." 161 "orry-Say, ou-yay are-ay ot-nay allowed-ay o-tay int-pray iles-fay" 162 "orry-Say, ou-yay are-ay ot-nay allowed-ay o-tay ave-say iles-fay" 163 "orry-Say, ou-yay are-ay ot-nay allowed-ay o-tay et-say options-ay in-ay ecure-say ode-may." 164 "orry-Say, ou're-yay ot-nay allowed-ay o-tay o-day is-thay" 165 "orry-Say, is-thay achine-may oesn't-day upport-say ovies-may" 166 "orry-Say, o-nay iewer-vay or-fay e-thay ile-fay...." 167 "awn-Spay o-tay DCL ailed-fay!" 168 "awn-Spay o-tay efault-day ell-shay ailed-fay!" 169 "awning-Spay DCL ubprocess-say. ogout-Lay o-tay eturn-ray o-tay opher-Gay.\n" 170 "awning-Spay our-yay efault-day ell-shay. ype-Tay 'exit' o-tay eturn-ray o-tay opher-Gay.\n\n" 171 "art-Stay our-yay apture-cay ow-nay...\n\n" 172 "art-Stay our-yay ownload-day ow-nay...\n" 173 "ystem-Say oblem-pray, unable-ay o-tay ail-may" 174 "e-Thay ilename-fay is-ay:" 175 "Unable-ay o-tay allocate-ay a ocket-say." 176 "Unix-ay iping-pay equested-ray. eck-Chay our-yay onfiguration-cay!" 177 "Unknown-ay error-ay." 178 "Use-ay '/' o-tay efine-day a earch-say irst-fay..." 179 "iew-Vay item-ay umber-nay: " 180 "es-Yay" 181 "our-Yay oice-Chay" 182 "\nownload-Day omplete-Cay. %d otal-tay ytes-bay, %d ytes-bay/ec-say\n" 183 "\nownload-Day ould-cay ot-nay e-bay ompleted-cay, orry-say... \n" 184 "\ness-Pray %sRETURN%s o-tay ontinue-cay" 185 "\ness-Pray o-tay ontinue-cay" 186 "\n\nerver-Say Information-ay\n" 187 "anonymous-ay FTP ost-Hay" 188 "opher-gay: othing-Nay eceived-ray or-fay ain-may enu-may, an't-cay ontinue-Cay\n" 189 "e-Thay 'd'elete ommand-cay is-ay only-ay or-fay ookmarks-bay." 190 "^G : ancel-Cay" 191 "OK: Enter-ay" 192 "Tab, ^N : ove-May o-tay ext-nay ield-fay" 193 "^P : ove-May o-tay evious-pray ield-fay" 194 "^F : isplay-Day ext-nay age-pay" 195 "^B : isplay-Day evious-pray age-pay" 196 "^- : elp-Hay (^/ or ^7 ay-may ork-way)" 197 "Enter-ay: Accept-ay" 198 "[elp-Hay: ^-] [ancel-Cay: ^G]" 199 "[ycle-Cay alues-Vay: Space] [ist-Lay alues-Vay: l]" 200 "elect-Say an-ay item-ay" $ $ Choose menu.. $ 201 "orm-Fay elp-Hay" 202 "^G : ancel-Cay" 203 "Down, ^N : ove-May o-tay ext-nay oice-chay" 204 "Up, ^P : ove-May o-tay evious-pray oice-chay" 205 "Space, ^F : isplay-Day ext-nay age-pay" 206 "b, ^B : isplay-Day evious-pray age-pay" 207 "^ : isplay-Day irst-fay age-pay" 208 "$ : isplay-Day ast-lay age-pay" 209 "0-9 : elect-Say a ecific-spay oice-chay" 210 "Enter : elect-Say urrent-cay oice-chay" 211 "ancel-Cay: ^G" 212 " (efault-day)" 213 "oice-Chay ialog-Day elp-Hay" 214 "othing-Nay available-ay." 215 "arning-Way, ad-bay ine-lay in-ay gopherrc: %s\n" 216 "Aborting-ay opher-gay onfiguration-cay ave-say!!" 217 "ext-Tay" 218 "A new configuration is available. Load it?" 219 "Default System Printer" 220 "ANSI attached Printer" 221 "Print to" $ Default language/region gopher+ view to choose 222 "En_iglatinpay" $ $ Multilingual HELP files are now possible $ If CONF.H defines GOPHERHELP_SECURE, make sure you $ have a separate file for secure users' help that $ doesn't document features they're not allowed to use. $ For VMS: $ 223 "GopherP_Dir:gopher.hlp" 224 "GopherP_Dir:gopher.hlp_secure" $ $ For Unix: $ 225 "/usr/local/lib/gopher.hlp" 226 "/usr/local/lib/gopher.hlp_secure" $ $ Gripe Enhancements $ 227 "orry-Say, an't-cay ubmit-say ipes-gray in-ay ecure-say ode-may" 228 "annot-Cay end-say ail-may o-tay ull-nay address-ay..." 229 "egarding-Ray e-thay ollowing-fay opher-Gay item-ay:\n" 230 "o-Tay" 231 "" $ $ A message that asks the User if they speak this language.. $ 232 "all-Shay e-way eak-spay ig-Pay atin-Lay?" 233 " ownloading-Day %d ytes-bay" 234 " 1200bps: %d inutes-may\n" 235 " 2400bps: %d inutes-may\n" 236 " 14400bps: %d inutes-may\n\n" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sD%s o-tay ownload-day:" 238 ", o-tay ownload-day:" $ $ Sorry, only this language is available $ -- msg # overlap in v2.13 !!! $221 "orry-Say, only-ay ig-Pay atin-Lay is-ay available-ay" gopher-3.0.15/gopher/locales/Es_MX.msg0000664000000000000000000002335010762617110014351 0ustar $ $ Translation courtesy of Fernando Garcia-Loygorri $ Modify by Daniel Trejo-Medina $ $quote " $ $ Welcome message... $ 1 "¡Bienvenido al maravilloso mundo de Gopher!\n\n" 2 "Hay limitaciones en el uso de Gopher y no está\n" 3 "garantizado. Por favor, lea el archivo 'Copyright' incluído\n" 4 "en el paquete.\n\n" 5 "Derechos Reservados 1991-2000 por los Regentes de la Universidad de Minnesota\n\n" 6 "Cliente de Información de Gopher de Internet %s.%s parche%d (%s)\n" 7 "Presione ENTER para continuar\n" $ $ Errors in .gopherrc $ 8 "¡No puedo escribir el archivo de configuración de Gopher!" $ $ Help for command line $ 9 "Utilice: %s [-sSbDr] [-T tipo] [-p ruta] [-t titulo] [hostname puerto]+\n" 10 " -s Modo seguro, usuarios sin cuenta propia\n" 11 " -S Modo seguro, usuarios con cuenta propia\n" 12 " -p ruta Especificación de la ruta al elemento inicial\n" 13 " -T tipo Tipo de elemento inicial\n" 14 " -i Argumento de búsqueda (para -T 7)\n" 15 " -b Primero los recordatorios\n" 16 " -r Usuario remoto\n" 17 " -D Modo de depuración\n" $ $ Pager help.. $ 18 "Ayuda de Paginador" 19 "u, ^G, izquierda : Volver al menú" 20 "espacio, abajo : Ir a la siguiente página" 21 "b, arriba : Ir a la página anterior" 22 "/ : Buscar en el texto" 23 "m : Enviar por correo el documento actual" 24 "s : Guardar el documento actual" 25 "p : Imprimir el documento actual" 26 "D : Descargar el documento actual" $ $ New Application Menu $ 27 "Nombre del tipo de contenido" 28 "Aplicación de presentación" 29 "Aplicación de impresión" $ $ Top Level Options $ 30 "Opciones generales" 31 "Configuración de las aplicaciones de presentación" 32 "Configuración de las aplicaciones de impresión" 33 "Definición de un tipo de contenido nuevo" $ $ Telnet connection $ 34 "¡¡¡Aviso!!!, va a abandonar el programa Gopher" 35 "de Internet y a conectarse a otro servidor. Si" 36 "se queda atorado, pulse la tecla de Control junto" 37 "con la tecla ] y después teclee quit" 38 "tecla ^ y después teclee q." 39 "Conectando a %.40s, puerta %d usando %s." 40 "Conectando a %.40s usando %s." 41 "Use como login \"%.40s\" para entrar" $ $ HTML menu $ 42 "¡¡¡Aviso!!!, va a abandonar el cliente Gopher de" 43 "Internet y a conectarse a un Lector de HTML. Use la Ayuda" 44 "del Lector si no está familiarizado con sus órdenes." 45 "Al salir del Lector, será devuelto al cliente Gopher" 46 "de Internet." $ $ Other html msgs $ 47 "Lo sienta, este cliente no da soporte a HTML" $ $ gopher.c $ 48 "Lo siento, no puedo encontrar un administrador para este elemento" $ $ Gripe form msgs $ 49 "Presione la tecla Intro para enviar su mensaje." 50 "Presione la tecla de tabulación al final de cada línea que escriba." 51 "Asunto" 52 "Problema" 53 "No puedo enviar el correo..." 54 "Enviando una queja a %s..." 55 "Palabras a buscar" 56 " Página: %d/%d" 57 " para Ayuda, " 58 " para Salir" 59 " para menu anterior" 60 "%s: No se ha recibido el menú principal, no es posible seguir\n" 61 "%sm%s para enviar por correo, %sD%s para transferir, %ss%s para salvar o %sp%s para imprimir:" 62 ", %sm%s para enviar por correo, %sD%s para transferir:" 63 ", para enviar por correo, para transferir:" 64 "\n para enviar por correo, para transferir, para salvar o

para imprimir:" 65 "La sintaxis de la dirección ha sido rechazada..." 66 "Palabras buscadas en negrita en el compaginador interno" 67 "Recordatorios" 68 "No puedo abrir el antiguo archivo.." 69 "¡No puedo escribir en SYS$SCRATCH!" 70 "¡No puedo escribir en el directorio /tmp!" 71 "No puedo abrir el archivo solicitado.." 72 "No puedo conectar al servidor %.40s, puerta %d." 73 "Elija un tipo de documento" 74 "Elija un método de transferencia" 75 "Conexión a otro servidor de Gopher" 76 "Conexión a un servidor de FTP anónimo vía Gopher" 77 "Conectandose" 78 "Fallo en la conexión: %s." 79 "Fallo en la conexión al servidor remoto." 80 "No he podido crear '%s'" 81 "No he podido ejecutar %s" 82 "No he podido encontrar el texto" 83 "¡No he podido crear un archivo temporal!\n" 84 "Lo siento, ha habido un problema al imprimir..." 85 "¡Error al invocar una TPU como compaginador!" 86 "Salir: u" 87 "Extrayendo campos..." 88 "El archivo no fue transferido con éxito" 89 "Información sobre el directorio de Gopher" 90 "Error de Gopher" 91 "Archivo de Gopher" 92 "Archivo de ayuda" 93 "Información sobre elemento de Gopher" 94 "Opciones de Gopher" 95 "Error de transmisión de Gopher" 96 "Ayuda: ?" 97 "Servidor de Gopher Inicial: %.59s" 98 "Servidor a consultar:" 99 "Nombre de servidor" 100 "Nombre de servidor desconocido." 101 "No puedo establecer el tipo de su terminal\n" 102 "Cliente de Información de Gopher de Internet v%s.%s.%d" 103 "Información sobre ligas" 104 "Fecha y hora locales" 105 "Enviar por correo el documento actual a:" 106 "Enviando el archivo..." 107 "Enviando el archivo a %s..." 108 "Aún no se ha implementado el manejo de películas" 109 "Nombre de este recordatorio:" 110 "Error en la red" 111 "No" 112 "No hay recordatorios definidos" 113 "¡No hay una presentación asignada a esta vista!" 114 "El usuario '%s' no existe" 115 "Siguiente página: " 116 "Siguiente página: Espacio" 117 "Página anterior: b" 118 "Puerto" 119 "Presione " 120 "Presione para continuar" 121 "Presione cuando esté listo\n" 122 "Imprimir el documento actual" 123 "Hay problemas escribiendo" 124 "¿Seguro en salir (y=sí/n=no) ?" 125 "Recibiendo directorio..." 126 "Recibiendo archivo..." 127 "Recibiendo página de HTML..." 128 "Recibiendo información..." 129 "Recibiendo archivo MIME..." 130 "Recibiendo película..." 131 "Recibiendo sonido..." 132 "Recibiendo Imagen..." 133 "Extrayendo directorio..." 134 "Volver al Menú: u" 135 "Menú principal: " 136 "Guardar en archivo:" 137 "Guardar lista de elementos en archivo:" 138 "Guardando archivo..." 139 "Búsqueda en títulos de directorios de:" 140 "Búsqueda sin éxito..." 141 "Buscar texto por:" 142 "Buscando texto..." 143 "Buscando..." 144 "Seleccionador (Opcional)" 145 "Mostrar la fecha y hora locales en el servidor remoto" 146 "Tamaño Lenguaje Tipo de Documento\n" 147 "---------- ------------- ----------------------------\n" 148 "Lo siento, no puedo mostrar este archivo" 149 "Lo siento, no puedo borrar el directorio de más alto nivel." 150 "¡Lo siento, no puedo transferir eso!" 151 "Lo siento, no puedo hacer un recordatorio de recordatorios" 152 "Lo siento, con esta cuenta no es posible guardar archivo" 153 "Lo siento, con esta cuenta no es posible iniciar otro proceso" 154 "¡Lo siento, no puedo guardar ese elemento en un archivo!" 155 "Lo siento, no puedo imprimir este documento" 156 "Lo siento, no hay mecanismo para imprimir este documento" 157 "Lo siento, telnet no está disponible." 158 "Lo siento, esta máquina no da soporte a imágenes" 159 "Lo siento, esta máquina no da soporte a sonidos" 160 "Lo siento, tn3270 no está disponible." 161 "Lo siento, Ud. no está autorizado a imprimir archivo" 162 "Lo siento, Ud. no está autorizado a guardar archivo" 163 "Lo siento, Ud. no está autorizado para pone opciones en modo seguro" 164 "Lo siento, Ud. no está autorizado a hacer esto" 165 "Lo siento, esta máquina no maneja películas" 166 "Lo siento, No hay visualizador para el archivo..." 167 "¡Ha fallado el inicio del subproceso DCL!" 168 "¡Ha fallado el inicio del intérprete de órdenes habitual!" 169 "Iniciando el subproceso DCL. Salga para volver a Gopher.\n" 170 "Iniciando su intérprete de órdenes habitual. Teclee 'exit' para volver\na Gopher.\n\n" 171 "Comience ahora su captura de datos...\n\n" 172 "Comience ahora su descarga de datos...\n" 173 "Problema en el sistema, no es posible enviar correo" 174 "El nombre del archivo es" 175 "No es posible reservar un socket." 176 "Se ha solicitado un pipe de Unix. ¡Compruebe su configuración!" 177 "Error desconocido." 178 "Use '/' para definir primero una búsqueda..." 179 "Opción número:" 180 "Sí" 181 "Elija" 182 "\nTransferencia terminada. %d bytes en total, %d bytes/sec.\n" 183 "\nLo siento, no ha sido posible completar la transferencia... \n" 184 "\nPresione %sENTER%s para continuar" 185 "\nPresione para continuar" 186 "\n\nInformación del servidor\n" 187 "Servidor para FTP anónimo" 188 "gopher: No se ha recibido el menú principal, no es posible seguir\n" 189 "El comando 'd'elete es solo para recordatorios" 190 "^G : Cancelar" 191 "OK : Enter" 192 "Tab, ^N : Siguiente campo" 193 "^P : Campo anterior" 194 "^F : Ver página siguiente" 195 "^B : Ver página anterior" 196 "^- : Ayuda (^/ o ^7 tambien funcionan)" 197 "Enter : Aceptar" 198 "[Ayuda: ^-] [Cancelar: ^G]" 199 "[Valores ciclicos: Espacio] [Listar Valores: l]" 200 "Seleccione un elemento" $ $ Elegir menu.. $ 201 "Ayuda Rapida" 202 "^G : Cancelar" 203 "Abajo, ^N : Siguiente Opción" 204 "Arriba, ^P : Opción Anterior" 205 "Espacio, ^F : Ver página siguiente" 206 "b, ^B : Ver página anterior" 207 "^ : Ver la primera página" 208 "$ : Ver la última página" 209 "0-9 : Escoger una opción específica" 210 "Enter : Escoger la opción actual" 211 "Cancelar : ^G" 212 " (default)" 213 "Elegir Ayuda de dialogo" 214 "Nada Disponible." 215 "Peligro, error en una línea del gopherrc: %s\n" 216 "Abortando el salvar la configuración!!" 217 "Texto" $ Default language/region gopher+ view to choose 222 "Es_MX" 223 "GopherP_Dir:gopherhlp.ES" 224 "GopherP_Dir:gopher.hlp_secure" 225 "/usr/local/lib/gopher.hlp.Es" 226 "/usr/local/lib/gopher.hlp_secure" 232 "¿Habla español de America Latina?" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sm%s para enviar por correo, %sD%s para transferir:" 238 ", para enviar por correo, para transferir:" gopher-3.0.15/gopher/locales/gopher.hlp.Fr0000664000000000000000000000526310762617110015230 0ustar AIDE pour Gopher ---------------- Déplacements dans Gopher ------------------------ Pour les déplacements, utiliser les flèches ou les commandes vi/emacs équivalentes Flèche à droite, Retour: Exécute/Affiche l'élément sélectionné Flèche à gauche, u ....: Quitte/Retourne au niveau précédent Flèche vers le bas ....: Déplace le curseur à la ligne suivante Flèche vers le haut ...: Déplace le curseur à la ligne précédente >, +, Pgdwn, Espace ...: Affiche la page suivante <, -, Pgup, b .........: Affiche la page précédente 0-9 ...................: Déplace le curseur à la ligne de menu désirée m .....................: Retourne au menu principal Signets ------- a : Ajoute l'élément sélectionné au menu des signets. A : Ajoute le répertoire au menu des signets. v : Permet de visualiser le menu des signets. d : Efface un signet. Autres commandes ---------------- q : Quitte avec confirmation. Q : Quitte sans confirmation. s : Sauvegarde l'élément sélectionné dans un fichier. S : Sauvegarde le menu courant dans un fichier. D : Active le téléchargement d'un fichier. r : Affiche le menu principal du serveur Gopher de l'élément sélectionné. R : Affiche le menu principal du serveur Gopher du répertoire courant. = : Affiche l'information technique concernant l'élément sélectionné. ^ : Affiche l'information technique concernant le répertoire courant. o : Ouvre une connexion vers un autre serveur. O : Permet de modifier les options. / : Recherche pour un élément du menu. n : Poursuit la recherche pour un élément du menu. g : Envoie par courrier des commentaires à l'administrateur de l'élément sélectionné. !, $: Passage au shell. Objects Gopher: Identificateur Type Description ----------------------------------- (aucun) 0 fichier / 1 répertoire <) s fichier sonore I,g Fichier graphique ; Fichier d'animation 4 Fichier Macintosh (Binhex) 9 Fichier binaire 5 Fichier binaire DOS 2 Répertoire téléphonique CSO (ph/qi) 8 Connexion telnet <3270> T Connexion telnet (émulation IBM 3270) M Fichier MIME (Multi-purpose Internet Mail Extensions h Fichier HTML (HyperText Markup Language) 7 Recherche par mot-clé (aucun) Formulaire ASK L'équipe de développement de Gopher espère que vous trouverez une utilité à ce logiciel. Si vous croyez avoir identifié un bogue, s'il-vous-plaît, veuillez envoyer vos remarques par courrier électronique à "gopher@complete.org". gopher-3.0.15/gopher/locales/message.tpu0000664000000000000000000001770510762617110015053 0ustar !******************************************************************** ! wilkinson/macrides ! 1.2 ! 1994/12/18 ! ! J.Lance Wilkinson, Penn State University C&IS - LCS. ! F. Macrides, Worcester Foundation for Expermimental Biology !******************************************************************** ! MODULE: message.tpu ! conversion editor for VMS "internationalized" messages ! converts *.msg file to *.vms$msg source code !********************************************************************* ! Revision History: ! message.tpu,v ! Revision 1.2 1994/12/18 macrides ! Added initstring_to_platform() and initstring_to_facility() procedures ! as replacements for language_to_facility(). The latter would go out ! of range after two letters, and did not guarantee unique facility ! values. The new initstring procedures accept both the platform (VAX ! or AXP) and facility value (0 - 2047) as a concatenated string passed ! via the /init qualifer. The MAKE.COM procedure increments the facility ! value by 1 for each successive call to MESSAGE.TPU. ! ! Revision 1.1 1994/6/1 wilkinson ! Initial revision ! !********************************************************************/ Procedure merge_text(xxx) position(end_of(vms_msgs)); copy_text(xxx); update(ALL); endprocedure !merge_text Procedure process_line(ln) ! ! Process a line of the format ! LOCAL work, work_rng, whitespace, mcode, x, y, z, i, j; On_Error delete(work); return(false); EndOn_Error; work := create_buffer("process_line_buffer"); position(beginning_of(work)); copy_text(ln); position(beginning_of(work)); whitespace := search_quietly(any(" "+ASCII(9)), FORWARD, EXACT, work); if whitespace = 0 then delete(work); return(false); endif; position(beginning_of(whitespace)); split_line; position(beginning_of(work)); mcode_txt := erase_line; edit(mcode_txt,TRIM); mcode := int(mcode_txt); if mcode = 0 then delete(work); return(false); endif; whitespace := search_quietly(qchar, FORWARD, EXACT, work); if whitespace = 0 then delete(work); return(false); endif; position(end_of(whitespace)); move_horizontal(1); split_line; position(beginning_of(work)); erase_line; position(end_of(work)); whitespace := search_quietly(qchar, REVERSE, EXACT, work); if whitespace = 0 then delete(work); return(false); endif; position(beginning_of(whitespace)); split_line; erase_line; ! ! The buffer work now has the text of the message. It might contain ! C language character constants like '\n' and '\"' which must be ! converted to the single character. ! position(beginning_of(work)); work_rng := create_range(beginning_of(work),end_of(work),none); whitespace := create_range(beginning_of(work),beginning_of(work),none); loop; work_rng := create_range(mark(free_cursor),end_of(work_rng),none); whitespace := search_quietly("\", FORWARD, EXACT, work_rng); exitif whitespace = 0; position(end_of(whitespace)); move_horizontal(1); x := CURRENT_CHARACTER; i := 0; j := 0; case x ['n']: j := 2; i := 10; ['t']: j := 2; i := 9; ['b']: j := 2; i := 8; ['r']: j := 2; i := 13; ['f']: j := 2; i := 12; ['\']: j := 1; ['"']: j := 1; ["'"]: j := 1; ['0','1','2','3', '4','5','6','7']: j := 2; i := int(x); move_horizontal(1); case CURRENT_CHARACTER from '0' to '7' [inrange]: j := 3; i := (i * 8) + int(CURRENT_CHARACTER); move_horizontal(1); case CURRENT_CHARACTER from '0' to '7' [inrange]: j := 4; i := (i * 8) + int(CURRENT_CHARACTER); endcase; endcase; [outrange]: j := 0; endcase; position(end_of(whitespace)); if j <> 0 then x := erase_character(j); if j > 1 then copy_text(ascii(i)); else move_horizontal(1); endif; else move_horizontal(1); endif; position(mark(free_cursor)); endloop; i := 1; loop; x := substr(">""'*",i,1); exitif x = "*"; position(beginning_of(work)); whitespace := search_quietly(x, FORWARD, EXACT, work); exitif whitespace = 0; i := i + 1; endloop; if x = "*" then z := "!>>> Error; can't build a message text from this: "; else z := ""; endif; y := x; if x = ">" then x := "<"; endif; ! ! At this point, mcode contains an integer message number, while ! the buffer work contains the message text. x, y and z contain ! delimiter texts. if hiwater <> mcode then merge_text(fao(" .BASE !ZL",mcode)); endif; position(beginning_of(work)); merge_text(fao("!AS!AS!ZL !AS!AS!AS",z,language,mcode,x,CURRENT_LINE,y)); hiwater := mcode + 1; delete(work); return(false); endprocedure !process_line procedure initstring_to_platform(i) Local x, platform, work; x := i; edit(x, COLLAPSE, UPPER, OFF); work := create_buffer("initstring_to_platform_buffer"); position(beginning_of(work)); copy_text(x); position(beginning_of(work)); platform := erase_character(3); delete(work); return platform; endProcedure; !initstring_to_platform procedure initstring_to_facility(i) Local x, work; x := i; edit(x, COLLAPSE, UPPER, OFF); work := create_buffer("initstring_to_facility_buffer"); position(beginning_of(work)); copy_text(x); position(beginning_of(work)); x := erase_character(3); position(beginning_of(work)); facility := erase_character(4); delete(work); return facility; endProcedure; !initstring_to_facility Procedure process_messages Local ln, architecture; ! ! Process the the input file ! qchar := '"'; hiwater := 0; w0 := create_window(1,get_info(SCREEN,"visible_length"),off); w1 := create_window(1,get_info(w0,"original_length")/2,on); set(status_line,w1,special_graphics,fao("!80*q")); infile := get_info(COMMAND_LINE,"file_name"); if infile = "" then message("ABORT! No input file specified..."); abort; endif; language := file_parse(infile,"","",NAME); if (get_info(command_line,"initialization")) then initstring := get_info(command_line,"initialization_file"); else message("ABORT! No init string specified..."); abort; endif; facility := initstring_to_facility(initstring); outfile := get_info(COMMAND_LINE,"output_file"); unix_msgs := create_buffer("unix", infile); map(w0,unix_msgs); vms_msgs := create_buffer("vms"); map(w1,vms_msgs); set(OUTPUT_FILE,vms_msgs,outfile); update(ALL); ! ! Prime the pump ! position(end_of(unix_msgs)); split_line; copy_text("$end_of_msgs "); position(beginning_of(unix_msgs)); update(ALL); merge_text(fao(" .TITLE Gopher Messages from !AS",infile)); merge_text(" .IDENT 'GOPHER 2.1'"); merge_text(fao(" .FACILITY GOPHER,!AS/PREFIX=GOPHER_",facility)); merge_text(fao(" .LITERAL GOPHER_LANG_!AS=!AS",language,facility)); merge_text(" .SEVERITY INFORMATIONAL"); loop; position(beginning_of(unix_msgs)); ln := erase_line; update(ALL); exitif ln = "$end_of_msgs "; ! $end_of_msgs pseudo-directive... if substr(ln,1,1) = "$" then merge_text(fao("!! !AS",ln)); endif; if substr(ln,1,7) = "$quote " then ! $quote Directive ? edit(ln,COMPRESS,OFF); qchar := substr(ln,8,1); else edit(ln,TRIM); if substr(ln,1,1) <> "$" then if substr(ln,1,1) <> "" then process_line(ln); endif; endif; endif; endloop; delete(unix_msgs); merge_text(" .END"); erase_line; write_file(vms_msgs); delete(vms_msgs); vms_msgs := create_buffer("vms"); map(w1,vms_msgs); outfile := file_parse(outfile,"","",NAME) + ".opt"; set(OUTPUT_FILE,vms_msgs,outfile); merge_text("GSMATCH=ALWAYS,0,0"); architecture := "UNIVERSAL=GOPHER_LANG_!AS"; ln := initstring_to_platform(initstring); edit(ln,collapse,upper); if (ln<>"VAX") then architecture := "SYMBOL_VECTOR=(GOPHER_LANG_!AS=DATA)"; endif; merge_text(fao(architecture,language)); write_file(vms_msgs); delete(vms_msgs); quit; endProcedure; !process_messages process_messages; gopher-3.0.15/gopher/locales/gopher.hlp.Es0000664000000000000000000000556610762617110015236 0ustar Ayuda Rapida a Gopher --------------------- Moverse al rededor de Gopher ---------------------------- Utilise la flechas o equivaliencias para poder moverse. Derecha, Enter ...........: Escoge la opción actual. Izquierda, u .............: Voler al menu anterior. Abajo ....................: Baja de una linea. Arriba ...................: Sube de una linea. >, +, [Pgdwn], Espacio ...: Ver pàgina siguinte. <, -, [pgdup], b .........: Ver pàgina anterior. 0-9 ......................: Escoger una opción especifica. m ........................: Regresar al menu principal. Recordatorios ------------- a : Adiciona el elemento acual al recoradatorio. A : Adiciona al directorio actual/busca en la lista del recordatorio. v : Ver la lista del recordatorio. d : Borra el recordatorio en directorio actual. Otros comandos -------------- q : Salida con confirmación. Q : Salir incondicionalemente. s : Archivar el elemento actual. S : Archivar el directorio actual. D : Descargar un fichero. r : Volver al menu principal del actual elemento. R : Volver al menu principal del menu actual. = : Presentación tecnica sobre el elemento actual. ^ : Presentación tecnica sobre el directorio actual. o : Conexion a otro servidor de Gopher. O : Cambiar opciones. f : Conexión a un servidor de FTP anonimo via Gopher. w : Conectarse a http, gopher, Ftp, telnet o tn3270 URL. / : Buscar un elemento en el menu. n : Buscar el proximo elemento. g : "Queja" via email al adminitrador del actual elemento. L : Cambiar el language de los mensajes. !, $ : Iniciar el subproceso (VMS). Ctrl-L, Ctrl-R, Ctrl-W : Borar y Ctrl-T : Mostrar la fecha y hora locales en el servidor remoto. Objetos de Gopher: Etiquetas de Tipo Descripción los elementos --------------------------------------------------- (nome) 0 archivo / 1 directorio <) S archivo de sonido I,g archivo de imagenes ; archivo de peliculas 4 archivo de BinHexed Macintosh 9 archivo binario 5 archivo en binario DOS 2 CSO (ph/qi) servidor de lista telefononica 8 conexión telnet <3270> T conexión telnet (emulacion IBM 3270) M archivo "Multi-purpose Internet Mail Ext" h archivo de lenguage HyperText Markup 7 elemento de busqueda por index (none) preguntar por El equipo de gopher espera que este programa le sea util. Si usted piensa que a encontrado un error, por favor reportarlo a nosotros utilisando el e-mail a "gopher@complete.org". gopher-3.0.15/gopher/locales/De_DE.msg0000664000000000000000000002363510762617110014304 0ustar $quote " $ $ Translation into the German language on 94/08/12 by: $ Deutsche Uebersetzung am 12.08.94 von: $ $ NET Network Expert Team GmbH $ Figarostr. 3 $ D-70597 Stuttgart $ Tel. +49 711 9768921 $ Fax. +49 711 9768933 $ $ $ Welcome message... $ $ --- some problems here with \n $ 1 "Willkommen in der wunderbaren Welt des Gopher!\n\n" $ 2 "Gopher hat bestimmte Nutzungseinschränkungen und keinerlei\n" $ 3 "Garantie. Sehen Sie bitte in der Datei 'Copyright' nach, die \n" $ 4 "in der Distribution enthalten ist.\n\n" $ 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\n\n" $ 6 "Internet Gopher Information Client %s.%s patch%d (%s)\n" $ 7 "Zum fortfahren Eingabetaste drücken\n" $ $ Errors in .gopherrc $ 8 "Kann Gopher-Konfigurationsdatei nicht schreiben!!" $ $ Help for command line $ $ --- some problems here with \n $ 9 "Aufruf: %s [-sSbDr] [-T typ] [-p pfad] [-t titel] [hostname port]+\n" $ 10 " -s Sicherer Modus, Benutzer ohne eigenen Zugang\n" $ 11 " -S Sicherer Modus, Benutzer mit eigenem Zugang\n" $ 12 " -p pfad Pfadangabe zum Anfangsartikel\n" $ 13 " -T typ Typ des Anfangsartikels\n" $ 14 " -i Suchargument (fuer -T 7)\n" $ 15 " -b Lesezeichen zuerst\n" $ 16 " -r Entfernter Benutzer\n" $ 17 " -D Debug-Modus\n" $ $ Pager help.. $ 18 "Betrachter-Hilfe" 19 "u, ^G, Pfeil-links : Zurück zur Auswahl" 20 "Leertaste, Pfeil-unten : Zur nächsten Seite" 21 "b, Pfeil-oben : Zur vorherigen Seite" 22 "/ : Textsuche" 23 "m : Dokument versenden" 24 "s : Dokument speichern" 25 "p : Dokument drucken" 26 "D : Dokument herunterladen" $ $ New Application Menu $ 27 "Name Inhaltstyp" 28 "Anzeigeanwendung" 29 "Druckanwendung" $ $ Top Level Options $ 30 "Allgemeine Optionen" 31 "Anzeigeanwendungen konfigurieren" 32 "Druckanwendungen konfigurieren" 33 "Neuen Inhaltstyp definieren" $ $ Telnet connection $ 34 "Warnung!!!!!, Sie sind dabei, das Internet Gopher Programm" 35 "zu verlassen und sich an einen anderen Host anzuschließen." 36 "Sollten Sie hängenbleiben, drücken Sie Control und" 37 "die ]-Taste, danach geben Sie quit ein" 38 "die ^-Taste, dann tippen Sie q." 39 "Verbindung nach %.40s, Port %d mittels %s." 40 "Verbindung nach %.40s mittels %s." 41 "Verwenden Sie den Zugang \"%.40s\" zum anmelden" $ $ HTML menu $ 42 "Warnung!!!!!, Sie sind dabei, das Internet Gopher Programm" 43 "zu verlassen und einen HTML-Betrachter aufzurufen. Verwenden Sie" 44 "die Betrachter-Hilfe wenn Ihnen die Kommandos nicht geläufig sind." 45 "Nach Beenden des Betrachters kommen Sie in den Internet" 46 "Gopher Klienten zurück." $ $ Other html msgs $ 47 "Bedaure, dieser Klient unterstützt kein HTML" $ $ gopher.c $ 48 "Bedaure, kann keinen Administrator für diesen Artikel finden!" $ $ Gripe form msgs $ 49 "Drüecken Sie die Eingabetaste um Ihre Nachricht zu versenden." 50 "Drüecken Sie die Tabulator-Taste am Ende jeder Eingabezeile." 51 "Thema" 52 "Problem" 53 "Kann keine Post versenden..." 54 "Sende Beschwerde an %s..." 55 "Worte nach denen gesucht werden soll" 56 " Seite: %d/%d" 57 " Hilfe, " 58 " Beenden" 59 " vorherige Auswahl" $ --- some problems here with \n $ 60 "%s: Nichts für das Hauptmenü empfangen, kann nicht weitermachen\n" 61 "%sm%s zum versenden, %sD%s zum herunterladen, %ss%s zum speichern, oder %sp%s zum drucken:" 62 ", %sm%s zum versenden, %sD%s zum herunterladen:" 63 ", zum versenden, zum herunterladen:" $ --- some problems here with \n $ 64 ",\n zum versenden, zum herunterladen, zum speichern, oder

zum drucken:" 65 "Adressen-Syntax abgelehnt..." 66 "Fett Suchworte im Betrachter" 67 "Lesezeichen" 68 "Kann alte Datei nicht öffnen.." 69 "Kann nicht auf SYS$SCRATCH schreiben!" 70 "Kann nicht ins /tmp Verzeichnis schreiben!" 71 "Kann gewünschte Datei nicht öffnen.." 72 "Keine Verbindung zu Rechner %.40s, port %d." 73 "Wählen Sie einen Dokumenttyp" 74 "Methode zum herunterladen" 75 "An einen neuen Gopher Server binden" 76 "Via Gopher an einen anonymen FTP Server binden" 77 "Verbindungsaufbau..." 78 "Verbindung fehlgeschlagen: %s." 79 "Verbindung zu anderem Rechner fehlgeschlagen." 80 "Konnte '%s' nicht erstellen" $ --- some problems here with \n $ 81 "Konnte %s nicht ausführen\n" 82 "Konnte Text nicht finden" $ --- some problems here with \n $ 83 "Konnte keine Temporärdatei erstellen!\n" 84 "Druckerproblem entdeckt, bedaure..." 85 "Fehler beim TPU-Aufruf (Betrachter)!!!" 86 "Ende: u" 87 "Hole Felder..." 88 "Datei nicht erfolgreich transferiert" 89 "Gopher Verzeichnis-Information" 90 "Gopher Fehler" 91 "Gopher Datei" 92 "Gopher Hilfedatei" 93 "Gopher Artikelinformation" 94 "Gopher Optionen" 95 "Gopher Übertragungsfehler" 96 "Hilfe: ?" 97 "Lokaler Gopherserver: %.59s" 98 "Zu befragender Rechner:" 99 "Rechnername" 100 "Rechnername ist unbekannt." $ --- some problems here with \n $ 101 "Ich kenne Ihren Terminaltyp nicht\n" 102 "Internet Gopher Informationsklient v%s.%s.%d" 103 "Link Info" 104 "Lokales Datum und Uhrzeit" 105 "Versende aktuelles Dokument an:" 106 "Versende Datei..." 107 "Versende Datei an %s..." 108 "Filmbetrachtung noch nicht implementiert" 109 "Name dieses Lesezeichens:" 110 "Netzwerkfehler" 111 "Nein" 112 "Keine Lesezeichen definiert" 113 "Kein Anzeigekommando mit dieser Ansicht verknüpft!" 114 "Kein solcher Anwender '%s'" 115 "Seite nach unten: " 116 "Seite nach unten: Leertaste" 117 "Seite nach oben: b" 118 "Port" 119 "Tasten: " 120 "Zum fortfahren Eingabetaste drücken" $ --- some problems here with \n $ 121 "Wenn bereit, Eingabetaste drücken\n" 122 "Aktuelles Dokument drucken" 123 "Problem beim schreiben" 124 "Wirklich verlassen (y/n) ?" 125 "Empfange Verzeichnis..." 126 "Empfange Datei..." 127 "Empfange HTML-Seite..." 128 "Empfange Information..." 129 "Empfange MIME-Datei..." 130 "Empfange Film..." 131 "Empfange Ton..." 132 "Empfange Bild..." 133 "Hole Verzeichnis..." 134 "Zurück zur Auswahl: u" 135 "Hauptmenü: " 136 "Speichern als Datei:" 137 "Artikelliste speichern in Datei:" 138 "Speichere Datei..." 139 "Suche Verzeichnistitel für:" 140 "Suche fehlgeschlagen..." 141 "Text absuchen nach:" 142 "Durchsuche Text..." 143 "Suche..." 144 "Selektor (Optional)" 145 "Zeige lokales Datum und Zeit" $ --- some problems here with \n $ 146 "Umfang Sprache Dokumenttyp\n" $ 147 "---------- ------------- ----------------------------\n" 148 "Bedaure, kann diese Datei nicht zeigen" 149 "Bedaure, kann Haupt-Verzeichnis nicht löschen." 150 "Bedaure, kann das nicht herunterladen!" 151 "Bedaure, kann aus Lesezeichen keine Lesezeichen machen" 152 "Bedaure, kann mit diesem Zugang keine Dateien speichern" 153 "Bedaure, kann mit diesem Zugang keine Subprozesse starten" 154 "Bedaure, kann den Artikel nicht als Datei speichern!" 155 "Bedaure, kann dieses Dokument nicht drucken" 156 "Bedaure, kein Druckverfahren für dieses Dokument" 157 "Bedaure, telnet ist nicht verfügbar." 158 "Bedaure, diese Maschine unterstüzt keine Bilder" 159 "Bedaure, diese Maschine unterstützt keinen Ton" 160 "Bedaure, tn3270 ist nicht verfügbar." 161 "Bedaure, Sie dürfen keine Dateien drucken" 162 "Bedaure, Sie düfen keine Dateien speichern" 163 "Bedaure, Sie dürfen im Sicherheits-Modus keine Optionen setzen." 164 "Bedaure, Sie dürfen das nicht" 165 "Bedaure, diese Machine unterstützt keine Filme" 166 "Bedaure, keine Anzeigeprogramm für die Datei...." 167 "Spawn nach DCL fehlgeschlagen!" 168 "Spawn zur voreingestellten Shell fehlgeschlagen!" $ --- some problems here with \n $ 169 "Starte DCL Subprozess. Rückkehr zum Gopher mit 'Logout'.\n" $ 170 "Starte Ihre Standard-Shell. Rückkehr zum Gopher mit 'Exit'.\n\n" $ 171 "Starten Sie jetzt das einlesen...\n\n" $ 172 "Starten Sie jetzt Ihr Transferprogramm...\n" 173 "Systemproblem, kann nicht versenden" 174 "Der Dateiname lautet:" 175 "Kann keine Socket allozieren." 176 "Unix piping erwünscht. Überprüfen Sie Ihre Konfiguration!" 177 "Unbekannter Fehler." 178 "Verwenden Sie erst '/' um eine Suche zu definieren..." 179 "Ansehen Artikel Nr.: " 180 "Ja" 181 "Ihre Wahl" $ --- some problems here with \n $ 182 "\nHerunterladen abgschlossen. %d Bytes gesamt, %d Bytes/sek\n" $ 183 "\nHerunterladen konnte nicht abgeschlossen werden, bedaure... \n" $ 184 "\nZum fortfahren %sEingabetaste%s drücken" $ 185 "\nZum fortfahren Eingabetaste drücken" $ 186 "\n\nServer-Information\n" 187 "anonymous FTP Host" $ --- some problems here with \n $ 188 "Gopher: Keine Daten für Hauptmenü, kann nicht fortfahren\n" 189 "Das Lösch-Kommando 'd' gilt nur für Lesezeichen." 190 "^G : Abbruch" 191 "OK: Eing." 192 "Tab, ^N : Zum nächsten Feld" 193 "^P : Zum vorherigen Feld" 194 "^F : Nächste Seite zeigen" 195 "^B : Vorherige Seite zeigen" 196 "^- : Hilfe (^/ oder ^7 geht evtl. auch)" 197 "Eingabetaste : Formular übernehmen" 198 "[Hilfe: ^-] [Abbruch: ^G]" 199 " [Wert ändern: Leerzeichen] [Liste: l]" 200 "Treffen Sie Ihre Auswahl" $ $ Choose menu.. $ 201 "Formular-Hilfe" 202 "^G : Abbruch" 203 "Runter, ^N : Nächster Auswahlpunkt" 204 "Hoch, ^P : Vorheriger Auswahlpunkt" 205 "Leertaste, ^F : Nächste Seite" 206 "b, ^B : Vorherige Seite" 207 "^ : Erste Seite" 208 "$ : Letzte Seite" 209 "0-9 : Bestimmter Auswahlpunkt" 210 "Eingabetaste : Aktuellen Auswahlpunkt anwählen" 211 "Abbruch: ^G" 212 " (Standardwert)" 213 "Auswahldialog-Hilfe" 214 "Nichts verfügbar." $ --- some problems here with \n $ 215 "Achtung, fehlerhafte Zeile in gopherrc: %s\n" 216 "Breche abspeichern der Gopher-Konfiguration ab!!" 217 "Text" 218 "Eine neue Konfiguration ist verfügbar. Laden?" 219 "Voreingestellter Systemdrucker" 220 "ANSI Drucker" 221 "Ausdruck nach" $ Default language/region gopher+ view to choose 222 "De_DE" $ $ A message that asks the User if they speak this language.. $ 232 "Spraeken zie Deutcsh?" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sD%s zum herunterladen:" 238 ", zum herunterladen:" gopher-3.0.15/gopher/locales/gopher.hlp.Dk0000664000000000000000000000501010762617110015205 0ustar Hurtig Gopher Hjælp ------------------- Flytte rundt i Gopherspace -------------------------- Brug pile-tasterne eller vi/emacs ekvivalenter til at flytte rundt. Højre, Return .............: "Enter"/vis nuværende punkt. Venstre, u ................: "Exit" nuværende punkt/Gå et niveau op. Ned .......................: Flyt til næste linie. Op ........................: Flyt til forrige linie. >, +, SideNed, Mellemrum ..: Vis næste side. <, -, SideOp, b ...........: Vis forrige side. 0-9 .......................: Gå til en specifik linie. m .........................: Gå tilbage til hovedmenuen. Bogmærker --------- a : Tilføj nuværende punkt til bogmærke listen. A : Tilføj nuværende bibliotek/søgning til bogmærke listen. v : Vis bogmærke liste. d : Slet et bogmærke/biblioteks punkt. Other commands -------------- q : Afslut med prompt. Q : Afslut betingelsesløst. s : Gem nuværende punkt til en fil. S : Gem nuværende menu listning til en fil. D : Download en fil. r : gå til rod menu af nuværende punkt. R : gå til rod menu af nuværende menu. = : Vis teknisk information om nuværende punkt. ^ : Vis teknisk information om nuværende bibliotek. o : Åbn en ny gopher server. O : Skift optioner. f : Forbind til en anonymous FTP server. w : Forbind til en http, gopher, FTP, telnet eller tn3270 URL / : Søgning for et punkt in en menu. n : Find næste søgnings punkt. g : "Gripe" via email til administrator af nuværende punkt. L : Skift sprog af tekster (VMS). !, $ : Shell Escape (Unix) eller Spawn subprocess (VMS). Ctrl-L, Ctrl-R, Ctrl-W : Genskriv (Visk ud) skærmen. Ctrl-T : Vis værts lokale dato og tid. Gopher objekter: Punkt symbol Type Beskrivelse -------------------------------------------- (none) 0 fil / 1 bibliotek <) s lyd fil I,g billede fil ; video fil 4 BinHexed Macintosh fil 9 binær fil 5 DOS binær fil 2 CSO (ph/qi) phone-book server 8 telnet forbindelse <3270> T telnet forbindelse (IBM 3270 emulation) M Multi-purpose Internet Mail Extensions fil h HyperText Markop Language fil 7 index-søgning punkt (none) ASK form Gopher udviklings teamet håber, at du finder dette program nyttigt. Hvis du finder noget, som du tror er en fejl, så rapporter venligst til os ved at sende e-mail til "gopher@complete.org". gopher-3.0.15/gopher/locales/Es_ES.msg0000664000000000000000000002122110762617110014327 0ustar $ $ Translation courtesy of Fernando Garcia-Loygorri $ $quote " $ $ Welcome message... $ 1 "¡Bienvenido al maravilloso mundo de Gopher!\n\n" 2 "Hay limitaciones en el uso de Gopher y no está\n" 3 "garantizado. Por favor, lea el fichero 'Copyright' incluído\n" 4 "en el paquete.\n\n" 5 "Copyright 1991-2000 by the Regents of the Universidad of Minnesota\n\n" 6 "Cliente de Información de Gopher de Internet %s.%s parche%d (%s)\n" 7 "Pulse INTRO para continuar\n" $ $ Errors in .gopherrc $ 8 "¡No puedo escribir el fichero de configuración de Gopher!" $ $ Help for command line $ 9 "Usage: %s [-sSbDr] [-T type] [-p path] [-t title] [hostname port]+\n" 10 " -s Modo seguro, usuarios sin cuenta propia\n" 11 " -S Modo seguro, usuarios con cuenta propia\n" 12 " -p senda Especificación de la senda al elemento inicial\n" 13 " -T tipo Tipo de elemento inicial\n" 14 " -i Argumento de búsqueda (para -T 7)\n" 15 " -b Primero los recordatorios\n" 16 " -r Usuario remoto\n" 17 " -D Modo de depuración\n" $ $ Pager help.. $ 18 "Ayuda sobre el compaginador" 19 "u, ^G, izquierda : Volver al menú" 20 "espacio, abajo : Ir a la siguiente página" 21 "b, arriba : Ir a la página anterior" 22 "/ : Buscar en el texto" 23 "m : Enviar por correo el documento actual" 24 "s : Guardar el documento actual" 25 "p : Imprimir el documento actual" 26 "D : Descargar el documento actual" $ $ New Application Menu $ 27 "Nombre del tipo de contenido" 28 "Aplicación de presentación" 29 "Aplicación de impresión" $ $ Top Level Options $ 30 "Opciones generales" 31 "Configuración de las aplicaciones de presentación" 32 "Configuración de las aplicaciones de impresión" 33 "Definición de un tipo de contenido nuevo" $ $ Telnet connection $ 34 "¡¡¡Aviso!!!, va a abandonar el programa Gopher" 35 "de Internet y a conectarse a otro ordenador. Si" 36 "se queda atascado, pulse la tecla de Control junto" 37 "con la tecla ] y después teclee quit" 38 "tecla ^ y después teclee q." 39 "Conectando a %.40s, puerta %d usando %s." 40 "Conectando a %.40s usando %s." 41 "Use el nombre de cuenta \"%.40s\" para entrar" $ $ HTML menu $ 42 "¡¡¡Aviso!!!, va a abandonar el cliente Gopher de" 43 "Internet y a conectarse a un Lector de HTML. Use la Ayuda" 44 "del Lector si no está familiarizado con sus órdenes." 45 "Al salir del Lector, será devuelto al cliente Gopher" 46 "de Internet." $ $ Other html msgs $ 47 "Lo sienta, este cliente no da soporte a HTML" $ $ gopher.c $ 48 "Lo siento, no puedo encontrar un administrador para este elemento" $ $ Gripe form msgs $ 49 "Pulse la tecla Intro para enviar su mensaje." 50 "Pulse la tecla de tabulación al final de cada línea que escriba." 51 "Sujecto" 52 "Problema" 53 "Cannot send mail..." 54 "Enviando una queja a %s..." 55 "Palabras a buscar" 56 " Página: %d/%d" 57 " para la Ayuda, " 58 " para Salir" 59 " para subir un menú" 60 "%s: No se ha recibido el menú principal, no es posible seguir\n" 61 "%sm%s para enviar por correo, %sD%s para descargar, %ss%s para guardar o %sp%s para imprimir:" 62 ", %sm%s para enviar por correo, %sD%s para descargar:" 63 ", para enviar por correo, para descargar:" 64 "\n para enviar por correo, para descargar, para guardar o

para imprimir:" 65 "La sintaxis de la dirección ha sido rechazada..." 66 "Palabras buscadas en negrita en el compaginador interno" 67 "Recordatorios" 68 "No puedo abrir el antiguo fichero.." 69 "¡No puedo escribir en SYS$SCRATCH!" 70 "¡No puedo escribir en el directorio /tmp!" 71 "No puedo abrir el fichero solicitado.." 72 "No puedo conectar al ordenador %.40s, puerta %d." 73 "Elija un tipo de documento" 74 "Elija un método de descarga" 75 "Conexión a otro servidor de Gopher" 76 "Conexión a un servidor de FTP anónimo vía la pasarela Gopher" 77 "Conectando..." 78 "Fallo en la conexión: %s." 79 "Fallo en la conexión al ordenador remoto." 80 "No he podido crear '%s'" 81 "No he podido ejecutar %s" 82 "No he podido encontrar el texto" 83 "¡No he podido crear un fichero temporal!\n" 84 "Lo siento, ha habido un problema al imprimir..." 85 "¡Error al invocar una TPU como compaginador!" 86 "Salir: u" 87 "Extrayendo campos..." 88 "El fichero no fue transferido con éxito" 89 "Información sobre el directorio de Gopher" 90 "Error de Gopher" 91 "Fichero de Gopher" 92 "Fichero de ayuda de Gopher" 93 "Información sobre elemento de Gopher" 94 "Opciones de Gopher" 95 "Error de transmisión de Gopher" 96 "Ayuda: ?" 97 "Servidor de Gopher inicial: %.59s" 98 "Ordenador al que interrogar:" 99 "Nombre de ordenador" 100 "Nombre de ordenador desconocido." 101 "No puedo establecer el tipo de su terminal\n" 102 "Cliente de Información de Gopher de Internet v%s.%s.%d" 103 "Información sobre enlaces" 104 "Fecha y hora locales" 105 "Enviar por correo el documento actual a:" 106 "Enviando el fichero..." 107 "Enviando el fichero a %s..." 108 "Aún no se ha implementado el pase de películas" 109 "Nombre de este recordatorio:" 110 "Error en la red" 111 "No" 112 "No hay recordatorios definidos" 113 "¡No hay una orden de presentación asignada a esta vista!" 114 "El usuario '%s' no existe" 115 "Siguiente página: " 116 "Siguiente página: Espacio" 117 "Página anterior: b" 118 "Puerta" 119 "Pulse " 120 "Pulse para continuar" 121 "Pulse cuando esté listo\n" 122 "Imprimir el documento actual" 123 "Hay problemas escribiendo" 124 "¿Quiere realmente salir (y=sí/n=no) ?" 125 "Recibiendo directorio..." 126 "Recibiendo fichero..." 127 "Recibiendo página de HTML..." 128 "Recibiendo información..." 129 "Recibiendo fichero MIME..." 130 "Recibiendo película..." 131 "Recibiendo sonido..." 132 "Receiving Image..." 133 "Extrayendo directorio..." 134 "Volver al Menú: u" 135 "Menú raíz: " 136 "Guardar en fichero:" 137 "Guardar lista de elementos en fichero:" 138 "Guardando fichero..." 139 "Búsqueda en títulos de directorios de:" 140 "Búsqueda sin éxito..." 141 "Búsqueda en texto de:" 142 "Buscando texto..." 143 "Buscando..." 144 "Seleccionador (Opcional)" 145 "Mostrar la fecha y hora locales en el ordenador remoto" 146 "Tamaño Lenguaje Tipo de Documento\n" 147 "---------- ------------- ----------------------------\n" 148 "Lo siento, no puedo mostrar este fichero" 149 "Lo siento, no puedo borrar el directorio de más alto nivel." 150 "¡Lo siento, no puedo descargar eso!" 151 "Lo siento, no puedo hacer un recordatorio de recordatorios" 152 "Lo siento, con esta cuenta no es posible guardar ficheros" 153 "Lo siento, con esta cuenta no es posible iniciar otro proceso" 154 "¡Lo siento, no puedo guardar ese elemento en un fichero!" 155 "Lo siento, no puedo imprimir este documento" 156 "Lo siento, no hay mecanismo para imprimir este documneto" 157 "Lo siento, telnet no está disponible." 158 "Lo siento, esta máquina no da soporte a imágenes" 159 "Lo siento, esta máquina no da soporte a sonidos" 160 "Lo siento, tn3270 no está disponible." 161 "Lo siento, Ud. no está autorizado a imprimir ficheros" 162 "Lo siento, Ud. no está autorizado a guardar ficheros" 163 "Sorry, you are not allowed to set options in secure mode." 164 "Lo siento, Ud. no está autorizado a hacer esto" 165 "Sorry, this machine doesn't support movies" 166 "Sorry, no viewer for the file...." 167 "¡Ha fallado el inicio del subproceso DCL!" 168 "¡Ha fallado el inicio del intérprete de órdenes habitual!" 169 "Iniciando el subproceso DCL. Salga para volver a Gopher.\n" 170 "Iniciando su intérprete de órdenes habitual. Teclee 'exit' para volver\na Gopher.\n\n" 171 "Comience ahora su captura de datos...\n\n" 172 "Comience ahora su descarga de datos...\n" 173 "Problema en el sistema, no es posible enviar correo" 174 "El nombre del fichero es" 175 "No es posible reservar un zócalo." 176 "Se ha solicitado un empalme de Unix. ¡Compruebe su configuración!" 177 "Error desconocido." 178 "Use '/' para primero definir una búsqueda..." 179 "Ver elemento número:" 180 "Sí" 181 "Elija" 182 "\nCompletada la descarga. %d bytes en total, %d bytes/sec.\n" 183 "\nLo siento, no ha sido posible completar la descarga... \n" 184 "\nPulse %sINTRO%s para continuar" 185 "\nPulse para continuar" 186 "\n\nInformación del servidor\n" 187 "Ordenador para FTP anónimo" 188 "gopher: No se ha recibido el menú principal, no es posible seguir\n" 189 "The 'd'elete command is only for bookmarks" $ Default language/region gopher+ view to choose 222 "Es_ES" 223 "GopherP_Dir:gopherhlp.ES" 224 "GopherP_Dir:gopher.hlp_secure" 225 "/usr/local/lib/gopher.hlp.Es" 226 "/usr/local/lib/gopher.hlp_secure" 232 "¿Habla Español Castellano?" $ $ Add to post-pager option list in SecureMode and NoShellMode $ 237 ", %sD%s para descargar:" 238 ", para descargar:" gopher-3.0.15/gopher/locales/README.VMS0000664000000000000000000000726210762617110014216 0ustar $Id: README.VMS,v 1.1 2000/08/19 00:28:56 jgoerzen Exp $ README for VMS internationalization 18 Dec 1994 VMS Gopher Client 2.1 - F. Macrides , J.Lance Wilkinson The MAKE.COM file contained here invokes a TPU procedure to convert the various [.GOPHER.LOCALES]*.MSG Unix message files to a source code format compatible with VMS MESSAGE, then compiles and links sharable image files for these message files. The MAKE.COM and MESSAGE.TPU files coordinate to generate an appropriate linkage options file to define a specific symbol as either UNIVERSAL for the VAX environment, or as a SYMBOL_VECTOR DATA entry for the AXP environment. The MAKE.COM file detects whether it is being executed in a VAX or AXP environment, and passes MESSAGE.TPU an initialization string beginning with the characters "VAX" or "AXP" followed by a facility code value in the range of 0 to 2047. The value is incremented by 1 for each successive call to MESSAGE.TPU together with the file name for the input .MSG file (e.g., DE_DE, EN_US, ES_ES, ES_MX, FR, etc.) to develop a unique facility code for each language. MAKE.COM stops calling MESSAGE.TPU if the value would exceed the MESSAGE utility's limit of 2047 (Are there more than 2048 languages?). Note that the sharable image files are architecture-specific, VAX or AXP, so caution in a mixed cluster is advised. The symbol constant GOPHERMSGS_DEV can be defined in conf.h such that the appropriate sharable image files are sought in differnt locations for clients built on VAX versus AXP (see comments in conf.h). The default location is the GopherP_Dir referenced directory. If a DCL logical or symbol for LC_MESSAGES is detected when the client starts, it is evaluated and inserted into the string for filenames replacing the %s below: GopherP_Dir:Gopher_Msg_%s.EXE or with "GopherP_Dir" replaced by another device logical if GOPHERMSGS_DEV was changed from the default in conf.h. If the logical or symbol (getenv() is used to detect it) is not found, a VMS call to LIB$GET_USERS_LANGUAGE(), which uses the SYS$LANGUAGE logical, is tried. Again, if successful here, the resultant string replaces the %s in the above filespec. LC_MESSAGES can be defined with DCL wildcarding to reference more than one sharable image file. A scan is then performed for one or more matching files. If one or more is found to contain a message number 232, the image is activated and becomes part of the executable in memory (note: size of the image increases as more message files are associated), and the messages present in the file are used. If none are found, the hardcoded messages in the client are used. If more than one is found (e.g., if LC_MESSAGES was defined as "*"), a menu is built of all the located files, using message number 232 as the menu title. This message number 232 should be an invitation to use the language specific to the file, such as "Do you speak English?" in the English message file. Absence of this message will cause the language to be ignored and not included in the menu. Once the menu is built, it can be offered to the user for choosing a language. If the constant symbol GOPHERMSGS_DEFAULT has been defined in conf.h so that it points to a found sharable image file, its language will be establish at startup of the client. Later, during client usage, an L (uppercase) keystroke will cause the menu to be raised again and allow a choice of another language. If no default language has been established via GOPHERMSGS_DEFAULT, the menu will be displayed at startup of the client and the user must make a choice. The initial choice can be changed at any time via an L keystroke to reinvoke the menu. gopher-3.0.15/gopher/locales/gopher.hlp.It0000664000000000000000000000571610762617110015240 0ustar Pro-Memoria per l'uso di Gopher --------------------------------- Come navigare nello spazio Gopher --------------------------------- Per postarsi usare i tasti-cursore o i comandi equivalenti di vi/emacs. , Return ......: "Entra"/Visualizza l'elemento corrente , u .........: "Esce" dall'elemento corrente/Va al livello superiore ...............: Per spostarsi alla prossima linea. .................: Per spostarsi alla prossima linea. >, +, , .: Per visualizzare la pagina successiva <, -, , b .......: Per visualizzare la pagina precedenre 0-9 ...................: Per andare ad una specifica linea m .....................: Per tornare indietro al menu principale ----------- a : Per aggiungere l'elemento corrente alla lista dei A : Per aggiungere il menu corrente alla lista dei v : Per visualizzare la lista dei d : Per cancellare un elemento dal menu o dalla lista dei Altri comandi -------------- q : Chiusura di Gopher, con richiesta di cofnerma Q : Chiusura incondizionata di Gopher s : Salva l'elemento corrente in un file S : Salva il menu corrente in un file D : Scarica un file (via Modem) r : Va al menu principale associato al corrente elemento R : Va al menu principale associato al corrente menu = : Visualizza informazioni tecniche sul currente elemento ^ : Visualizza informazioni techiche sul coddente menu o : Apre un nuovo Server Gopher O : Modifica le opzioni f : Connessione ad un Server FTP remoto w : Connessione a URL http, gopher, FTP, telnet o tn3270 / : Ricerca un elemento del menu+ n : Trova il successivo elemento ricercato. g : Invia un commento via posta elettronica all'amministratore dell'elemento corrente L : Cambia il linguaggio dei messaggi (VMS) !, $ : Accesso alla Shell (Unix) o attivazione sottoprocesso DCL (VMS). Ctrl-L, Ctrl-R, Ctrl-W : Rivisualizzazione della videata Ctrl-T : Visualizza Data e Orario corrente Oggetti Gopher: Descrittore Tipo Descrizione -------------------------------------------- (none) 0 File 1 Direttorio <) s Suono I,g Immagine ; Animazione. 4 File BinHexed Macintosh 9 File binario 5 File binario DOS 2 Elenco Telefonico CSO (ph/qi) 8 Connessione Telnet <3270> T Connessione Telnet (con emulazione IBM 3270) M File "Multi-purpose Internet Mail Extensions" h File HyperText Markup Language (Ipertesto) 7 Ricerca di un testo (none) Modulo "ASK" Il Gruppo di Sviluppo del software Gopher si augura che possiate trovare utile questo software. Se trovate quello che pensate sia un errore, per cortesia segnalatecelo inviando un messaggio di Posta- Elettronica a "gopher@complete.org". gopher-3.0.15/gopher/locales/README0000664000000000000000000000625610762617110013554 0ustar $Id: README,v 1.1 2000/08/19 00:28:56 jgoerzen Exp $ How to install and use Internationalized message strings. ========================================================= For all systems: ---------------- If you changed the top-level Makefile.config to be anything but /usr/local/lib, you will have to edit all the *.msg files. Search for a line in each starting with 225 (223 for VMS) and if it exists, change the directory path on the next 2 lines appropriately. For X/Open 3 compliant systems: ------------------------------- Gopher now uses the catopen/catgets calls to read data from message catalogs. Installing these can be difficult at times. Here are a few hints on getting these message files working. 1) Make the files into binary catalogs using the 'gencat' utility. If you type 'make' in this directory they should automatically generate themselves. 2) Now, you need to figure out where to install the files. Different operating systems have different places to put these files. Some like /usr/lib/locales/, others /usr/lib/nls, etc. Look at the manual page for catopen() or intro in section 5 of your manual pages for more information. Specifically look for information on the value of the NLSPATH variable. 3) Once you have the files in the correct locations you can use them by changing your LANG or LC_MESSAGES environment variable. i.e LANG=fr or setenv LC_MESSAGES Es Note that case is significant. The catopen() routines will most likely look in the following location for it's cat file in: {NLSLIB}/{lang}/LC_MESSAGES/gopher.cat NLSLIB is defined as your OS specific languages directory, where {lang} is the value of the LC_MESSAGES environment variable or the LANG variable Other systems put these files in different locations. Consult your manual pages for more information. What to do if it just won't work -------------------------------- On some systems you need to have the right files loaded to do NLS commands. The call to setlocale() will fail if you don't have the proper files in the /usr/lib/nls directory. Don't worry though, we provide a backup for such a circumstance. By typing 'make install' you will make a gophernls directory that contains all of the message catalogs. If the gopher client cannot find the message catalog the regular way, it will try these backup files. So, if you wanted to use the spanish gopher, do setenv LC_MESSAGES Es before running the gopher client. This should work on most other systems. For non-X/Open 3 compliant systems: ----------------------------------- make install-msgs should install the files properly. To use them set the environment variables LANG or LC_MESSAGES to the name of the message file without the suffix, i.e. setenv LC_MESSAGES Es_ES if you want a spanish speaking gopher. Customizing Gopher for your Particular Locale ============================================= Basically start with one of the files and convert from it. You might want to start with the En_US.msg, since this is the list of original english messages. Then give it a name (use your iso language code) and send it to the gopher team for the next release. Thanks! gopher-3.0.15/gopher/locales/Dk.msg0000664000000000000000000002310210762617110013727 0ustar $ $ This danish translation is made by Arne Vajhøj (ARNE@KO.HHS.DK) $ 30/12/94 partly from the swedish translation. $ $quote " $ $ Welcome message... $ 1 "Velkommen til Gophers vidunderlige verden!\n\n" 2 "Gopher har begrænsninger i sit anvendelsesområde og\n" 3 "har ingen garanti. Kig venligst i filen 'Copyright'\n" 4 "som følger med distributionen.\n\n" 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\n\n" 6 "Interrnet Gopher Information Client %s.%s patch%d (%s)\n" 7 "Tryk RETURN for at fortsætte\n" $ $ Errors in .gopherrc $ 8 "Kan ikke skrive til gophers konfigurations fil!!" $ $ Help for command line $ 9 "Anvendelse: %s [-sSbDr] [-T type] [-p sti] [-t titel] [vært port]+\n" 10 " -s Sikker modus, brugere uden egen konto\n" 11 " -S Sikker modus, brugere med egen konto\n" 12 " -p sti Sti til første objekt\n" 13 " -T type Type for første objekt\n" 14 " -i Søgekriterium (for -T 7)\n" 15 " -b Bogmærke først\n" 16 " -r Fjernbrugere\n" 17 " -D Fejlfindingsmodus\n" $ $ Sider help.. $ 18 "Bladringshjælp" 19 "u, ^G, venstre : Gå tilbage til menu" 20 "mellemrum, ned : Gå til næste side" 21 "b, op : Gå til foregående side" 22 "/ : Søg text" 23 "m : send aktuelle dokument med email" 24 "s : gem aktuelle dokument" 25 "p : udskriv aktuelle dokument" 26 "D : downloade aktuelle dokument" $ $ New Application Menu $ 27 "Content-Type Navn" 28 "Applikation for visning" 29 "Applikation for udskrift" $ $ Top Level Options $ 30 "Generelle indstilninger" 31 "Indstil applikationer for visning" 32 "Indstil applikationer for udskrift" 33 "Definer ny Content-Type" $ $ Telnet connection $ 34 "Advarsel!!!!!, du forlader nu Internet" 35 "Gopher programmet og forbinder til en anden vært." 36 "Hvis du sidder fast så kan du presse ctrl og" 37 "] tasterne, og siden skrive quit" 38 "^ tasterne, og siden skrive q." 39 "Forbinder op %.40s, port %d med %s." 40 "Forbinder op %.40s med %s." 41 "Anvend kontonavnet \"%.40s\" for at logge ind" $ $ HTML menu $ 42 "Advarsel!!!!!, du forlader nu Internet Gopher" 43 "klienten og forbinder dig op mod en HTML klient. Anvend" 44 "klientens hjælp, hvis du ikke kender programmets kommandoer." 45 "Når du forlader programmet, kommer du tilbage til" 46 "Internet Gopher klienten." $ $ Other html msgs $ 47 "Beklager, denne klient understøtter ikke HTML" $ $ gopher.c $ 48 "Beklager, kan ikke finde en administartor for dette objekt!" $ $ Gripe form msgs $ 49 "Tryk på Enter for at sende din meddelelse." 50 "Tryk på Tab tasten ved enden af hver linie du skriver." 51 "Æmne" 52 "Problem" 53 "Kan ikke sende mail..." 54 "Sender mail til %s..." 55 "Ord at søge efter" 56 " Side: %d/%d" 57 " for Hjælp, " 58 " for at Afslutte" 59 " for at gå en menu op" 60 "%s: Intet modtaget for hovedmenuen, kan ikke fortsætte\n" 61 "%sm%s for mail, %sD%s for at downloade, %ss%s for at gemme, eller %sp%s for udskrift:" 62 ", %sm%s for mail, %sD%s for at downloade:" 63 ", for mail, for at downloade:" 64 ",\n for mail, for at downloade, for at gemme, eller

for udskrift:" 65 "Adresse syntaxen forkert..." 66 "Fede søgord i den indbyggede bladrer" 67 "Bogmærke" 68 "Kan ikke åbne gammel fil.." 69 "Kan ikke skrive til SYS$SCRATCH!" 70 "Kan ikke skrive til /tmp biblioteket!" 71 "Kan ikke åbne den ønskede fil.." 72 "Kan ikke forbinde op til værten %.40s, port %d." 73 "Vælg en dokumenttyp" 74 "Vælg en metod til at downloade" 75 "Forbind til en ny Gopher Server" 76 "Forbind til anonymous FTP Server over en Gopher gateway" 77 "Forbind..." 78 "Forbindelse mislykkedes: %s." 79 "Forbindelse til vært mislykkedes." 80 "Kunde ikke kreere '%s'" 81 "Kunde ikke eksekvere %s" 82 "Kunde ikke finde text" 83 "Kunde ikke kreere en temporær fil!\n" 84 "Det var fejl ved udskrift, beklager..." 85 "Fejl ved anvendelse af TPU som bladrer!!!" 86 "Afslutte: u" 87 "Hent felt..." 88 "Filen overførtes ikke korrekt" 89 "Gopher biblioteks information" 90 "Gopher fejl" 91 "Gopher fil" 92 "Gopher hjælpe fil" 93 "Gopher objekt information" 94 "Gopher indstilninger" 95 "Gopher overførselsfejl" 96 "Hjælp: ?" 97 "Home Gopher server: %.59s" 98 "Vært at spørge:" 99 "Værtnavn" 100 "Værtnavn er ukendt." 101 "Jeg kan ikke forstå din terminal type\n" 102 "Internet Gopher information klient v%s.%s.%d" 103 "Link information" 104 "Lokal dato og tid" 105 "Send aktuelle dokument med mail:" 106 "Sender fil..." 107 "Sender fil til %s..." 108 "At se på viedeo er ikke implementerat" 109 "Navn på dette bogmærke:" 110 "Netværksfejl" 111 "Nej" 112 "Ingen bogmærker definerde" 113 "Ingen kommando for at se på dette er defineret!" 114 "Ingen brugere '%s'" 115 "SideNed: " 116 "SideNed: Mellemrum" 117 "SideOp: b" 118 "Port" 119 "Tryk " 120 "Tryk for at fortsætte" 121 "Tryk når du er klar\n" 122 "Udskriv aktuelle dokument" 123 "Problem ved skrivning" 124 "Virkelig afslutte (y/n) ?" 125 "Modtager bibliotek..." 126 "Modtager fil..." 127 "Modtager HTML side..." 128 "Modtager information..." 129 "Modtager MIME fil..." 130 "Modtager video..." 131 "Modtager lyd..." 132 "Modtager bildede..." 133 "Henter bibliotek..." 134 "Gå tilbage til Menu: u" 135 "Hovedmenu: " 136 "Gem til fil:" 137 "Gem liste af objekter til fil:" 138 "Gemmer fil..." 139 "Søg i bibliotekstitler:" 140 "Søgningen mislykkedes..." 141 "Søg i text:" 142 "Søger i text..." 143 "Søger..." 144 "Afgrænsning (valgfrit)" 145 "Vis værtens lokale dato og tid" 146 "Størrelse Sprog Dokumenttype\n" 147 "---------- ------------- ----------------------------\n" 148 "Beklager, kan ikke vise denne fil" 149 "Beklager, kan ikke slette øverste biblioteksniveau." 150 "Beklager, kan ikke downloade det der!" 151 "Beklager, kan ikke lave et bogmærke af bogmærker" 152 "Beklager, kan ikke gemme filer med dennee konto" 153 "Beklager, kan ikke spawnw med denne konto" 154 "Beklager, kan ikke gemme dette objekt til en fil!" 155 "Beklager, kan ikke udskrive dette dokument" 156 "Beklager, det findes ingen metode til at udskrive dette dokument" 157 "Beklager, telnet er ikke tilgængeligt." 158 "Beklager, denne maskine understøtter ikke billeder" 159 "Beklager, denne maskine understøtter ikke lyd" 160 "Beklager, tn3270 er ikke tilgængligt." 161 "Beklager, du har ikke lov til at udskrive filer" 162 "Beklager, du har ikke lov til at gemme filer" 163 "Beklager, du har ikke lov til at lave indstilninger i sikker modus." 164 "Beklager, du har ikke lov til at lave dette" 165 "Beklager, denne maskine understøtter ikke video" 166 "Beklager, findes intet program for denne type af fil...." 167 "Start af DCL mislykkedes!" 168 "Start af standard kommandofortolker (shell) mislykkedes!" 169 "Starter DCL subprocess. Log ud for at returnere til Gopher.\n" 170 "Starter din standard kommandofortolker (shell). Skriv 'exit' for at returnere til Gopher.\n\n" 171 "Start din \"fangst\" nu...\n\n" 172 "Start downloadningen nu...\n" 173 "Problem med systemet, kan ikke sende mail" 174 "Filnavnet er:" 175 "Kan ikke kreere en netværkskanal (socket)." 176 "Unix \"rørkommando\" (pipe) er ønsket. Kontroller dine indstilninger!" 177 "Ukendt fejl." 178 "Anvend '/' for at definere en søgning først..." 179 "Kig på objekt nummer: " 180 "Ja" 181 "Dit valg" 182 "\nDownloadning klar. %d bytes totalt, %d bytes/s\n" 183 "\nDownloadning kunde ikke fuldføres, beklager... \n" 184 "\nTryk %sRETURN%s for at fortsætte" 185 "\nTryk for at fortsætte" 186 "\n\nServer information\n" 187 "anonymous FTP vært" 188 "gopher: Intet modtaget for hovedmenuen, kan ikke fortsætte\n" 189 "'d'elete kommandoen er kun for bogmærker." 190 "^G : Fortryd" 191 "OK: Enter" 192 "Tab, ^N : Flyt til næste felt" 193 "^P : Flyt til forrige felt" 194 "^F : Vis næste side" 195 "^B : Vis forrige side" 196 "^- : Hjælp (prøv ^/ eller ^7)" 197 "Enter : Accepter" 198 "[Hjælp: ^-] [Fortryd: ^G]" 199 "[Skift værdier: mellemrume] [Vis værdier: l]" 200 "Vælg et punkt" $ $ Choose menu.. $ 201 "Form Hjælp" 202 "^G : Fortryd" 203 "Down, ^N : Flyt til næste valg" 204 "Up, ^P : Flyt til forrige valg" 205 "Space, ^F : Vis næste side" 206 "b, ^B : Vis forrige side" 207 "^ : Vis første side" 208 "$ : Vis sidste side" 209 "0-9 : Vælg specifik valg" 210 "Enter : Vælg nuværende valg" 211 "Fortryd: ^G" 212 " (standard)" 213 "Valg Dialog Hjælp" 214 "Intet tilgængelig." 215 "Advarsel, forkert linie i gopherrc: %s\n" 216 "Aborterer gopher konfiguration gem!!" 217 "Tekst" 218 "En ny konfiguration er tilgængelig. Brug den?" 219 "Standard system printer" 220 "ANSI tilknyttet printer" 221 "Print til" $ Default language/region gopher+ view til choose 222 "Dk_DK" $ $ Multilingual HELP files are now possible $ If CONF.H defines GOPHERHELP_SECURE, make sure you $ have a separate file for secure users' help that $ doesn't document features they're not allowed til use. $ For VMS: $ 223 "GopherP_Dir:gopher_hlp.Dk" 224 "GopherP_Dir:gopher_hlp_secure.Dk" $ $ For Unix: $ 225 "/usr/local/lib/gopher.hlp.Dk" 226 "/usr/local/lib/gopher.hlp_secure.Dk" $ $ Gripe Enhancements $ 227 "Beklager,kan ikke sende mail i sikker modus" 228 "Kan ikke sende mail til nul address..." 229 "Med hensyn tilfølgende Gopher punkt:\n" 230 "Til" 231 "" $ $ A message that asks the User if they speak this language.. $ 232 "Taler du dansk?" 233 " Downloading %d bytes" 234 " 1200bps: %d minutter\n" 235 " 2400bps: %d minutter\n" 236 " 14400bps: %d minutter\n\n" $ $ Add til post-sider option list in SecureMode and NoShellMode $ 237 ", %sD%s for at downloade:" 238 ", for at downloade:" gopher-3.0.15/gopher/locales/Fr.msg0000664000000000000000000002477710762617110013763 0ustar $ $ Translation courtesy of Sylvie St. Georges $ Fixes by Eddy.Beliveau@hec.ca $ $ $ Welcome message... $ $quote " 1 "Bienvenue dans l'univers merveilleux de Gopher!\n\n" 2 "Gopher ne comprend aucune garantie et son utilisation n'est pas\n" 3 "sans restriction. S.V.P. se référer au fichier 'Copyright'\n" 4 "inclus dans la distribution.\n\n" 5 "Copyright 1991-2000 by the Regents of the University of Minnesota\n\n" 6 "Client d'information Gopher pour l'Internet %s.%s révision%d (%s)\n" 7 "Appuyez sur pour continuer" $ $ Errors in .gopherrc $ 8 "Impossible d'écrire dans le fichier de configuration de gopher!!" $ $ Help for command line $ 9 "Usage: %s [-sSbDr] [-T type] [-p chemin] [-t titre] [serveur] [port]+\n" 10 " -s Mode sécuritaire, utilisateurs sans code d'accès\n" 11 " -S Mode sécuritaire, utilisateurs avec un code d'accès\n" 12 " -p chemin Chemin d'accès pour le premier écran\n" 13 " -T type Type du premier élément\n" 14 " -i Paramètre de recherche (pour -T 7)\n" 15 " -b Signets comme écran d'entrée\n" 16 " -r Utilisateur avec accès à distance\n" 17 " -D Mode d'épuration\n" $ $ Pager help.. $ 18 "Aide pour le défileur d'écran" 19 "u, ^G, flèche vers la gauche : Retourne au menu" 20 "barre d'espacement, flèche vers le bas: Affiche la page suivante" 21 "b, flèche vers le haut : Affiche la page précédente" 22 "/ : Active la recherche" 23 "m : Envoie le document par courrier" 24 "s : Sauvegarde le document" 25 "p : Imprime le document" 26 "D : Active le téléchargement" $ $ New Application Menu $ 27 "Type du contenu" 28 "Progamme de visualisation" 29 "Programme d'impression" $ $ Top Level Options $ 30 "Options générales" 31 "Configuration pour la visualisation" 32 "Configuration pour l'impression" 33 "Nouveau type de contenu" $ $ Telnet connection $ 34 "Attention!!!!!, vous allez quitter le programme" 35 "Gopher pour vous connecter sur un autre ordinateur." 36 "En cas de problème, pressez simultanément les touches" 37 "Ctrl et ] puis tapez quit." 38 "Ctrl et ^ puis tapez q." 39 "Connexion à %.40s, port %d par %s." 40 "Connexion à %.40s par %s." 41 "Au login, utilisez le nom d'usager \"%.40s\"" $ $ HTML menu $ 42 "Attention!!!!!, vous allez quitter le client Gopher" 43 "pour vous connecter à un lecteur de fichiers HTML." 44 "Consultez l'aide HTML pour une description des commandes." 45 "En quittant le lecteur HTML, vous retournerez au client" 46 "Gopher." $ $ Other html msgs $ 47 "Désolé, ce client ne supporte pas HTML" $ $ gopher.c $ 48 "Désolé, aucun administrateur pour cet élément!" $ $ Gripe form msgs $ 49 "Appuyez sur pour envoyer votre message." 50 "Appuyez sur à la fin de chaque ligne que vous tapez." 51 "Sujet" 52 "Problème" 53 "Impossible d'envoyer du courrier..." 54 "Commentaires envoyés à %s..." 55 "Rechercher les mots-clés:" 56 " Page: %d/%d" 57 " pour Aide, " 58 " pour Quitter" 59 " pour menu Précédent" 60 "%s: Aucune information disponible dans le menu principal,\n impossible de continuer\n" 61 "%sm%s courrier, %sD%s télécharger, %ss%s sauvegarder, ou %sp%s" 62 ", %sm%s courrier, %sD%s télécharger:" 63 ", courrier, télécharger:" 64 ",\n courrier, télécharger, sauvegarder, ou

imprimer:" 65 "Erreur de syntaxe dans l'adresse..." 66 "Mots recherchés apparaissant en caractères gras" 67 "Menu des signets" 68 "Impossible d'ouvrir l'ancien fichier.." 69 "Impossible d'écrire dans SYS$SCRATCH!" 70 "Impossible d'écrire dans le répertoire /tmp!" 71 "Impossible d'ouvrir le fichier.." 72 "Connexion à %.40s, port %d impossible." 73 "Choisissez un type de document" 74 "Choisissez le mode de téléchargement:" 75 "Connexion à un autre serveur Gopher" 76 "Connexion à un serveur FTP anonymous par la passerelle Gopher" 77 "Connexion en cours..." 78 "Problème de connexion: %s." 79 "Problème de connexion avec l'autre ordinateur." 80 "Impossible de créer '%s'" 81 "Impossible d'exécuter %s" 82 "Recherche infructueuse" 83 "Impossible de créer le fichier tmp!\n" 84 "Désolé! Problème d'impression..." 85 "Erreur dans l'appel de TPU comme défileur d'écran!!!" 86 "Sortie: u" 87 "Champs disponibles..." 88 "Erreur survenue pendant le transfert" 89 "Information sur un répertoire Gopher" 90 "Erreur Gopher" 91 "Fichier Gopher" 92 "Fichier d'aide Gopher" 93 "Information sur un élément Gopher" 94 "Options pour Gopher" 95 "Erreur de transmission Gopher" 96 "Aide: ?" 97 "Serveur Gopher primaire: %.59s" 98 "Ordinateur à interroger:" 99 "Nom du serveur" 100 "Ce nom d'ordinateur est inconnu." 101 "Je ne peux identifier votre type de terminal\n" 102 "Client d'information Gopher pour l'Internet v%s.%s.%d" 103 "Information sur le lien" 104 "Date et heure locales" 105 "Envoi du document par courrier à:" 106 "Envoi du fichier par courrier..." 107 "Envoi du fichier par courrier à %s..." 108 "Visualisation pour l'animation non disponible" 109 "Nom pour ce signet:" 110 "Erreur de réseau" 111 "Non" 112 "Aucun signet n'est défini" 113 "Aucune commande de visualisation n'a été assignée pour cette option!" 114 "Usager '%s' inconnu" 115 "PageSuivante: " 116 "PageSuivante: Espace" 117 "PagePrécédente: b" 118 "Port" 119 "Appuyez sur " 120 "Appuyez sur pour continuer" 121 "Appuyez sur lorsque vous serez prêt\n" 122 "Appuyez sur pour continuer\n" 123 "Impression en cours" 124 "Désirez-vous quitter (Y=oui,N=non) ?" 125 "Réception du répertoire..." 126 "Réception du fichier..." 127 "Réception de la page HTML..." 128 "Réception de l'information.." 129 "Réception du fichier MIME..." 130 "Réception du fichier d'animation..." 131 "Réception du fichier de son..." 132 "Réception du fichier graphique..." 133 "Recherche du répertoire..." 134 "Retour au menu: u" 135 "Menu principal: " 136 "Sauvegarder dans le fichier:" 137 "Menu sauvegardé dans le fichier:" 138 "Sauvegarde du fichier..." 139 "Recherche dans le menu pour:" 140 "Recherche infructueuse..." 141 "Recherche dans le texte pour:" 142 "Recherche le texte..." 143 "Recherche..." 144 "Sélecteur (Optionnel)" 145 "Affichage de la date et de l'heure locales d'un site" 146 "Taille Langage Type de document\n" 147 "---------- ------------- ----------------------------\n" 148 "Désolé, impossible de visualiser ce fichier" 149 "Désolé, ce dernier élément ne peut être effacé." 150 "Désolé, impossible à télécharger!" 151 "Désolé, le menu des signets ne peut être défini comme un nouveau signet" 152 "Désolé, il ne vous est pas permis de sauvegarder des fichiers" 153 "Désolé, cet élément ne peut être sauvegardé!" 154 "Désolé, cette option ne vous est pas permise" 155 "Désolé, impossible d'imprimer ce document" 156 "Désolé, méthode d'impression non disponible pour ce document" 157 "Désolé, telnet n'est pas disponible." 158 "Désolé, ce client ne supporte pas les fichiers images" 159 "Désolé, cet ordinateur ne supporte pas les fichiers sonores" 160 "Désolé, tn3270 n'est pas disponible." 161 "Désolé, il ne vous est pas permis d'imprimer des fichiers" 162 "Désolé, il ne vous est pas permis de sauvegarder des fichiers" 163 "Désolé, il ne vous est pas permis de modifier les options." 164 "Désolé, cette option ne vous est pas permise" 165 "Désolé, cet ordinateur ne supporte pas l'animation" 166 "Désolé, aucun programme de visualisation pour ce fichier..." 167 "Impossible d'accéder au DCL!" 168 "Impossible d'accéder au shell implicite!" 169 "Passage au DCL. Quittez (logout) pour revenir à Gopher.\n" 170 "Passage au shell implicite. Tapez 'exit' pour revenir à Gopher.\ n\n" 171 "Préparez la réception pour la saisie d'écran ...\n\n" 172 "Préparez la réception pour le téléchargement...\n" 173 "Problème de système, impossible d'envoyer du courrier" 174 "Le nom du fichier est:" 175 "Problème d'allocation de port." 176 "Redirection Unix demandée. Vérifiez votre configuration!" 177 "Erreur inconnue." 178 "Utilisez '/' pour une première recherche..." 179 "Afficher le numéro: " 180 "Oui" 181 "Votre choix" 182 "\nTéléchargement complété. %d octets au total, %d octets/sec\n" 183 "\nDésolé, téléchargement non complété... \n" 184 "\nAppuyez sur %sRETOUR%s pour continuer" 185 "\nAppuyez sur pour continuer" 186 "\n\nServeur d'information\n" 187 "Site FTP anonymous" 188 "gopher: Aucune information disponible dans le menu principal,\nimpossible de continuer\n" 189 "La commande 'd'elete n'affecte que les signets" 190 "^G : Annuler" 191 "OK: Retour" 192 "Tab, ^N : Champ suivant" 193 "^P : Champ précédent" 194 "^F : Écran suivant" 195 "^B : Écran précédent" 196 "^_ : Aide (^/ ou ^7)" 197 "Retour : Accepter" 198 "[Aide: ^-] [Annuler: ^G]" 199 "[Valeurs(défilement): Espace] [Valeurs(liste): l]" 200 "Choisissez" $ $ Choose menu... $ 201 "Aide pour formulaire" 202 "^G : Annuler" 203 "Flèche vers le bas, ^N : Choix suivant" 204 "Flèche vers le haut, ^N : Choix précédent" 205 "Espace, ^F : Écran suivant" 206 "b, ^B : Écran précédent" 207 "^ : Écran initial" 208 "$ : Écran" 209 "0-9 : Sélection d'un élément" 210 "Retour : Sélection de l'élément courant" 211 "Annuler: ^G" 212 " (par défaut)" 213 "Aide pour écran à choix multiples" 214 "Aucune information disponible." 215 "Attention, mauvaise entrée dans gopherrc: %s\n" 216 "Sauvegarde de la configuration interrompue!!" 217 "Texte" 218 "Désirez-vous la nouvelle configuration (Y=oui,N=non)" 219 "Imprimante du système" 220 "Imprimante esclave" 221 "Imprimer vers" $ Default language/region gopher+ view to choose 222 "Fr_FR" $ Multilingual HELP files are now possible $ If CONF.H defines GOPHERHELP_SECURE, make sure you $ have a separate file for secure users' help that $ doesn't document features they're not allowed to use. $ For VMS: $ 223 "GopherP_Dir:gopher_hlp.Fr" 224 "GopherP_Dir:gopher_hlp_secure.Fr" $ $ For Unix: $ 225 "/usr/local/lib/gopher.hlp.Fr" 226 "/usr/local/lib/gopher.hlp_secure.Fr" $ $ Gripe Enhancements $ 227 "Désolé, on ne peut envoyer vos commentaires à l'administrateur" 228 "On ne peut envoyer du courrier à une adresse non définie" 229 "En ce qui concerne l'élément Gopher suivant:\n" 230 "A" 231 "" 232 "Parlez-vous Francais?" 233 "Téléchargement %d octets" 234 " 1200 bauds %d minutes\n" 235 " 2400 bauds %d minutes\n" 236 " 14400 bauds %d minutes\n" gopher-3.0.15/gopher/form.c0000664000000000000000000003607210762617110012360 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2001/01/17 21:48:05 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/form.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 92, 93, 94 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: form.c * Form definition and management functions ********************************************************************* * Revision History: * $Log: form.c,v $ * Revision 1.3 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.2 2001/01/03 22:28:24 s2mdalle * Code cleanups, compiler warning fixes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.9 1995/11/03 21:18:17 lindner * ANSIfication * * Revision 3.8 1995/05/01 03:42:48 lindner * Fixes for NetBSD * * Revision 3.7 1994/07/03 23:10:57 lindner * fix forms.. * * Revision 3.6 1994/05/19 14:07:24 lindner * use fast malloc on VMS VAXC * * Revision 3.5 1994/04/01 02:24:56 lindner * Fix return types * * Revision 3.4 1994/03/08 15:55:05 lindner * gcc -Wall fixes * * Revision 3.3 1994/03/04 23:39:50 lindner * Fix for log entries * * Revision 3.2 1994/03/04 23:36:32 lindner * bug fixes. * * Revision 3.1 1994/02/20 16:15:44 lindner * New form definition and management functions * * *********************************************************************/ #include "form.h" #include "String.h" #include "GSgopherobj.h" #include "BLblock.h" #include "Malloc.h" #include "CURcurses.h" #include "gopher.h" /** Make a new item... **/ ITEM * ITEMnew(void) { ITEM *temp; temp = (ITEM*) malloc(sizeof(ITEM)); temp->type = ITEM_UNINIT; temp->label = STRnew(); temp->response = STRnew(); temp->chooseitem = -1; temp->choices = STAnew(3); return(temp); } /* * Clear out a specific item */ void ITEMinit(ITEM *item) { item->type = ITEM_UNINIT; STRinit(item->label); STRinit(item->response); STAinit(item->choices); item->chooseitem=0; } /* * Copy an item */ ITEM* ITEMcpy(ITEM *dest, ITEM *orig) { dest->type = orig->type; STRset(dest->label, STRget(orig->label)); STRset(dest->response, STRget(orig->response)); dest->chooseitem = orig->chooseitem; STAcpy(dest->choices, orig->choices); return(dest); } /* * Nuke a defined ITEM */ void ITEMdestroy(ITEM *item) { STRdestroy(item->label); STRdestroy(item->response); STAdestroy(item->choices); free(item); } /* * Add an item to the list of choices.. */ void ITEMpushChoice(ITEM *item, char *choice) { String *str; str = STRnew(); STRset(str, choice); STApush(item->choices, str); STRdestroy(str); } /************************************************************************* * Form definition routines.. Pretty swanky.. */ FORM* FORMfromASK(GopherObj *gs) { int Asknum; Blockobj *bl; char askline[256]; char *defaultval; #if 0 int i; char ** responses = NULL; ITEM *item; #endif /* 0 */ FORM *form; GSgetginfo(gs, TRUE); bl = GSfindBlock(gs, "ASK"); if (bl == NULL) return(NULL); form = FORMnew(BLgetNumLines(bl)); for (Asknum=0; Asknum maxpromptwidth) maxpromptwidth = strlen(ITEMgetPrompt(item)); } if (totalprompts != 0 && (totalprompts % pagesize) == 0) numforms ++; } if (numforms > 1) numprompts = pagesize; else numprompts = totalprompts; if (numprompts == 0) { return(-1); } maxlength -= (maxpromptwidth+1); tempwin = newwin(6 + numprompts, COLS-2, (LINES-(6+numprompts))/2,1); CURwenter(cur,tempwin); while (currentform < numforms) { if (currentform == (numforms-1)) { numprompts = totalprompts - (pagesize * currentform); } else { numprompts = pagesize ; } wstandend(tempwin); CURbox(cur,tempwin, 6+numprompts, COLS-2); currentfield = 0; /*** Add the window title, centered ***/ if (Wintitle != NULL) { /** Trim window title to fit in the window **/ if (strlen(Wintitle) > COLS-2) { strncpy(TrimmedTitle, Wintitle, COLS-2); TrimmedTitle[COLS-5] = '.'; TrimmedTitle[COLS-4] = '.'; TrimmedTitle[COLS-3] = '.'; TrimmedTitle[COLS-2] = '\0'; } else strcpy(TrimmedTitle, Wintitle); /** Put the title, bold **/ wmove(tempwin, 0,(COLS -2 - strlen(TrimmedTitle))/2); wstandout(tempwin); waddstr(tempwin, TrimmedTitle); wstandend(tempwin); } /** Add the prompts and typing area **/ for (i=0; i