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 d337367..141424f 100644 (file)
@@ -18,7 +18,6 @@ Makefile.deps
 TODO
 NONE
 aclocal.m4
-*_command_list.c
 *_command_list.h
 *_command_list.man
 paraslash-git.tar.bz2
index 83973cf..3fed0c2 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -623,7 +623,7 @@ EXCLUDE_PATTERNS       = *.cmdline.* \
                          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
index 30a5c01..88d1593 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))))))))))))))))))))))))))
 
-%_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 < $< >$@
diff --git a/afs.cmd b/afs.cmd
index e229527..f0bd26f 100644 (file)
--- a/afs.cmd
+++ b/afs.cmd
@@ -1,9 +1,5 @@
 BN: afs
-OF: afs_command_list
 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
 ---
index 04c8f62..6c99d4c 100644 (file)
@@ -1,8 +1,5 @@
 BN: audiod
-OF: audiod_command_list
 SF: audiod_command.c
-AT: audiod_command
-IN: list para sched audiod
 SN: list of audiod commands
 ---
 N: cycle
index abae4ec..1530aee 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/env bash
 
-
 read_header()
 {
        local key value i
@@ -13,30 +12,9 @@ read_header()
                BN:)
                        base_name="$value"
                        ;;
-               OF:)
-                       output_file="$value"
-                       array_name=${value%command_list}cmds
-                       ;;
                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"
                        ;;
@@ -44,10 +22,6 @@ read_header()
                        template_members="$value"
                esac
        done
-       if test -z "$output_file"; then
-               echo "header error" 1&>2
-               exit 1
-       fi
 }
 
 read_one_command()
@@ -265,36 +239,11 @@ template_loop()
        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='
 '
 
-       echo "extern struct $array_type $array_name[];"
        while : ; do
                read_one_command
                if test $ret -lt 0; then
@@ -346,9 +295,6 @@ read_header
 arg="$1"
 shift
 case "$arg" in
-       "c")
-               com_c_file
-               ;;
        "h")
                com_header
                ;;
index a80e231..83097f1 100644 (file)
@@ -1,9 +1,5 @@
 BN: server
-OF: server_command_list
 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