command_util: Remove code for generating .c files.
[paraslash.git] / command_util.sh
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
                ;;