gopher/0000755000000000000000000000000012722722044007232 5ustar gopher/configure.in0000644000000000000000000001264610762617110011553 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/patchlevel.h0000644000000000000000000000026010762617110011527 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/MANIFEST0000644000000000000000000002434210762617110010367 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/doc/0000755000000000000000000000000012722722042007775 5ustar gopher/doc/clientlogging.vms0000644000000000000000000002261410762617110013357 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/doc/Makefile.in0000644000000000000000000000065410762617110012050 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/doc/client.changes0000644000000000000000000011520510762617110012612 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/doc/FAQ0000644000000000000000000000511410762617110010331 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/doc/TODO0000644000000000000000000000131610762617110010467 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/doc/PLATFORMS0000644000000000000000000000445410762617110011277 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/doc/gopherrc.50000644000000000000000000000521410762617110011677 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/doc/object.changes0000644000000000000000000000345010762617110012600 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/doc/gopher.10000644000000000000000000001642010762617110011347 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/doc/gophfilt.10000644000000000000000000000674110762617110011704 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/doc/INSTALL0000644000000000000000000002070010762617110011026 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/Makefile.config.in0000644000000000000000000002161111363667255012560 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/install-sh0000644000000000000000000001273610762617110011243 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/config.h.in0000644000000000000000000001646212722722044011266 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/README0000644000000000000000000000505610762617110010117 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/debian/0000755000000000000000000000000012722722042010452 5ustar gopher/debian/startopts0000644000000000000000000000141410762617110012441 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/debian/changelog0000644000000000000000000003535212722721431012335 0ustar gopher (3.0.16) unstable; urgency=low * Bump compat to 9. Closes: #817485. -- John Goerzen Sun, 29 May 2016 21:18:52 -0500 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/debian/rules0000755000000000000000000000573312722721677011557 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 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_prep 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/debian/compat0000644000000000000000000000000212722721406011653 0ustar 9 gopher/debian/dirs0000644000000000000000000000012510762617110011335 0ustar usr/bin usr/sbin usr/share/man/man1 usr/share/man/man5 usr/share/man/man8 etc/gopher gopher/debian/copyright0000644000000000000000000000245610762617110012415 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/debian/conffiles0000644000000000000000000000000010762617110012334 0ustar gopher/debian/docs0000644000000000000000000000015610762617110011330 0ustar README doc/INSTALL doc/TODO doc/client.changes doc/clientlogging.vms doc/object.changes doc/PLATFORMS doc/FAQ gopher/debian/control0000644000000000000000000000116612722722011012055 0ustar Source: gopher Section: net Priority: optional Maintainer: John Goerzen Standards-Version: 3.9.6 Build-Depends: debhelper (>= 9), 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/copyright0000644000000000000000000000170110762617110011163 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/gopher/0000755000000000000000000000000012722722042010514 5ustar gopher/gopher/Makefile.in0000644000000000000000000001211710762617110012564 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/gopher/globals.h0000644000000000000000000001277710762617110012327 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.4 $ * $Date: 2002/01/08 17:36:14 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/globals.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: globals.h * Global variables and #defines ********************************************************************* * Revision History: * $Log: globals.h,v $ * 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 2000/08/19 00:43:59 jgoerzen * Fix to use linux standard sys_errlist * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.20 1995/11/03 21:18:17 lindner * ANSIfication * * Revision 3.19 1995/05/01 05:41:30 lindner * compatibility fixes * * Revision 3.18 1995/05/01 03:42:08 lindner * Fixes for NetBSD * * Revision 3.17 1995/04/15 07:08:17 lindner * none * * Revision 3.16 1994/07/06 15:38:54 lindner * Add setlocale_langdir * * Revision 3.15 1994/06/29 07:07:56 lindner * moved gcatd to Locale.[ch] (Coopersmith) * * Revision 3.14 1994/05/17 05:47:55 lindner * Massive internationalization change * * Revision 3.13 1994/03/04 23:36:33 lindner * remove MAXRESP define * * Revision 3.12 1993/09/29 20:51:44 lindner * add declaration of CleanupandExit() * * Revision 3.11 1993/08/16 18:19:32 lindner * VMS special interrupt and subprocess handling vars * * Revision 3.10 1993/08/16 17:58:19 lindner * Removed REMOTEUSER ifdefs * * Revision 3.9 1993/08/03 20:48:21 lindner * Audio file fix from jqj * * Revision 3.8 1993/08/03 20:24:16 lindner * Bigger Better Badder Options, inspired by jqj * * Revision 3.7 1993/07/27 05:28:46 lindner * Mondo Debug overhaul from Mitra * * Revision 3.6 1993/07/23 04:36:59 lindner * Added a Jmpenv variable for longjmp * * Revision 3.5 1993/07/20 23:11:56 lindner * Got rid of versionline * * Revision 3.4 1993/06/08 06:33:07 lindner * Updated version number * * Revision 3.3 1993/04/15 21:28:27 lindner * Mods for remote access * * Revision 3.2 1993/03/24 16:57:51 lindner * New version# * * Revision 3.1.1.1 1993/02/11 18:02:57 lindner * Gopher+1.2beta release * *********************************************************************/ #include #define WHOLELINE 80 /* Used in ourutil.c */ /* * These are some funky defines that assures that global variables are * declared only once. (when globals.c includes this file with EXTERN * defined. */ #ifndef EXTERN #define EXTERN extern #define INIT(x) #else #define EXTERN #define INIT(x) =(x) #endif /*** Global variables ***/ EXTERN RCobj *GlobalRC; EXTERN boolean ChangedDefs INIT(FALSE); EXTERN char *Searchstring INIT(NULL); EXTERN int iLevel INIT(0); EXTERN BOOLEAN SecureMode INIT(FALSE); EXTERN BOOLEAN NoShellMode INIT(FALSE); EXTERN BOOLEAN RemoteUser INIT(FALSE); EXTERN GopherDirObj *CurrentDir INIT(NULL); EXTERN GopherDirObj *OldDirs[30]; /** Should be a stack... **/ EXTERN GopherDirObj *BookmarkDir INIT(NULL); EXTERN char USERCAP[WHOLELINE]; /* The validated user capability */ EXTERN int SOUNDCHILD INIT(0); /* The pid of the sound player child. */ EXTERN CursesObj *CursesScreen; EXTERN char *Gopenfile INIT(NULL); #if defined(VMS) && defined(A_LANGUAGE) EXTERN GopherDirObj *setlocale_LangDir INIT(NULL); #endif #ifndef VMS extern int errno; #endif /*** Externals ***/ #ifndef VMS extern char **environ; /* User environment array */ #endif /*** VMS needs special interrupt and subprocess handling ***/ #ifdef VMS void (*VMSsignal(/* int, void (*) () */)) (int); #define signal(a,b) VMSsignal(a,b) EXTERN boolean HadVMSInt INIT(FALSE); int DCLsystem(/* char* */); #define system(a) DCLsystem(a) #endif /*** Prototypes and forward declarations ***/ /*** Ourutils.c ***/ void display_file(/* char *Filename */); void ZapCRLF(char *); int outchar(int c); void CursesErrorMsg(char *Message); void GetOneOption(/* char*, char* */); int process_request(GopherObj *ZeGopher); int Load_Dir(GopherObj *ZeGopher); int Load_Index(GopherObj *ZeGopher); int Load_Index_or_Dir(GopherObj *ZeGopher, char *Searchmungestr); void GetOneOption(/* */); void check_sock(int sockfd, char *host, int port); char *Choose_View(GopherObj *gs); char **AskBlock(GopherObj *gs); void CleanupandExit(int exitval); gopher/gopher/download.h0000644000000000000000000000043110762617110012473 0ustar /* download.h * Written by David Allen * Simple prototypes for functions in download.c */ #define DOWNLOAD_H 1 #ifndef OURUTILS_H # include "ourutils.h" #endif /* OURUTILS_H */ void Download_file(GopherObj *gs); void BuiltinDownload(char *dirname); gopher/gopher/subprocs.c0000644000000000000000000000372710762617110012532 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/subprocs.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: subprocs.c * procedures for dealing with child processes. ********************************************************************* * Revision History: * $Log: subprocs.c,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.5 1995/11/03 21:18:22 lindner * ANSIfication * * Revision 3.4 1994/04/13 03:37:30 lindner * Remove dead code * * Revision 3.3 1993/07/20 23:14:13 lindner * Use waitpid, not wait3 * * Revision 3.2 1993/04/15 21:44:50 lindner * Fixes for sysv signals * * Revision 3.1.1.1 1993/02/11 18:02:58 lindner * Gopher+1.2beta release * * Revision 1.2 1992/12/31 05:36:51 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 * * *********************************************************************/ #ifdef VMS void sig_child() { } #else /* not VMS */ #include "gopher.h" #include "Wait.h" #if defined(SIGTSTP) && !defined(_CRAY) /* True on a BSD system */ #include #endif #include /* A little signal handler that handles those damn zombies */ void sig_child(int sig) { /* * Use the waitpid() system call with the WNOHANG option */ int pid; Portawait status; while ( (pid = waitpid(-1, &status, WNOHANG|WUNTRACED)) > 0) ; } #ifdef SIGCHLD #ifndef SIGCLD # define SIGCLD SIGCHLD #endif #endif #endif /* not VMS */ gopher/gopher/CURcurses.c0000644000000000000000000020133010762617110012536 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/01/08 17:36:14 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/CURcurses.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: CURcurses.c * Abstraction of all Curses Functions ********************************************************************* * Revision History: * $Log: CURcurses.c,v $ * 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/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.3 2001/01/03 22:25:57 s2mdalle * Code cleanups, fixes for copious compiler warnings. * * Revision 1.2 2000/12/27 21:25:01 s2mdalle * Added #include "gopher.h" * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.61 1996/01/04 18:28:51 lindner * Updates for autoconf * * Revision 3.60 1995/11/03 21:18:15 lindner * ANSIfication * * Revision 3.59 1995/11/03 20:50:47 lindner * Coen: fixes.. * * Revision 3.58 1995/05/02 06:06:57 lindner * Fix for message str.. * * Revision 3.57 1995/04/15 07:09:46 lindner * New funky C-x stuff * * Revision 3.56 1995/03/09 05:24:39 lindner * F.Macrides 01-Mar-1995 Removed the CURsetScreen(cur, initscr()) that * someone #ifdef'ed for VMS in CURresize(). * * Revision 3.55 1995/02/27 17:44:51 lindner * New pacbell fcn CURrightline * * Revision 3.54 1995/02/07 19:34:41 lindner * Fix for unix systems without SIGTSTP * * Revision 3.53 1995/01/25 23:09:24 lindner * Word wrapping in gopher forms, provided by Pacific Bell Knowledge Net * * Revision 3.52 1994/12/03 01:51:39 lindner * Fix prototype for DCLspawn_exception * * Revision 3.51 1994/10/21 04:41:07 lindner * Add ANSI attached printer code.. * * Revision 3.50 1994/06/29 07:06:59 lindner * moved gcatd to Locale.[ch] (Coopersmith) * * Revision 3.49 1994/06/29 05:11:07 lindner * None.. * * Revision 3.48 1994/06/12 05:28:17 lindner * Fix for locales * * Revision 3.47 1994/06/09 22:13:35 lindner * More language conversions * * Revision 3.46 1994/05/24 05:49:54 lindner * Fix for bad free() in CURrequest() * * Revision 3.45 1994/04/25 20:43:29 lindner * Remove ugly pointer debug statement * * Revision 3.44 1994/04/25 03:49:41 lindner * 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). * * Revision 3.43 1994/04/25 03:37:35 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.42 1994/04/13 19:13:20 lindner * AskL modifications * * Revision 3.41 1994/04/01 02:24:41 lindner * Remove debugging stuff * * Revision 3.40 1994/03/31 21:26:43 lindner * Mitra's debug routine * * Revision 3.39 1994/03/08 15:55:02 lindner * gcc -Wall fixes * * Revision 3.38 1994/03/04 23:39:45 lindner * Fix for log entries * * Revision 3.37 1994/03/04 23:36:28 lindner * Many, many fixes and enhancements for Beckett and Co. * * Revision 3.36 1994/02/21 15:47:34 lindner * Remove conditional compilation for DEC ALPHAS trusted flag on VMS * * Revision 3.35 1994/02/20 21:45:18 lindner * Better sanity checks for box drawing characters * * Revision 3.34 1994/01/20 06:46:15 lindner * Fix boundary condition * * Revision 3.33 1994/01/14 16:40:04 lindner * Added VMSVersion() for getting the VMS version number, and modified * spawn_DCLprocess() so that it includes the TRUSTED flag for VAX v6+ * and AXP v2+. If DEC changes AXP v2.0 to v6.1 (I've heard rumors to * that affect), remove the __ALPHA conditional compilation in * spawn_DCLprocess() so it just checks for v6+. * * Revision 3.32 1993/12/28 17:29:09 lindner * Better method of drawing box characters * * Revision 3.31 1993/11/04 02:06:50 lindner * Add Ben's AIS hack * * Revision 3.30 1993/10/26 18:24:31 lindner * Make sure we cleanup before exiting * * Revision 3.29 1993/10/26 18:12:56 lindner * Fixes for Input routines, screen redrawing, ASK fixes * * Revision 3.28 1993/10/22 20:22:12 lindner * Range checks for lots of things * * Revision 3.27 1993/10/07 05:10:12 lindner * Make TrimmedTitle[] (twice) a larger array (256 elements). Makes * 132-column terminals and huge xterm windows happier. * * In CURwgetch(), fix vt100 "Help" escape sequence. Add vt100 "Enter", * vt200 "Help", and vt200 "Do" escape sequences. * * Revision 3.26 1993/09/30 22:41:57 lindner * Add option for bolding of searched words * * Revision 3.25 1993/09/29 22:47:17 lindner * Fix for AskBlock memory cruft * * Revision 3.24 1993/09/29 20:52:47 lindner * Add [space to cycle] prompt earlier * * Revision 3.23 1993/09/26 09:19:19 lindner * Add bold #defines * * Revision 3.22 1993/09/22 19:58:15 lindner * Fix for extra cruft on screen from Select/Choose * * Revision 3.21 1993/09/22 04:13:44 lindner * none * * Revision 3.20 1993/09/22 01:15:44 lindner * Add support for DEC HELP key/KEY_HELP * * Revision 3.19 1993/09/21 02:42:18 lindner * Exit on error reading from terminal (kills spinning processes) * * Revision 3.18 1993/09/21 01:46:06 lindner * Implement all remaining ASK block items.. * * Revision 3.17 1993/09/11 06:31:33 lindner * spelling correction * * Revision 3.16 1993/09/11 04:51:00 lindner * Fix to skip labels in CURrequest() * * Revision 3.15 1993/09/03 03:28:59 lindner * 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). * * Revision 3.14 1993/08/19 20:22:45 lindner * Mitra's Debug patch * * Revision 3.13 1993/08/16 18:17:01 lindner * Fixes 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). * * Revision 3.12 1993/08/12 06:32:06 lindner * Add needed variable * * Revision 3.11 1993/08/09 20:44:48 lindner * Fix for really long strings * * Revision 3.10 1993/08/09 20:29:50 lindner * Get rid of the beep during a ^G in CURwgetstr(). * * Make CURChoice() delete its window when it exits. * * Revision 3.9 1993/07/30 17:31:34 lindner * Mods to support AskP: * * Revision 3.8 1993/07/27 02:02:47 lindner * More comments * * Revision 3.7 1993/07/23 04:33:48 lindner * Mods to curchoice for default * * Revision 3.6 1993/07/20 23:10:17 lindner * none * * Revision 3.5 1993/04/15 21:23:36 lindner * Removed extraneous wattron/wattroff * * Revision 3.4 1993/03/26 19:42:32 lindner * Fix for skip by two problem in CURrequest * * Revision 3.3 1993/03/18 23:15:24 lindner * Mods to support titles inside of a CURrequest. * * Revision 3.2 1993/02/16 23:26:02 lindner * Fixes for SIG_ERR (for Crays) * * Revision 3.1.1.1 1993/02/11 18:02:56 lindner * Gopher+1.2beta release * * Revision 1.8 1993/01/11 20:25:31 lindner * Fixed weird wprintw error on EP/IX. * * Revision 1.8 1993/01/11 20:25:31 lindner * Fixed weird wprintw error on EP/IX. * * Revision 1.7 1993/01/09 02:16:21 lindner * Changed (void*)-1 constructs to SIG_ERR * * Revision 1.6 1993/01/09 01:28:11 lindner * Replaced hosed Log messages (Ooops!) * * Revision 1.5 1993/01/09 01:24:42 lindner * Added CURchoice(), let's you choose one option from [2-9] items. * * Revision 1.4 1993/01/09 00:49:16 lindner * More mods for VMS from jqj. Looks like better ctrl-y and ctrl-c * processing. * * Revision 1.3 1993/01/06 17:05:46 lindner * Added nl() to CURexit() for EP/IX machines. * * Revision 1.2 1992/12/31 05:55:44 lindner * Mods for VMS * * Revision 1.1 1992/12/10 06:16:51 lindner * Initial revision * * *********************************************************************/ #include "CURcurses.h" #include "gopher.h" #include "Malloc.h" #include #ifndef SIG_ERR #define SIG_ERR ((void *) -1) #endif #include "Stdlib.h" #include "compatible.h" #include "Debug.h" #include "String.h" #include "util.h" #ifdef VMS static int w_getch(); #undef wgetch #define wgetch w_getch void setterm_pas(); void resetterm(); void VMSCURinit(/* CursesObj* */); void VMSinit(); int VMSVersion(/* char *, int */); void VMSexit(); int spawn_DCLprocess(); unsigned int DCLspawn_exception(); #endif /* VMS */ #include #ifdef HAVE_TERM_H #include #endif #ifdef CTRLCPROMPTS # define DIALOGCANCELSTR "Cancel - ^C" # define HELPCANCEL "^C : Cancel" # define HELP2CANCEL "^C : Cancel" # define FORMCANCEL "[Help: ^-] [Cancel: ^C] " #else # define DIALOGCANCELSTR "Cancel - ^G" # define HELPCANCEL "^G : Cancel" # define HELP2CANCEL "^G : Cancel" # define FORMCANCEL "[Help: ^-] [Cancel: ^G] " #endif /*NEWCTRLC*/ #ifdef CONTROLX # define CXPROMPT1 "^X : Accept" #else # define CXPROMPT1 "Enter : Accept" #endif /* * Do we use wordwrap? */ boolean wordwrap = 0; /* * Initialize data space for various screen information */ CursesObj * CURnew(void) { CursesObj *cur; cur = (CursesObj *) malloc(sizeof(CursesObj)); cur->Screen = NULL; cur->Termtype = STRnew(); cur->Clearscreen = STRnew(); cur->AudibleBell = STRnew(); cur->Highlighton = STRnew(); cur->Highlightoff = STRnew(); cur->canUseACS = FALSE; cur->inCurses = FALSE; cur->sigtstp = SIG_ERR; cur->sigwinch = SIG_ERR; CURinit(cur); return(cur); } /* * Initialize various strings and such. */ void CURinit(CursesObj *cur) { #ifdef VMS VMSCURinit(cur); #else int err; static char terminal[1024]; static char capabilities[1024]; /* String for cursor motion */ static char *ptr = capabilities; /* for buffering */ char *cp; /*** Set the terminal type ***/ if (getenv("TERM") != NULL) CURsetTerm(cur, getenv("TERM")); else CURsetTerm(cur, "unknown"); err = tgetent(terminal, CURgetTerm(cur)); if (err !=1) CURsetTerm(cur, "unknown"); /*** Get the clearscreen code ***/ if ((cp = (char *)tgetstr("cl", &ptr)) != NULL) CURsetCLS(cur, cp); else CURsetCLS(cur, ""); /*** Set the bell ***/ if ((cp = (char *) tgetstr("bl", &ptr)) != NULL) CURsetBell(cur, cp); else CURsetBell(cur, "\007"); /*** Set the highlight codes ***/ if ((cp = (char *) tgetstr("so", &ptr)) != NULL) { CURsetHighon(cur, cp); if ((cp = (char *) tgetstr("se", &ptr)) != NULL) CURsetHighoff(cur, cp); } else { CURsetHighon(cur, ""); CURsetHighoff(cur, ""); } /*** Does terminal support alternate character set? ***/ if ((char *) tgetstr("as", &ptr) != NULL) cur->canUseACS = TRUE; CURsetScreen(cur,initscr()); #endif cur->inCurses = FALSE; CURsetGraphicsChars(cur, CURgetTerm(cur)); } /* * Set the characters to output depending on the terminal type... * * Most systems don't do it right.. */ static char *CURgraphicChars[] = { "vtxxx", "qxlkmjwvtun", "xterm", "qxlkmjwvtun", "z29", "aqfcedsuvtb", "wyse50", "zvrsqupwtyx", "isc", "D3Z?@Y+++++", "sun-cmd","-|+++++++++", NULL, NULL }; void CURsetGraphicsChars(CursesObj *cur, char *termtype) { cur->Box_hline = '-'; cur->Box_vline = '|'; cur->Box_ul = '+'; cur->Box_ur = '+'; cur->Box_ll = '+'; cur->Box_lr = '+'; cur->Box_tt = '+'; cur->Box_bt = '+'; cur->Box_lt = '+'; cur->Box_rt = '+'; cur->Box_ct = '+'; #if defined(A_ALTCHARSET) && !defined(ultrix) && !defined(__osf__) /** use ALTCHARSET if termcap or terminfo knows how **/ if (cur->canUseACS) { char *term, *chars; char termname[20]; int count=0; strcpy(termname, termtype); /** VT100 terminals and above support alternate character set **/ if (strncasecmp(termname, "vt1", 3) == 0 || strncasecmp(termname, "vt2", 3) == 0 || strncasecmp(termname, "vt3", 3) == 0) strcpy(termname, "vtxxx"); /* name in CURgraphicChars[] */ while ((term = CURgraphicChars[count++]) != NULL) { chars = CURgraphicChars[count++]; if (strcmp(termname, term) == 0) { #ifdef ACS_BSSB cur->Box_hline = ACS_HLINE; cur->Box_vline = ACS_VLINE; cur->Box_ul = ACS_BSSB; cur->Box_ur = ACS_BBSS; cur->Box_ll = ACS_SSBB; cur->Box_lr = ACS_SBBS; cur->Box_tt = ACS_TTEE; cur->Box_bt = ACS_BTEE; cur->Box_lt = ACS_LTEE; cur->Box_rt = ACS_RTEE; cur->Box_ct = ACS_PLUS; #else /* ACS_BSSB */ cur->Box_hline = A_ALTCHARSET|chars[0]; cur->Box_vline = A_ALTCHARSET|chars[1]; cur->Box_ul = A_ALTCHARSET|chars[2]; cur->Box_ur = A_ALTCHARSET|chars[3]; cur->Box_ll = A_ALTCHARSET|chars[4]; cur->Box_lr = A_ALTCHARSET|chars[5]; cur->Box_tt = A_ALTCHARSET|chars[6]; cur->Box_bt = A_ALTCHARSET|chars[7]; cur->Box_lt = A_ALTCHARSET|chars[8]; cur->Box_rt = A_ALTCHARSET|chars[9]; cur->Box_ct = A_ALTCHARSET|chars[10]; #endif /* ACS_BSSB */ } } } #endif } /* * Given a properly "CURnew" cursesobj, initialize the screen.. */ void CURenter(CursesObj *cur) { /* for safety */ if (cur->inCurses == TRUE) return; #ifdef VMS (void)setterm_pas(); CURsetScreen(cur,initscr()); #else tputs(CURgetCLS(cur),1,CURoutchar); fflush(stdout); #endif cur->inCurses = TRUE; CURwenter(cur,stdscr); #ifdef SIGWINCH if (cur->sigwinch != SIG_ERR) signal(SIGWINCH, cur->sigwinch); #endif #ifdef SIGTSTP if (cur->sigtstp != SIG_ERR) signal(SIGTSTP, cur->sigtstp); #endif } /* * Set up processing for the window (especially for system V curses! */ void CURwenter(CursesObj *cur, WINDOW *win) { cbreak(); noecho(); nonl(); #ifdef SYSVCURSES intrflush(win, FALSE); nodelay(win, FALSE); #ifndef ultrix /** Causes wgetch to dump core in ultrix **/ #ifndef _SEQUENT_ keypad(win, TRUE); #endif #endif #endif } /* * Exit curses system. */ void CURexit(CursesObj *cur) { if (!cur->inCurses) return; cur->inCurses = FALSE; echo(); nl(); endwin(); #ifdef SYSVCURSES #ifndef _SEQUENT_ keypad(stdscr, FALSE); #endif #endif #ifdef VMS (void)resetterm(); #endif #ifdef SIGTSTP tputs(CURgetCLS(cur),1,CURoutchar); fflush(stdout); cur->sigtstp = signal(SIGTSTP, SIG_DFL); #endif #ifdef SIGWINCH cur->sigwinch = signal(SIGWINCH, SIG_DFL); #endif } /* * send a character to stdout, not really curses, but we do use it... */ int CURoutchar(int c) { /** output the given character. From tputs... **/ /** Note: this CANNOT be a macro! **/ putc(c, stdout); return(c); } /* * Rightline, uses curses routines to center a line. */ void CURrightline(CursesObj *cur, char *theline, int yval) { mvaddstr(yval, (COLS - strlen(theline) -1), theline); } /* * Centerline, uses curses routines to center a line. */ void CURcenterline(CursesObj *cur, WINDOW *win, char *theline, int yval, int windowidth, boolean bright) { char TrimmedLine[256]; strcpy(TrimmedLine, theline); /** Make sure theline fits in the window **/ if (strlen(theline) > windowidth) { TrimmedLine[windowidth-3] = '.'; TrimmedLine[windowidth-2] = '.'; TrimmedLine[windowidth-1] = '.'; TrimmedLine[windowidth] = '\0'; } wmove(win, yval, (windowidth - strlen(TrimmedLine))/2); if (bright) wstandout(win); waddstr(win, TrimmedLine); if (bright) wstandend(win); } /* * CURwgetstr is a replacement of getstr that allows editing of the string * if the user types control codes we don't recognize, it's returned instead * We assume that the incoming string is shorter than the max.. */ int CURwgetstr(CursesObj *cur, WINDOW *win, char *inputline, int maxlength, boolean hidden) { int pointer = 0; int curpointer = 0; int ch; int y,x; wstandout(win); /*** Check to see if there's something in the inputline already ***/ while (inputline[pointer] != '\0') { if (hidden) waddch(win, '*'); else waddch(win, inputline[pointer]); pointer ++; curpointer ++; } wrefresh(win); for (;;) { ch = CURwgetch(cur,win); switch (ch) { case '\n': #ifdef CONTROLX case '\030': #endif inputline[pointer] = '\0'; wstandend(win); return(ch); break; case '\b': /*** backspace and delete ***/ if (curpointer > 0) { char *cp; getyx(win, y, x); wmove(win, y, x-1); /* Update the string */ for (cp = inputline + curpointer - 1; *cp != '\0'; cp++) { *cp = *(cp + sizeof(char)); if (*cp != '\0') { if (hidden) waddch(win, '*'); else waddch(win, *cp); } } *cp = '\0'; waddch(win, ' '); pointer--; curpointer--; wmove(win, y, x-1); wrefresh(win); } break; case '\001': /*** ^A go to beginning of line ***/ getyx(win, y, x); wmove(win, y, x-curpointer); curpointer = 0; wrefresh(win); break; case '\005': /*** ^E go to end of line ***/ getyx(win, y, x); wmove(win, y, x+pointer-curpointer); curpointer = pointer; wrefresh(win); break; case '\007': /*** ^G cancel... ***/ wstandend(win); return(-1); break; case '\013': /*** ^K delete to end of line ***/ getyx(win, y, x); while (curpointer < pointer) { waddch(win, ' '); pointer--; } inputline[pointer] = '\0'; wmove(win, y, x); wrefresh(win); break; case '\025': /*** ^U erase whole line ***/ getyx(win, y, x); wmove(win, y, x-curpointer); while (pointer > 0) { waddch(win, ' '); pointer--; } inputline[pointer] = '\0'; wmove(win, y, x-curpointer); curpointer = 0; wrefresh(win); break; case KEY_LEFT: if (curpointer > 0) { curpointer--; getyx(win, y, x); wmove(win, y, x-1); wrefresh(win); } break; case KEY_RIGHT: if (curpointer < pointer) { curpointer++; getyx(win, y, x); wmove(win, y, x+1); wrefresh(win); } break; default: if (ch < 256 && isprint(ch) && curpointer >= maxlength) { /* Return at the end for word wrapping */ if (wordwrap) { /*inputline[curpointer] = ch;*/ inputline[curpointer] = '\0'; wstandend(win); wrefresh(win); return(ch); } else CURBeep(cur); } else if (ch < 256 && isprint(ch)) { inputline[curpointer++] = ch; if (curpointer > pointer) { pointer = curpointer; inputline[curpointer+1] = '\0'; } if (hidden) waddch(win, '*'); else waddch(win, ch); wrefresh(win); } else { wstandend(win); return(ch); } } /* switch */ } /* for */ } /* * This stuff is stolen and modified from hytelnet Thanks Earl! */ int CURwgetch(CursesObj *cur, WINDOW *window) { int a, b, c; if (ControlCpressed) { return ('\007'); /** Control-C cancels us **/ } 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_wgetch triggered\r\n",NULL); ControlCpressed = FALSE; /* Deal with return code, not flag*/ return('\007'); } while (1) { c = wgetch(window); reprimeControlc(); switch (c) { case -1: /* error usually means connection was closed.. */ CleanupandExit(-1); break; case 12: /* ^L */ case 18: /* ^R */ case 23: /* ^W */ /* redraw the screen */ #ifdef VMS clearok(curscr, TRUE); wrefresh(window); #else wrefresh(curscr); #endif /* don't return yet, get another keystroke */ break; case 27: /* handle escape sequence */ b = wgetch(window); if (b == '[' || b == 'O') a = wgetch(window); else a = b; switch (a) { case 'A': c = KEY_UP; break; case 'B': c = KEY_DOWN; break; case 'C': c = KEY_RIGHT; break; case 'D': c = KEY_LEFT; break; case 'M': /* vt100 enter */ if (b == 'O') c = KEY_ENTER; break; case 'Q': /* vt100 Help */ if (b == 'O') c = KEY_HELP; break; case '2': if (b == '[') b = wgetch(window); switch(b) { case '8': /* vt200 Help */ if (wgetch(window) == '~') c = KEY_HELP; break; case '9': /* vt200 Do */ if (wgetch(window) == '~') c = KEY_ENTER; break; } case '5': /* vt 200 prev. screen */ if (b == '[' && wgetch(window) == '~') c = KEY_PPAGE; break; case '6': /* vt 200 next screen */ if (b == '[' && wgetch(window) == '~') c = KEY_NPAGE; break; } /* fall through to default to reassign certain keys */ default: /* The many forms of the return key... */ if ((c == KEY_ENTER)|| (c=='\r')) c = '\n'; /** SYSV curses Gack! **/ /* The many forms of backspace */ if (c == '\010' || c == '\177' || c == KEY_BACKSPACE) return('\b'); return(c); break; } /* switch(c) */ } /* while(1) */ } int CURgetch(CursesObj *cur) { return(CURwgetch(cur, stdscr)); } /* * Resets the screen when a size change has happened */ void CURresize(CursesObj *cur) { if (cur->inCurses) { CURexit(cur); CURenter(cur); } } /* * Get one option displays a message, and gets a response * * If the Response has something in it, it is displayed and editable * * If the user wants to abort, GetOneOption returns a -1, otherwise it * returns a 0 */ int CURGetOneOption(CursesObj *cur, char *Title, char *OptionName, char *Response) { int i; Requestitem *items[2], item; items[0] = &item; items[1] = NULL; item.prompt = OptionName; item.stowage = Response; item.thing = CUR_PROMPT; i = CURrequester(cur, Title, items); refresh(); return(i); } /* * This is the old version of GetOneOption, for those times when the * garsh darn terminal is just too gadblam slow :-) */ int CUROldGetOneOption(CursesObj *cur, char *OptionName, char *Response) { int i; mvaddstr(LINES-1, 0, OptionName); standout(); addstr(" "); standend(); clrtoeol(); move(LINES-1, strlen(OptionName)); refresh(); i = CURwgetstr(cur, stdscr, Response, 4, FALSE); return(i); } /* * Fills in the Response with either a lowercase 'y' or 'n' */ void CURgetYesorNo(CursesObj *cur, char *OptionName, char *Response) { int c; int posx, posy; mvaddstr(LINES-1, 0, OptionName); clrtoeol(); getyx(cur->Screen, posy, posx); addch(' '); if (*Response == 'y') mvaddstr(posy, posx+1, "y"); else { *Response = 'n'; mvaddstr(posy, posx+1, "n "); } move(posy, posx+1); refresh(); while (1) { c = CURgetch(cur); if (c == 'y') { mvaddstr(posy, posx+1, Gtxt("Yes",180)); move(posy, posx+1); refresh(); *Response = 'y'; *(Response +1) = '\0'; return; } else if (c == 'n') { mvaddstr(posy, posx+1, Gtxt("No ",111)); move(posy, posx+1); refresh(); *Response = 'n'; *(Response +1) = '\0'; return; } else if ((c == '\n')||(c=='\r')) { return; } #ifdef VMS else if ( c == '\032' ) { /* control-Z */ return; } #endif else { Debugmsg("CURgetYesorNo beep\r\n") CURBeep(cur); } } } void CURBeep(CursesObj *cur) { Debugmsg("CURBeep\r\n") #ifdef SYSVCURSES beep(); #else /* CURcenterline(cur, stdscr, CURgetBell(cur), 1, COLS, FALSE); */ tputs(CURgetBell(cur), 1, CURoutchar); fflush(stdout); #endif } void CURbox(CursesObj *cur, WINDOW *win, int height, int width) { int i; wmove(win, 0, 0); waddch(win, CURgetBox_ul(cur)); for (i=0; i messlength) messlength = strlen(Message[messheight]); messheight++; } winwidth = max(31, messlength+6); winwidth = max(winwidth, strlen(Wintitle)+6); winwidth = min(winwidth, COLS-2); tempwin = newwin(5+messheight, winwidth, (LINES-(5+messheight))/2, (COLS-winwidth)/2); if (tempwin == (WINDOW *)0) return(-1); CURwenter(cur,tempwin); CURbox(cur, tempwin, 5+messheight, winwidth); /** Add the message **/ for (i=0; i messlength) { for (j=0; j < messlength; j++) waddch(tempwin, Message[i][j]); } else waddstr(tempwin, Message[i]); } /** Add the window title, centered **/ if (Wintitle != NULL) CURcenterline(cur, tempwin, Wintitle, 0, winwidth, TRUE); /** Add the keyboard labels **/ wmove(tempwin, 3+messheight, winwidth - 28); CURbutton(cur, tempwin, Gtxt(DIALOGCANCELSTR,211), FALSE); waddch(tempwin, ' '); CURbutton(cur, tempwin, Gtxt("OK: Enter",191), FALSE); wrefresh(tempwin); switch(CURwgetch(cur, tempwin)) { case -1: case '\007': delwin(tempwin); return(-1); default: delwin(tempwin); return(0); } } int CURRequest(CursesObj *cur, char *Wintitle, char **Prompts, char **Stowages) { Requestitem **items; int i, choice, numprompts = 0; while (Prompts[numprompts] != NULL) numprompts++; items = (Requestitem **) malloc(sizeof(Requestitem *) * (numprompts+1)); for (i = 0; i < numprompts; i++) { items[i] = (Requestitem*) malloc(sizeof(Requestitem)); items[i]->prompt = Prompts[i]; items[i]->stowage = Stowages[i]; if (Stowages[i] == NULL) items[i]->thing = CUR_LABEL; else items[i]->thing = CUR_PROMPT; } items[i] = NULL; choice = CURrequester(cur, Wintitle, items); /** Free memory **/ for (i=0; i <= numprompts; i++) if (items[i]) free(items[i]); free(items); return(choice); } /* * CURrequester takes an array of requestitems and does the right * things with it.. */ int CURrequester(CursesObj *cur, char *Wintitle, Requestitem **items) { int BottomField; int ch; Requestitem *curitem; int currentfield = 0; int FieldsPerPage; boolean Found; int i,j,k; int maxlength; int maxpromptwidth = 0; int numprompts = 0; WINDOW *tempwin; int TopField; int WinLines; int WinWidth = COLS - 1; static char **RequestHelp = NULL; if (RequestHelp == NULL) { RequestHelp = (char**) malloc(sizeof(char*) * 8); RequestHelp[0] = Gtxt(HELPCANCEL,190); RequestHelp[1] = Gtxt("Tab, ^N : Move to next field",192); RequestHelp[2] = Gtxt("^P : Move to previous field",193); RequestHelp[3] = Gtxt("^F : Display next page",194); RequestHelp[4] = Gtxt("^B : Display previous page",195); RequestHelp[5] = Gtxt("^- : Help (^/ or ^7 may work)",196); RequestHelp[6] = Gtxt(CXPROMPT1,197); RequestHelp[7] = NULL; } /*** Find the number of prompts... and the max width ***/ while ((curitem = items[numprompts++]) != NULL) { /*** Skip non editable prompts ***/ if (curitem->thing != CUR_LABEL) { if (curitem->prompt && strlen(curitem->prompt) > maxpromptwidth) maxpromptwidth = strlen(curitem->prompt); } else { if (currentfield == numprompts-1) currentfield++; } } numprompts--; if (numprompts == 0) return(-1); TopField = 0; FieldsPerPage = min(numprompts, LINES - 5); BottomField = min(TopField + FieldsPerPage, numprompts) - 1; /** If only one prompt, offer an entire line for input **/ if (numprompts == 1 && items[0]->thing == CUR_PROMPT) { WinLines = 8; maxlength = WinWidth - 4; } else { WinLines = FieldsPerPage + 5; maxlength = WinWidth - maxpromptwidth - 6; } /*** Create the new window ***/ tempwin = newwin(WinLines, WinWidth, (LINES - WinLines) / 2, 0); CURwenter(cur, tempwin); CURbox(cur, tempwin, WinLines, WinWidth); /*** Add the window title, centered ***/ if (Wintitle != NULL) CURcenterline(cur, tempwin, Wintitle, 0, WinWidth, TRUE); /*** Display the form and allow the user to update it ***/ while (1) { /*** Add the labels ***/ wmove(tempwin, WinLines - 2, 2); waddstr(tempwin, Gtxt(FORMCANCEL,198)); if (items[currentfield]->thing == CUR_CHOICE) waddstr(tempwin, Gtxt(" [Cycle Values: Space] [List Values: l]",199)); else { #ifdef CONTROLX waddstr(tempwin, " [Accept: ^X] "); #else waddstr(tempwin, " [Accept: Enter] "); #endif waddstr(tempwin, " [Next field: TAB] "); waddstr(tempwin, " "); } /** Add the prompts and typing area **/ if (numprompts == 1 && items[0]->thing == CUR_PROMPT) { wmove(tempwin, 2, 2); waddstr(tempwin, items[0]->prompt); /** Trim the stowage if necessary **/ if ((j = strlen(items[0]->stowage)) > maxlength) while (j > maxlength) (items[0])->stowage[--j] = '\0'; /** Add the stowage if it exists and its black space **/ wmove(tempwin, 4, 2); wstandout(tempwin); waddstr(tempwin, items[0]->stowage); for (j=strlen(items[0]->stowage)+2; j < WinWidth-2; j++) waddch(tempwin, ' '); wstandend(tempwin); } else { i = 0; for (k = TopField; k <= BottomField ; k++) { wmove(tempwin, 2 + i, 2); if (items[k]->prompt) { waddstr(tempwin, items[k]->prompt); for (j = WinWidth-strlen(items[k]->prompt)-4; j>0;j--) waddch(tempwin, ' '); } switch (items[k]->thing) { case CUR_LABEL: break; case CUR_CHOICE: /** Add the default **/ wmove(tempwin, 2 + i, maxpromptwidth + 4); waddstr(tempwin, items[k]->choices[items[k]->chooseitem]); break; case CUR_ASKL: wordwrap = TRUE; wmove(tempwin, 2 + i, 2); wstandout(tempwin); waddstr(tempwin, items[k]->stowage); for (j = WinWidth - strlen(items[k]->stowage) - 4 ; j > 0; j--) waddch(tempwin, ' '); wstandend(tempwin); break; default: /** Add the black space for the stowage, **/ /** and the stowage, if it exists **/ wordwrap = FALSE; wmove(tempwin, 2 + i, maxpromptwidth + 4); wstandout(tempwin); if (items[k]->thing == CUR_PASSWD) for (j = strlen(items[k]->stowage); j > 0; j--) waddch(tempwin, '*'); else if (items[k]->stowage) waddstr(tempwin, items[k]->stowage); for (j = WinWidth - (items[k]->stowage ? strlen(items[k]->stowage):0) - maxpromptwidth - 6; j > 0; j--) waddch(tempwin, ' '); wstandend(tempwin); } i++; } } if (numprompts == 1) wmove(tempwin, 4, 2); else wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + 4); if (items[currentfield]->thing == CUR_ASKL) wmove(tempwin, 2 + currentfield - TopField, 2); wrefresh(tempwin); if (items[currentfield]->thing == CUR_CHOICE) { int choice = items[currentfield]->chooseitem; boolean done = FALSE; wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + strlen(items[currentfield]->choices[choice]) + 4); wrefresh(tempwin); while (!done) { ch = CURwgetch(cur, tempwin); wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + 4); for (i=strlen(items[currentfield]->choices[choice]); i>0; i--) waddch(tempwin, ' '); if (ch == ' ') { choice++; } else if (ch == 'l') { int tempx; tempx = CURChoice(cur, items[currentfield]->prompt, items[currentfield]->choices, Gtxt("Select an item",200), items[currentfield]->chooseitem); touchwin(tempwin); if (tempx != -1) choice = tempx; } else done = TRUE; if (items[currentfield]->choices[choice] == NULL) choice = 0; wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + 4); waddstr(tempwin, items[currentfield]->choices[choice]); items[currentfield]->chooseitem = choice; wrefresh(tempwin); } } else { int zemax = maxlength; if (items[currentfield]->thing == CUR_ASKL) zemax = COLS - 6; ch = CURwgetstr(cur,tempwin,items[currentfield]->stowage, zemax, items[currentfield]->thing == CUR_PASSWD); } #ifdef CONTROLX if (ch == '\n') { if (numprompts > 1) { ch = '\t'; /* Treat as tab, next field */ } else { ch = '\030'; /* Treat as control-X, accept */ } } #endif switch (ch) { case '\016': case '\t': /*** Move to next non-label field (tab) ***/ do { currentfield++; if (currentfield > numprompts - 1) { TopField = 0; BottomField = min(TopField + FieldsPerPage, numprompts) - 1; currentfield = TopField; } else if (currentfield > BottomField) { TopField++; BottomField++; } } while (items[currentfield]->thing == CUR_LABEL); break; case '\020': /*** Move to the previous non-label field (back tab) ***/ do { currentfield--; if (currentfield < 0) { currentfield = numprompts - 1; TopField = max(0, numprompts - FieldsPerPage); BottomField = currentfield; } else if (currentfield < TopField) { TopField--; BottomField--; } } while (items[currentfield]->thing == CUR_LABEL); break; case KEY_DOWN: /* * Move to the next non-label field on the current * screen. If there is no such field, scroll down * one line. If a non-label field is found, move * to it, otherwise don't move. (Line down) */ if (currentfield == BottomField) { TopField++; BottomField++; if (BottomField > numprompts - 1) { TopField = 0; BottomField = min(TopField + FieldsPerPage, numprompts) - 1; currentfield = TopField; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } else if (items[BottomField]->thing != CUR_LABEL) currentfield = BottomField; } else { Found = FALSE; for (i = currentfield + 1; i <= BottomField; i++) if (items[i]->thing != CUR_LABEL) { currentfield = i; Found = TRUE; break; } if (!Found) { TopField++; BottomField++; if (BottomField > numprompts - 1) { TopField = 0; BottomField = min(TopField + FieldsPerPage, numprompts) - 1; currentfield = TopField; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } else if (items[BottomField]->thing != CUR_LABEL) currentfield = BottomField; } } break; case KEY_UP: /* * Move to the previous non-label field on the current * screen. If there is no such field, scroll up * one line. If a non-label field is found, move * to it, otherwise don't move. (Line up) */ if (currentfield == TopField) { TopField--; BottomField--; if (TopField < 0) { TopField = max(0, numprompts - FieldsPerPage); BottomField = numprompts - 1; currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } else if (items[TopField]->thing != CUR_LABEL) currentfield = TopField; } else { Found = FALSE; for (i = currentfield - 1; i >= TopField; i--) if (items[i]->thing != CUR_LABEL) { currentfield = i; Found = TRUE; break; } if (!Found) { TopField--; BottomField--; if (TopField < 0) { TopField = max(0, numprompts - FieldsPerPage); BottomField = numprompts - 1; currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } else if (items[TopField]->thing != CUR_LABEL) currentfield = TopField; } } break; case '\006': case KEY_NPAGE: /*** Move down a page ***/ if (BottomField == numprompts - 1) { currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } else { BottomField = min(BottomField + FieldsPerPage, numprompts) - 1; TopField = max(0, BottomField - FieldsPerPage + 1); if (currentfield < TopField) { currentfield = TopField; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } } break; case '\002': case KEY_PPAGE: /*** Move up a page ***/ if (TopField == 0) { currentfield = 0; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } else { TopField = max(0, TopField - FieldsPerPage + 1); BottomField = min(TopField + FieldsPerPage, numprompts) - 1; if (currentfield > BottomField) { currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } } break; case '\037': case KEY_HELP: CURDialog(cur, "Form Help", RequestHelp); touchwin(tempwin); break; case '\007': case -1: /*** Cancel ***/ delwin(tempwin); return(-1); #ifdef CONTROLX case '\030': #else case '\n': #endif delwin(tempwin); return(0); default: if (wordwrap) { char *p; if ( currentfield == numprompts-1){ CURBeep(cur); continue; } if (items[currentfield+1]->thing != CUR_ASKL ) { CURBeep(cur); continue; } /* we must go and find the last space in stowage and move to next line */ p=strrchr(items[currentfield]->stowage,' '); /* copy rest of string to next line */ if ( p != NULL ) { char addit[2]; *addit = ch; *(addit+1) = '\0'; strcat(p+1, addit); strcpy(items[currentfield+1]->stowage,p+1); /* now blank out those characters */ *p='\0'; wmove(tempwin, 2 + currentfield - TopField, 2); wstandout(tempwin); waddstr(tempwin, items[currentfield]->stowage); for (j=strlen(items[currentfield]->stowage)+ maxpromptwidth+4; j < COLS-6; j++) waddch(tempwin, ' '); wstandend(tempwin); } currentfield++; /* go to next ASKL field */ if (currentfield > BottomField) { TopField++; BottomField++; } } } } } /* * CURChoice takes a bunch of titles, throws them on the screen, * and asks the user to choose one. * * Returns the number chosen, or -1 if the user cancels. * * Limitation: The number of choices must be less than 100. */ int CURChoice(CursesObj *cur, char *WinTitle, char **Choices, char *Prompt, int DefaultChoice) { int BottomChoice; int ch; int ChoicesPerPage; int CurrentChoice = 0; int CurrentLine; int CurrentPage; int i; char InBuf[3]; int j; int k; int MaxChoiceWidth = 0; int NumChoices = 0; int NumPages; WINDOW *TempWin; int TopChoice; int WinLines; int WinWidth; static char ** ChoiceHelp = NULL; if (ChoiceHelp == NULL) { ChoiceHelp = (char**) malloc(sizeof(char*) * 10); ChoiceHelp[0] = Gtxt(HELP2CANCEL,202); ChoiceHelp[1] = Gtxt("Down, ^N : Move to next choice",203); ChoiceHelp[2] = Gtxt("Up, ^P : Move to previous choice",204); ChoiceHelp[3] = Gtxt("Space, ^F : Display next page",205); ChoiceHelp[4] = Gtxt("b, ^B : Display previous page",206); ChoiceHelp[5] = Gtxt("^ : Display first page",207); ChoiceHelp[6] = Gtxt("$ : Display last page",208); ChoiceHelp[7] = Gtxt("0-9 : Select a specific choice",209); ChoiceHelp[8] = Gtxt("Enter : Select current choice",210); ChoiceHelp[9] = NULL; } /*** Determine number of choices and verify it's within limits ***/ while (Choices[NumChoices] != NULL) NumChoices++; if (NumChoices == 0) return(-1); if (NumChoices > 99) { CursesErrorMsg("More than 99 choices! Please gripe."); return(-1); } ChoicesPerPage = min(NumChoices, LINES - 6); NumPages = NumChoices / ChoicesPerPage + 1; WinLines = ChoicesPerPage + 6; CurrentChoice = (DefaultChoice > -1) ? DefaultChoice : 0; CurrentPage = CurrentChoice / ChoicesPerPage; BottomChoice = min(CurrentPage * ChoicesPerPage + ChoicesPerPage, NumChoices) - 1; TopChoice = max(0, BottomChoice - ChoicesPerPage + 1); CurrentLine = CurrentChoice - TopChoice + 2; /*** Determine dialog box width ***/ for (i = 0; i < NumChoices; i++) if (i == DefaultChoice) MaxChoiceWidth = max(strlen(Choices[i]) + 10, MaxChoiceWidth); else MaxChoiceWidth = max(strlen(Choices[i]), MaxChoiceWidth); WinWidth = max(strlen(Prompt) + 17, MaxChoiceWidth + 15); WinWidth = max(strlen(WinTitle) + 8, WinWidth); WinWidth = max(29, WinWidth); WinWidth = min(COLS - 2, WinWidth); /*** Create the new window ***/ TempWin = newwin(WinLines, WinWidth, (LINES - WinLines) / 2, (COLS - WinWidth) / 2); CURwenter(cur, TempWin); CURbox(cur, TempWin, WinLines, WinWidth); /*** Add the window title, centered ***/ if (WinTitle != NULL) CURcenterline(cur, TempWin, WinTitle, 0, WinWidth, TRUE); /*** Add the prompt ***/ wmove(TempWin, ChoicesPerPage + 3, 3); wprintw(TempWin, "%s (1-%d): ", Prompt, NumChoices); /*** Add the labels ***/ wmove(TempWin, ChoicesPerPage + 4, 3); CURbutton(cur, TempWin, Gtxt("Help: ?",96), FALSE); waddstr(TempWin, " "); CURbutton(cur, TempWin, Gtxt(DIALOGCANCELSTR,211), FALSE); /*** Display the dialog box and allow the user to make a choice ***/ while (1) { /*** Add the current page of choices ***/ i = 0; for (j = TopChoice; j <= BottomChoice; j++) { wmove(TempWin, 2 + i, 8); for (k = 0; k < WinWidth - 10; k++) waddch(TempWin, ' '); wmove(TempWin, 2 + i, 8); wprintw(TempWin, "%2d.", j + 1); wmove(TempWin, 2 + i, 12); wprintw(TempWin, "%s", Choices[j]); if (j == DefaultChoice) waddstr(TempWin, Gtxt(" (default)",212)); i++; } /*** Add the cursor ***/ wmove(TempWin, CurrentLine, 3); waddstr(TempWin, "-->"); /*** Update the screen ***/ wrefresh(TempWin); /*** Let the user choose ***/ ch = CURwgetch(cur, TempWin); switch(ch) { case '\016': case KEY_DOWN: /*** Move down a line ***/ if (CurrentChoice == BottomChoice) { TopChoice++; BottomChoice++; if (BottomChoice > NumChoices - 1) { CurrentChoice = 0; TopChoice = 0; BottomChoice = min(TopChoice + ChoicesPerPage, NumChoices) - 1; } else CurrentChoice++; } else CurrentChoice++; break; case '\020': case KEY_UP: /*** Move up a line ***/ if (CurrentChoice == TopChoice) { TopChoice--; BottomChoice--; if (TopChoice < 0) { CurrentChoice = NumChoices - 1; TopChoice = max(0, NumChoices - ChoicesPerPage); BottomChoice = CurrentChoice; } else CurrentChoice--; } else CurrentChoice--; break; case '\006': case ' ': case '+': case KEY_NPAGE: /*** Move down a page ***/ if (BottomChoice == NumChoices - 1) CurrentChoice = BottomChoice; else { BottomChoice = min(BottomChoice + ChoicesPerPage, NumChoices) - 1; TopChoice = max(0, BottomChoice - ChoicesPerPage + 1); CurrentChoice = max(TopChoice, CurrentChoice); } break; case '\002': case 'b': case '-': case KEY_PPAGE: /*** Move up a page ***/ if (TopChoice == 0) CurrentChoice = TopChoice; else { TopChoice = max(0, TopChoice - ChoicesPerPage + 1); BottomChoice = min(TopChoice + ChoicesPerPage, NumChoices) - 1; CurrentChoice = min(CurrentChoice, BottomChoice); } break; case '^': /*** Move to top ***/ TopChoice = 0; BottomChoice = min(TopChoice + ChoicesPerPage, NumChoices) - 1; CurrentChoice = TopChoice; break; case '$': /*** Move to bottom ***/ BottomChoice = NumChoices - 1; TopChoice = max(0, BottomChoice - ChoicesPerPage + 1); CurrentChoice = BottomChoice; break; case '\037': case KEY_HELP: case 'h': case '?': /*** Help ***/ CURDialog(cur, Gtxt("Choice Dialog Help",213), ChoiceHelp); touchwin(TempWin); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '0': /*** Literal ***/ InBuf[0] = ch; InBuf[1] = '\0'; InBuf[2] = '\0'; i = strlen(Prompt) + (NumChoices < 10 ? 11 : 12); j = ChoicesPerPage + 3; wmove(TempWin, j, i); ch = CURwgetstr(cur, TempWin, InBuf, (NumChoices < 10 ? 1 : 2), FALSE); k = atoi(InBuf); if ((ch == '\n') && (0 < k) && (k <= NumChoices)) { delwin(TempWin); return (k - 1); } else { wmove(TempWin, j, i); waddstr(TempWin, " "); if (ch != -1) CURBeep(cur); break; } case '\007': /*** Cancel ***/ delwin(TempWin); return (-1); case '\n': case '\030': /* Control X */ /*** Accept ***/ delwin(TempWin); return (CurrentChoice); default: CURBeep(cur); break; } wmove(TempWin, CurrentLine, 3); waddstr(TempWin, " "); CurrentPage = CurrentChoice / ChoicesPerPage; CurrentLine = CurrentChoice - TopChoice + 2; } } /********************** Cruft for VMS follows ****************************/ #ifdef VMS #include #include #include #include #include #include #include #include #include #include #include #ifdef signal #undef signal #endif #include #ifdef system #undef system #endif #include #ifndef CLI$M_TRUSTED #define CLI$M_TRUSTED 64 /* May not be in the compiler's clidef.h */ #endif #define EFN 0 /* Event flag */ static int mask = LIB$M_CLI_CTRLY|LIB$M_CLI_CTRLT; /* ^Y and ^T */ static int old_msk; /* Saved control mask */ static short trap_flag = FALSE; /* TRUE if AST is set */ static $DESCRIPTOR (term_name, "SYS$INPUT:"); /* For channel assigns */ short term_chan; /* The channel */ static short first = TRUE; /* Terminal initialization flag */ struct char_buffer_type { /* Terminal characteristics */ char class; char type; unsigned short size; unsigned long tchars; unsigned long tchars2; } oldbuf; static int in_pos, in_len; /* For escape sequence */ static unsigned char buffer[20]; /* handling in w_getch */ boolean DidCleanup = FALSE; /* Exit handler flag */ static char VersionVMS[20]; /* Version of VMS */ /* * Define local replacement for wgetch that returns the characters without * having to set the terminal /pasthru, which screws up control-Y processing. */ static int w_getch(win) int win; { int status; unsigned short iosb[4]; if (in_pos < in_len) return(buffer[in_pos++]); status = sys$qiow (0, term_chan, IO$_READVBLK|IO$M_NOECHO|IO$M_NOFILTR, &iosb, 0, 0, &buffer, 1, 0, 0, 0, 0); if ((status&1) == 1) status = iosb[0]; if (status == SS$_PARTESCAPE) { /* escape sequence in progress, fake a successful read */ status = 1; } if ((status&1) != 1) exit(status); in_pos = 1; in_len = iosb[1] + iosb[3]; return (buffer[0]); } void setterm_pas() { int status; short iosb[4]; if(first) VMSinit(); else status = lib$disable_ctrl(&mask); in_pos = 0; in_len = 0; } void resetterm() { int status; status = sys$qiow(0,term_chan,IO$_SETMODE,0,0,0, &oldbuf,12,0,0,0,0); status = lib$enable_ctrl(&old_msk); } /* VMS doesn't have termcap. Unfortunately, the code in this */ /* module uses termcap just a little bit (it really shouldn't) */ /* rather than doing everything through curses */ /* The following simulates tputs, but does not support padding */ int tputs(register char *cp, int affcnt, int (*outc)()) { while (*cp) outc(*(cp++)); return(0); } /* * VMSsignal -- F.Macrides 31-Jul-1993 (modification of my LYNX routine) * Sets up AST for both Ctrl-C and Ctrl-Y, with system response to Ctrl-T * disabled. If called with a sig other than SIGINT, it will use the C * library's signal(sig, func). * VMSsignal(SIGINT, SIG_DFL) is treated as a call to resetterm(). * Call VMSsignal(SIGINT, SIG_IGN) before system() calls to enable Ctrl-C * and Ctrl-Y in the subprocess, and then call VMSsignal(SIG_INT, func) * on return from the subprocess. * For func's which do not invoke an exit, the func should reassert itself. * The VMS C signal() calls do not fully emulate the Unix calls, and * VMSsignal() is just a "helper", also not a full emulation. */ void (*VMSsignal (sig, func)) (int) int sig; void (*func)(); { int status; short iosb[4]; static int SIG_IGN_flag; /* pass all signals other than SIGINT to signal() */ if (sig != SIGINT) { return(signal(sig, func)); } /* if func is SIG_DFL, treat it as resetterm() */ if (func == SIG_DFL) { resetterm(); return(SIG_DFL); } /* Clear any previous AST */ if (trap_flag) { status = sys$dassgn (term_chan); status = lib$enable_ctrl(&old_msk); trap_flag = FALSE; } /* if func is SIG_IGN, leave the TT channel closed and the */ /* system response to interrupts enabled for system() calls */ if (func == SIG_IGN) return(SIG_IGN); /* if we get to here, we have a SIGINT func, so set the AST */ if(first) VMSinit(); else { status = sys$assign (&term_name, &term_chan, 0, 0); status = lib$disable_ctrl(&mask); } status = sys$qiow (EFN, term_chan, IO$_SETMODE|IO$M_CTRLCAST|IO$M_CTRLYAST, &iosb, 0, 0, func, SIGINT, 0, 0, 0, 0); trap_flag = TRUE; return(func); } /* * VMSCURinit, VMSinit, VMSexit -- F.Macrides 12-Aug-1993 * Save termial characteristics at the time when gopher.c's Initialize() * is called. Make sure they're retored and that cleanup is done if we * exit via exit(-1)'s or ACCVIO's. */ void VMSCURinit(cur) CursesObj *cur; { int status, i; short Type = 0; long buf_siz = 20, len; unsigned long Addr; char ch, Name[20], cl[20], bl[20], so[20], se[20]; /** Keep DECC from complaining **/ struct dsc$descriptor_s Name_desc; Name_desc.dsc$w_length = 20; Name_desc.dsc$b_class = DSC$K_CLASS_S; Name_desc.dsc$b_dtype = DSC$K_DTYPE_T; Name_desc.dsc$a_pointer = Name; /*** Initialize the terminal, if we haven't already ***/ if(first) VMSinit(); /*** Can't handle "unknown" terminal type ***/ if (oldbuf.type == 0) { CURsetTerm(cur, "unknown"); return; } /*** Get the terminal table ready ***/ Type = (short) oldbuf.type; status = smg$init_term_table_by_type (&Type, &Addr, &Name_desc); if (!(status&1)) { CURsetTerm(cur, "unknown"); return; } /*** Set the terminal name ***/ i = 0; while ((Name[i++] != ' ') && i <= 20) ; Name[--i] = '\0'; if (strlen(Name)) CURsetTerm(cur, Name); else CURsetTerm(cur, "VMS"); /*** Get the clearscreen code ***/ status = smg$get_term_data(&Addr, &SMG$K_ERASE_WHOLE_DISPLAY, &buf_siz, &len, cl); if (status&1) { cl[len] = '\0'; CURsetCLS(cur, cl); } else /*** Assume 7-bit ***/ CURsetCLS(cur, "\033[2J"); /*** Set the bell ***/ CURsetBell(cur, "\007"); /*** Set the highlight codes ***/ status = smg$get_term_data (&Addr, &SMG$K_BEGIN_BOLD, &buf_siz, &len, so); if (status&1) { so[len] = '\0'; CURsetHighon(cur, so); } else CURsetHighon(cur, "\033[1m"); status = smg$get_term_data (&Addr, &SMG$K_BEGIN_NORMAL_RENDITION, &buf_siz, &len, se); if (status&1) { se[len] = '\0'; CURsetHighoff(cur, se); } else CURsetHighoff(cur, "\033[m"); } void VMSinit() { int status; static unsigned long condition; static struct _exit_block { unsigned long forward; unsigned long address; unsigned long zero; unsigned long condition; } exit_handler_block; if(first) { /* get a channel and save terminal parms if we haven't already */ status = sys$assign (&term_name, &term_chan, 0, 0 ); status = sys$qiow(0,term_chan,IO$_SENSEMODE,0,0,0, &oldbuf,12,0,0,0,0); first = FALSE; status = lib$disable_ctrl(&mask, &old_msk); exit_handler_block.forward = 0; exit_handler_block.address = (unsigned long) &VMSexit; exit_handler_block.zero = 0; exit_handler_block.condition = (unsigned long) &condition; /* declare the exit handler block */ status = sys$dclexh(&exit_handler_block); if (status != SS$_NORMAL) { printf("exit_status: %d", status); } /* Get the version of VMS */ if (VMSVersion(VersionVMS, 20) < 3) /* Load zeros on error */ strcpy(VersionVMS, "V0.0-0"); } } void VMSexit() { /* * If we didn't get here via CleanupandExit(), it was via an * exit(-1) or ACCVIO, so make *sure* we reset the terminal, * then attempt a cleanup. */ if (!DidCleanup) { fprintf(stderr,"\nPress RETURN to clean up and exit: "); (void) getchar(); resetterm(); CleanupandExit(-1); } } /* * VMSVersion -- F.Macrides 09-Jan-1994 * Modification of UNZIP routine for getting VMS Version. */ int VMSVersion(VerString, VerLen) char *VerString; int VerLen; { int status, i = SYI$_VERSION, verlen = 0; struct dsc$descriptor version; char *m; version.dsc$a_pointer = VerString; version.dsc$w_length = VerLen - 1; version.dsc$b_dtype = DSC$K_DTYPE_B; version.dsc$b_class = DSC$K_CLASS_S; status = lib$getsyi(&i, 0, &version, &verlen, 0, 0); if (!(status&1) || verlen == 0) return 0; /* Cut out trailing spaces */ for (m=VerString+verlen, i=verlen-1; i > 0 && VerString[i] == ' '; --i) *(--m) = '\0'; return strlen(VerString)+1; /* Transmit ending 0 too */ } /* * DCLsystem, spawn_DCLprocess, DCLspawn_exception -- F.Macrides 31-Jul-1993 * Exception-handler routines for enabling interrupts and Control-T * during spawns when setjmp() has been established, and the parent * passes a DCL CLI. * F.Macrides 09-Jan-1994 -- spawn_DCLprocess includes TRUSTED flag for * spawns with a command (but not spawns to DCL) if the version of * OpenVMS/VAX requires it in captive accounts. */ int DCLsystem(command) char *command; { int status; extern void controlc(); VMSsignal(SIGINT, SIG_IGN); status = spawn_DCLprocess(command); VMSsignal(SIGINT, controlc); if ((status&1) != 1) return(-1); else return(0); } int spawn_DCLprocess(command) char *command; { int status; /** Keep DECC from complaining **/ struct dsc$descriptor_s command_desc; command_desc.dsc$w_length = strlen(command); command_desc.dsc$b_class = DSC$K_CLASS_S; command_desc.dsc$b_dtype = DSC$K_DTYPE_T; command_desc.dsc$a_pointer = command; VAXC$ESTABLISH(DCLspawn_exception); if (command == "") status = lib$spawn(0); else { #ifndef __ALPHA /* OpenVMS/AXP v6.1 still doesn't have the TRUSTED flag ;( */ if(VersionVMS[1] >= '6') /** Include TRUSTED flag **/ status = lib$spawn(&command_desc,0,0,&CLI$M_TRUSTED); else #endif status = lib$spawn(&command_desc); } return(status); } unsigned int DCLspawn_exception(sigarr, mecharr) void *sigarr, *mecharr; { int status; status = lib$sig_to_ret(sigarr, mecharr); return(SS$_UNWIND); } #endif /* VMS */ gopher/gopher/locales/0000755000000000000000000000000012722722042012136 5ustar gopher/gopher/locales/make.com0000644000000000000000000000610410762617110013555 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/gopher/locales/README0000644000000000000000000000625610762617110013030 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/gopher/locales/Es_MX.msg0000644000000000000000000002335010762617110013625 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/gopher/locales/It.msg0000644000000000000000000002753010762617110013232 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/gopher/locales/Sv.msg0000644000000000000000000001771610762617110013253 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/gopher/locales/gopher.hlp.It0000644000000000000000000000571610762617110014514 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/gopher/locales/piglatin.msg0000644000000000000000000002714710762617110014471 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/gopher/locales/En_US.msg0000644000000000000000000002171110762617110013622 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/gopher/locales/message.tpu0000644000000000000000000001770510762617110014327 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/gopher/locales/gopher.hlp.Dk0000644000000000000000000000501010762617110014461 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/gopher/locales/README.VMS0000644000000000000000000000726210762617110013472 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/gopher/locales/Es_ES.msg0000644000000000000000000002122110762617110013603 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/gopher/locales/gopher.hlp.Es0000644000000000000000000000556610762617110014512 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/gopher/locales/De_DE.msg0000644000000000000000000002363510762617110013560 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/gopher/locales/Makefile.in0000644000000000000000000000340710762617110014210 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/gopher/locales/Dk.msg0000644000000000000000000002310210762617110013203 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/gopher/locales/Fr.msg0000644000000000000000000002477710762617110013237 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/gopher/locales/klingon.msg0000644000000000000000000002312110762617110014307 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/gopher/locales/gopher.hlp.Fr0000644000000000000000000000526310762617110014504 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/gopher/html2.h0000644000000000000000000000023210762617110011711 0ustar /* html2.h * Written by David Allen * Simple prototypes for html2.c */ #define HTML2_H 1 void do_html(GopherObj *ZeGopher); gopher/gopher/gopher.rc0000644000000000000000000000604710762617110012336 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.1 $ # $Date: 2000/08/19 00:28:56 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/gopher.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: gopher.rc,v $ # Revision 1.1 2000/08/19 00:28:56 jgoerzen # Initial revision # # Revision 3.12 1995/02/27 17:43:43 lindner # Add support for RIP graphics (from PACbell) # # Revision 3.11 1995/01/20 04:53:19 lindner # Fix for jpeg, tiff display.. # # Revision 3.10 1994/09/29 19:24:18 lindner # Fix for image/gif xv launcher in default config # # Revision 3.9 1994/06/09 04:20:32 lindner # make searchbolding the default, add note for vms admins # # Revision 3.8 1994/03/04 23:42:32 lindner # Fix for more content types # # Revision 3.7 1993/08/12 06:32:43 lindner # Fix for x-troff # # Revision 3.6 1993/07/27 05:28:50 lindner # Mondo Debug overhaul from Mitra # # Revision 3.5 1993/07/23 04:36:21 lindner # Postscript printing mods # # Revision 3.4 1993/04/15 21:28:11 lindner # Mods for richtext # # 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: text/html,lynx -force_html %s,lynx -force_html -dump %s | lpr map: text/plain,builtin,lpr %s map: text/richtext,richtext %s|Less -f -r,lpr %s map: text/rip,showrip %s,lpr %s map: text/tab-separated-values,builtin,lpr %s map: text/x-dvi,xdvi %s,lpr %s map: text/x-tex,, map: text/x-troff,nroff %s|more -d,ptroff %s map: message/rfc822,builtin,lpr %s map: image/gif,|xv -,|giftoppm |pnmtops | lpr map: image/ief,, map: image/jpeg,, map: image/ppm,|xv -,|pnmtops | lpr map: image/tiff,tifftopnm|xv -,tifftopnm|pnmtops|lpr map: audio/basic,|play -v 40 -&, map: video/mpeg,, map: video/quicktime,, map: application/applefile,, map: application/dca-rft,, map: application/mac-binhex40,, map: application/macwriteii,, map: application/msword,, map: application/octet-stream,, map: application/oda,, map: application/pdf,, map: application/postscript,gspreview %s,lpr %s map: application/rtf,, map: application/wordperfect5.1,, map: application/zip,, # # 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/gopher/ourutils.h0000644000000000000000000000164610762617110012563 0ustar /* ourutils.h * Written by David Allen * Simple prototypes for functions in ourutils.c */ #define OURUTILS_H 1 #include "CURcurses.h" #include "upload.h" #include "pager.h" #ifndef DOWNLOAD_H # include "download.h" #endif /* DOWNLOAD_H */ void UNIXfile(char *fname); int outchar(int c); int twirl(void); void GSmail(GopherObj *gs); char *Choose_View(GopherObj *gs); Requestitem *REQitemnew(void); void REQitemdestroy(Requestitem *req); char **AskBlock(GopherObj *gs); void Save_file(GopherObj *gs, char *saveto, char *view); void Save_list(GopherDirObj *gd); void GSdisplay(GopherObj *gs); boolean GStoFile(GopherObj *gs, FILE *f, char *view, int (*twirlfn) (/* ??? */)); void GSprompter(GopherObj *gs, char *view, char *command); void CursesMsg(char *Message, char *title); void CursesErrorMsg(char *Message); int logrequest(char *msg, GopherObj *gs); void Gplus_Error(int sockfd); gopher/gopher/link.com0000644000000000000000000000574310762617110012163 0ustar $ vg = 'f$verify(0)' $!******************************************************************** $! lindner $! 3.9 $! 1994/06/09 04:09:47 $! /home/mudhoney/GopherSrc/CVS/gopher+/gopher/link.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 gopher client $!********************************************************************* $! Revision History: $! link.com,v $! Revision 3.9 1994/06/09 04:09:47 lindner $! Fix for vms linking problem $! $! Revision 3.8 1994/05/06 02:21:31 lindner $! Mods for TCPWARE on VMS $! $! Revision 3.7 1994/02/20 16:17:40 lindner $! Add form object file $! $! Revision 3.6 1993/09/08 05:21:25 lindner $! Add pager.c $! $! Revision 3.5 1993/08/25 02:58:56 lindner $! Fix from Fote for vms make procedures $! $! Revision 3.4 1993/08/23 02:54:42 lindner $! Fix for vmsopts $! $! Revision 3.3 1993/08/16 18:48:37 lindner $! Alpha and DECC mods $! $! Revision 3.2 1993/08/05 03:24:39 lindner $! Changes for CMUIP and NETLIB $! $! Revision 3.1.1.1 1993/02/11 18:02:59 lindner $! Gopher+1.2beta release $! $! Revision 1.2 1993/01/07 22:54:37 lindner $! Added download.obj $! $! Revision 1.1 1992/12/31 06:10:07 lindner $! Initial revision $! $! $!********************************************************************/ $! $ IF P1 .EQS. "" $ THEN $ type/nopage sys$input: Usage: @link UCX @link WOLLONGONG @link MULTINET @link CMUIP @link NETLIB @link TCPWARE $ exit $ ENDIF $ IF P2 .EQS. "DEBUG" $ THEN $ debug := "/debug/exe=gopher_debug" $ objectlib := "libgopher_debug" $ ELSE $ debug := "" $ objectlib := "libgopher" $ ENDIF $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $! $ IF P1 .eqs. "TCPWARE" $ THEN $ write sys$output "Linking client with UCX emulation..." $ ENDIF $ transport := "''P1'" $! $ IF f$trnlnm("VAXCMSG") .eqs. "DECC$MSG" .or. - f$trnlnm("DECC$CC_DEFAULT") .eqs. "/DECC" $ THEN $ optfile := "''transport'_DECC" ! DECC $ ELSE $ optfile := "''transport'_VAXC" ! VAXC $ ENDIF $! $ IF P2 .eqs. "DEBUG $ THEN $ vgl = f$verify(1) $ link'debug'- gopher.objd,manager.objd,globals.objd,ourutils.objd,cso.objd,- html2.objd,CURcurses.objd,gopherrc.objd,download.objd,pager.objd,- form.objd,upload.objd,[-.object]'objectlib'/lib,- sys$library:vaxccurse/lib,- sys$disk:[.vmsopts]'optfile'/opt $ vgl = 'f$verify(0)' $ ELSE $ vgl = f$verify(1) $ link'debug'- gopher.obj,manager.obj,globals.obj,ourutils.obj,cso.obj,- html2.obj,CURcurses.obj,gopherrc.obj,download.obj,pager.obj,- form.obj,upload.obj,[-.object]'objectlib'/lib,- sys$library:vaxccurse/lib,- sys$disk:[.vmsopts]'optfile'/opt $ vgl = 'f$verify(0)' $ ENDIF $! $ CLEANUP: $ vgl = f$verify(vg) $exit gopher/gopher/gopher.h0000644000000000000000000000601310762617110012152 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/gopher/form.h0000644000000000000000000000673410762617110011643 0ustar /******************************************************************** * $Author: s2mdalle $ * $Revision: 1.2 $ * $Date: 2001/01/03 22:29:00 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/form.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: form.h * Abstraction of form definition and management functions ********************************************************************* * Revision History: * $Log: form.h,v $ * Revision 1.2 2001/01/03 22:29:00 s2mdalle * Compiler warning fixes, includes, etc. * * 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/11/03 21:18:17 lindner * ANSIfication * * Revision 3.2 1994/07/03 23:10:58 lindner * fix forms.. * * Revision 3.1 1994/02/20 16:15:46 lindner * New form definition and management functions * * *********************************************************************/ #include "String.h" #include "DAarray.h" #include "STAarray.h" #include "boolean.h" #include "CURcurses.h" /* * An ITEM is a single UI control type thing.. Examples include labels, * choose items, etc.. */ typedef enum {ITEM_UNINIT, ITEM_LABEL, ITEM_PROMPT, ITEM_CHOICE, ITEM_SELECT, ITEM_PASSWD, ITEM_LONG, ITEM_FILENAME} ITEMtype; typedef struct ITEM_struct { ITEMtype type; String *label; String *response; int chooseitem; StrArray *choices; } ITEM; #define ITEMsetPrompt(f,l) (STRset((f)->label,(l))) #define ITEMgetPrompt(f) (STRget((f)->label)) #define ITEMgetType(f) ((f)->type) #define ITEMsetType(f,t) ((f)->type = (t)) #define ITEMsetLabel(f,l) (STRset((f)->label,(l))) #define ITEMgetLabel(f) (STRget((f)->label)) #define ITEMgetResponse(f) (STRget((f)->response)) #define ITEMsetResponse(f,r) (STRset((f)->response,(r))) #define ITEMgetChoice(f) ((f)->chooseitem) #define ITEMsetChoice(f,c) ((f)->chooseitem=(c)) #define ITEMgetChoiceNum(f,i) (STAgetText((f)->choices,i)) #define ITEMgetNumChoices(i) (STAgetTop((i)->choices)) ITEM *ITEMnew(void); void ITEMinit(ITEM *item); ITEM *ITEMcpy(ITEM *dest, ITEM *orig); void ITEMdestroy(ITEM *item); void ITEMpushChoice(ITEM *item, char *choice); /******************************************************************** * * A FORM is an array of items * */ typedef DynArray FORM; #define FORMnew(a) (DAnew((a),ITEMnew,ITEMinit,ITEMdestroy,ITEMcpy)) #define FORMinit(a) (DAinit((a))) #define FORMgetTop(a) (DAgetTop(a)) #define FORMgetEntry(a,b) (ITEM*)(DAgetEntry(a,b)) #define FORMpush(a,b) (DApush((DynArray*)(a),(b))) #define FORMpop(a) (FORM*)(DApop(a)) #define FORMdestroy(a) (DAdestroy(a)) #define FORMcpy(a,b) (DAcpy(a,b)) int CURform(CursesObj *cur, char *Wintitle, FORM *form); boolean FORMaddLabel(FORM *form, char *label); boolean FORMaddPrompt(FORM *form, char *prompt, char *defval); boolean FORMaddPasswd(FORM *form, char *prompt, char *defval); boolean FORMaddFilechoice(FORM *form, char *prompt, char *defval); boolean FORMaddLong(FORM *form, char *prompt, char *defval); boolean FORMaddChoice(FORM *form, char *prompt, char **choices, int defval); boolean FORMaddSelect(FORM *form, char *prompt, int defval); char **FORMdoAskBlock(); gopher/gopher/gopherrc.h0000644000000000000000000001140510762617110012500 0ustar /******************************************************************** * $Author: s2mdalle $ * $Revision: 1.2 $ * $Date: 2001/01/03 22:30:11 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/gopherrc.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: gopherrc.h * Abstraction and macros for stuff in gopherrc.c ********************************************************************* * Revision History: * $Log: gopherrc.h,v $ * Revision 1.2 2001/01/03 22:30:11 s2mdalle * Just a pile of function prototypes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.8 1995/11/03 21:18:19 lindner * ANSIfication * * Revision 3.7 1994/10/21 04:41:08 lindner * Add ANSI attached printer code.. * * Revision 3.6 1994/07/06 15:43:42 lindner * Allow 'home' gopher server in gopherrc files * * Revision 3.5 1994/06/29 05:13:14 lindner * Define, add code to check for new config file * * Revision 3.4 1993/12/28 17:30:34 lindner * more typecasting for picky compilers * * Revision 3.3 1993/09/30 22:42:14 lindner * Add option for bolding of searched words * * Revision 3.2 1993/02/19 21:10:54 lindner * Updated declarations * * Revision 3.1.1.1 1993/02/11 18:03:00 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:35:54 lindner * initial rev. * * * *********************************************************************/ #ifndef GOPHERRC_H #define GOPHERRC_H #include "String.h" #include "DAarray.h" #include "GSgopherobj.h" #include "GDgopherdir.h" /* * stuff to map from a gopher+ view attribute to a command */ struct gopherrcmap_struct { String *view; String *displaycmd; String *printcmd; }; typedef struct gopherrcmap_struct RCMapObj; /** Macros and external functions ***/ #define RCMgetView(a) (STRget((a)->view)) #define RCMgetDisplaycmd(a) (STRget((a)->displaycmd)) #define RCMgetPrintcmd(a) (STRget((a)->printcmd)) #define RCMsetView(a,b) (STRset((a)->view,b)) #define RCMsetDisplaycmd(a,b) (STRset((a)->displaycmd,b)) #define RCMsetPrintcmd(a,b) (STRset((a)->printcmd,b)) RCMapObj *RCMnew(void); void RCMdestroy(RCMapObj *rcm); void RCMinit(RCMapObj *rcm); void RCMdestroy(RCMapObj *rcm); /** Dynamic Array of the above... **/ /*** Definitions for an Array of extension objects ***/ typedef DynArray RCMAarray; #define RCMAnew() (RCMAarray *)(DAnew(20,RCMnew,NULL,RCMdestroy,RCMcpy)) #define RCMAdestroy(a) (DAdestroy(a)) #define RCMAgetEntry(a,b) (RCMapObj *)(DAgetEntry((DynArray*)a,b)) #define RCMAadd(a,b) (DApush(((DynArray*)a),((char*)b))) #define RCMAgetNumEntries(a) (DAgetTop((DynArray*)a)) int RCMAviewSearch(RCMAarray *rcma, char *view); boolean RCMAfromLine(RCMAarray *rcma, char *line); void RCMAtoFile(RCMAarray *rcma, FileIO *fio); /* * General gopherrc stuff. */ struct RC_struct { RCMAarray *commands; GopherDirObj *Bookmarks; GopherObj *Home; boolean SearchBolding; boolean ANSIprinter; boolean ChangedDefs; }; typedef struct RC_struct RCobj; #define RCgetBookmarkDir(a) ((a)->Bookmarks) #define RCsetBookmarkDir(a,b) ((a)->Bookmarks=(b)) #define RCinitBookmarkDir(a,b) ((a)->Bookmarks=GDnew(b)) #define RCgetHome(a) ((a)->Home) #define RCsetHome(a,b) ((a)->Home = (b)) #define RCsearchBolding(a) ((a)->SearchBolding) #define RCsetSearchBolding(a,b) ((a)->SearchBolding=(b)) #define RCuseANSIprinter(a) ((a)->ANSIprinter) #define RCsetANSIprinter(a,b) ((a)->ANSIprinter=(b)) RCobj *RCnew(void); void RCsetdefs(RCobj *rc); void RCfromFile(RCobj *rc, FileIO *rcfio); void RCtoFile(RCobj *rc); boolean RCisGlobalNew(void); #endif /* Prototypes */ RCMapObj *RCMnew(void); void RCMdestroy(RCMapObj *rcm); void RCMinit(RCMapObj *rcm); void RCMcpy(RCMapObj *dest, RCMapObj *orig); void RCMdisplayCommand(RCMapObj *rcm, char *filename, char *line); void RCMprintCommand(RCMapObj *rcm, char *filename, char *line); int RCMAviewSearch(RCMAarray *rcma, char *view); boolean RCMAfromLine(RCMAarray *rcma, char *line); void RCMAtoFile(RCMAarray *rcma, FileIO *fio); RCobj *RCnew(void); void RCfromFile(RCobj *rc, FileIO *rcfio); void RCfromENV(RCobj *rc); void RCfromUser(RCobj *rc); void RCreadGlobalRC(RCobj *rc); void RCsetdefs(RCobj *rc); void RCtoFile(RCobj *rc); boolean RCdisplayCommand(RCobj *rc, char *view, char *filename, char *line); boolean RCprintCommand(RCobj *rc, char *view, char *filename, char *line); boolean RCisGlobalNew(void); gopher/gopher/cso.c0000644000000000000000000001250210762617110011445 0ustar /******************************************************************** * $Author: s2mdalle $ * $Revision: 1.2 $ * $Date: 2001/01/03 22:27:10 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/cso.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: cso.c * Functions to support CSO qi/ph servers ********************************************************************* * Revision History: * $Log: cso.c,v $ * Revision 1.2 2001/01/03 22:27:10 s2mdalle * Inclusion of the new header cso.h that holds prototypes for this module. * * 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/11/03 21:18:16 lindner * ANSIfication * * Revision 3.13 1994/05/19 14:07:22 lindner * use fast malloc on VMS VAXC * * Revision 3.12 1994/05/17 05:47:53 lindner * Massive internationalization change * * Revision 3.11 1994/05/14 04:13:38 lindner * Internationalization... * * Revision 3.10 1994/03/04 23:35:17 lindner * fix cso requester to be nice and big * * Revision 3.9 1994/02/20 16:30:36 lindner * Use FileIO routines for fetching fields * * Revision 3.8 1994/01/20 06:47:01 lindner * Fix params for showfile * * Revision 3.7 1993/10/22 20:21:02 lindner * misc fixes * * Revision 3.6 1993/10/11 04:44:09 lindner * Add early searching.. tag for CSO, better ui * * Revision 3.5 1993/10/07 05:11:22 lindner * Better memory management * * Revision 3.4 1993/07/07 19:42:15 lindner * fix for cancel from cso screen * * Revision 3.3 1993/06/08 06:31:01 lindner * Fixed infamous cached cso search, added fishing mode * * Revision 3.2 1993/05/20 06:00:38 lindner * Better cso support, fixed bug with unchangable search * * Revision 3.1.1.1 1993/02/11 18:02:57 lindner * Gopher+1.2beta release * * Revision 1.4 1993/01/08 19:43:01 lindner * dialog box cancels automatically if the user doesn't enter anything. * * Revision 1.3 1992/12/31 05:53:01 lindner * Mods for VMS * * Revision 1.2 1992/12/28 19:02:58 lindner * Changed field selection criteria to be based on "Lookup" * not "Indexed". Removed old dead static variables. * Changed the name of the popup box from "Ph Query" to the * name of the gopher item. * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * *********************************************************************/ #include "gopher.h" #include "fileio.h" #include "Malloc.h" #include "cso.h" void do_cso(GopherStruct *ZeGopher) { char inputline[1024], *cp; int sockfd, len, numfields=0; char *Fields[50]; char *Responses[50]; char query[512]; int i; FileIO *sock; Draw_Status(Gtxt("Fetching Fields...",87)); refresh(); /*** Fetch the indexed fields from the server ***/ if ((sockfd = GSconnect(ZeGopher)) <0) { check_sock(sockfd, GSgetHost(ZeGopher), GSgetPort(ZeGopher)); return; } sock = FIOopenfd(sockfd, TRUE); FIOwritestring(sock, "fields\r\n"); while (1) { len = FIOreadline(sock, inputline, 1024); twirl(); if ((len <= 0) || (strncmp(inputline, "200", 3)==0)) break; cp = inputline; if (strstr(inputline, "Lookup") == NULL) continue; cp = strrchr(inputline,':'); *cp = '\0'; cp--; cp = strrchr(inputline, ':') + 1; /*** Put name at the top ***/ if (strcmp(cp, "name") == 0 && numfields != 0) { Fields[numfields] = Fields[0]; Fields[0] = strdup(cp); } else Fields[numfields] = strdup(cp); Responses[numfields] = (char *) malloc(sizeof(char) * COLS); *Responses[numfields] = '\0'; *(Responses[numfields]+1) = '\0'; numfields++; } Fields[numfields] = NULL; Responses[numfields] = NULL; FIOwritestring(sock, "quit\r\n"); /** Read the stupid bye message **/ FIOreadline(sock, inputline, 1024); FIOclose(sock); /*** Do cso stuff until user presses CTRL-G ***/ while (1) { clear(); Draw_Status("..."); refresh(); if (CURRequest(CursesScreen, GSgetTitle(ZeGopher), Fields, Responses) < 0) { /*** Free the memory that we just allocated ***/ for (i=0; i 6) GSsetPath(ZeGopher, query); else { for (i=0; i menu items now fit properly when the line is * too long for the screen. (Beckett) * * Revision 3.15 1993/10/26 18:43:20 lindner * Fix for multiply defined cases * * Revision 3.14 1993/10/22 20:30:34 lindner * Fixes for menu drawing (Beckett) * * Revision 3.13 1993/10/22 20:05:20 lindner * Add Movie (;) and Info (i) type support * * Revision 3.12 1993/09/08 01:22:30 lindner * Add support for HTML and MIME on the menu displays * * Revision 3.11 1993/08/23 02:32:48 lindner * Fix for arrow updating * * Revision 3.10 1993/08/19 20:22:54 lindner * Mitra's Debug patch * * Revision 3.9 1993/08/16 18:11:29 lindner * fix for VMS Alpha systems * * Revision 3.8 1993/07/30 14:19:34 lindner * Mitra autoexit patch * * Revision 3.7 1993/07/27 05:28:56 lindner * Mondo Debug overhaul from Mitra * * Revision 3.6 1993/07/27 02:02:45 lindner * More comments * * Revision 3.5 1993/07/20 23:12:32 lindner * Mods to use patchlevel.h * * Revision 3.4 1993/04/23 20:14:13 lindner * Fix for munged characters in Draw_Status * * Revision 3.3 1993/04/15 21:17:00 lindner * none * * Revision 3.2 1993/03/26 19:43:46 lindner * Fix for repainting when selecting an item bu number * * Revision 3.1.1.1 1993/02/11 18:02:58 lindner * Gopher+1.2beta release * * Revision 2.1 1993/02/09 22:36:56 lindner * Now shows ask items, provision for auto size display in the future * * Revision 1.4 1993/01/31 00:08:12 lindner * New fcn DisplayTitle() * * Revision 1.3 1993/01/06 21:01:40 lindner * Improved behaviour when executing an item by typing it's number * The arrow and screen are updated to reflect the item being * retrieved. * * Revision 1.2 1993/01/05 22:31:57 lindner * Fixed display problems with directory title searching. * * 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 "CURcurses.h" #include "gopher.h" #include "patchlevel.h" #include "Debug.h" #include "manager.h" #include "util.h" #ifdef NOBANNER # define MENULINE(x) (x)+1 #else # define MENULINE(x) (x)+3 #endif /* If any gophers to display (screen can be blank), count the number of pages. If there is a remainder greater than zero, add one page */ #define PAGECALC(x,y) (y) ? (x/y) + ((x%y)>0) : 1 /* ** Draw the title on the top */ void Draw_Banner(void) { #ifndef NOBANNER char line[80]; sprintf(line, Gtxt("Internet Gopher Information Client v%s.%s.%d",102), GOPHER_MAJOR_VERSION, GOPHER_MINOR_VERSION, PATCHLEVEL); CURcenterline(CursesScreen, stdscr, line, 0, COLS, TRUE); #endif } /* ** Draw the status line */ void Draw_Status(char *textline) { mvaddstr(LINES-1, 0, Gtxt("Press ",119)); standout(); addstr("?"); standend(); addstr(Gtxt(" for Help, ",57)); standout(); addstr("q"); standend(); addstr(Gtxt(" to Quit",58)); #ifndef AUTOEXITONU if (iLevel != 0) { addstr(", "); standout(); addstr("u"); standend(); addstr(Gtxt(" to go up a menu",59)); } #endif clrtoeol(); mvaddch(LINES-1, COLS-strlen(textline)-4, ' '); addstr(textline); } void DisplayTitle(GopherObj *gs, int maxlength, boolean dogplus) { char type; char *c, *d; char *size; int m,n; char temp[1024]; type = GSgetType(gs); d = GSgetTitle(gs); if (GSisGplus(gs) && GSgplusInited(gs)) { size = VIgetSize(GSgetView(gs, 0)); } if (GSisAsk(gs)) maxlength -= 5; switch(type) { case A_DIRECTORY: maxlength--; break; case A_SOUND: maxlength -= 3; break; case A_INDEX: maxlength -=4; break; case A_PDF: case A_CSO: case A_TELNET: case A_UNIXBIN: case A_MACHEX: maxlength -=6; break; case A_TN3270: case A_MIME: case A_HTML: maxlength -= 7; break; case A_MOVIE: maxlength -= 8; break; case A_PCBIN: maxlength -=9; break; case A_GIF: case A_IMAGE: maxlength -= 10; } if (d==NULL) d = "error"; if((m = strlen(d)) <= maxlength) printw(" %s", d); else { /*** Cut out the middle bits **/ if ((c = strchr(d, '/'))!=NULL && (maxlength > (c-d))) { n = c - d; strncpy(temp, d, n); strcpy(temp + n, ".."); strcat(temp, d + (m + n - maxlength)); printw(" %s", temp); } else { /** Trunc it.. **/ strcpy(temp, d); temp[maxlength] ='\0'; printw(" %s..", temp); } } switch(type) { case A_DIRECTORY: addch('/'); break; case A_CSO: addstr(" "); break; case A_TN3270: addstr(" <3270>"); break; case A_TELNET: addstr(" "); break; case A_INDEX: addstr(" "); break; case A_SOUND: addstr(" <)"); /** It's supposed to look like a speaker! **/ break; case A_PCBIN: addstr(" "); break; case A_UNIXBIN: addstr(" "); break; case A_IMAGE: case A_GIF: addstr(" "); break; case A_MACHEX: addstr(" "); break; case A_MIME: addstr(" "); break; case A_HTML: addstr(" "); break; case A_MOVIE: addstr(" "); break; case A_PDF: addstr(" "); break; } if (GSisAsk(gs)) { /* Add string in two parts to avoid ANSI C turning "??>" into a trigraph for '}' */ addstr(" "); } } /* ** Man is this ugly. */ void Display_Dir_Page(GopherDirObj *gopherdir, int iNewLine, int nNewPage, int nMaxPages, int iPageLen, int iLastPageLen) { int i, iLoop, iOffset; boolean dogplus = FALSE; GopherObj *gs; static char *MenuStyle = NULL; static int MenuBytePad; int j; /*** Clear the screen and redraw the top line **/ clear(); Draw_Banner(); if (MenuStyle == NULL) { if ((MenuStyle = getenv("GOPHERMENUSTYLE")) == NULL) MenuStyle = "[%d]"; MenuBytePad = strlen(MenuStyle)-2; } /** Draw the menu **/ iLoop = (nNewPage == nMaxPages) && iLastPageLen ? iLastPageLen : iPageLen; /** Look at the first item in the directory to decide whether to use a gopher+ display of the menu ***/ for (i= 0, iOffset = (nNewPage-1) * iPageLen; i 9) addch(' '); if (iOffset >99) addch(' '); } else { printw(MenuStyle, iOffset +1); } if (iOffset + 1 < 10) addch(' '); dogplus = GSisGplus(GDgetEntry(gopherdir, iOffset)); DisplayTitle(GDgetEntry(gopherdir, iOffset), COLS-13, dogplus); } } /* scline - Screen line relocator. * Returns the line resulting from choice */ int scline(int iOldGopher, int iNewGopher, GopherDirObj *gophersdir) { int iPageLen, iLastPageLen; /* Length of normal, final pages */ int nMaxPages, nNewPage, nOldPage; /* Natural numbers */ int iOldLine, iNewLine; /* Screen locations */ char sPagenum[40]; int iMaxGophers; GopherObj *tempGopher; int Direction = 1; iMaxGophers = GDgetNumitems(gophersdir); if (iNewGopher==0) iNewGopher = GDgetNumitems(gophersdir); if (iNewGopher > iMaxGophers) iNewGopher = 1; if (iNewGopher == iOldGopher - 1) Direction = -1; do { if (iNewGopher <= 0) break; tempGopher = GDgetEntry(gophersdir, iNewGopher-1); if (GSgetType(tempGopher) != A_INFO && GSgetType(tempGopher) != A_ERROR) break; iNewGopher += Direction; if (iNewGopher > iMaxGophers) { iNewGopher = 1; if (iOldGopher < 1) break; } if (iNewGopher < 1) iNewGopher = iMaxGophers; if (iOldGopher > iMaxGophers) break; } while (iNewGopher != iOldGopher); iPageLen = LINES-4 - TITLEPOS;/* Number of menu lines possible per page */ nMaxPages = PAGECALC(iMaxGophers, iPageLen); /* Total number of pages */ nOldPage = PAGECALC(iOldGopher, iPageLen); nNewPage = PAGECALC(iNewGopher, iPageLen); if ((nNewPage < 1) || (nNewPage > nMaxPages)) /* It won't work , make*/ return(iOldGopher); /* no changes */ iLastPageLen = iMaxGophers % iPageLen; /* Lines on last page */ iOldLine = iOldGopher - ((nOldPage-1)*iPageLen);/* Old Screen location */ iNewLine = iNewGopher - ((nNewPage-1)*iPageLen);/* New Screen location */ if ((iNewLine < 0) || (iNewLine > iPageLen)) return(iOldGopher); if (nOldPage != nNewPage) { Display_Dir_Page(gophersdir, iNewLine, nNewPage, nMaxPages, iPageLen, iLastPageLen); /*** Draw the title ***/ #ifdef NOBANNER standout(); #endif CURcenterline(CursesScreen, stdscr, GDgetTitle(gophersdir), TITLEPOS, COLS, FALSE); #ifdef NOBANNER standend(); #endif } sprintf(sPagenum, Gtxt(" Page: %d/%d",56), nNewPage, nMaxPages); Draw_Status(sPagenum); mvaddstr(MENULINE(iOldLine), 1, " "); if ( (GSgetType(GDgetEntry(gophersdir, iNewGopher-1)) == A_INFO) || (GSgetType(GDgetEntry(gophersdir, iNewGopher-1)) == A_ERROR) ) mvaddstr(MENULINE(iNewLine), 1, "---"); else mvaddstr(MENULINE(iNewLine), 1, "-->"); refresh(); return(iNewGopher); } /* ** This routine draws a numbered menu ** from a gopherdirobj ** ** It returns the number that the user selected, or it returns ** zero if the user decided to cancel. ** ** RETURN Code isnt used currently anywhere! */ int GetMenu(GopherDirObj *gd, int *typedchar, boolean redisplay) { int ch; /* Input character */ int iItem; /* Display line */ static int iNewItem=1; char sLinenum[5]; /* Used when going to a specific line */ int numitems; /** variables for searching **/ char search1[100]; char *search2; int sfound; int i; search1[0] = '\0'; /* search string will be remembered so init now */ numitems = GDgetNumitems(gd); iItem = -1; iNewItem = GDgetCurrentItem(gd); if (redisplay == TRUE) { /*** Draw the title ***/ #ifdef NOBANNER standout(); #endif CURcenterline(CursesScreen, stdscr, GDgetTitle(gd), TITLEPOS, COLS, FALSE); #ifdef NOBANNER standend(); #endif /* Move to the last line that we were sitting on */ /* scline is the bit that actually draws the menu */ iItem = scline(iItem, iNewItem, gd); } else iItem = GDgetCurrentItem(gd); while (1) { #ifdef VMS if (HadVMSInt) { HadVMSInt = FALSE; ch = 'q'; } else ch = CURgetch(CursesScreen); #else ch = CURgetch(CursesScreen); #endif /* Note letters not in here are picked up by default and passed back to caller for processing */ switch(ch) { case '\004': DEBUG = 1 - DEBUG; break; case 'j': case '\016': case KEY_DOWN: iNewItem = iItem + 1; /* Advance down the page */ break; case 'k': case '\020': /*** For those emacs dudes **/ case KEY_UP: iNewItem = iItem - 1; /* Back up */ break; case '+': /** Like in elm **/ case '>': /** Like in nn **/ case ' ': /** Like in the pager ***/ case KEY_NPAGE: /*** Go down a page ***/ if (iItem == numitems) { /* Already on last item */ iNewItem = 1; } else { iNewItem = iItem + (LINES -4 - TITLEPOS); if (iNewItem > numitems) iNewItem = numitems; } break; case '-': case '<': case KEY_PPAGE: case 'b': /*** Like in the pager ***/ /*** Go up a page ***/ iNewItem = iItem - (LINES - 4 - TITLEPOS); if ( iNewItem < 0 ) iNewItem = 1; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '0': sLinenum[0] = (char) ch; sLinenum[1] = '\0'; if (CUROldGetOneOption(CursesScreen, Gtxt("View item number: ",179), sLinenum) <0) { scline(iItem, iNewItem, gd); break; } if (atoi(sLinenum) <= numitems) iNewItem = atoi(sLinenum); /* Jump */ else { CURBeep(CursesScreen); break; } iItem = scline(iItem, iNewItem, gd); if (iNewItem > 0 && iNewItem <= GDgetNumitems(gd)) { *typedchar = '\n'; GDsetCurrentItem(gd, iNewItem); return(iItem); } break; case '/': case 'n': sfound = 0; if (search1[0] == '\0' && ch == 'n') { CursesErrorMsg(Gtxt("Use '/' to define a search first...",178)); iItem = scline(-1,iItem, gd); break; } if (search1[0] == '\0' || ch == '/') if (CURGetOneOption(CursesScreen, GDgetTitle(gd), Gtxt("Search directory titles for:",139) , search1)<0) { iItem = scline(-1,iItem, gd); break; } if (strlen(search1) == 0) { iItem = scline(-1, iItem, gd); break; } /* * Start searching from next item */ for (i=iItem; i < numitems && sfound==0; i++) { search2 = GSgetTitle(GDgetEntry(gd, i)); if (strcasestr(search2, search1) != NULL ) { iNewItem = i+1; sfound = 1; } } /* if it wasn't found after the current line start from the beginning again */ for ( i= 0 ; i < iItem && sfound==0;i++) { search2 = GSgetTitle(GDgetEntry(gd,i)); if (strcasestr(search2,search1) != NULL ) { iNewItem = i+1; sfound = 1; } } if (sfound == 0) { search1[0] = '\0'; Debugmsg("GetMenu beep search\r\n") CURBeep(CursesScreen); CursesErrorMsg(Gtxt("Search failed...",140)); } if (ch != 'n') iItem = scline(-1, iNewItem, gd); break; case '\0': break; default: if (ch == KEY_LEFT || ch == 'h' || ch == '\002') ch = 'u'; if (ch == KEY_RIGHT || ch == 'l' || ch == '\006') ch = '\n'; *typedchar = ch; GDsetCurrentItem(gd, iItem); return(iItem); } iItem = scline(iItem, iNewItem, gd); refresh(); } } gopher/gopher/upload.h0000644000000000000000000000025110762617110012150 0ustar /* upload.h * Written by David Allen * Simple prototypes for the functions in upload.c */ #define UPLOAD_H 1 void BuiltinUploadfile(void); gopher/gopher/pager.h0000644000000000000000000000142310762617110011764 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/gopher/makefile.vms0000644000000000000000000000466310762617110013032 0ustar # either MULTINET, UCX, or WOLLONGONG #TCPVERSION=UCX #TCPVERSION=MULTINET TCPVERSION=WOLLONGONG OBJINCLUDES = OTHERINCLUDES = /inc=([-.object],[-]) INCLUDES = $(OBJINCLUDES) $(OTHERINCLUDES) # --- the above was from ../Makefile.config OBJS = gopher.obj manager.obj globals.obj ourutils.obj cso.obj \ subprocs.obj html.obj HTML2.obj CURcurses.obj hymoo.obj gopherrc.obj \ download.obj OBJLIST = gopher.obj,manager.obj,globals.obj,ourutils.obj,cso.obj,subprocs.obj,html.obj,HTML2.obj,CURcurses.obj,hymoo.obj,gopherrc.obj,download.obj OPT = #OPT = /noopt/debug/list CC = cc CCFLAGS = $(OPT) $(INCLUDES) /def=($(TCPVERSION)=1) LDFLAGS = #LDFLAGS = /trace/debug/map TARGET = gopher all: $(TARGET) manager.obj: manager.c gopher.h [-]conf.h write sys$output "Compiling manager.c" $(CC) $(CCFLAGS) manager.c gopher.obj: gopher.c gopher.h [-]conf.h write sys$output "Compiling gopher.c" $(CC) $(CCFLAGS) gopher.c globals.obj: globals.h version.h globals.c gopher.h [-]conf.h write sys$output "Compiling globals.c" $(CC) $(CCFLAGS) globals.c ourutils.obj: ourutils.c gopher.h [-]conf.h write sys$output "Compiling ourutils.c" $(CC) $(CCFLAGS) ourutils.c cso.obj: cso.c gopher.h [-]conf.h write sys$output "Compiling cso.c" $(CC) $(CCFLAGS) cso.c subprocs.obj: subprocs.c gopher.h [-]conf.h write sys$output "Compiling subprocs.c" $(CC) $(CCFLAGS) subprocs.c html.obj: html.c gopher.h [-]conf.h write sys$output "Compiling html.c" $(CC) $(CCFLAGS) html.c HTML2.obj: HTML2.c gopher.h [-]conf.h write sys$output "Compiling HTML2.c" $(CC) $(CCFLAGS) HTML2.c CURcurses.obj: CURcurses.c gopher.h [-]conf.h write sys$output "Compiling CURcurses.c" $(CC) $(CCFLAGS) CURcurses.c hymoo.obj: hymoo.c gopher.h [-]conf.h write sys$output "Compiling hymoo.c" $(CC) $(CCFLAGS) hymoo.c gopherrc.obj: gopherrc.c gopher.h [-]conf.h write sys$output "Compiling gopherrc.c" $(CC) $(CCFLAGS) gopherrc.c download.obj: download.c gopher.h [-]conf.h write sys$output "Compiling download.c" $(CC) $(CCFLAGS) download.c [-.object]gopher.olb: set default [-.object] make gopher.olb set default [-.gopher] $(TARGET) : $(OBJS) [-.object]gopher.olb write sys$output "Linking $(TARGET) for $(TCPVERSION)" link$(LDFLAGS)/exe=$(TARGET) $(OBJLIST), - [-.object]gopher.olb/lib, - sys$library:vaxccurse.olb/lib, - sys$disk:[]$(TCPVERSION).opt/opt clean: delete *.obj;*, $(TARGET).exe;* *.lis;* install : all copy $(TARGET) $(CLIENTDIR) copy gopher.hlp sys$help: gopher/gopher/ourutils.c0000644000000000000000000014762210762617110012563 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/gopher/html2.c0000644000000000000000000000771610762617110011722 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.1 $ * $Date: 2000/08/19 00:28:56 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/html2.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: html2.c * More lame code for html ********************************************************************* * Revision History: * $Log: html2.c,v $ * Revision 1.1 2000/08/19 00:28:56 jgoerzen * Initial revision * * Revision 3.18 1995/11/03 21:18:20 lindner * ANSIfication * * Revision 3.17 1995/11/03 20:50:49 lindner * Coen: fixes.. * * Revision 3.16 1994/10/13 05:29:16 lindner * Compiler complaint fixes * * Revision 3.15 1994/05/17 05:48:00 lindner * Massive internationalization change * * Revision 3.14 1994/05/14 04:13:43 lindner * Internationalization... * * Revision 3.13 1994/04/25 20:47:34 lindner * Remove html stuff from menu * * Revision 3.12 1994/04/14 02:56:55 lindner * Replace yet another system call * * Revision 3.11 1994/03/04 23:31:56 lindner * mem fix * * Revision 3.10 1994/02/20 16:29:56 lindner * Use urls embedded in gopher obj instead of GSfromHREF * * Revision 3.9 1993/12/30 04:17:24 lindner * use URL from GS instead of hack method * * Revision 3.8 1993/10/22 20:27:10 lindner * Fix for trailing blanks on HTML viewer (Fote) * * Revision 3.7 1993/10/11 17:03:46 lindner * application/html-->text/html, and simplified test for absence of a display command (Fote) * * Revision 3.6 1993/09/08 05:23:54 lindner * Use and external browser for html * * Revision 3.5 1993/07/29 17:21:27 lindner * eliminate non-used variables * * Revision 3.4 1993/07/27 05:28:53 lindner * Mondo Debug overhaul from Mitra * * Revision 3.3 1993/07/27 00:32:46 lindner * HTML patch from Mitra * * Revision 3.2 1993/04/15 21:19:43 lindner * Debug line added (Mitra) * * Revision 3.1.1.1 1993/02/11 18:02:58 lindner * Gopher+1.2beta release * * Revision 1.2 1992/12/31 03:59:42 lindner * Renamed to html2.c for case insensitive VMS. Fixed State: line. * * 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 "gopher.h" #include "Malloc.h" #include "Debug.h" char *process_tag(); /* * Enable use of an external HTML browser until the * builtin HTML pager is functional (if ever 8-). */ #include "fileio.h" void do_html(GopherObj *ZeGopher) { char command[256], HTMLcmd[128]; char *Dialogmess[7]; if (!RCdisplayCommand(GlobalRC, "text/html", "", HTMLcmd) || !strncasecmp(HTMLcmd, "- none -", 8) || HTMLcmd == NULL || HTMLcmd[0] == '\0') { CursesErrorMsg(Gtxt("Sorry, this client does not support HTML",47)); return; } else if (HTMLcmd[strlen(HTMLcmd)-1] == ' ') HTMLcmd[strlen(HTMLcmd)-1] = '\0'; sprintf(command, "%s \"%s\"",HTMLcmd, GSgetURLhtml(ZeGopher,"")); clear(); #ifdef VMS refresh(); #endif Dialogmess[0] = Gtxt("Warning!!!!!, you are about to leave the Internet Gopher",42); Dialogmess[1] = Gtxt("Client and connect to an HTML Browser. Use the Browser",43); Dialogmess[2] = Gtxt("Help if you are not familiar with its commands.",44); Dialogmess[3] = ""; Dialogmess[4] = Gtxt("Upon quitting from the Browser, you will be returned to",45); Dialogmess[5] = Gtxt("the Internet Gopher Client.",46); Dialogmess[6] = NULL; if (CURDialog(CursesScreen, GSgetTitle(ZeGopher), Dialogmess) <0) return; CURexit(CursesScreen); FIOsystem(command); CURenter(CursesScreen); } gopher/gopher/gopher.hlp0000644000000000000000000000463210762617110012513 0ustar Quick Gopher Help ----------------- Moving around Gopherspace ------------------------- Use the arrow keys or vi/emacs equivalent to move around. Right, Return .......: "Enter"/Display current item. Left, u .............: "Exit" current item/Go up a level. Down ................: Move to next line. Up ..................: Move to previous line. >, +, Pgdwn, Space ..: View next page. <, -, Pgup, b .......: View previous page. 0-9 .................: Go to a specific line. m ...................: Go back to the main menu. Bookmarks --------- 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. Other commands -------------- q : Quit with prompt. Q : Quit unconditionally. s : Save current item to a file. S : Save current menu listing to a file. D : Download a file. 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. O : Change options. f : Connect to an anonymous FTP server. w : Connect to an http, gopher, FTP, telnet or tn3270 URL / : Search for an item in the menu. n : Find next search item. g : "Gripe" via email to administrator of current item. L : Change language of messages (VMS). !, $ : Shell Escape (Unix) or Spawn subprocess (VMS). Ctrl-L, Ctrl-R, Ctrl-W : Redraw (Wipe) the screen. Ctrl-T : Show host's local date and time. Gopher objects: 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 The Gopher development team hopes that you find this software useful. If you find what you think is a bug, please report it to us by sending e-mail to "gopher@complete.org". gopher/gopher/CURcurses.h0000644000000000000000000002212510762617110012546 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/gopher/version.h0000644000000000000000000000000010762617110012341 0ustar gopher/gopher/gopherremote.rc0000644000000000000000000000342010762617110013542 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/gopher/globals.c0000644000000000000000000000177210762617110012313 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/gopher/vmsopts/0000755000000000000000000000000010762617110012230 5ustar gopher/gopher/vmsopts/wollongong_decc.opt0000644000000000000000000000007210762617110016116 0ustar twg$tcp:[netdist.lib]twglib.olb/lib sys$share:vaxcrtl/lib gopher/gopher/vmsopts/cmuip_vaxc.opt0000644000000000000000000000011510762617110015107 0ustar identification="CMUIP-2.0x" sys$library:neterror sys$share:vaxcrtl.exe/share gopher/gopher/vmsopts/ucx_vaxc.opt0000644000000000000000000000006410762617110014574 0ustar sys$library:ucx$ipc/lib sys$share:vaxcrtl.exe/share gopher/gopher/vmsopts/multinet_decc.opt0000644000000000000000000000007510762617110015575 0ustar multinet:multinet_socket_library/share sys$share:vaxcrtl/lib gopher/gopher/vmsopts/netlib_vaxc.opt0000644000000000000000000000012310762617110015246 0ustar identification = "NETLIB-2.0x" netlib_shrxfr/shareable sys$share:vaxcrtl/shareable gopher/gopher/vmsopts/tcpware_vaxc.opt0000644000000000000000000000006010762617110015436 0ustar tcpware:ucx$ipc/lib sys$share:vaxcrtl.exe/share gopher/gopher/vmsopts/ucx_decc.opt0000644000000000000000000000007010762617110014526 0ustar sys$library:ucx$ipc_shr.exe/share sys$share:vaxcrtl/lib gopher/gopher/vmsopts/tcpware_decc.opt0000644000000000000000000000006410762617110015377 0ustar tcpware:ucx$ipc_shr.exe/share sys$share:vaxcrtl/lib gopher/gopher/vmsopts/netlib_decc.opt0000644000000000000000000000011510762617110015204 0ustar identification = "NETLIB-2.0x" netlib_shrxfr/shareable sys$share:vaxcrtl/lib gopher/gopher/vmsopts/multinet_vaxc.opt0000644000000000000000000000007710762617110015642 0ustar multinet:multinet_socket_library/share sys$share:vaxcrtl/share gopher/gopher/vmsopts/wollongong_vaxc.opt0000644000000000000000000000010010762617110016151 0ustar twg$tcp:[netdist.lib]twglib.olb/lib sys$share:vaxcrtl.exe/share gopher/gopher/vmsopts/cmuip_decc.opt0000644000000000000000000000010710762617110015045 0ustar identification="CMUIP-2.0x" sys$library:neterror sys$share:vaxcrtl/lib gopher/gopher/download.c0000644000000000000000000002531710762617110012500 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/gopher/upload.c0000644000000000000000000000654210762617110012154 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/gopher/pager.c0000644000000000000000000004457310762617110011774 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/03/19 20:22:42 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/pager.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: pager.c * neato pager.. ********************************************************************* * Revision History: * $Log: pager.c,v $ * Revision 1.5 2002/03/19 20:22:42 jgoerzen * Logged regex changes. * Include STRstring.h and strcasestr proto. * * Revision 1.4 2002/02/12 21:20:14 jgoerzen * Made files using strcasecmp() include util.h * * 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:38 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.34 1995/11/03 21:18:22 lindner * ANSIfication * * Revision 3.33 1995/05/01 05:41:30 lindner * compatibility fixes * * Revision 3.32 1995/05/01 03:41:49 lindner * Fix return value * * Revision 3.31 1995/04/15 07:08:03 lindner * Fix * * Revision 3.30 1995/02/23 21:53:53 lindner * Correct cast.. * * Revision 3.29 1995/01/03 19:53:25 lindner * Dynamic screen position code, long title fix from Allan L. Bazinet * * Revision 3.28 1994/12/03 01:52:19 lindner * Don't auto exit paging at the end of the file * * Revision 3.27 1994/10/21 04:41:08 lindner * Add ANSI attached printer code.. * * Revision 3.26 1994/06/29 07:14:39 lindner * Check for A_CHARTEXT before trying to use it * * Revision 3.25 1994/06/29 05:13:55 lindner * Change to Stat.h * * Revision 3.24 1994/06/09 22:13:40 lindner * More language conversions * * Revision 3.23 1994/06/09 16:35:57 lindner * Fix typos * * Revision 3.22 1994/06/09 04:37:06 lindner * (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. * * Revision 3.21 1994/06/03 06:12:19 lindner * Fix for redisplay after using help * * Revision 3.20 1994/05/19 14:08:05 lindner * use fast malloc on VMS VAXC * * Revision 3.19 1994/05/18 03:59:41 lindner * Change to FIOsystem() for VMS * * Revision 3.18 1994/05/17 05:48:06 lindner * Massive internationalization change * * Revision 3.17 1994/05/14 04:13:47 lindner * Internationalization... * * *********************************************************************/ /** Note, uses Global "Searchstring" **/ #include "gopher.h" #include "CURcurses.h" #include "STRstring.h" #include "fileio.h" #include "Malloc.h" #include "pager.h" #include "util.h" #ifdef VMS #include #else #include #endif #define PosIncrement 10 /* room for 10 screens per malloc */ /** Argv/argc for searched words.. **/ static char *words[50]; static int wordcount = 0; /** Optional search string **/ static char slashstring[128]; /** bytecount positions for each page.. (non-dynamic.. yet...) **/ /* static int positions[4000]; */ /** Bad programmer **/ static int *positions = NULL; /* not-so-bad programmer */ static int currentpage; static int pos_max; /* * This is the beginning of a built in pager.. * it is very pretty.. * */ void PagerHelp(CursesObj *cur) { static char **helpmenu = NULL; if (helpmenu == NULL) { helpmenu = (char**) malloc(sizeof(char*) * 9); helpmenu[0] = Gtxt("u, ^G, left : Return to menu",19); helpmenu[1] = Gtxt("space, down : Move to the next page",20); helpmenu[2] = Gtxt("b, up : Move to the previous page",21); helpmenu[3] = Gtxt("/ : Search for text",22); helpmenu[4] = Gtxt("m : mail current document",23); helpmenu[5] = Gtxt("s : save current document",24); helpmenu[6] = Gtxt("p : print current document",25); helpmenu[7] = Gtxt("D : download current document",26); helpmenu[8] = NULL; } CURDialog(cur, Gtxt("Pager Help",18), helpmenu); } void PagerInitGlobals(void) { currentpage = 0; wordcount = 0; slashstring[0] = '\0'; } void PagerTitles(CursesObj *cur, GopherObj *gs, int totalbytes) { int i, fluff_len, k_bytes; char *cp; k_bytes = totalbytes/1024; /* Okay, first draw the top... ***/ move(0,0); wboldout(stdscr); fluff_len = 11 + (k_bytes/10); /* 11 = strlen("_(0k)_100%_"); */ if((strlen(GSgetTitle(gs))) <= (COLS-fluff_len)) { waddstr(stdscr, GSgetTitle(gs)); } else { cp = GSgetTitle(gs); for(i = 0; i < (COLS-(fluff_len+3)); i++) { waddch(stdscr, *cp++); } waddstr(stdscr, "..."); } wboldend(stdscr); wprintw(stdscr, " (%dk)", k_bytes); wmove(stdscr, 1,0); waddch(stdscr, CURgetBox_ul(cur)); for (i=0; i",115), FALSE); waddch(stdscr, ' '); CURbutton(cur, stdscr, Gtxt("Help: ?",96), FALSE); waddch(stdscr, ' '); CURbutton(cur, stdscr, Gtxt("Return to Menu: u",134), FALSE); } int PagePosAlloc(void) { size_t MallocSize; MallocSize = sizeof(int) * PosIncrement; positions = (int *) malloc(MallocSize); if (!positions) return(FALSE); else { pos_max = PosIncrement; return(TRUE); } } int PagePosRealloc(void) { int *temp = NULL; /* in case realloc fails */ size_t MallocSize; MallocSize = sizeof(int) * (pos_max + PosIncrement); temp = positions; positions = (int *) realloc(positions, MallocSize); if(!positions) { positions = temp; return(FALSE); } else { pos_max += PosIncrement; return(TRUE); } } void PagePosFree(void) { if(positions) free(positions); } void PagerPercent(int bytes, int totalbytes) { int per = (totalbytes? ((100 * bytes)/totalbytes) : 0); wmove(stdscr, 0, COLS-5); if (totalbytes != 0) wprintw(stdscr, "%d%%", per); if (per < 100) waddch(stdscr, ' '); if (per < 10) waddch(stdscr, ' '); } /* * Turn the search terms into a argv style thing.. */ void PagerParseSearchstring(void) { char *MungeSearchstr = Searchstring; int numchars; char theline[256]; wordcount = 0; if (Searchstring == NULL) return; while (isspace(*MungeSearchstr)) /** Strip off spaces **/ MungeSearchstr++; for (wordcount=0; wordcount<40; wordcount++) { while (isspace(*MungeSearchstr)) /** Strip off spaces **/ MungeSearchstr++; numchars = sreadword(MungeSearchstr, theline, 40); MungeSearchstr += numchars; if (numchars == 0) break; if (strcasecmp(theline, "and")==0 || strcasecmp(theline, "or")==0 || strcasecmp(theline, "not")==0) { wordcount--; } else { if (words[wordcount] != NULL) free(words[wordcount]); words[wordcount] = strdup(theline); } } } void PagerPrintLine(char *inputline) { int lowwordnum = -1, i; char *cp, *lowword; int wlen; /** Just print it if no search terms **/ if ((wordcount == 0 && slashstring[0] == '\0') || RCsearchBolding(GlobalRC) == FALSE) { waddstr(stdscr, inputline); return; } /** Find the first word in the line **/ while (*inputline!='\0') { lowword = NULL; if (slashstring[0] != '\0') cp = strcasestr(inputline, slashstring); else cp = NULL; if (cp != NULL) { lowword = cp; lowwordnum = -1; } for (i=0; i< wordcount; i++) { cp = strcasestr(inputline, words[i]); if (cp != NULL) if (cp < lowword || lowword == NULL) { lowword = cp; lowwordnum = i; } } if (lowword == NULL) { /** No search terms, spit it out **/ waddstr(stdscr, inputline); return; } else { /** add non bolded stuff **/ for (cp = inputline; cp < lowword; cp++) #if defined(GINTERNATIONAL) && defined(A_CHARTEXT) waddch(stdscr, *cp & A_CHARTEXT); #else waddch(stdscr, *cp); #endif inputline = lowword; /*** Bolded stuff ***/ standout(); if (lowwordnum == -1) wlen = strlen(slashstring); else wlen = strlen(words[lowwordnum]); for (cp = inputline; cp < inputline + wlen; cp++) waddch(stdscr, *cp); inputline += wlen; standend(); } } } void PagerSeekPage(FILE *thefile, int gotopage, int *bytecount) { if (gotopage < currentpage) { fseek(thefile, positions[gotopage], 0); *bytecount = positions[gotopage]; currentpage = gotopage; } } void PagerNextPage(CursesObj *cur, FILE *thefile, char *theline, int *bytecount, int totalbytes) { int i; char *cp = NULL; #ifdef VMS boolean check_next_line = FALSE; #endif /** Save current bytecount position **/ positions[currentpage++] = *bytecount; if(currentpage == pos_max) if(!PagePosRealloc()) { CursesErrorMsg(Gtxt("Sorry, can't display this file",148)); return; } wmove(stdscr, 2, 0); /* Display a screen of text */ for (i=0; i 1) CURbutton(cur, stdscr, Gtxt("PageUp: b",117), FALSE); } /* * Seek to the page with the specific search term... */ boolean PagerSearch(FILE *thefile, char *theline, int *bytecount, char *search) { int i; char *cp = NULL; #ifdef VMS boolean check_next_line = FALSE; #endif do { /** Save current bytecount position **/ positions[currentpage++] = *bytecount; if(currentpage == pos_max) if(!PagePosRealloc()) { CursesErrorMsg(Gtxt("Sorry, can't display this file",148)); return(FALSE); } for (i=0; i 1) { PagerSeekPage(thefile, currentpage-2, &bytecount); PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); } break; case '^': if (currentpage > 1) { PagerSeekPage(thefile, 0, &bytecount); PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); } break; case '$': if (bytecount < totalbytes) do PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); while (bytecount < totalbytes); break; case '\037': case KEY_HELP: case 'h': case '?': PagerHelp(cur); touchwin(stdscr); break; case 'p': if (SecureMode || NoShellMode) { CursesErrorMsg(Gtxt("Sorry, you are not allowed to print files",161)); touchwin(stdscr); break; } if (RCuseANSIprinter(GlobalRC) == TRUE) { FILE *printit; char *cp; char printtmpstr[512]; printit = fopen(GSgetLocalFile(gs), "r"); if (printit == NULL) { CursesErrorMsg(Gtxt("Cannot Open requested file..",71)); break; } CURexit(CursesScreen); printf("Now printing on ANSI attached printer\n"); printf("\033[5i"); while (1) { cp = fgets(printtmpstr, sizeof(printtmpstr), printit); if (cp == NULL) break; fputs(cp, stdout); } fclose(printit); printf("\f\033[4i"); printf(Gtxt("Press to continue",121)); getchar(); CURenter(CursesScreen); touchwin(stdscr); clearok(curscr, TRUE); break; } if (!RCprintCommand(GlobalRC, GSgetLocalView(gs), GSgetLocalFile(gs), command) || !strncasecmp(command, "- none -", 8) || strlen(command) == 0) { CursesErrorMsg(Gtxt("Sorry, no method to print this document",156)); touchwin(stdscr); break; } Dialogmess[0] = strdup(Gtxt("The filename is:",174)); Dialogmess[1] = strdup(GSgetLocalFile(gs)); Dialogmess[2] = NULL; if (CURDialog(cur, Gtxt("Print current document",122), Dialogmess) != -1) { if (FIOsystem(command)) CursesErrorMsg(Gtxt("Encountered printing problem, sorry...",84)); } free(Dialogmess[0]); free(Dialogmess[1]); touchwin(stdscr); clearok(curscr, TRUE); break; case 's': if (!(SecureMode || NoShellMode)) Save_file(gs, NULL, GSgetLocalView(gs)); else CursesErrorMsg(Gtxt("Sorry, you are not allowed to save files",162)); touchwin(stdscr); break; case 'D': Download_file(gs); wclear(stdscr); PagerTitles(cur, gs, totalbytes); PagerSeekPage(thefile, currentpage-1, &bytecount); PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); break; case 'm': #ifdef NOMAIL if (SecureMode || NoShellMode) { CursesErrorMsg(Gtxt("Sorry, you are not allowed to do this", 64)); touchwin(stdscr); break; } #endif GSmail(gs); wclear(stdscr); PagerTitles(cur, gs, totalbytes); PagerSeekPage(thefile, currentpage-1, &bytecount); PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); break; case '/': /** Search ... ***/ if ((CURGetOneOption(CursesScreen, "", Gtxt("Search text for:",141), slashstring) < 0) || (slashstring[0] == '\0')) { touchwin(stdscr); break; } case 'n': /** Next occurrence, and fall through from above.. **/ if (slashstring[0] == '\0') { CursesErrorMsg(Gtxt("Use '/' to define search a first...",178)); touchwin(stdscr); break; } savedpagenum = currentpage; if (ch == '/') PagerSeekPage(thefile, currentpage-1, &bytecount); if (!PagerSearch(thefile, theline, &bytecount, slashstring)) { CursesErrorMsg(Gtxt("Couldn't find text",82)); touchwin(stdscr); PagerSeekPage(thefile, savedpagenum-1, &bytecount); PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); touchwin(stdscr); break; } /* We found it... */ PagerSeekPage(thefile, currentpage-1, &bytecount); PagerNextPage(cur, thefile, theline, &bytecount, totalbytes); touchwin(stdscr); break; default: CURBeep(cur); break; } } /*** Clean up.. ***/ fclose(thefile); free(theline); PagePosFree(); } gopher/gopher/cso.h0000644000000000000000000000024310762617110011451 0ustar /* cso.h * Written by David Allen * Simple prototypes for functions in cso.c */ #define CSO_H 1 void do_cso(GopherStruct *ZeGopher); gopher/gopher/gopher.tpu0000644000000000000000000000246510762617110012542 0ustar !! !! Procedure for using TPU with EDT keypad functions as gopher pager on VMS. !! Adapted from procedure by: Eric Gallagher EGALLAGHER@nimue.hood.edu !! procedure eve$set_status_line (this_window) local this_buffer, ! The current buffer. mode_string, ! String version of current mode. direction_string; ! String version of current direction. this_buffer := get_info (this_window, eve$kt_buffer); !! Below, a brief statement to prevent adding a status line to those !! windows that don't need one. if (this_buffer = 0) or (get_info (this_window, "status_line") = 0) then return; endif; !! Below is a section straight from the original procedure. It may be !! marginally useful, so it may as well be kept. if get_info (this_buffer, eve$kt_mode) = insert then mode_string := "Insert "; else mode_string := "Overstrike"; endif; if get_info (this_buffer, "direction") = reverse then direction_string := "Reverse"; else direction_string := "Forward"; endif; !! Set the status line set (status_line, this_window, reverse, " Exit from this Reader: Ctrl-Z | Find Keyword: Home | Direction: " + direction_string); endprocedure; eve$set_status_line(current_window); set (no_write,current_buffer); !! Set EDT-style keypad functions eve$set_edt_keypad; gopher/gopher/manager.h0000644000000000000000000000106710762617110012304 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/gopher/form.c0000644000000000000000000003607210762617110011634 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

\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/object/BLblock.h0000644000000000000000000000752310762617110012167 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/object/boolean.h0000644000000000000000000000213610762617110012271 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/object/GSgopherobj.c0000644000000000000000000014464612621232663013075 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/config.guess0000644000000000000000000003736110762617110011560 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/Makefile.in0000644000000000000000000001365010762617110011303 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/config.sub0000644000000000000000000004311310762617110011213 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/announcements/0000755000000000000000000000000010762617110012106 5ustar gopher/announcements/3.0.4.html0000644000000000000000000000570110762617110013441 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:

  • [portability] Builds on MacOS X natively
  • [portability] Builds on Solaris natively
  • [portability] Fixes to make install target
  • [portability] Many autoconf fixes
  • [bugfix] Proper gopher URL handling
  • [features] Out-of-box support for .ogg and .mp2 files
  • [features] Generate useful gopherd.conf as part of build
  • [portability] Major rewrite of regex system resulting in more portable code
  • [bugfix] Don't prematurely stop reading some documents
  • [portability] Builds on FreeBSD natively
  • [features] New FAQ

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

  • You are encouraged to use ./configure --disable-auth to build.
  • BSD users should use "gmake" to build.
  • MacOS X (and in fact, all) users should read doc/PLATFORMS.

$Id: 3.0.4.html,v 1.3 2002/03/20 03:08:06 jgoerzen Exp $ gopher/announcements/3.0.0.html0000644000000000000000000002335110762617110013436 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

  • 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 $ gopher/announcements/3.0.0.txt0000644000000000000000000002172510762617110013314 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/make.com0000644000000000000000000000170610762617110010652 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/COPYING0000644000000000000000000004311010762617110010263 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/configure0000755000000000000000000035401012722722044011144 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