/*
- * Copyright (C) 1998-2014 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998 Andre Noll <maan@tuebingen.mpg.de>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
#include "ggo.h"
#include "version.h"
-INIT_FADE_ERRLISTS;
+/** Array of error strings. */
+DEFINE_PARA_ERRLIST;
+
static struct fade_args_info conf;
enum mixer_id {MIXER_ENUM};
if (ret < 0)
goto out;
vol = ret;
- PARA_NOTICE_LOG("fading %s from %d to %d in %d seconds\n",
+ PARA_NOTICE_LOG("fading %s from %d to %d in %u seconds\n",
conf.mixer_channel_arg, vol, new_vol, secs);
diff = new_vol - vol;
if (!diff) {
tm = localtime(&t1);
}
wake_time_epoch = mktime(tm);
- PARA_INFO_LOG("waketime: %s", asctime(tm));
+ PARA_INFO_LOG("waketime: %d:%02d\n", tm->tm_hour, tm->tm_min);
client_cmd("stop");
sleep(1);
if (fot) {
exit(0);
}
+/**
+ * The main function of para_fade.
+ *
+ * The executable is linked with the alsa or the oss mixer API, or both. It has
+ * a custom log function which prefixes log messages with the current date.
+ *
+ * \param argc Argument counter.
+ * \param argv Argument vector.
+ *
+ * \return EXIT_SUCCESS or EXIT_FAILURE.
+ */
int main(int argc, char *argv[])
{
int ret;