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 ".usage = \"$usage_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
55 #include \"$output_file.h\""
61 if test -z "$header_comment" -o -z "$c_file_comment" \
62 -o -z "$output_file"; then
63 echo "header error" 1&>2
79 while read key value; do
102 if test "$line" = "---"; then
113 if test -n "$name_txt" -a -n "$desc_txt" -a -n "$usage_txt" \
114 -a -n "$help_txt"; then
118 if test -z "$name_txt" -a -z "$desc_txt" -a -z "$usage_txt" \
119 -a -z "$help_txt"; then
135 echo ".SS \"$name_txt\""
138 echo "\\fBusage: \\fP$usage_txt"
142 if test -n "$perms_txt"; then
143 echo -n "\\fBpermissions:\\fP "
144 if test "$perms_txt" = "0"; then
156 echo "[$section_name]"
160 if test $ret -lt 0; then
163 if test $ret -eq 0; then
172 echo "/** \file $output_file.c $c_file_comment */"
174 echo "struct $array_type $array_name[] = {"
177 if test $ret -lt 0; then
180 if test $ret -eq 0; then
185 echo '{.name = NULL}};'
193 echo ' * \param fd the file descriptor to send output to'
194 if test $line_handler -eq 0; then
195 echo ' * \param argc the number of arguments'
196 echo ' * \param argv the argument vector'
198 echo ' * \param cmdline the full command line'
201 echo " * usage: $usage_txt"
203 echo "$help_txt" | sed -e 's/^/ * /g'
205 grep "^\(__noreturn \)*int com_$name_txt(" $source_file | sed -e 's/$/;/1'
211 echo "/** \file $output_file.h $header_comment */"
213 echo "extern struct $array_type $array_name[];"
216 if test $ret -lt 0; then
219 if test $ret -eq 0; then