X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fade.c;h=67dc4d5494c13ea8d6d167d56502b5818146bcff;hp=2ade4710b11c2e56972cb9c86c8cfd9a95a9f64e;hb=21c6e0b09b42e61e72b741bd726856ab0bcd1d64;hpb=53d5ac455d0616a5ee8867c986631ed34c177a42 diff --git a/fade.c b/fade.c index 2ade4710..67dc4d54 100644 --- a/fade.c +++ b/fade.c @@ -69,7 +69,7 @@ static int fade(struct mixer *m, struct mixer_handle *h, int new_vol, int fade_t 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) { @@ -205,7 +205,7 @@ static int sweet_dreams(struct mixer *m, struct mixer_handle *h) tm = localtime(&t1); } wake_time_epoch = mktime(tm); - PARA_INFO_LOG("waketime: %u:%02u\n", tm->tm_hour, tm->tm_min); + PARA_INFO_LOG("waketime: %d:%02d\n", tm->tm_hour, tm->tm_min); client_cmd("stop"); sleep(1); if (fot) { @@ -335,6 +335,17 @@ __noreturn static void print_help_and_die(void) 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;