f4acf7053a5964e984fd0d466446848a8808a892
tdreszer
Thu Aug 12 17:11:54 2010 -0700
Now that CART_VAR_EMPTY exists, cartDump should accept it just like it accepts 'n/a'
diff --git src/hg/cartDump/cartDump.c src/hg/cartDump/cartDump.c
index b8b02ea..136105f 100644
--- src/hg/cartDump/cartDump.c
+++ src/hg/cartDump/cartDump.c
@@ -8,6 +8,8 @@
static char const rcsid[] = "$Id: cartDump.c,v 1.14 2008/12/09 00:41:20 angie Exp $";
+#define CART_DUMP_REMOVE_VAR "n/a"
+
void doMiddle(struct cart *cart)
/* cartDump - Dump contents of cart. */
{
@@ -25,7 +27,7 @@
{
varName = skipLeadingSpaces(varName);
eraseTrailingSpaces(varName);
- if (sameString(newValue, "n/a"))
+ if (sameString(newValue, CART_DUMP_REMOVE_VAR) || sameString(newValue, CART_VAR_EMPTY))
cartRemove(cart, varName);
else
cartSetString(cart, varName, newValue);
@@ -53,7 +55,7 @@
printf(" ");
cgiMakeButton("submit", "submit");
printf("
\n");
-printf("Put n/a in for the new value to clear a variable.");
+printf("Put '%s' in for the new value to clear a variable.",CART_DUMP_REMOVE_VAR);
printf("
Cookies passed to %s:
\n%s\n