command_util: Remove code for generating .c files.
authorAndre Noll <maan@systemlinux.org>
Thu, 28 Jun 2012 02:45:09 +0000 (04:45 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 29 Jun 2012 19:36:31 +0000 (21:36 +0200)
Now that the *_command_list.c files are no longer needed we may remove
this mode from command_util.sh. This makes quite a few headers of
the .cmd files unused, so these can be removed as well.

.gitignore
Doxyfile
Makefile.in
afs.cmd
audiod.cmd
command_util.sh
server.cmd

index d337367bfe0325eeb6caa6b6f6982eb35bdb14c2..141424f058ffadc11a675bb511d4e712c794cb84 100644 (file)
@@ -18,7 +18,6 @@ Makefile.deps
 TODO
 NONE
 aclocal.m4
 TODO
 NONE
 aclocal.m4
-*_command_list.c
 *_command_list.h
 *_command_list.man
 paraslash-git.tar.bz2
 *_command_list.h
 *_command_list.man
 paraslash-git.tar.bz2
index 83973cfb9dc23c6d6eaacb2efe7406c74d6b5d73..3fed0c2e759c155e90534bc6f092f967f2a67f5c 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -623,7 +623,7 @@ EXCLUDE_PATTERNS       = *.cmdline.* \
                          gcc-compat.h \
                          fade.c \
                          config.h \
                          gcc-compat.h \
                          fade.c \
                          config.h \
-                       *_command_list.[ch] \
+                       *_command_list.h \
                        *_completion.h
 
 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
                        *_completion.h
 
 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
index 30a5c015a6f982dd5703aa51498aa89eda347b4e..88d15932799c151ab8dac8df25a9561480b7bf5a 100644 (file)
@@ -119,9 +119,6 @@ $(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,\
 $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\
 $(subst z,Z,$1))))))))))))))))))))))))))
 
 $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\
 $(subst z,Z,$1))))))))))))))))))))))))))
 
-%_command_list.c: %.cmd
-       @[ -z "$(Q)" ] || echo 'GEN $@'
-       $(Q) ./command_util.sh c < $< >$@
 %_command_list.h: %.cmd
        @[ -z "$(Q)" ] || echo 'GEN $@'
        $(Q) ./command_util.sh h < $< >$@
 %_command_list.h: %.cmd
        @[ -z "$(Q)" ] || echo 'GEN $@'
        $(Q) ./command_util.sh h < $< >$@
diff --git a/afs.cmd b/afs.cmd
index e2295272c1ef5b3c07a0c1e237a9da7a6dbaea02..f0bd26f1a1bef059126b362478526081e68e3743 100644 (file)
--- a/afs.cmd
+++ b/afs.cmd
@@ -1,9 +1,5 @@
 BN: afs
 BN: afs
-OF: afs_command_list
 SF: afs.c aft.c attribute.c
 SF: afs.c aft.c attribute.c
-AT: server_command
-SI: osl regex
-IN: para error crypt sideband command string afh afs server list user_list
 SN: list of afs commands
 TM: mood lyr img pl
 ---
 SN: list of afs commands
 TM: mood lyr img pl
 ---
index 04c8f6248dcc5bdd8032ca831eadafe0741ffb30..6c99d4c7d272e73e686bc8a9cd1d5832b3bdf9de 100644 (file)
@@ -1,8 +1,5 @@
 BN: audiod
 BN: audiod
-OF: audiod_command_list
 SF: audiod_command.c
 SF: audiod_command.c
-AT: audiod_command
-IN: list para sched audiod
 SN: list of audiod commands
 ---
 N: cycle
 SN: list of audiod commands
 ---
 N: cycle
index abae4ec2b74c84e925c0297900c01c3dfb3c553a..1530aee7333ea03a1b2748d85d60ce68c2eae2dd 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/env bash
 
 #!/usr/bin/env bash
 
-
 read_header()
 {
        local key value i
 read_header()
 {
        local key value i
@@ -13,30 +12,9 @@ read_header()
                BN:)
                        base_name="$value"
                        ;;
                BN:)
                        base_name="$value"
                        ;;
-               OF:)
-                       output_file="$value"
-                       array_name=${value%command_list}cmds
-                       ;;
                SF:)
                        source_files="$value"
                        ;;
                SF:)
                        source_files="$value"
                        ;;
-               AT:)
-                       array_type="$value"
-                       ;;
-               SI:)
-                       for i in $value; do
-                               system_includes="$system_includes
-#include <$i.h>"
-                       done
-                       ;;
-               IN:)
-                       for i in $value; do
-                               includes="$includes
-#include \"$i.h\""
-                       done
-                       includes="$includes
-#include \"$output_file.h\""
-                       ;;
                SN:)
                        section_name="$value"
                        ;;
                SN:)
                        section_name="$value"
                        ;;
@@ -44,10 +22,6 @@ read_header()
                        template_members="$value"
                esac
        done
                        template_members="$value"
                esac
        done
-       if test -z "$output_file"; then
-               echo "header error" 1&>2
-               exit 1
-       fi
 }
 
 read_one_command()
 }
 
 read_one_command()
@@ -265,36 +239,11 @@ template_loop()
        source_files="$t_source_files"
 }
 
        source_files="$t_source_files"
 }
 
-com_c_file()
-{
-       echo "$system_includes"
-       echo "$includes"
-       echo "struct $array_type $array_name[] = {"
-       while : ; do
-               read_one_command
-               if test $ret -lt 0; then
-                       exit 1
-               fi
-               if test $ret -eq 0; then
-                       break
-               fi
-               if test $template -eq 0; then
-                       make_array_member
-                       printf "%s" "$result"
-                       continue
-               fi
-               template_loop make_array_member
-               printf "%s" "$result"
-       done
-       echo '{.name = NULL}};'
-}
-
 com_header()
 {
        local array_members CR='
 '
 
 com_header()
 {
        local array_members CR='
 '
 
-       echo "extern struct $array_type $array_name[];"
        while : ; do
                read_one_command
                if test $ret -lt 0; then
        while : ; do
                read_one_command
                if test $ret -lt 0; then
@@ -346,9 +295,6 @@ read_header
 arg="$1"
 shift
 case "$arg" in
 arg="$1"
 shift
 case "$arg" in
-       "c")
-               com_c_file
-               ;;
        "h")
                com_header
                ;;
        "h")
                com_header
                ;;
index a80e2312a00606724222e67965f24298def2d857..83097f1f2862a719d0b002c229d3b8fc102e5f8e 100644 (file)
@@ -1,9 +1,5 @@
 BN: server
 BN: server
-OF: server_command_list
 SF: command.c
 SF: command.c
-AT: server_command
-SI: osl regex
-IN: para error crypt sideband command string afh afs server list user_list
 SN: list of server commands
 ---
 N: ff
 SN: list of server commands
 ---
 N: ff