981ef07d25e4560559dae28d3e316913569944d7
tdreszer
  Fri Jul 6 17:51:06 2012 -0700
Next batch of many checkins as dictated by Jim.  Formatting space after if and limiting lines to 100 chars.  Changes limited to lines last touched by tdreszer (git blame) so as not to ruin history.  None of these changes should affect executables in any way.
diff --git src/hg/inc/trackDb.h src/hg/inc/trackDb.h
index 9cf4b4d..afe0207 100644
--- src/hg/inc/trackDb.h
+++ src/hg/inc/trackDb.h
@@ -47,93 +47,101 @@
 #ifndef	__cplusplus
     unsigned char private;	/* 1 if only want to show it on test site */
 #else
     unsigned char priv;		/* don't conflict with C++ keyword */
 #endif
     int restrictCount;	/* Number of chromosomes this is on (0=all though!) */
     char **restrictList;	/* List of chromosomes this is on */
     char *url;	/* URL to link to when they click on an item */
     char *html;	/* Some html to display when they click on an item */
     char *grp;	/* Which group track belongs to */
     unsigned char canPack;	/* 1 if can pack track display, 0 otherwise */
     char *settings;	/* Name/value pairs for track-specific stuff */
     struct hash *settingsHash;  /* Hash for settings. Not saved in database.
                                  * Don't use directly, rely on trackDbSetting to access. */
     /* additional info, determined from settings */
-    char treeNodeType;          /* bit map containing defining supertrack, composite and children of same (may be parent & child) */
-    struct trackDb *parent;     /* parent of composite or superTracks */
-    struct trackDb *subtracks;  /* children of composite not supertracks */ // NOTE: can only be on one sl at a time!
-    struct slRef *children;     /* children of folders (superTracks) only.  Needed as slRef since these children are on the main trackList and can't be in 2 sl's at once */
-    char *parentName;           /* set if this is a supertrack member */
-    boolean isShow;             /* for supertracks tracks: true if this is a supertrack with pseudo-vis 'show' */
+    char treeNodeType;          // bit map containing defining supertrack, composite and children
+                                //     of same (may be parent & child)
+    struct trackDb *parent;     // parent of composite or superTracks
+    struct trackDb *subtracks;  // children of composite not supers. NOTE: only in one sl at a time!
+    struct slRef *children;     // children of folders (superTracks) only.
+                                // Needed as slRef since these children are on the main trackList
+                                // and can't be in 2 sl's at once
+    char *parentName;           // set if this is a supertrack member 
+    boolean isShow;             // for supertracks: true if supertrack with pseudo-vis 'show'
     struct hash *overrides;     /* If not NULL, this is an override
                                  * entry.  It contains the names, but not the
                                  * values of the fields and settings that were
                                  * specified in the entry. */
-    struct tdbExtras *tdbExtras;/* This struct allows storing extra values which may be used multiple times within a single cgi
-                                   And example is the metadata looked looked up once in the metaTbl and used again and again. */
+    struct tdbExtras *tdbExtras;// This struct allows storing extra values which may be used
+                                // multiple times within a single cgi. An example is the metadata
+                                // looked up once in the metaDb and used again and again.
     };
 
 #define FOLDER_MASK                      0x10
 #define COMPOSITE_MASK                   0x20
 #define MULTI_TRACK_MASK                 0x80
 #define FOLDER_CHILD_MASK                0x01
 #define COMPOSITE_CHILD_MASK             0x02
 #define COMPOSITE_VIEW_MASK              0x04
 #define MULTI_TRACK_CHILD_MASK           0x08
 #define PARENT_MASK                      0xF0
 #define CHILD_MASK                       0x0F
 #define TREETYPE_MASK                    0xFF
 #define PARENT_NODE(nodeType)            ((nodeType) & PARENT_MASK)
 #define CHILD_NODE(nodeType)             ((nodeType) & CHILD_MASK)
 #define FOLDER_NODE(nodeType)            ((nodeType) & FOLDER_MASK)
 #define COMPOSITE_NODE(nodeType)         ((nodeType) & COMPOSITE_MASK)
 #define MULTI_TRACK_NODE(nodeType)       ((nodeType) & MULTI_TRACK_MASK)
 #define CONTAINER_NODE(nodeType)         ((nodeType) & (MULTI_TRACK_MASK | COMPOSITE_MASK))
 #define FOLDER_CHILD_NODE(nodeType)      ((nodeType) & FOLDER_CHILD_MASK)
 #define COMPOSITE_CHILD_NODE(nodeType)   ((nodeType) & COMPOSITE_CHILD_MASK)
 #define COMPOSITE_VIEW_NODE(nodeType)    ((nodeType) & COMPOSITE_VIEW_MASK)
 #define MULTI_TRACK_CHILD_NODE(nodeType) ((nodeType) & MULTI_TRACK_CHILD_MASK)
-#define CONTAINER_CHILD_NODE(nodeType)   ((nodeType) & (MULTI_TRACK_CHILD_MASK | COMPOSITE_CHILD_MASK))
+#define CONTAINER_CHILD_NODE(nodeType)   ((nodeType) & \
+                                                   (MULTI_TRACK_CHILD_MASK | COMPOSITE_CHILD_MASK))
 #define INDEPENDENT_NODE(nodeType)      (((nodeType) & TREETYPE_MASK) == 0 )
 #define SOLO_NODE(nodeType)             (((nodeType) & TREETYPE_MASK) <= FOLDER_CHILD_MASK)
 //#define tdbIsParent(tdb)              ((tdb)->subtracks)
 //#define tdbIsChild(tdb)               ((tdb)->parent   )
 //#define tdbIsTreeLeaf(tdb)            ( CHILD_NODE((tdb)->treeNodeType) && !tdbIsParent(tdb))
 //#define tdbIsTreeRoot(tdb)            (PARENT_NODE((tdb)->treeNodeType) && !tdbIsChild(tdb) )
-//#define tdbIsTreeBranch(tdb)          (!INDEPENDENT_NODE((tdb)->treeNodeType) &&  tdbIsParent(tdb) &&  tdbIsChild(tdb))
-//#define tdbIsNotInTree(tdb)           ( INDEPENDENT_NODE((tdb)->treeNodeType) && !tdbIsParent(tdb) && !tdbIsChild(tdb))
+//#define tdbIsTreeBranch(tdb) (  !INDEPENDENT_NODE((tdb)->treeNodeType)
+//                             &&  tdbIsParent(tdb) &&  tdbIsChild(tdb))
+//#define tdbIsNotInTree(tdb)  (   INDEPENDENT_NODE((tdb)->treeNodeType)
+//                             && !tdbIsParent(tdb) && !tdbIsChild(tdb))
 
 // --- Folders are superTracks.  Currently only one level deep
 INLINE void tdbMarkAsFolder(struct trackDb *tdb)
 // Marks a trackDb struct as a supertrack
 {
 tdb->treeNodeType |= FOLDER_MASK;
 }
 #define tdbMarkAsSuperTrack(tdb) tdbMarkAsFolder(tdb)
 
 INLINE void tdbMarkAsFolderChild(struct trackDb *tdb)
 // Marks a trackDb struct as a child of a folder
 {
 tdb->treeNodeType |= FOLDER_CHILD_MASK;
 }
 #define tdbMarkAsSuperTrackChild(tdb) tdbMarkAsFolderChild(tdb)
 
 INLINE boolean tdbIsFolder(struct trackDb *tdb)
 // Is this trackDb struct marked as a folder ?
 {
-return tdb && FOLDER_NODE(tdb->treeNodeType);  // && tdb->children  NOTE: The children list is not always filled in, but should be
+return tdb && FOLDER_NODE(tdb->treeNodeType);  // && tdb->children
+//  NOTE: The children list is not always filled in, but should be
 }
 #define tdbIsSuper(tdb) tdbIsFolder(tdb)
 #define tdbIsSuperTrack(tdb) tdbIsFolder(tdb)
 
 INLINE boolean tdbIsFolderContent(struct trackDb *tdb)
 // Is this trackDb struct marked as a contained in a folder ?
 {
 return tdb && tdb->parent && FOLDER_CHILD_NODE(tdb->treeNodeType);
 }
 #define tdbIsSuperTrackChild(tdb) tdbIsFolderContent(tdb)
 
 INLINE struct trackDb *tdbGetImmediateFolder(struct trackDb *tdb)
 // Return closest ancestor who is a folder track.
 {
 struct trackDb *parent = tdb->parent;
@@ -181,31 +189,32 @@
 {
 return tdb && tdb->parent && COMPOSITE_CHILD_NODE(tdb->treeNodeType);
 }
 #define tdbIsCompositeSubtrack(tdb) tdbIsCompositeChild(tdb)
 
 INLINE struct trackDb *tdbGetComposite(struct trackDb *tdb)
 // Return closest ancestor who is a composite track.
 {
 struct trackDb *parent = tdb->parent;
 for ( ; parent != NULL && !tdbIsComposite(parent); parent = parent->parent)
      ;
 return parent;
 }
 
 
-// --- MultiTracks are container tracks with one level of subtracks combined into a unified hgTracks image track
+// --- MultiTracks are container tracks with one level of subtracks
+ //                combined into a unified hgTracks image track
 INLINE void tdbMarkAsMultiTrack( struct trackDb *tdb)
 // Marks a trackDb struct as a multiTrack (like multiWig)
 {
 tdb->treeNodeType |= MULTI_TRACK_MASK;
 }
 
 INLINE void tdbMarkAsMultiTrackChild( struct trackDb *tdb)
 // Marks a trackDb struct as a child of a multiTrack (like multiWig)
 {
 tdb->treeNodeType |= MULTI_TRACK_CHILD_MASK;
 }
 #define tdbMarkAsMultiTrackSubtrack(tdb) tdbMarkAsMultiTrackChild(tdb)
 
 INLINE boolean tdbIsMultiTrack( struct trackDb *tdb)
 // Is this trackDb struct marked as a multiTrack (like multiWig) ?
@@ -218,31 +227,31 @@
 {
 return tdb && tdb->parent && MULTI_TRACK_CHILD_NODE(tdb->treeNodeType);
 }
 #define tdbIsMultiTrackSubtrack(tdb) tdbIsMultiTrackChild(tdb)
 
 INLINE struct trackDb *tdbGetMultiTrack(struct trackDb *tdb)
 // Return closest ancestor who is a multiTrack.
 {
 struct trackDb *parent = tdb->parent;
 for ( ; parent != NULL && !tdbIsMultiTrack(parent); parent = parent->parent)
      ;
 return parent;
 }
 
 
-// --- CONTAINERS are composites or multiTracks, which behave in similar ways through some code paths
+// --- CONTAINERS are composites or multiTracks, which behave in similar ways thru some code paths
 INLINE boolean tdbIsContainer( struct trackDb *tdb)
 // Is this trackDb struct marked as a composite or multiTrack with children ?
 {
 return tdb && tdb->subtracks && CONTAINER_NODE(tdb->treeNodeType);
 }
 
 INLINE boolean tdbIsContainerChild(struct trackDb *tdb)
 // Is this trackDb struct marked as a child of a composite or multiTrack ?
 {
 return tdb && tdb->parent && CONTAINER_CHILD_NODE(tdb->treeNodeType);
 }
 #define tdbIsSubtrack(tdb) tdbIsContainerChild(tdb)
 
 INLINE struct trackDb *tdbGetContainer(struct trackDb *tdb)
 // Return closest ancestor who is a container track.