Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

/gopher/head: changeset 18

Added patches from David Allen <s2mdalle@titan.vcu.edu>
  • Loading branch information...
commit 40e2b4b759a4a9fc96aafb5d3f38307926568055 1 parent a353c65
jgoerzen authored
Showing with 536 additions and 255 deletions.
  1. +53 −47 conf.h
  2. +2 −2 configure.in
  3. +13 −0 debian/changelog
  4. +1 −0  debian/rules
  5. +8 −5 gopherd/AUTH.c
  6. +6 −3 gopherd/AUTH.h
  7. +0 −1  gopherd/GGroup.h
  8. +41 −36 gopherd/authenticate.c
  9. +15 −6 gopherd/command.c
  10. +12 −4 gopherd/command.h
  11. +10 −6 gopherd/error.c
  12. +8 −4 gopherd/ext.c
  13. +9 −5 gopherd/ext.h
  14. +23 −8 gopherd/ftp.c
  15. +30 −5 gopherd/ftp.h
  16. +45 −27 gopherd/gopherd.c
  17. +43 −4 gopherd/gopherd.h
  18. +17 −4 gopherd/gopherdconf.h
  19. +8 −4 gopherd/index.c
  20. +9 −6 gopherd/kernutils.c
  21. +8 −4 gopherd/mindexd.c
  22. +8 −4 gopherd/openers.c
  23. +11 −7 gopherd/serverutil.c
  24. +26 −4 gopherd/serverutil.h
  25. +8 −5 gopherd/site.c
  26. +6 −0 gopherd/special.h
  27. +8 −4 gopherd/waisgopher.c
  28. +14 −4 object/BLblock.c
  29. +8 −5 object/BLblock.h
  30. +19 −7 object/GSgopherobj.c
  31. +11 −7 object/Regex.h
  32. +11 −3 object/String.h
  33. +9 −6 object/fileio.c
  34. +8 −4 object/fileio.h
  35. +11 −5 object/url.c
  36. +8 −4 object/url.h
  37. +9 −5 object/util.c
View
100 conf.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:15 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/conf.h,v $
* $State: Exp $
*
@@ -15,8 +15,14 @@
*********************************************************************
* Revision History:
* $Log: conf.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:15 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.2 2000/12/18 11:05:07 mdallen
+ * Removed ~50 instances of nested comments for commented out #define's
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.23 1995/02/25 06:45:33 lindner
* Add write time out
@@ -163,21 +169,21 @@
* (This is a gopher+ language code - see object/VIews.c for more examples)
*/
#define DEFAULT_LANG "En_US" /* English (US) */
-/* #define DEFAULT_LANG "Da_DK" /* Danish */
-/* #define DEFAULT_LANG "De_DE" /* German */
-/* #define DEFAULT_LANG "En_GB" /* English (UK) */
-/* #define DEFAULT_LANG "Es_ES" /* Spanish */
-/* #define DEFAULT_LANG "Fr_FR" /* French */
-/* #define DEFAULT_LANG "It_IT" /* Italian */
-/* #define DEFAULT_LANG "Jp_JP" /* Japanese */
-/* #define DEFAULT_LANG "No_NO" /* Norwegian */
-/* #define DEFAULT_LANG "Sv_SE" /* Swedish */
+/* #define DEFAULT_LANG "Da_DK" Danish */
+/* #define DEFAULT_LANG "De_DE" German */
+/* #define DEFAULT_LANG "En_GB" English (UK) */
+/* #define DEFAULT_LANG "Es_ES" Spanish */
+/* #define DEFAULT_LANG "Fr_FR" French */
+/* #define DEFAULT_LANG "It_IT" Italian */
+/* #define DEFAULT_LANG "Jp_JP" Japanese */
+/* #define DEFAULT_LANG "No_NO" Norwegian */
+/* #define DEFAULT_LANG "Sv_SE" Swedish */
/*
* Define this if you want the 'd'elete command restricted to bookmarks
*/
-/* #define DELETE_BOOKMARKS_ONLY /* */
+/* #define DELETE_BOOKMARKS_ONLY */
/*
@@ -185,19 +191,19 @@
* the client is invoked in SecureMode or NoShellMode (bookmarks in the
* user account's gopherrc will still be read.
*/
-/* #define SECURE_MAPS_GLOBALRC_ONLY /* */
+/* #define SECURE_MAPS_GLOBALRC_ONLY */
/*
* Define this if you want the spawn to shell command disabled regardless
* of whether SecureMode or NoShellMode are set.
*/
-/* #define NEVERSPAWN /* */
+/* #define NEVERSPAWN */
/*
* Define this if you want to disable access to the Options menus under all
* circumstances.
*/
-/* #define NEVERSETOPTIONS /* */
+/* #define NEVERSETOPTIONS */
/*
* Define this if you want the link's tuple and URL decription (as created
@@ -211,12 +217,12 @@
* address included for the gripe command. If included, the user can
* modify it to have the gripe sent to a different address.
*/
-/* #define MODIFIABLE_GRIPE_TO /* */
+/* #define MODIFIABLE_GRIPE_TO */
/*
* Define this if you want gripes disabled in SecureMode and NoShellMode
*/
-/* #define NOGRIPE_SECURE /* */
+/* #define NOGRIPE_SECURE */
/* Define LOCAL_GRIPE_ADMINISTRATOR and use your site's Gopher Administrator
* address if you want gripes sent there for Gopher0 servers (or Gopher+
@@ -228,9 +234,9 @@
* screen message that the link's administrator is unknown (unless
* MODIFIABLE_GRIPE_TO is on, in which case the address field is set to "").
*/
-/* #define LOCAL_GRIPE_ADMINISTRATOR "<GopherAdmin@host.domain>" /* */
-/* #define DOMAIN_FOR_LOCAL_GRIPES "host.domain" /* */
-/* #define DOMAIN_FOR_LOCAL_GRIPES CLIENT1_HOST /* */
+/* #define LOCAL_GRIPE_ADMINISTRATOR "<GopherAdmin@host.domain>" */
+/* #define DOMAIN_FOR_LOCAL_GRIPES "host.domain" */
+/* #define DOMAIN_FOR_LOCAL_GRIPES CLIENT1_HOST */
/*
* Override some defaults for various platforms
@@ -268,7 +274,7 @@
* Define this if you have an old version of VAXC/OpenVMS
* which lacks the mktime() function.
*/
-/* #define NO_MKTIME /* */
+/* #define NO_MKTIME */
/*
* The "builtin" pager is the default VMS utility for displaying text.
@@ -279,8 +285,8 @@
* and +s switches.
*/
#define PAGER_COMMAND "builtin" /* */
-/* #define PAGER_COMMAND "TPU/NOINI/COM=GopherP_Dir:GOPHER.TPU %s" /* */
-/* #define PAGER_COMMAND "most -n +s %s" /* */
+/* #define PAGER_COMMAND "TPU/NOINI/COM=GopherP_Dir:GOPHER.TPU %s" */
+/* #define PAGER_COMMAND "most -n +s %s" */
/*
* MAIL_COMMAND is the program logical for the mail verb.
@@ -298,10 +304,10 @@
*/
#define MAIL_COMMAND "mail"
#define MAIL_ADRS "%s" /* */
-/* #define MAIL_ADRS "\"IN%%\"\"%s\"\"\"" /* */
-/* #define MAIL_ADRS "\"MX%%\"\"%s\"\"\"" /* */
-/* #define MAIL_ADRS "\"WINS%%\"\"%s\"\"\"" /* */
-/* #define MAIL_ADRS "\"SMTP%%\"\"%s\"\"\"" /* */
+/* #define MAIL_ADRS "\"IN%%\"\"%s\"\"\"" */
+/* #define MAIL_ADRS "\"MX%%\"\"%s\"\"\"" */
+/* #define MAIL_ADRS "\"WINS%%\"\"%s\"\"\"" */
+/* #define MAIL_ADRS "\"SMTP%%\"\"%s\"\"\"" */
/*
* Use MultiNet's command verb for telnet and tn3270, so that it can
@@ -328,7 +334,7 @@
* and then define the Printer Command appropriately
*/
#define PRINTER_COMMAND "print %s" /* */
-/* #define PRINTER_COMMAND "@GopherP_Dir:GOPHERPRINT %s" /* */
+/* #define PRINTER_COMMAND "@GopherP_Dir:GOPHERPRINT %s" */
/*
* Sounds are not implemented on VMS.
@@ -342,7 +348,7 @@
* and images can only be 's'aved or 'D'ownloaded.
*/
#define IMAGE_COMMAND "xv %s" /* */
-/* #define IMAGE_COMMAND "- none -" /* */
+/* #define IMAGE_COMMAND "- none -" */
/*
* The builtin HTML browser is not yet functional.
@@ -356,8 +362,8 @@
*/
#define HTML_COMMAND "- none -"
-/* #define HTML_COMMAND "lynx -force_html %s" /* lynx 2.2 or greater */
-/* #define HTML_COMMAND "www" /* WWW Line-Mode client */
+/* #define HTML_COMMAND "lynx -force_html %s" lynx 2.2 or greater */
+/* #define HTML_COMMAND "www" WWW Line-Mode client */
/*
* Point these to the default configuration files for view command maps:
@@ -402,14 +408,14 @@
* See [.GOPHER.LOCALES]README.VMS for more information.
*/
#define GOPHERMSGS_DEFAULT "EN_US" /* English_US */
-/* #define GOPHERMSGS_DEFAULT "DE_DE" /* German_DE */
-/* #define GOPHERMSGS_DEFAULT "DK" /* Danish */
-/* #define GOPHERMSGS_DEFAULT "ES_ES" /* Spanish_ES */
-/* #define GOPHERMSGS_DEFAULT "ES_MX" /* Spanish_MX */
-/* #define GOPHERMSGS_DEFAULT "IT" /* Italian */
-/* #define GOPHERMSGS_DEFAULT "FR" /* French */
-/* #define GOPHERMSGS_DEFAULT "PIGLATIN" /* Oy-vay */
-/* #define GOPHERMSGS_DEFAULT "SV" /* Swedish */
+/* #define GOPHERMSGS_DEFAULT "DE_DE" German_DE */
+/* #define GOPHERMSGS_DEFAULT "DK" Danish */
+/* #define GOPHERMSGS_DEFAULT "ES_ES" Spanish_ES */
+/* #define GOPHERMSGS_DEFAULT "ES_MX" Spanish_MX */
+/* #define GOPHERMSGS_DEFAULT "IT" Italian */
+/* #define GOPHERMSGS_DEFAULT "FR" French */
+/* #define GOPHERMSGS_DEFAULT "PIGLATIN" Oy-vay */
+/* #define GOPHERMSGS_DEFAULT "SV" Swedish */
/*
* Point this to the on-line Gopher+ help file. It will be used if
@@ -426,14 +432,14 @@
* edit those, and make sure each message number 224 (226 for Unix) points to
* the correct help file location and name, so that it will be used instead.
*/
-/* #define GOPHERHELP_SECURE "GopherP_Dir:gopher.hlp_secure" /* */
+/* #define GOPHERHELP_SECURE "GopherP_Dir:gopher.hlp_secure" */
/*
* Define this if you want to disable mailing of documents in SecurMode (-s)
* and NoShellMode (-S). Printing and saving to disk are always disabled for
* those ("remote user") modes.
*/
-/* #define NOMAIL /* */
+/* #define NOMAIL */
/*
* Client logging via syslog() code has been ported to VMS systems
@@ -444,8 +450,8 @@
* 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 /* */
+/* #define CLIENT_LOGGER */
+/* #define TELNET_TRACE */
#endif /* VMS (Have you noticed how verbose VMSers tend to be?!?!?) */
@@ -490,8 +496,8 @@
#ifndef HTML_COMMAND
/*** See the VMS HTML section for info on obtaining lynx or www ***/
#define HTML_COMMAND "- none -" /* */
-/* #define HTML_COMMAND "lynx -force_html %s" /* lynx 2.1 or greater */
-/* #define HTML_COMMAND "www" /* WWW Line-Mode client */
+/* #define HTML_COMMAND "lynx -force_html %s" lynx 2.1 or greater */
+/* #define HTML_COMMAND "www" WWW Line-Mode client */
#endif
#ifndef REMOTERC
View
4 configure.in
@@ -186,7 +186,7 @@ dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h limits.h locale.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h)
+AC_CHECK_HEADERS(fcntl.h ctype.h limits.h locale.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -205,7 +205,7 @@ AC_FUNC_STRCOLL
AC_FUNC_VFORK
AC_FUNC_VPRINTF
AC_FUNC_GETLOADAVG
-AC_CHECK_FUNCS(bzero gethostname fgetpwent getwd madvise mkdir mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid)
+AC_CHECK_FUNCS(bzero gethostname fgetpwent getcwd getwd madvise mkdir mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid)
AC_TRY_LINK("unistd.h", [getdtablesize();])
View
13 debian/changelog
@@ -1,3 +1,16 @@
+gopher (2.3.1-6) unstable; urgency=low
+
+ * Added many excellent code patches and cleanups from
+ David Allen <s2mdalle at titan.vcu.edu>.
+
+ -- John Goerzen <jgoerzen@complete.org> Tue, 19 Dec 2000 20:18:09 -0500
+
+gopher (2.3.1-5) unstable; urgency=low
+
+ * Additional code modifications and fixes.
+
+ -- John Goerzen <jgoerzen@complete.org> 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.
View
1  debian/rules
@@ -42,6 +42,7 @@ clean:
-$(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 configure doc/Makefile gopherd/Makefile \
View
13 gopherd/AUTH.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/AUTH.c,v $
*
* Paul Lindner, University of Minnesota DCS.
@@ -14,8 +14,11 @@
*********************************************************************
* Revision History:
* $Log: AUTH.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.17 1995/10/31 16:54:28 lindner
* Fix for checking for a group
@@ -75,7 +78,7 @@
#include "AUTH.h"
#include "compatible.h"
-
+#include "Regex.h"
#include "Malloc.h"
#include "fileio.h" /* For running scripts */
View
9 gopherd/AUTH.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.2 $
- * $Date: 2000/08/19 01:25:26 $
+ * $Revision: 1.3 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/AUTH.h,v $
*
* Paul Lindner, University of Minnesota DCS.
@@ -14,6 +14,9 @@
*********************************************************************
* Revision History:
* $Log: AUTH.h,v $
+ * Revision 1.3 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
* Revision 1.2 2000/08/19 01:25:26 jgoerzen
* Now includes crypt.h
*
@@ -148,6 +151,7 @@ typedef struct AUTHITEMS_struct AUTHITEMS;
AUTH *AUTHITEMSfindAUTH(AUTHITEMS *ai, AUTHarray *aa, char *fname);
char *AUTHITEMSfindType(AUTHITEMS *ai, char *fname);
char *AUTHITEMSfindExtraArgs(AUTHITEMS *ai, char *fname);
+ boolean AUTHAprocessLine(AUTHarray *autharr, char *inputline);
#else
# define AUTHAvalidate(a,b,c,d,e,f) (AUTHRES_OK)
# define AUTHITEMSdestroy(a)
@@ -158,4 +162,3 @@ typedef struct AUTHITEMS_struct AUTHITEMS;
# define AUTHITEMSnew(a) (NULL)
# define AUTHITEMSfindAUTH(a,b,c) (NULL)
#endif
-
View
1  gopherd/GGroup.h
@@ -3,7 +3,6 @@
#include "RBTree.h"
#include "AUTH.h"
-
struct GGroup_struct {
String *groupname;
RBTree *users;
View
77 gopherd/authenticate.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/authenticate.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: authenticate.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * 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/09/25 05:02:30 lindner
* Convert to ANSI C
@@ -128,52 +131,52 @@ static char pc2[] = {
/* The (in)famous S-boxes */
static char si[8][64] = {
/* S1 */
- 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
- 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
- 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0,
- 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13,
+ { 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
+ 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
+ 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0,
+ 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 },
/* S2 */
- 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10,
- 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5,
- 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15,
- 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9,
+ { 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10,
+ 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5,
+ 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15,
+ 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 },
/* S3 */
- 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8,
- 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1,
- 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7,
- 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12,
+ { 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8,
+ 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1,
+ 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7,
+ 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 },
/* S4 */
- 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15,
- 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9,
- 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4,
- 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14,
+ { 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15,
+ 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9,
+ 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4,
+ 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 },
/* S5 */
- 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9,
- 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6,
- 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14,
- 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3,
+ { 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9,
+ 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6,
+ 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14,
+ 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 },
/* S6 */
- 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11,
- 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8,
- 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6,
- 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13,
+ { 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11,
+ 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8,
+ 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6,
+ 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13 },
/* S7 */
- 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1,
- 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6,
- 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2,
- 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12,
+ { 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1,
+ 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6,
+ 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2,
+ 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12 },
/* S8 */
- 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7,
- 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2,
- 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8,
- 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11
+ { 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7,
+ 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2,
+ 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8,
+ 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11 }
};
/* 32-bit permutation P used on the output of the S-boxes */
@@ -279,6 +282,7 @@ desinit()
/*--------------------------------*/
/* Free up storage used by DES */
+#if 0
static void
desdone()
{
@@ -289,6 +293,7 @@ desdone()
kn = 0;
}
}
+#endif /* 0 */
/*--------------------------------*/
View
21 gopherd/command.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/command.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: command.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.37 1995/11/03 17:09:36 lindner
* coen: add '4' and '5' to valid prefixes.
@@ -246,7 +249,14 @@ CMDfromNet(CMDobj *cmd, int sockfd)
if (length <= 0) {
close(sockfd);
- LOGGopher("getcommand: readline error");
+ /* FIXME: I (mdallen) changed this from
+ * LOGGopher("getcommand: readline error") to this.
+ *
+ * There doesn't seem to be a point in specifying a sockfd arg
+ * except to make the compiler happy - LOGGopher doesn't use it.
+ */
+ /* 1 == stdout */
+ LOGGopher(1, "getcommand: readline error");
exit(-1);
}
@@ -511,7 +521,6 @@ CMDgetXtra(CMDobj *cmd, int fd, int extradata)
}
} else if ((extradata & (4|8))) {
/*** HTTP headers and POST lines ***/
- boolean emptyLastLine= 0;
int postsize = 0;
Debug("HTTP and/or POST data\n",0);
View
16 gopherd/command.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/command.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: command.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.11 1995/09/25 05:02:31 lindner
* Convert to ANSI C
@@ -58,9 +61,14 @@
#ifndef COMMAND_H
#define COMMAND_H
+#ifdef HAVE_CTYPE_H
+#include "ctype.h"
+#endif /* HAVE_CTYPE_H */
+
#include "STRstring.h"
#include "STAarray.h"
#include "boolean.h"
+#include "serverutil.h"
typedef enum {UnknownProtocol, Gopher0, GopherPlus, HTTP0_9, HTTP1_0} CMDprotocol;
typedef enum {UnknownHTTPcmd, POST, GET} HTTPcmd;
View
16 gopherd/error.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.2 $
- * $Date: 2000/08/19 01:33:42 $
+ * $Revision: 1.3 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/error.c,v $
* $State: Exp $
*
@@ -15,6 +15,9 @@
*********************************************************************
* Revision History:
* $Log: error.c,v $
+ * Revision 1.3 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
* Revision 1.2 2000/08/19 01:33:42 jgoerzen
* errlist fix
*
@@ -89,7 +92,7 @@
* If neither are defined, we assume SERVER.
*/
-void my_perror();
+void my_perror(void);
#ifndef NULL
#define NULL ((void *) 0)
@@ -133,7 +136,7 @@ char emesgstr[255] = {0}; /* used by all server routines */
*/
void
-err_init()
+err_init(void)
{
/* have to be able to reopen, since daemon_start keeps closing us */
closelog(); /* in case we've been closed by daemon_start */
@@ -249,7 +252,7 @@ void err_dump(char *va_alist, ...)
* We just append it the the end of the emesgstr[] array.
*/
-void my_perror()
+void my_perror(void)
{
int len;
char *sys_err_str();
@@ -286,7 +289,7 @@ char *t_errlist[1];
*/
char *
-sys_err_str()
+sys_err_str(void)
{
static char msgstr[200];
@@ -317,3 +320,4 @@ sys_err_str()
}
+
View
12 gopherd/ext.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/ext.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: ext.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * 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/09/25 05:02:32 lindner
* Convert to ANSI C
@@ -110,6 +113,7 @@
#include "Dirent.h"
#include "Regex.h"
+
/*
* Some functions to initialize and destroy sites and extensions..
* (Needed for use with DynArrays...)
View
14 gopherd/ext.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/ext.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: ext.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * 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:23 lindner
* more fixes...
@@ -111,7 +114,6 @@ Extobj *EXnew();
void EXdestroy(Extobj *);
void EXcpy(Extobj *, Extobj *);
-
/*** Definitions for an Array of extension objects ***/
typedef DynArray ExtArray;
@@ -126,5 +128,7 @@ boolean EXAsearch(ExtArray *, Extobj *, char *, int);
boolean EXAviewSearch(ExtArray *, Extobj *, char *);
char * EXAfindFile(ExtArray *, char*, char*);
+boolean EXAcasedSearch(ExtArray *extarr, Extobj *ext,
+ char *fileext, int exttype);
#endif /** EXT_H **/
View
31 gopherd/ftp.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/ftp.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: ftp.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.52 1995/11/03 18:13:58 lindner
* Coen: ftp gw fixes..
@@ -1264,12 +1267,12 @@ int
ParseUnixList(FTP *ftp, char *bufptr, char *IntName, char *theName,
int cols, GopherObj *gs, char *ftpuser, char **ftppass)
{
- int i, end;
- int gap, objsize;
+ int i=0, end=0;
+ int gap=0, objsize=0;
char *dirname, *alias, *group=NULL, *size=NULL, *month=NULL,
*novellsize=NULL;
char tmpstr[64], sizestr[16], datestr[32];
- char *cp1;
+ char *cp1=NULL;
end = strlen(bufptr);
while (isspace(bufptr[end-1]))
@@ -1365,6 +1368,18 @@ ParseUnixList(FTP *ftp, char *bufptr, char *IntName, char *theName,
month = group;
size = novellsize;
break;
+ /* Extra unused cases added to clarify assumptions and so the
+ * compiler won't complain.
+ */
+ case FTP_UNKNOWN:
+ case FTP_VMS:
+ case FTP_UNIX:
+ case FTP_MTS:
+ case FTP_WINNT:
+ case FTP_VM:
+ case FTP_UNIX_L8:
+ case FTP_MICRO_VAX:
+ case FTP_OS2:
}
try_size_again:
@@ -1493,7 +1508,7 @@ ParseUnixList(FTP *ftp, char *bufptr, char *IntName, char *theName,
GSsetType(gs, A_DIRECTORY);
sprintf (tmpstr, "%s [%s]", IntName, datestr);
GSsetTitle(gs, tmpstr);
- if (cp1 = strchr(IntName, '/'))
+ if ((cp1 = strchr(IntName, '/')))
for ( ; *cp1; cp1++ ) {
if (*cp1 == '/')
*cp1 = '*';
View
35 gopherd/ftp.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/ftp.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: ftp.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * 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/09/25 05:02:34 lindner
* Convert to ANSI C
@@ -50,6 +53,7 @@
#define GOPHER_FTP_H
#include "boolean.h"
+#include "command.h"
typedef enum {FTP_UNKNOWN, FTP_VMS, FTP_NOVELL, FTP_UNIX, FTP_MTS, FTP_WINNT,
FTP_MACOS, FTP_VM, FTP_UNIX_L8, FTP_MICRO_VAX, FTP_OS2
@@ -96,6 +100,27 @@ void FTPopenData(FTP *ftp, char *command, char *file, int errorlevel);
boolean IsBinaryType(char *);
void FTPabort(FTP *);
-
+/* mdallen: more prototypes.... */
+int FTPerrorMessage(FTP *ftp, char *message);
+boolean FTPsend(FTP *ftp, char *command);
+int FTPgetReply(FTP *ftp, int errorlevel, char *message, int maxlen);
+int FTPgetReplyline(FTP *ftp, char *message, int maxlen);
+int FTPinfoMessage(FTP *ftp, char *message);
+
+#ifndef NO_FTP
+int GopherFTPgw(int sockfd, char *ftpstr, CMDobj *cmd);
+int GopherList(FTP *ftp, char *bufptr, char *theName, GopherObj *gs,
+ char *ftpuser, char *ftppass);
+int ParseUnixList(FTP *ftp, char *bufptr, char *IntName, char *theName,
+ int cols, GopherObj *gs, char *ftpuser, char **ftppass);
+int ParseVMSList(FTP *ftp, char *bufptr, char *IntName, char *theName,
+ GopherObj *gs, char *ftpuser, char *ftppass);
+int ParseOS2List(FTP *ftp, char *bufptr, char *IntName, char *theName,
+ GopherObj *gs, char *ftpuser, char *ftppass);
+int GopherType(FTP *ftp, char *bufptr, char *theName);
+int GopherFile(FTP *ftp, char *buf, char *theName);
+#endif /* NO_FTP */
#endif /* GOPHER_FTP_H */
+
+
View
72 gopherd/gopherd.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.4 $
- * $Date: 2000/08/23 01:48:40 $
+ * $Revision: 1.5 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/gopherd.c,v $
* $State: Exp $
*
@@ -15,6 +15,14 @@
*********************************************************************
* Revision History:
* $Log: gopherd.c,v $
+ * Revision 1.5 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.4.1 2000/12/18 23:06:00 mdallen
+ * Included relevant headers, changed return type of main from void->int,
+ * fixed getwd to getcwd. HandleHTTPpost changed to void return type since
+ * it doesn't return anything and nobody uses its return value.
+ *
* Revision 1.4 2000/08/23 01:48:40 jgoerzen
* Cross fingers: final mods
*
@@ -637,21 +645,25 @@ gopherd_exit(int val)
*/
RETSIGTYPE
-sigabnormalexit()
+sigabnormalexit(void)
{
gopherd_exit(-1);
}
-void
+int
main(int argc, char *argv[], char *envp[])
{
int childpid;
- int sockfd, gophersockfd = -1, httpsockfd = -1, newsockfd;
- int clilen;
+ int sockfd = -1,
+ gophersockfd = -1,
+ httpsockfd = -1,
+ newsockfd = -1;
+ int clilen = 0;
struct sockaddr_in cli_addr;
boolean OptionsRead = FALSE;
- int i=0;
- char tmpstr[256];
+ int i = 0;
+ int tmpstrlen = 256;
+ char tmpstr[tmpstrlen];
int numready;
fd_set socketfds;
@@ -720,7 +732,11 @@ main(int argc, char *argv[], char *envp[])
if (*optarg == '/' || strcasecmp(optarg, "syslog") == 0)
GDCsetLogfile(Config, optarg);
else {
- getwd(tmpstr);
+#ifdef HAVE_GETCWD
+ getcwd(tmpstr, tmpstrlen);
+#else
+ getwd(tmpstr);
+#endif /* HAVE_GETCWD */
strcat(tmpstr, "/");
strcat(tmpstr, optarg);
@@ -732,7 +748,11 @@ main(int argc, char *argv[], char *envp[])
if (*optarg == '/')
GDCfromFile(Config, optarg);
else {
- getwd(tmpstr);
+#ifdef HAVE_GETCWD
+ getcwd(tmpstr, tmpstrlen);
+#else
+ getwd(tmpstr);
+#endif /* HAVE_GETCWD */
strcat(tmpstr, "/");
strcat(tmpstr, optarg);
GDCfromFile(Config, tmpstr);
@@ -996,16 +1016,14 @@ main(int argc, char *argv[], char *envp[])
Connections++;
}
}
-}
-
-
+ return(0);
+} /* End main() */
int EXECflag;
-
static void
-SetInitialScriptEnvironment()
+SetInitialScriptEnvironment(void)
{
/* Stuff that doesn't change over the life of the server... */
char tmpstr[256];
@@ -1023,7 +1041,6 @@ SetInitialScriptEnvironment()
SetEnvironmentVariable("GATEWAY_INTERFACE", "CGI/1.0");
}
-
static void
SetScriptEnvironment(CMDobj *cmd, char *view)
{
@@ -1091,7 +1108,7 @@ OutputAuthForm(int sockfd, char *pathname, char *host, int port, CMDprotocol p)
}
#endif
-int
+void
HandleHTTPpost(CMDobj *cmd)
{
int doneCONTENT_TYPE;
@@ -1240,7 +1257,12 @@ do_command(int sockfd)
case AUTHRES_NOGROUP:
GplusError(sockfd, 1, "Your group does not have access to this item", NULL);
return(0);
-
+ /* Unhandled possible cases from the returned enum */
+ case AUTHRES_OK:
+ case AUTHRES_BADPW:
+ case AUTHRES_EXPIRED:
+ case AUTHRES_NOUSER:
+ case AUTHRES_SYSERR:
}
Setuid_username(user);
@@ -1268,7 +1290,7 @@ do_command(int sockfd)
if ((CMDgetCommand(cmd) != NULL && *CMDgetCommand(cmd) != '!') ||
((ishtml = (strncmp(CMDgetSelstr(cmd), "halidate ", 9)) == 0))) {
char *extra_args;
- char *authuser, *authpw;
+ char *authuser=NULL, *authpw=NULL;
selstr = CMDgetSelstr(cmd) + 9;
@@ -1868,9 +1890,6 @@ GSfindHTMLtitle(GopherObj *gs, char *filename)
}
-
-
-
/*
* This function tries to find out what type of file a pathname is.
*/
@@ -2387,7 +2406,6 @@ GDfromUFS(char *pathname, int sockfd, boolean isGplus)
if (GDCViewExtension(Config, filename, &ext)) {
char *Prefix;
- int num;
char Pathp[512];
Prefix = EXgetPrefix(ext);
@@ -2615,7 +2633,7 @@ GDfromSelstr(CMDobj *cmd, int sockfd)
/*
* Send item information to client
*/
-void
+static void
item_info(CMDobj *cmd, int sockfd)
{
GopherDirObj *gd = NULL;
@@ -2705,7 +2723,7 @@ item_info(CMDobj *cmd, int sockfd)
char *started = ctime(&ServerStarted);
*(started+24) = '\0';
- sprintf(tmpstr, "+STATISTICS:\r\n Total Connections: %d\r\n Server Started: %s\r\n Connections per Hour: %d\r\n Concurrent Sessions: %d\r\n",
+ sprintf(tmpstr, "+STATISTICS:\r\n Total Connections: %ld\r\n Server Started: %s\r\n Connections per Hour: %d\r\n Concurrent Sessions: %d\r\n",
Connections, started, connperhour, ActiveSessions);
writestring(sockfd, tmpstr);
@@ -2743,7 +2761,7 @@ item_info(CMDobj *cmd, int sockfd)
writestring(sockfd, "\r\n+VIEWS:\r\n");
if (GDCgetCaching(Config)) {
if (rstat("/.cache", &statbuf) == 0) {
- sprintf(tmpstr, " application/gopher-menu %s: <%dk>\r\n",
+ sprintf(tmpstr, " application/gopher-menu %s: <%ldk>\r\n",
GDCgetLang(Config), (statbuf.st_size + 512)/1024);
writestring(sockfd, tmpstr);
} else {
@@ -2751,7 +2769,7 @@ item_info(CMDobj *cmd, int sockfd)
}
if (rstat("/.cache+", &statbuf) == 0) {
- sprintf(tmpstr, " application/gopher+-menu %s: <%dk>\r\n",
+ sprintf(tmpstr, " application/gopher+-menu %s: <%ldk>\r\n",
GDCgetLang(Config), (statbuf.st_size + 512)/1024);
writestring(sockfd, tmpstr);
} else {
View
47 gopherd/gopherd.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/gopherd.h,v $
* $State: Exp $
*
@@ -15,8 +15,15 @@
*********************************************************************
* Revision History:
* $Log: gopherd.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.2 2000/11/18 23:21:50 mdallen
+ * Prototyped all non-static functions from gopherd.c
+ * at the bottom of the file, added more relevant header #includes.
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.10 1994/09/29 19:58:50 lindner
* Fix for including Locale.h
@@ -125,6 +132,38 @@ typedef struct stat STATSTR;
# endif
#endif
+#include "daemon.h"
+#include "error.h"
+#include "kernutils.h"
+#include "ftp.h"
+#include "gopherdconf.h"
+#include "command.h"
+#include "ext.h"
+#include "serverutil.h"
+#include "index.h"
/*** This one must be last ***/
#include "globals.h"
+
+/* Prototypes */
+RETSIGTYPE read_timeout (int sig);
+void gopherd_exit (int val);
+RETSIGTYPE sigabnormalexit (void);
+void OkHTTPresponse (int sockfd);
+
+#ifndef NO_AUTHENTICATION
+void OutputAuthForm (int sockfd, char *pathname,
+ char *host, int port,
+ CMDprotocol p);
+#endif /* NO_AUTHENTICATION */
+
+void HandleHTTPpost (CMDobj *cmd);
+void AddDefaultView (GopherObj *gs, int size,
+ char *dirname);
+void GSrunScripts (GopherObj *gs, char *filename);
+GopherDirObj *GDfromUFS (char *pathname, int sockfd,
+ boolean isGplus);
+void GSicontoNet (GopherObj *gs, int sockfd);
+int Process_Side (FILE *sidefile,
+ GopherObj *Gopherp);
+boolean IsAskfile (char *pathname);
View
21 gopherd/gopherdconf.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/gopherdconf.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: gopherdconf.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.25 1995/09/26 04:59:46 lindner
* Fix abort routines, change to Die/Warn hash over access routines..
@@ -277,6 +280,14 @@ void GDCdestroy(GDCobj *gdc);
boolean GDCignore(GDCobj *, char *);
+/* mdallen: added extra prototypes */
+
+boolean GDCignore(GDCobj *gdc, char *fname);
+boolean GDCViewExtension(GDCobj *gdc, char *fext, Extobj **extin);
+boolean GDCBlockExtension(GDCobj *gdc, char *fext, Extobj *ext);
+void GDCaddFileSep(GDCobj *gdc, char *expr);
+void GDCintegrityCheck(GDCobj *gdc);
+void GDCfromFile(GDCobj *gdc, char *filename);
#ifndef NO_AUTHENTICATION
@@ -287,6 +298,7 @@ boolean GDCignore(GDCobj *, char *);
AUTHresult GDCvalidate(GDCobj*, char*, char*, char*, char*, char*,
char*);
char **GDCauthAsk(GDCobj*, char*);
+
#else
# define GDCCanRead(a,b,c,d) (SITE_OK)
# define GDCCanBrowse(a,b,c,d) (SITE_OK)
@@ -301,4 +313,5 @@ boolean GDCignore(GDCobj *, char *);
void GDCpushOtherGDC(GDCobj *, char *, char*);
void GDCaddFileSep(GDCobj *, char*);
void GDCpushBlockScript(GDCobj *, char*, char*);
+boolean GDCevalDir(GDCobj *gdc, char *dir);
#endif /* GOPHERDCONF_H */
View
12 gopherd/index.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/index.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: index.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.32 1995/09/28 21:11:31 lindner
* More fixes...
@@ -131,6 +134,7 @@
#include "compatible.h"
#include "gopherd.h"
#include "command.h"
+#include "index.h"
#include "fileio.h"
#include "Debug.h"
View
15 gopherd/kernutils.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/kernutils.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: kernutils.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.10 1995/09/25 22:10:57 lindner
* blobbo..
@@ -83,7 +86,7 @@ double maxload;
double sysload = 0.0;
int
-LoadTooHigh()
+LoadTooHigh(void)
{
int status;
@@ -103,7 +106,7 @@ LoadTooHigh()
extern volatile in noshare vaxc$errno_stv;
-int getload()
+int getload(void)
{
double sysload = 0.0;
/* In VMS with Multinet, we'll assign a channel to $$VMS_LOAD_AVERAGE,
View
12 gopherd/mindexd.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/mindexd.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: mindexd.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.23 1996/01/04 18:30:13 lindner
* Fix for Ustat on Linux, autoconf changes
@@ -100,6 +103,7 @@
#include "command.h"
#include <setjmp.h>
#include "Wait.h"
+#include "index.h"
#define MAXSLAVES 64
View
12 gopherd/openers.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/openers.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: openers.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.9 1996/01/04 18:30:01 lindner
* Fix for Ustat on Linux
@@ -70,6 +73,7 @@
*/
#include "gopherd.h"
+#include "dedot.h"
#include "Debug.h"
#include <sys/param.h> /* for MAXPATHLEN */
View
18 gopherd/serverutil.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/serverutil.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: serverutil.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.52 1996/01/04 18:30:14 lindner
* Fix for Ustat on Linux, autoconf changes
@@ -190,6 +193,7 @@
#include "Debug.h"
#include "Dirent.h" /* For S_ISADIR */
#include "gopherdconf.h" /* For GDCaccess */
+#include "Regex.h"
#if defined(HAVE_SYSLOG_H)
#include <syslog.h>
@@ -307,7 +311,7 @@ GplusError(int sockfd, int errclass, char *text, char **moretext)
tempstr = strdup(text);
nl = tempstr;
- while (nl = strchr(nl, '\n')) {
+ while ((nl = strchr(nl, '\n'))) {
*nl = '\0';
nl++;
@@ -589,7 +593,7 @@ process_mailfile(int sockfd, char *Mailfname)
foundtitle = FALSE;
if (Endbyte != 0) {
- sprintf(outputline, "0%s\tR%d-%d-%s\t%s\t%d\r\n",
+ sprintf(outputline, "0%s\tR%ld-%ld-%s\t%s\t%d\r\n",
Title, Startbyte, Bytecount, Mailfname,
Zehostname, GopherPort);
if (writestring(sockfd, outputline) < 0)
@@ -603,7 +607,7 @@ process_mailfile(int sockfd, char *Mailfname)
}
if (*Title != '\0') {
- sprintf(outputline, "0%s\tR%d-%d-%s\t%s\t%d\r\n",
+ sprintf(outputline, "0%s\tR%ld-%ld-%s\t%s\t%d\r\n",
Title, Startbyte, Bytecount, Mailfname,
Zehostname, GopherPort);
if (writestring(sockfd, outputline)<0)
View
30 gopherd/serverutil.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/serverutil.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: serverutil.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.7 1995/10/04 21:05:20 lindner
* NO_AUTH mod
@@ -79,4 +82,23 @@ FILE* Gpopen(int sockfd, char *cmd, char *rw);
void CheckAccess(int sockfd, Accesslevel);
#endif
+/* prototypes */
+void LOGGopher (int sockfd, const char *fmt, ...);
+void GplusError (int sockfd, int errclass,
+ char *text, char **moretext);
+void Abortoutput (int sockfd, char *errmsg);
+void Die (int sockfd, int errorlevel, char *fmt, ...);
+void Warn (int sockfd, int errorlevel, char *fmt, ...);
+boolean Setuid_username (char *username);
+int is_mail_from_line (char *line);
+Splittype is_multipartfile (char *line);
+void process_mailfile (int sockfd, char *Mailfname);
+char *mtm_basename (char *string);
+boolean Cachetimedout (char *cache, int secs, char *dir);
+boolean isadir (char *path);
+void ServerSetArgv (const char *fmt, ...);
+FILE* Gpopen (int sockfd, char *cmd, char *rw);
+void SetEnvironmentVariable (char *variable, char *value);
+
+
#endif
View
13 gopherd/site.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/site.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: site.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.12 1995/09/25 05:02:39 lindner
* Convert to ANSI C
@@ -190,7 +193,7 @@ SiteAccess(
int sessions)
{
int i;
- Site *temp;
+ Site *temp=(Site *)NULL;
Accesslevel defaccess = ACC_FULL, level;
int defmaxsess = -1;
int maxsess;
View
6 gopherd/special.h
@@ -1,2 +1,8 @@
+/* special.h
+ * Prototypes for functions in special.c
+ */
+
+#include "dedot.h"
+
FILE *Specialfile(int sockfd, FILE *fp, char *pathname);
int Specialclose(FILE *fp);
View
12 gopherd/waisgopher.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopherd/waisgopher.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: waisgopher.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.33 1995/10/05 03:29:11 lindner
* Remove unused symbol
@@ -145,6 +148,7 @@
#include "gopherd.h"
#include "command.h"
#include "Debug.h"
+#include "serverutil.h"
#if defined(_AIX)
#define ANSI_LIKE
View
18 object/BLblock.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/BLblock.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: BLblock.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.14 1995/09/25 22:07:15 lindner
* Ansification
@@ -111,6 +114,7 @@ BLinit(Blockobj *bl)
case BDATA_TEXT:
STAinit(bl->data.text);
break;
+ case BDATA_NONE:
}
}
@@ -133,6 +137,7 @@ BLdatadestroy(Blockobj *bl)
case BDATA_GREF:
GSdestroy(bl->data.gs);
break;
+ case BDATA_NONE:
}
}
@@ -165,6 +170,7 @@ BLcpy(Blockobj *dest, Blockobj *orig)
case BDATA_TEXT:
BLsetText(dest, orig->data.text);
break;
+ case BDATA_NONE:
}
}
@@ -197,6 +203,9 @@ BLgetLine(Blockobj *bl, int lineno)
switch (BLgetDatatype(bl)) {
case BDATA_TEXT:
return(STRget(STAgetEntry(bl->data.text, lineno)));
+ case BDATA_NONE:
+ case BDATA_FILE:
+ case BDATA_GREF:
}
return(NULL);
}
@@ -330,6 +339,7 @@ BLtoNet(Blockobj *bl, int fd, boolean showheader)
}
fclose(infile);
break;
+ case BDATA_NONE:
}
}
View
13 object/BLblock.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/BLblock.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: BLblock.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * 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...
@@ -46,7 +49,7 @@
#include "STRstring.h"
#include "STAarray.h"
#include "boolean.h"
-
+#include "util.h"
/** Return Values for *fromNet() functions **/
#define SOFTERROR -1
View
26 object/GSgopherobj.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.2 $
- * $Date: 2000/08/23 00:18:41 $
+ * $Revision: 1.3 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/GSgopherobj.c,v $
* $State: Exp $
*
@@ -15,6 +15,9 @@
*********************************************************************
* Revision History:
* $Log: GSgopherobj.c,v $
+ * Revision 1.3 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
* Revision 1.2 2000/08/23 00:18:41 jgoerzen
* Various bugfixes
*
@@ -1180,6 +1183,7 @@ GSplusfromNet(GopherObj *gs, int fd)
extern int readfield();
extern int readline();
+#if 0
static void
GSprocessObject(GopherObj *gs)
{
@@ -1192,7 +1196,7 @@ GSprocessObject(GopherObj *gs)
}
#endif
}
-
+#endif /* 0 */
@@ -1393,9 +1397,9 @@ GSmerge(GopherObj *gs, GopherObj *overlay)
&& GSgetType(gs) != A_FILE) {
char *vs, vsize[64], *vc, vcomments[256];
VIewobj *temp;
- if (vs = VIgetSize(GSgetView(gs, 0)))
+ if ((vs = VIgetSize(GSgetView(gs, 0))))
strcpy(vsize, vs);
- if (vc = VIgetComments(GSgetView(gs, 0)))
+ if ((vc = VIgetComments(GSgetView(gs, 0))))
strcpy(vcomments, vc);
VIAdestroy(gs->gplus->Views);
gs->gplus->Views = VIAnew(10);
@@ -1417,6 +1421,7 @@ GSmerge(GopherObj *gs, GopherObj *overlay)
/** Compare two GopherObjs ***/
+#if 0 /* unused */
static int
GScmp(GopherObj *gs1, GopherObj *gs2)
{
@@ -1427,7 +1432,7 @@ GScmp(GopherObj *gs1, GopherObj *gs2)
return(strcmp(GSgetTitle(gs1), GSgetTitle(gs2)));
}
-
+#endif /* 0 */
/*********** The following functions implement the gopher/gopher+
protocol, mostly
@@ -1609,7 +1614,7 @@ GSgetginfo(GopherObj *gs, boolean savename)
int sockfd, bytes;
char inputline[256];
String *tempname = NULL;
- char temptype;
+ char temptype='\0';
if (!GSisGplus(gs))
return;
@@ -1942,6 +1947,13 @@ GSfromURL(GopherObj *gs, char *urltxt, char *host, int port, int doneflags)
GSsetPath(gs, "");
doneflags |= G_PATH;
break;
+/* Unhandled cases... */
+ case gopher:
+ case http:
+ case ftp:
+ case news:
+ case unset:
+ case unknown:
}
if (serviceType == ftp) {
View
18 object/Regex.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/Regex.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: Regex.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.7 1994/07/25 13:56:54 lindner
* First crack at POSIX regular expressions
@@ -56,7 +59,7 @@
# undef REGEX_POSIX
# define REGEX_POSIX
-#endif
+#endif /* REGEX_POSIX */
#if defined(USG) || defined(__svr4__) || defined(_AUX_SOURCE) || defined(hpux) || defined(irix) || defined(M_XENIX) || defined(SYSVREGEX)
@@ -73,7 +76,8 @@
# include <regexp.h>
# define REGEX_SYSV
-# endif
+# endif /* REGEX_CODEIT */
+
/*** BSDize the puppy ***/
char *re_comp();
int re_exec();
@@ -84,4 +88,4 @@
# include <regex.h>
# endif
-#endif
+#endif /* defined(....) */
View
14 object/String.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.2 $
- * $Date: 2000/08/19 01:36:18 $
+ * $Revision: 1.3 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/String.h,v $
* $State: Exp $
*
@@ -15,6 +15,12 @@
*********************************************************************
* Revision History:
* $Log: String.h,v $
+ * Revision 1.3 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.2.1 2000/12/18 23:04:29 mdallen
+ * removed nested comments from unused include
+ *
* Revision 1.2 2000/08/19 01:36:18 jgoerzen
* include more relevant header files.
*
@@ -61,7 +67,9 @@ Though your milage may vary...
*/
-/*#include "compatible.h" /* For strdup, etal */
+#if 0
+#include "compatible.h" /* For strdup, etal */
+#endif /* 0 */
#ifdef __convex__
# include <stdarg.h>
View
15 object/fileio.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/fileio.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: fileio.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.41 1996/01/04 18:25:12 lindner
* Updates for autoconf
@@ -875,8 +878,8 @@ FIOgetargv(char *cmd)
int
FIOsystem(char *cmd)
{
- char **argv, i;
- int result;
+ char **argv;
+ int result, i;
#ifdef VMS
return(DCLsystem(cmd));
View
12 object/fileio.h
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/fileio.h,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: fileio.h,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.16 1996/01/04 18:25:00 lindner
* Updates for autoconf
@@ -75,6 +78,7 @@
#include "STRstring.h"
#include "boolean.h"
#include "Stdlib.h"
+#include "util.h"
#ifdef VMS
# include <processes.h>
View
16 object/url.c
@@ -1,7 +1,7 @@
/********************************************************************
* $Author: jgoerzen $
- * $Revision: 1.1 $
- * $Date: 2000/08/19 00:28:56 $
+ * $Revision: 1.2 $
+ * $Date: 2000/12/20 01:19:20 $
* $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/object/url.c,v $
* $State: Exp $
*
@@ -15,8 +15,11 @@
*********************************************************************
* Revision History:
* $Log: url.c,v $
- * Revision 1.1 2000/08/19 00:28:56 jgoerzen
- * Initial revision
+ * Revision 1.2 2000/12/20 01:19:20 jgoerzen
+ * Added patches from David Allen <s2mdalle@titan.vcu.edu>
+ *
+ * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen
+ * Import from UMN Gopher 2.3.1 after GPLization
*
* Revision 3.19 1995/10/31 16:53:57 lindner
* Small fix for ftp urls..
@@ -343,7 +346,10 @@ URLparse(Url *url)