ee345a1bcc1d193a0b9f4e4056b9501f6c4c6181
tdreszer
  Mon Dec 13 10:24:38 2010 -0800
ClosestToHome will now support suffixes that begin with '_'.
diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 7091f9c..64f5a20 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -1736,30 +1736,33 @@
     	}
     }
 return dyStringCannibalize(&orderDY);
 }
 
 char *cartLookUpVariableClosestToHome(struct cart *cart, struct trackDb *tdb,
 	boolean compositeLevel, char *suffix,char **pVariable)
 /* Returns value or NULL for a cart variable from lowest level on up. Optionally
  * fills the non NULL pVariable with the actual name of the variable in the cart */
 {
 if (compositeLevel)
     tdb = tdb->parent;
 for ( ; tdb != NULL; tdb = tdb->parent)
     {
     char buf[512];
+    if (suffix[0] == '.' || suffix[0] == '_')
+        safef(buf, sizeof buf, "%s%s", tdb->track,suffix);
+    else
     safef(buf, sizeof buf, "%s.%s", tdb->track,suffix);
     char *cartSetting = hashFindVal(cart->hash, buf);
     if (cartSetting != NULL)
 	{
 	if(pVariable != NULL)
 	    *pVariable = cloneString(buf);
 	return cartSetting;
 	}
     }
 if (pVariable != NULL)
     *pVariable = NULL;
 return NULL;
 }
 
 void cartRemoveVariableClosestToHome(struct cart *cart, struct trackDb *tdb, boolean compositeLevel, char *suffix)