[gimp] pdbgen: Word-wrap return description



commit 914f04dcac956e33229aa7a09421329cfc66d527
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Dec 5 08:46:25 2012 +0530

    pdbgen: Word-wrap return description
    
    Also add punctuation where missing.

 tools/pdbgen/lib.pl        |   12 +++++++-----
 tools/pdbgen/pdb/paths.pdb |    2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/tools/pdbgen/lib.pl b/tools/pdbgen/lib.pl
index af462ec..a633ba4 100644
--- a/tools/pdbgen/lib.pl
+++ b/tools/pdbgen/lib.pl
@@ -83,7 +83,7 @@ sub generate {
 
 	my $funcname = "gimp_$name"; my $wrapped = "";
 	my %usednames;
-	my $retdesc = "";
+	my $retdesc = "Returns: ";
 
 	if ($proc->{deprecated}) {
 	    if ($proc->{deprecated} eq 'NONE') {
@@ -120,10 +120,10 @@ sub generate {
 
 	    $retarg->{retval} = 1;
 
-	    $retdesc = exists $retarg->{desc} ? $retarg->{desc} : "";
+	    $retdesc .= exists $retarg->{desc} ? $retarg->{desc} : "";
 
 	    if ($retarg->{type} eq 'stringarray') {
-		$retdesc .= " The returned value must be freed with g_strfreev().";
+		$retdesc .= ". The returned value must be freed with g_strfreev().";
 	    }
 	}
 	else {
@@ -172,7 +172,7 @@ sub generate {
 	# return success/failure boolean if we don't have anything else
 	if ($rettype eq 'void') {
 	    $return_args .= "\n" . ' ' x 2 . "gboolean success = TRUE;";
-	    $retdesc = "TRUE on success.";
+	    $retdesc .= "TRUE on success.";
 	}
 
 	# We only need to bother with this if we have to return a value
@@ -464,6 +464,8 @@ CODE
 			&desc_wrap($proc->{help});
 	}
 
+	$retdesc = &desc_wrap($retdesc);
+
 	$out->{code} .= <<CODE;
 
 /**
@@ -471,7 +473,7 @@ CODE
 $argdesc *
 $procdesc
  *
- * Returns: $retdesc$sincedesc
+$retdesc$sincedesc
  **/
 $rettype
 $wrapped$funcname ($clist)
diff --git a/tools/pdbgen/pdb/paths.pdb b/tools/pdbgen/pdb/paths.pdb
index a3a10be..1967bed 100644
--- a/tools/pdbgen/pdb/paths.pdb
+++ b/tools/pdbgen/pdb/paths.pdb
@@ -26,7 +26,7 @@ sub path_list {
 
     @outargs = (
 	{ name => 'path_list', type => 'stringarray',
-	  desc => 'List of the paths belonging to this image.',
+	  desc => 'List of the paths belonging to this image',
 	  array => { name => 'num_paths',
 		     desc => 'The number of paths returned.' } }
     );



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