From: Andre Noll Date: Thu, 28 Jun 2012 02:45:09 +0000 (+0200) Subject: command_util: Remove code for generating .c files. X-Git-Tag: v0.4.11~10^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=ad386453c0a3153783cb8f506f668118e58d0a32;ds=sidebyside command_util: Remove code for generating .c files. 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. --- diff --git a/.gitignore b/.gitignore index d337367b..141424f0 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ Makefile.deps TODO NONE aclocal.m4 -*_command_list.c *_command_list.h *_command_list.man paraslash-git.tar.bz2 diff --git a/Doxyfile b/Doxyfile index 83973cfb..3fed0c2e 100644 --- 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 diff --git a/Makefile.in b/Makefile.in index 30a5c015..88d15932 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 e2295272..f0bd26f1 100644 --- 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 --- diff --git a/audiod.cmd b/audiod.cmd index 04c8f624..6c99d4c7 100644 --- a/audiod.cmd +++ b/audiod.cmd @@ -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 diff --git a/command_util.sh b/command_util.sh index abae4ec2..1530aee7 100755 --- a/command_util.sh +++ b/command_util.sh @@ -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 ;; diff --git a/server.cmd b/server.cmd index a80e2312..83097f1f 100644 --- a/server.cmd +++ b/server.cmd @@ -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