7 echo ".name = \"$name_txt\","
8 if test $line_handler -eq 0; then
9 echo ".handler = com_$name_txt,"
11 echo ".line_handler = com_$name_txt,"
13 if test -n "$perms_txt"; then
14 echo ".perms = $perms_txt,"
16 echo ".description = \"$desc_txt\","
17 echo ".synopsis = \"$syn_txt\","
19 echo "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g'
27 while read key value; do
33 header_comment="$value"
36 c_file_comment="$value"
40 array_name=${value%command_list}cmds
51 #include \"$file_name.h\""
55 if test -z "$header_comment" -o -z "$c_file_comment" \
56 -o -z "$file_name"; then
57 echo "header error" 1&>2
73 while read key value; do
96 if test "$line" = "---"; then
107 if test -n "$name_txt" -a -n "$desc_txt" -a -n "$syn_txt" \
108 -a -n "$help_txt"; then
112 if test -z "$name_txt" -a -z "$desc_txt" -a -z "$syn_txt" \
113 -a -z "$help_txt"; then
130 printf "\t$name_txt - $desc_txt\n"
132 printf "\t$syn_txt\n"
135 if test -n "$perms_txt"; then
137 if test "$perms_txt" = "0"; then
140 printf "\t$perms_txt\n"
149 local cn="$(grep ^codename Makefile.in)"
150 local ver="$(grep ^AC_INIT configure.ac \
155 echo "r=paraslash-$ver (cn: $cn)"
158 local mandir=man/man1
161 mkdir -p $txtdir $mandir $htmldir || exit 1
164 if test $ret -lt 0; then
167 if test $ret -eq 0; then
171 echo "pfx: $pfx, name: $n"
172 dump_man > $txtdir/$n.txt
173 txt2man -t "$n" -r "$r" < $txtdir/$n.txt \
174 | sed -e 1d > $mandir/$n.1
175 man2html $mandir/$n.1 > $htmldir/$n.html
181 echo "/** \file $file_name.c $c_file_comment */"
183 echo "struct $array_type $array_name[] = {"
186 if test $ret -lt 0; then
189 if test $ret -eq 0; then
194 echo '{.name = NULL}};'
202 echo ' * \param fd the file descriptor to send output to'
203 if test $line_handler -eq 0; then
204 echo ' * \param argc the number of arguments'
205 echo ' * \param argv the argument vector'
207 echo ' * \param cmdline the full command line'
210 echo " * synopsis: $syn_txt"
212 echo "$help_txt" | sed -e 's/^/ * /g'
214 if test $line_handler -eq 0; then
215 echo "int com_$name_txt(int fd, int argc, char **argv);"
217 echo "int com_$name_txt(int fd, char *cmdline);"
224 echo "/** \file $file_name.h $header_comment */"
226 echo "extern struct $array_type $array_name[];"
229 if test $ret -lt 0; then
232 if test $ret -eq 0; then