4e4f5951fed8f4d923dcbbc313b3596c62374091
tdreszer
  Mon Jun 25 12:13:22 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.  Only affect is to my sanity and Jim's.
diff --git src/lib/common.c src/lib/common.c
index f3098b8..c71badc 100644
--- src/lib/common.c
+++ src/lib/common.c
@@ -1091,31 +1091,32 @@
 	}
     }
 slReverse(&list);
 return list;
 }
 
 char *slPairListToString(struct slPair *list,boolean quoteIfSpaces)
 // Returns an allocated string of pairs in form of [name1=val1 name2=val2 ...]
 // If requested, will wrap name or val in quotes if contain spaces: [name1="val 1" "name 2"=val2]
 {
 // Don't rely on dyString.  We should do the accounting ourselves and not create extra dependencies.
 int count = 0;
 struct slPair *pair = list;
 for(;pair != NULL; pair = pair->next)
     {
-    assert(pair->name != NULL && pair->val != NULL); // Better assert and get this over with, complete with stack
+    assert(pair->name != NULL && pair->val != NULL); // Better assert and get this over with,
+                                                     // complete with stack
     count += strlen(pair->name);
     count += strlen((char *)(pair->val));
     count += 2; // = and ' ' delimit
     if (quoteIfSpaces)
         {
         if (hasWhiteSpace(pair->name))
             count += 2; // " and "
         if (hasWhiteSpace((char *)(pair->val)))
             count += 2; // " and "
         }
     }
 if (count == 0)
     return NULL;
 
 char *str = needMem(count+5); // A bit of slop
@@ -1174,31 +1175,32 @@
 
 char *str = needMem(count+5); // A bit of slop
 
 char *strPtr = str;
 for(pair = list; pair != NULL; pair = pair->next, strPtr += strlen(strPtr))
     {
     if (pair != list)
         *strPtr++ = delimiter;
     if (hasWhiteSpace(pair->name))
         {
         if (quoteIfSpaces)
             sprintf(strPtr,"\"%s\"",pair->name);
         else
             {
             if (delimiter == ' ')  // if delimied by commas, this is entirely okay!
-                warn("slPairListToString() Unexpected white space in name delimied by space: [%s]\n", pair->name);
+                warn("slPairListToString() Unexpected white space in name delimied by space: "
+                     "[%s]\n", pair->name);
             sprintf(strPtr,"%s",pair->name); // warn but still make string
             }
         }
     else
         sprintf(strPtr,"%s",pair->name);
     }
 return str;
 }
 
 int slPairCmpCase(const void *va, const void *vb)
 /* Compare two slPairs, ignore case. */
 {
 const struct slPair *a = *((struct slPair **)va);
 const struct slPair *b = *((struct slPair **)vb);
 return strcasecmp(a->name, b->name);
@@ -1206,31 +1208,30 @@
 
 void slPairSortCase(struct slPair **pList)
 /* Sort slPair list, ignore case. */
 {
 slSort(pList, slPairCmpCase);
 }
 
 int slPairCmp(const void *va, const void *vb)
 /* Compare two slPairs. */
 {
 const struct slPair *a = *((struct slPair **)va);
 const struct slPair *b = *((struct slPair **)vb);
 return strcmp(a->name, b->name);
 }
 
-
 int slPairValCmpCase(const void *va, const void *vb)
 /* Case insensitive compare two slPairs on their values (must be string). */
 {
 const struct slPair *a = *((struct slPair **)va);
 const struct slPair *b = *((struct slPair **)vb);
 return strcasecmp((char *)(a->val), (char *)(b->val));
 }
 
 int slPairValCmp(const void *va, const void *vb)
 /* Compare two slPairs on their values (must be string). */
 {
 const struct slPair *a = *((struct slPair **)va);
 const struct slPair *b = *((struct slPair **)vb);
 return strcmp((char *)(a->val), (char *)(b->val));
 }
@@ -3365,37 +3366,39 @@
 {
 time_t test = dateToSeconds(date,format);
 time_t now = clock1();
 return (test < now);
 }
 
 static int daysOfMonth(struct tm *tp)
 /* Returns the days of the month given the year */
 {
 int days=0;
 switch(tp->tm_mon)
     {
     case 3:
     case 5:
     case 8:
-    case 10:    days = 30;   break;
+    case 10:    days = 30;
+                break;
     case 1:     days = 28;
                 if( (tp->tm_year % 4) == 0
                 && ((tp->tm_year % 20) != 0 || (tp->tm_year % 100) == 0) )
                     days = 29;
                 break;
-    default:    days = 31;   break;
+    default:    days = 31;
+                break;
     }
 return days;
 }
 
 static void dateAdd(struct tm *tp,int addYears,int addMonths,int addDays)
 /* Add years,months,days to a date */
 {
 tp->tm_mday  += addDays;
 tp->tm_mon   += addMonths;
 tp->tm_year  += addYears;
 int dom=28;
 while( (tp->tm_mon >11  || tp->tm_mon <0)
     || (tp->tm_mday>dom || tp->tm_mday<1) )
     {
     if(tp->tm_mon>11)   // First month: tm.tm_mon is 0-11 range