/*
- * Copyright (C) 1998-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998-2012 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
#include "fd.h"
#include "string.h"
#include "error.h"
+#include "version.h"
INIT_FADE_ERRLISTS;
static struct fade_args_info conf;
-__printf_2_3 void para_log(__a_unused int ll, const char *fmt, ...)
+__printf_2_3 void date_log(__a_unused int ll, const char *fmt, ...)
{
va_list argp;
time_t t1;
vprintf(fmt, argp);
va_end(argp);
}
+__printf_2_3 void (*para_log)(int, const char*, ...) = date_log;
/*
* Open the mixer device.
client_cmd("stop");
if (!afs_mode)
return;
- cmd = make_message("select %s\n", afs_mode);
+ cmd = make_message("select %s", afs_mode);
client_cmd(cmd);
free(cmd);
client_cmd("play");
static int snooze(void)
{
int ret;
- unsigned sleep_time;
if (conf.so_time_arg <= 0)
return 1;
- sleep_time = conf.so_time_arg;
if (open_and_get_mixer_channel() < conf.so_vol_arg)
ret = open_and_set_mixer_channel(conf.so_vol_arg);
else
return ret;
client_cmd("pause");
PARA_NOTICE_LOG("%d seconds snooze time...\n", conf.snooze_time_arg);
- sleep(sleep_time);
+ sleep(conf.snooze_time_arg);
client_cmd("play");
return fade(conf.si_vol_arg, conf.si_time_arg);
}