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"
53 #include \"$file_name.h\""
57 if test -z "$header_comment" -o -z "$c_file_comment" \
58 -o -z "$file_name"; then
59 echo "header error" 1&>2
75 while read key value; do
98 if test "$line" = "---"; then
109 if test -n "$name_txt" -a -n "$desc_txt" -a -n "$syn_txt" \
110 -a -n "$help_txt"; then
114 if test -z "$name_txt" -a -z "$desc_txt" -a -z "$syn_txt" \
115 -a -z "$help_txt"; then
132 printf "\t$name_txt - $desc_txt\n"
134 printf "\t$syn_txt\n"
137 if test -n "$perms_txt"; then
139 if test "$perms_txt" = "0"; then
142 printf "\t$perms_txt\n"
151 local cn="$(grep ^codename Makefile.in)"
152 local ver="$(grep ^AC_INIT configure.ac \
157 echo "r=paraslash-$ver (cn: $cn)"
160 local mandir=man/man1
163 mkdir -p $txtdir $mandir $htmldir || exit 1
166 if test $ret -lt 0; then
169 if test $ret -eq 0; then
173 echo "pfx: $pfx, name: $n"
174 dump_man > $txtdir/$n.txt
175 txt2man -t "$n" -r "$r" < $txtdir/$n.txt \
176 | sed -e 1d > $mandir/$n.1
177 man2html $mandir/$n.1 > $htmldir/$n.html
183 echo "/** \file $file_name.c $c_file_comment */"
185 echo "struct $array_type $array_name[] = {"
188 if test $ret -lt 0; then
191 if test $ret -eq 0; then
196 echo '{.name = NULL}};'
204 echo ' * \param fd the file descriptor to send output to'
205 if test $line_handler -eq 0; then
206 echo ' * \param argc the number of arguments'
207 echo ' * \param argv the argument vector'
209 echo ' * \param cmdline the full command line'
212 echo " * synopsis: $syn_txt"
214 echo "$help_txt" | sed -e 's/^/ * /g'
216 if test $line_handler -eq 0; then
217 echo "int com_$name_txt(int fd, int argc, char **argv);"
219 echo "int com_$name_txt(int fd, char *cmdline);"
226 echo "/** \file $file_name.h $header_comment */"
228 echo "extern struct $array_type $array_name[];"
231 if test $ret -lt 0; then
234 if test $ret -eq 0; then