+2.9: 2012-11-24
+ Exclude .git/.bzr/.hg repo directories as well as .svn.
+
2.8: 2005-10-19
Change license to BSD. Tweak Python to use hashlib rather than
the deprecated md5 module. Suppress some compiler warnings.
ctcompare - C Token Comparator
http://minnie.tuhs.org/Programs/Ctcompare/
-See the xhangelog in the RPM spec file for recent developments.
+See the NEWS file for recent developments.
static int eligible(const char *file)
/* is the specified file eligible to be compared? */
{
- if (strstr(file, "CVS") || strstr(file,"RCS") || strstr(file,"SCCS") || strstr(file, "SVN") || strstr(file, ".svn"))
+#define endswith(suff) !strcmp(suff, file + strlen(file) - strlen(suff))
+ if (strstr(file, "CVS") || strstr(file,"RCS") || strstr(file,"SCCS") || strstr(file, "SVN") || endswith(".svn") || endswith(".git") || endswith(".hg") || endswith(".bzr"))
return(0);
/* fast check for the most common suffixes */
-#define endswith(suff) !strcmp(suff, file + strlen(file) - strlen(suff))
else if (endswith(".c") || endswith(".h") || endswith(".html"))
return(1);
else if (endswith(".o") || endswith("~") || endswith(".bdf"))
return False
elif filter(lambda x: file.endswith(x), ('.o','~', '.bdf')):
return False
- elif filter(lambda x: file.find(x)>-1, ('RCS','SCCS','CVS','SVN','.svn')):
+ elif filter(lambda x: file.find(x)>-1, ('RCS','SCCS','CVS','SVN')):
+ return False
+ elif filter(lambda x: file.endswith(x), ('.svn','.git','.hg','.bzr')):
return False
elif c_only:
return filter(lambda x: file.endswith(x), ('.c','.cc','.h','.html'))