+BN: afs
OF: afs_command_list
SF: afs.c aft.c attribute.c
AT: server_command
+BN: audiod
OF: audiod_command_list
SF: audiod_command.c
AT: audiod_command
extern struct sched sched;
extern char *stat_item_values[NUM_STAT_ITEMS];
+
+struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY};
+
/** Iterate over the array of all audiod commands. */
#define FOR_EACH_COMMAND(c) for (c = 0; audiod_cmds[c].name; c++)
#include "signal.h"
#include "version.h"
+struct server_command afs_cmds[] = {DEFINE_AFS_CMD_ARRAY};
+struct server_command server_cmds[] = {DEFINE_SERVER_CMD_ARRAY};
+
/** Commands including options must be shorter than this. */
#define MAX_COMMAND_LEN 32768
---)
break
;;
+ BN:)
+ base_name="$value"
+ ;;
OF:)
output_file="$value"
array_name=${value%command_list}cmds
usage_txt=$(echo "$t_usage" | $sed_cmd)
help_txt=$(printf "%s\n" "$t_help" | $sed_cmd)
prototype=$(echo "$template_prototype" | $sed_cmd)
+ result=
$1
loop_result="$loop_result$result"
done
result="$loop_result"
+ # reset global variables
+ name_txt="$t_name"
+ perms_txt="$t_perms"
+ desc_txt="$t_desc"
+ usage_txt="$t_usage"
+ help_txt="$t_help"
+ source_files="$t_source_files"
}
com_c_file()
com_header()
{
+ local array_members CR='
+'
+
echo "extern struct $array_type $array_name[];"
while : ; do
read_one_command
if test $template -eq 0; then
make_proto
printf "%s" "$result"
+ make_array_member
+ array_members="$array_members$result"
continue
fi
template_loop make_proto
printf "%s" "$result"
+ template_loop make_array_member
+ array_members="$array_members$result"
done
+ array_members="$array_members{.name = NULL} \\$CR"
+ echo "#define DEFINE_$(tr 'a-z' 'A-Z' <<< "$base_name")_CMD_ARRAY $array_members"
}
com_completion()
dccp_recv recv_common write_common file_write audiod_command
client_common recv stdout filter stdin audioc write client
exec send_common ggo udp_recv color fec fecdec_filter
- prebuffer_filter audiod_command_list bitstream imdct
+ prebuffer_filter bitstream imdct
wma_afh wma_common wmadec_filter buffer_tree crypt_common
gui gui_theme sideband"
audiod_errlist_objs="audiod signal string daemon stat net crypt_common sideband
time grab_client filter_common wav_filter compress_filter amp_filter http_recv dccp_recv
recv_common fd sched write_common file_write audiod_command fecdec_filter
- client_common ggo udp_recv color fec prebuffer_filter audiod_command_list
+ client_common ggo udp_recv color fec prebuffer_filter
bitstream imdct wma_common wmadec_filter buffer_tree"
audiod_ldflags="-lm"
audiod_audio_formats="wma"
string signal time daemon http_send close_on_fork mm
crypt_common ipc dccp_send fd user_list chunk_queue
afs aft mood score attribute blob playlist sched acl
- send_common udp_send color fec server_command_list
- afs_command_list wma_afh wma_common sideband"
-
+ send_common udp_send color fec wma_afh wma_common sideband"
all_errlist_objs="$all_errlist_objs server vss command
http_send close_on_fork mm ipc dccp_send user_list
chunk_queue afs aft mood score attribute blob playlist
- acl udp_send server_command_list afs_command_list"
+ acl udp_send"
server_ldflags=""
server_audio_formats="mp3 wma"
#define COLOR_ERRORS
#define SIGNAL_ERRORS
#define FADE_ERRORS
-#define SERVER_COMMAND_LIST_ERRORS
-#define AFS_COMMAND_LIST_ERRORS
-#define AUDIOD_COMMAND_LIST_ERRORS
#define STDOUT_ERRORS
#define FILE_WRITE_ERRORS
#define STDIN_ERRORS
+BN: server
OF: server_command_list
SF: command.c
AT: server_command