about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTString.c15
-rw-r--r--WWW/Library/Implementation/HTString.h12
2 files changed, 22 insertions, 5 deletions
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 30c2bace..9c5d5172 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTString.c,v 1.56 2009/01/01 16:57:48 tom Exp $
+ * $LynxId: HTString.c,v 1.57 2009/03/17 22:27:59 tom Exp $
  *
  *	Case-independent string comparison		HTString.c
  *
@@ -962,6 +962,18 @@ char *HTQuoteParameter(const char *parameter)
 	outofmem(__FILE__, "HTQuoteParameter");
 
     n = 0;
+#if (USE_QUOTED_PARAMETER == 1)
+    /*
+     * Only double-quotes are used in Win32/DOS -TD
+     */
+    if (quoted)
+	result[n++] = D_QUOTE;
+    for (i = 0; i < last; i++) {
+	result[n++] = parameter[i];
+    }
+    if (quoted)
+	result[n++] = D_QUOTE;
+#else
     if (quoted)
 	result[n++] = S_QUOTE;
     for (i = 0; i < last; i++) {
@@ -984,6 +996,7 @@ char *HTQuoteParameter(const char *parameter)
     }
     if (quoted)
 	result[n++] = S_QUOTE;
+#endif
     result[n] = '\0';
     return result;
 }
diff --git a/WWW/Library/Implementation/HTString.h b/WWW/Library/Implementation/HTString.h
index e0d497ab..09dfdbc4 100644
--- a/WWW/Library/Implementation/HTString.h
+++ b/WWW/Library/Implementation/HTString.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTString.h,v 1.30 2008/12/31 21:04:28 tom Exp $
+ * $LynxId: HTString.h,v 1.31 2009/03/17 22:25:50 tom Exp $
  *						String handling for libwww
  *                                         STRINGS
  *                                            
@@ -88,10 +88,14 @@ extern "C" {
 				  va_list * ap);
 #endif
 
-#if (defined(VMS) || defined(DOSPATH) || defined(__EMX__)) && !defined(__CYGWIN__)
-#define USE_QUOTED_PARAMETER 0
+#if defined(__CYGWIN__)
+#define USE_QUOTED_PARAMETER 2	/* single and double-quoting */
+#elif defined(DOSPATH)
+#define USE_QUOTED_PARAMETER 1	/* double-quoting only */
+#elif (defined(VMS) || defined(__EMX__))
+#define USE_QUOTED_PARAMETER 0	/* no quoting */
 #else
-#define USE_QUOTED_PARAMETER 1
+#define USE_QUOTED_PARAMETER 2	/* single and double-quoting */
 #endif
 
 #if USE_QUOTED_PARAMETER