7 echo ".name = \"$name_txt\","
8 if test $line_handler -eq 0; then
9 echo ".handler = com_$name_txt,"
11 echo ".handler = NULL,"
12 echo ".line_handler = com_$name_txt,"
14 if test -n "$perms_txt"; then
15 echo ".perms = $perms_txt,"
17 echo ".description = \"$desc_txt\","
18 echo ".synopsis = \"$syn_txt\","
20 echo "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g'
28 while read key value; do
34 header_comment="$value"
37 c_file_comment="$value"
41 array_name=${value%command_list}cmds
52 #include \"$file_name.h\""
58 if test -z "$header_comment" -o -z "$c_file_comment" \
59 -o -z "$file_name"; then
60 echo "header error" 1&>2
76 while read key value; do
99 if test "$line" = "---"; then
110 if test -n "$name_txt" -a -n "$desc_txt" -a -n "$syn_txt" \
111 -a -n "$help_txt"; then
115 if test -z "$name_txt" -a -z "$desc_txt" -a -z "$syn_txt" \
116 -a -z "$help_txt"; then
132 echo ".SS \"$name_txt\""
135 echo "\\fBusage: \\fP$syn_txt"
139 if test -n "$perms_txt"; then
140 echo -n "\\fBpermissions:\\fP "
141 if test "$perms_txt" = "0"; then
154 echo "[$section_name]"
158 if test $ret -lt 0; then
161 if test $ret -eq 0; then
164 dump_man #> $txtdir/$n.txt
165 # txt2man -t "$n" -r "$r" < $txtdir/$n.txt \
166 # | sed -e 1d > $mandir/$n.1
167 # man2html $mandir/$n.1 > $htmldir/$n.html
173 echo "/** \file $file_name.c $c_file_comment */"
175 echo "struct $array_type $array_name[] = {"
178 if test $ret -lt 0; then
181 if test $ret -eq 0; then
186 echo '{.name = NULL}};'
194 echo ' * \param fd the file descriptor to send output to'
195 if test $line_handler -eq 0; then
196 echo ' * \param argc the number of arguments'
197 echo ' * \param argv the argument vector'
199 echo ' * \param cmdline the full command line'
202 echo " * synopsis: $syn_txt"
204 echo "$help_txt" | sed -e 's/^/ * /g'
206 if test $line_handler -eq 0; then
207 echo "int com_$name_txt(int fd, int argc, char **argv);"
209 echo "int com_$name_txt(int fd, char *cmdline);"
216 echo "/** \file $file_name.h $header_comment */"
218 echo "extern struct $array_type $array_name[];"
221 if test $ret -lt 0; then
224 if test $ret -eq 0; then