summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-08-07 01:48:02 +0000
committerMike Frysinger <vapier@gentoo.org>2007-08-07 01:48:02 +0000
commitfa0088cceed9d181eb81f19aef5b83564162f4db (patch)
tree64b7be1ee4d0938f2134cbdf9584d17116802e22 /app-portage
parentAdd support for @CODE and re-order trailing sections. (diff)
downloadgentoo-2-fa0088cceed9d181eb81f19aef5b83564162f4db.tar.gz
gentoo-2-fa0088cceed9d181eb81f19aef5b83564162f4db.tar.bz2
gentoo-2-fa0088cceed9d181eb81f19aef5b83564162f4db.zip
Add support for @RETURN values.
(Portage version: 2.1.3)
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/eclass-manpages/ChangeLog6
-rw-r--r--app-portage/eclass-manpages/files/eclass-to-manpage.awk8
2 files changed, 12 insertions, 2 deletions
diff --git a/app-portage/eclass-manpages/ChangeLog b/app-portage/eclass-manpages/ChangeLog
index eed260e9db47..1bc648cbd626 100644
--- a/app-portage/eclass-manpages/ChangeLog
+++ b/app-portage/eclass-manpages/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-portage/eclass-manpages
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.4 2007/08/07 01:05:25 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.5 2007/08/07 01:48:02 vapier Exp $
+
+ 07 Aug 2007; Mike Frysinger <vapier@gentoo.org>
+ files/eclass-to-manpage.awk:
+ Add support for @RETURN values.
07 Aug 2007; Mike Frysinger <vapier@gentoo.org>
files/eclass-to-manpage.awk:
diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index bddcfc284c85..07f962e9c01c 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.3 2007/08/07 01:05:25 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.4 2007/08/07 01:48:02 vapier Exp $
# This awk converts the comment documentation found in eclasses
# into man pages for easier/nicer reading.
@@ -22,6 +22,7 @@
# The format of functions:
# @FUNCTION: foo
# @USAGE: <required arguments to foo> [optional arguments to foo]
+# @RETURN: <whatever foo returns>
# @MAINTAINER:
# <optional; list of contacts, one per line>
# @DESCRIPTION:
@@ -125,6 +126,7 @@ if ($0 ~ /^# @ECLASS:/) {
if ($0 ~ /^# @FUNCTION:/) {
func_name = $3
usage = ""
+ funcret = ""
maintainer = ""
desc = ""
@@ -132,6 +134,8 @@ if ($0 ~ /^# @FUNCTION:/) {
getline
if ($2 == "@USAGE:")
usage = eat_line()
+ if ($2 == "@RETURN:")
+ funcret = eat_line()
if ($2 == "@MAINTAINER:")
maintainer = eat_paragraph()
if ($2 == "@DESCRIPTION:")
@@ -141,6 +145,8 @@ if ($0 ~ /^# @FUNCTION:/) {
print ".TP"
print "\\fB" func_name "\\fR " man_text(usage)
print man_text(desc)
+ if (funcret != "")
+ print "\nReturn value: " funcret
if (blurb == "")
fail("no @BLURB found")