about summary refs log tree commit diff stats
path: root/WWW
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2012-11-17 01:33:36 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2012-11-17 01:33:36 -0500
commit0bf7dbb3033d5a0ed2dd2c372a4e2434b8a034cf (patch)
treebe6098f59bcc03de3a8b66b542800085bb790c4f /WWW
parentf769d6297419caafe9cc3d62522f3f4d9a859dab (diff)
downloadlynx-snapshots-0bf7dbb3033d5a0ed2dd2c372a4e2434b8a034cf.tar.gz
snapshot of project "lynx", label v2-8-8dev_14i
Diffstat (limited to 'WWW')
-rw-r--r--WWW/Library/Implementation/HTFormat.c12
-rw-r--r--WWW/Library/Implementation/HTGopher.c24
2 files changed, 22 insertions, 14 deletions
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index 98daa0b4..fa211af7 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFormat.c,v 1.75 2012/08/10 11:48:05 tom Exp $
+ * $LynxId: HTFormat.c,v 1.76 2012/11/17 01:31:19 tom Exp $
  *
  *		Manage different file formats			HTFormat.c
  *		=============================
@@ -498,19 +498,11 @@ HTStream *HTStreamStack(HTFormat rep_in,
     HTPresentation *match;
     HTStream *result;
 
-    CTRACE((tfp, "HTFormat: Constructing stream stack for %s to %s (%s)\n",
+    CTRACE((tfp, "StreamStack: Constructing stream stack for %s to %s (%s)\n",
 	    HTAtom_name(rep_in),
 	    HTAtom_name(rep_out),
 	    NONNULL(anchor->content_type_params)));
 
-    /* don't return on WWW_SOURCE some people might like
-     * to make use of the source!!!!  LJM
-     */
-#if 0
-    if (rep_out == WWW_SOURCE || rep_out == rep_in)
-	return sink;		/*  LJM */
-#endif
-
     if (rep_out == rep_in) {
 	result = sink;
 
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index 885943e6..3ce376d6 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTGopher.c,v 1.55 2011/06/11 13:06:08 tom Exp $
+ * $LynxId: HTGopher.c,v 1.56 2012/11/17 01:33:36 tom Exp $
  *
  *			GOPHER ACCESS				HTGopher.c
  *			=============
@@ -21,6 +21,7 @@
 #define HTSTREAM_INTERNAL 1
 
 #include <HTUtils.h>		/* Coding convention macros */
+#include <HTFile.h>		/* For HTFileFormat() */
 
 #ifndef DISABLE_GOPHER
 #include <HTAlert.h>
@@ -1692,8 +1693,6 @@ static int HTLoadCSO(const char *arg,
 /*	Load by name.						HTLoadGopher
  *	=============
  *
- *  Bug:  No decoding of strange data types as yet.
- *
  */
 static int HTLoadGopher(const char *arg,
 			HTParentAnchor *anAnchor,
@@ -1941,11 +1940,28 @@ static int HTLoadGopher(const char *arg,
 		      s, sink);
 	break;
 
+    default:
+	{
+	    HTAtom *encoding = 0;
+	    const char *desc = 0;
+	    HTFormat format = HTFileFormat(arg, &encoding, &desc);
+
+	    /*
+	     * Ignore WWW_BINARY (since that is returned by HTFileFormat when
+	     * it does not have a representation), but otherwise use the
+	     * result.
+	     */
+	    if (format != WWW_BINARY) {
+		HTParseSocket(format, format_out, anAnchor, s, sink);
+		break;
+	    }
+	}
+	/* FALL-THRU */
+
     case GOPHER_MACBINHEX:
     case GOPHER_PCBINARY:
     case GOPHER_UUENCODED:
     case GOPHER_BINARY:
-    default:
 	/*
 	 * Specifying WWW_UNKNOWN forces dump to local disk.
 	 */