X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command_util.sh;h=847f87e4ccdd379330c36ed27dc65db4ecc96edb;hp=44b4ee1856e5eee158b7d108a171abf5077712a7;hb=75d545612d8fb51b7e6b2f8a7349b54502004cfa;hpb=a9126f461792a84c760162ecb25100f1593d427d diff --git a/command_util.sh b/command_util.sh index 44b4ee18..847f87e4 100755 --- a/command_util.sh +++ b/command_util.sh @@ -63,7 +63,6 @@ read_one_command() usage_txt="" help_txt="" perms_txt="" - line_handler=0 template=0 template_name="" template_prototype="" @@ -90,9 +89,6 @@ read_one_command() D:) desc_txt="$value" ;; - L:) - line_handler=1 - ;; U:) usage_txt="$value" ;; @@ -204,13 +200,13 @@ dump_proto() echo '/**' echo " * $desc_txt" echo ' *' - echo ' * \param rc4c The rc4 crypt context.' - if test $line_handler -eq 0; then - echo ' * \param argc The number of arguments.' - echo ' * \param argv The argument vector.' + if [[ "$system_includes" =~ openssl/rc4.h ]]; then + echo ' * \param rc4c The rc4 crypt context.' else - echo ' * \param cmdline The full command line.' + echo ' * \param fd The file descriptor to send output to.' fi + echo ' * \param argc The number of arguments.' + echo ' * \param argv The argument vector.' echo ' * ' echo " * Usage: $usage_txt" echo ' * ' @@ -233,21 +229,18 @@ dump_proto() dump_array_member() { + local TAB=' ' echo '{' echo ".name = \"$name_txt\"," - if test $line_handler -eq 0; then - echo ".handler = com_$name_txt," - else - echo ".handler = NULL," - echo ".line_handler = com_$name_txt," - fi + echo ".handler = com_$name_txt," if test -n "$perms_txt"; then echo ".perms = $perms_txt," fi echo ".description = \"$desc_txt\"," echo ".usage = \"$usage_txt\"," echo ".help = " - printf "%s\n" "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g' + printf "%s\n" "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g' \ + -e "s/$TAB/\\\t/g" echo '},' }