Commits

Palmer, 2E0EOL committed f747f47

Code from SVN daybodep-0.5.1 tag, recovered from .tar release

Comments (0)

Files changed (6)

 
 C++ advice and recursive dependencies
   - Adam Gooch <gooch411@hotmail.com>
+
+Bug fix and further improvement suggestions
+ - Joey Armstring
+0.5.1
+-----
+Joey Armstrong: Don't compare word2 with NULL when looking for include
+                lines.  Fixes a crash.
+
 0.5.0
 -----
 DDRP: Fix bug in LookInclude( ) which made warnings about missing
 
 
   Daybo Logic,
-  Flat 2,
-  Barker Court,
+  Flat 2 Barker Court,
   Victoria Avenue,
   Redfield,
   Bristol,
-  England
   United Kingdom.
 
   BS5 9NW
   word1 = WordListGetWord(0);
   word2 = WordListGetWord(1);
   if (
-    ( strcmp(word2, "include") == 0 ) ||
-    ( strcmp(word1, "#include") == 0 )
+    ( Compare(word2, "include") == 0 ) ||
+    ( Compare(word1, "#include") == 0 )
   )
     includeFound = true;
 
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-  Daybo Logic
-  57 Alderwood Parc,
-  Penryn,
-  Kernow,
+  Daybo Logic,
+  Flat 2 Barker Court,
+  Victoria Avenue,
+  Redfield,
+  Bristol,
   United Kingdom.
 
-  TR10 8RL
+  BS5 9NW
 */
 
 #ifndef INC_DAYBODEP_H
 /* Version information */
 #define VER_MAJ   (0)
 #define VER_MIN   (5)
-#define VER_PATCH (0)
-#define VER_STAMP (20060226) /* Format: YYYYMMDD */
+#define VER_PATCH (1)
+#define VER_STAMP (20060513) /* Format: YYYYMMDD */
 
 /* Maximum size of a buffer for reading from a file line by line */
 #define MAX_LINE_BUFF (1024)
   const char *SS1,
   const char *SS2
 );
+int Compare(
+  const char *S1,
+  const char *S2
+);
 /*-------------------------------------------------------------------------*/
 /*
   Contents of license.c (software license)
 /*
     Daybo Logic Dependency tool
-    Copyright (C) 2001-2003  David Duncan Ross Palmer, Daybo Logic.
+    Copyright (C) 2001-2006  David Duncan Ross Palmer, Daybo Logic.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 
   Daybo Logic,
-  57 Alderwood Parc,
-  Penryn,
-  Kernow,
+  Flat 2 Barker Court,
+  Victoria Avenue,
+  Redfield,
+  Bristol,
   United Kingdom
 
-  TR10 8RL
+  BS5 9NW
 */
 
 #include <assert.h>
 
   assert(Obj && S);
   for(n = Obj->base; n; n = n->next)
-    if( !strcmp(S, n->dynamicString) )
+    if( !Compare(S, n->dynamicString) )
       return true;
   return false;
 }
 /*
     Daybo Logic Dependency tool
-    Copyright (C) 2001-2003  David Duncan Ross Palmer, Daybo Logic.
+    Copyright (C) 2001-2006  David Duncan Ross Palmer, Daybo Logic.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-  Daybo Logic
-  57 Alderwood Parc,
-  Penryn,
-  Kernow,
+  Daybo Logic,
+  Flat 2 Barker Court,
+  Victoria Avenue,
+  Redfield,
+  Bristol,
   United Kingdom
 
-  TR10 8RL
+  BS5 9NW
 */
 
 #include <string.h>
   return newStr;
 }
 /*-------------------------------------------------------------------------*/
+int Compare(const char *S1, const char *S2)
+{
+  if ( S1 == S2 ) return 0;
+  if ( S1 && S2 )
+    return strcmp(S1, S2);
+  return -1;
+}
+/*-------------------------------------------------------------------------*/