summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/shman.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/shman.sh b/tools/shman.sh
index 5cf9aab..70c202f 100644
--- a/tools/shman.sh
+++ b/tools/shman.sh
@@ -81,6 +81,10 @@ gen_doc_func()
local desc=
local first_opt=true
local sect_opts=
+ local opd=
+ local req=
+ local first_opd=true
+ local sect_opds=
local sect_ret=
sect_name=".SH NAME${LF}${sym}"
@@ -108,6 +112,17 @@ gen_doc_func()
sect_opts="${sect_opts}.TP${LF}${opt}${LF}"
sect_opts="${sect_opts}${desc}${LF}"
;;
+ 'operand')
+ read opd req desc <<-EOF
+ ${args}
+ EOF
+ if ${first_opd}; then
+ sect_opds=".SH OPERANDS${LF}"
+ fi
+ first_opd=false
+ sect_opds="${sect_opds}.TP${LF}.I ${opd}${LF}"
+ sect_opds="${sect_opds}${desc}${LF}"
+ ;;
'return')
sect_ret=".SH RETURN VALUE${LF}${args}"
;;
@@ -116,7 +131,8 @@ gen_doc_func()
${doc}
EOF
- printf '%s\n\n' "${sect_name}" "${sect_desc}" "${sect_opts}" "${sect_ret}"
+ printf '%s\n\n' "${sect_name}" "${sect_desc}" \
+ "${sect_opts}" "${sect_opds}" "${sect_ret}"
}
gen_doc()