[Patch] Fix some "Since:" tag and check-doc-syntax oddities

Uli Schlachter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

today I accidentally stumbled upon a double "Since:" tag for
cairo_surface_set_mime_data(). Attached are the patches that resulted from this.

Anyone wants to take a look? :-)

Uli
-- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
0001-check-doc-syntax-Make-this-work-again.patch (text/x-diff, 962 B)
From 7e2d17ab1528d166552b40045cce94281491e85d Mon Sep 17 00:00:00 2001
From: Uli Schlachter <[email protected]>
Date: Sun, 6 May 2012 21:41:28 +0200
Subject: [PATCH 1/3] check-doc-syntax: Make this work again

Commit ed90616b77570 changed the way the awk script gets invoked. Due to a
missing "test", this resulted in the awk script never getting invoked at all.

Signed-off-by: Uli Schlachter <[email protected]>
---
 src/check-doc-syntax.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh
index bfda7a2..c74fb87 100755
--- a/src/check-doc-syntax.sh
+++ b/src/check-doc-syntax.sh
@@ -71,7 +71,7 @@ if echo $FILES | xargs grep "$note_regexp" /dev/null; then
 fi >&2
 
 # Only run the syntax checker on the source files (not doc/)
-if -e ./check-doc-syntax.awk; then
+if test -e ./check-doc-syntax.awk; then
     if echo $FILES | xargs ./check-doc-syntax.awk ; then
 	    :
     else
-- 
1.7.10
0002-check-doc-syntax-Find-duplicate-Since-tags.patch (text/x-diff, 902 B)
From 4a74051b8459d4c4618d7a725dbf69aed702ef86 Mon Sep 17 00:00:00 2001
From: Uli Schlachter <[email protected]>
Date: Sun, 6 May 2012 21:45:32 +0200
Subject: [PATCH 2/3] check-doc-syntax: Find duplicate "Since:" tags

It makes no sense to say more than one time when some symbol was introduced.

Signed-off-by: Uli Schlachter <[email protected]>
---
 src/check-doc-syntax.awk |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/check-doc-syntax.awk b/src/check-doc-syntax.awk
index d4325ce..5fdabda 100755
--- a/src/check-doc-syntax.awk
+++ b/src/check-doc-syntax.awk
@@ -69,6 +69,9 @@ in_doc {
 }
 
 /^ \* Since: ([0-9]*.[0-9]*|TBD)$/ {
+    if (doc_has_since != 0) {
+	log_error("Duplicate 'Since' field")
+    }
     doc_has_since = doc_line
 }
 
@@ -102,4 +105,4 @@ in_doc {
 END {
     if (!name_found)
 	log_warning("not found")
-}
\ No newline at end of file
+}
-- 
1.7.10
0003-c_surface_set_mime_data-Remove-duplicate-Since.patch (text/x-diff, 918 B)
From a5241b0871711b129c1940176b3e34d0448ac3e1 Mon Sep 17 00:00:00 2001
From: Uli Schlachter <[email protected]>
Date: Sun, 6 May 2012 21:48:42 +0200
Subject: [PATCH 3/3] c_surface_set_mime_data: Remove duplicate "Since"

This fixes the following message from "make check":

./cairo-surface.c (1192): ERROR: cairo_surface_set_mime_data: Duplicate 'Since'
field

Signed-off-by: Uli Schlachter <[email protected]>
---
 src/cairo-surface.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index e16a354..35ac391 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1183,8 +1183,6 @@ _cairo_mime_data_destroy (void *ptr)
  * discarded if you draw on the surface afterwards. Use this function
  * with care.
  *
- * Since: 1.10
- *
  * Return value: %CAIRO_STATUS_SUCCESS or %CAIRO_STATUS_NO_MEMORY if a
  * slot could not be allocated for the user data.
  *
-- 
1.7.10
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.