Ignore CVS directories when building documentation

Igor Peshansky pechtcha@cs.nyu.edu
Thu Jan 12 02:32:00 GMT 2006


The doctool program recursively searches for SGML/XML chunks in
subdirectories.  CVS keeps base copies of "cvs edit"ed files in CVS/Base.
Including both the base copy and the modified file results in duplicate
ids and other validation errors (not to mention wrong output).  This patch
tells doctool to ignore CVS directories during recursive traversals.

As usual, the ChangeLog is below.
	Igor
==============================================================================
2006-01-11  Igor Peshansky  <pechtcha@cs.nyu.edu>

	* doctool.c (scan_directory): Ignore "CVS" directories.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
-------------- next part --------------
Index: doctool.c
===================================================================
RCS file: /cvs/src/src/winsup/doc/doctool.c,v
retrieving revision 1.2
diff -u -p -r1.2 doctool.c
--- doctool.c	4 Dec 2001 04:20:30 -0000	1.2
+++ doctool.c	12 Jan 2006 02:27:33 -0000
@@ -157,7 +157,7 @@ scan_directory(dirname)
 
     STAT(name, &st);
 
-    if (S_ISDIR(st.st_mode))
+    if (S_ISDIR(st.st_mode) && strcmp(de->d_name, "CVS") != 0)
     {
       scan_directory(name);
     }


More information about the Cygwin-patches mailing list