Re: Trouble when mkdb-ing with ORBit-generated headers



On 25 May 2001 15:33:33 -0400, Owen Taylor wrote:
> It could be added, or maybe the doc-comment searcher could be improved
> a bit not to think:
> 
>  /** prototypes **/
> 
> Is a doc comment.
> 

The attached patch should safely resolve the problem -- it detects
single-line comments and skips them. Stylistically it could be improved,
but the change is really simple.

--
Peter Williams     peter newton cx / peterw ximian com

"Why should I have to change my name? He's the one who 
sucks!"                              -- Michael Bolton
? orbitbarf.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk-doc/ChangeLog,v
retrieving revision 1.74
diff -u -r1.74 ChangeLog
--- ChangeLog	2001/05/21 01:07:43	1.74
+++ ChangeLog	2001/05/25 22:44:38
@@ -1,3 +1,8 @@
+2001-05-25  Peter Williams  <peterw ximian com>
+
+	* gtkdoc-mkdb.in (ScanSourceFile): Skip single-line comments -- 
+	prevents barfing on ORBit-generated files.
+
 2001-05-20  Damon Chaplin  <damon ximian com>
 
 	* examples/Makefile.am (sgml-build.stamp): replaced use of wildcard
Index: gtkdoc-mkdb.in
===================================================================
RCS file: /cvs/gnome/gtk-doc/gtkdoc-mkdb.in,v
retrieving revision 1.28
diff -u -r1.28 gtkdoc-mkdb.in
--- gtkdoc-mkdb.in	2001/05/19 23:55:51	1.28
+++ gtkdoc-mkdb.in	2001/05/25 22:44:39
@@ -1605,7 +1605,9 @@
     while (<SRCFILE>) {
 	# Look for the start of a comment block.
 	if (!$in_comment_block) {
-	    if (m%^\s*/\*\*\s%) {
+	    if (m%^\s*/\*.*\*/%) {
+	        #one-line comment - not gtkdoc
+	    } elsif (m%^\s*/\*\*\s%) {
 #		print "Found comment block start\n";
 		$in_comment_block = 1;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]