]> git.tuebingen.mpg.de Git - paraslash.git/commit
command_util.bash: Kill make_proto().
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Jan 2015 23:52:02 +0000 (00:52 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:47 +0000 (23:23 +0200)
commit6aea41e619e9ec72167483465ca959715faa8e55
treed5e4f243014dd1c36517296c1dfa5c09f1c6b4e4
parentc781b528c69927871c62cff33e94c87ce251bde9
command_util.bash: Kill make_proto().

It is always a bad idea to parse C code with a regex in a script. In
addition, it is completely unnecessary in this case.

This commit changes command_util.bash to define, in addition to the
old XXX_CMD_ARRAY, another preprocessor macro XXX__COMMAND_HANDLERS
containing the comma separated list of command handlers without
any type information instead of grepping the source files. A simple
typedef is used to declare all command handlers.

Avoiding all the grep/sed calls reduces the (warm cache) make dep
time by ~10%.
audiod_command.c
command.c
command_util.bash
play.c