diff options
author | Christian Hesse <mail@eworm.de> | 2015-05-19 11:48:11 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2015-05-19 11:48:11 +0200 |
commit | 4759f3008c87708a16b07d189f445069e2caa357 (patch) | |
tree | 98e4a3b9fdd9d62d657078de19b8ebee979c2333 | |
parent | a098ca41eb72ab5b1105e54e6fbaa71069b0ef1b (diff) | |
download | journal-notify-4759f3008c87708a16b07d189f445069e2caa357.tar.gz journal-notify-4759f3008c87708a16b07d189f445069e2caa357.tar.zst |
use more generic variable names
-rw-r--r-- | journal-notify.c | 16 | ||||
-rw-r--r-- | journal-notify.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/journal-notify.c b/journal-notify.c index 1a737bd..18e16d2 100644 --- a/journal-notify.c +++ b/journal-notify.c @@ -26,16 +26,16 @@ const static struct option options_long[] = { }; /*** notify ***/ -int notify(const char * summary, const char * body, const char * icon, +int notify(const char * identifier, const char * message, const char * icon, int timeout, uint8_t urgency) { NotifyNotification * notification; int rc = -1; notification = #if NOTIFY_CHECK_VERSION(0, 7, 0) - notify_notification_new(summary, body, icon); + notify_notification_new(identifier, message, icon); #else - notify_notification_new(summary, body, icon, NULL); + notify_notification_new(identifier, message, icon, NULL); #endif if (notification == NULL) @@ -72,7 +72,7 @@ int main(int argc, char **argv) { const void * data; size_t length; - char * summary, * message; + char * identifier, * message; const char * icon = DEFAULTICON; int timeout = -1; uint8_t urgency; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { fprintf(stderr, "Failed to read syslog identifier field: %s\n", strerror(-rc)); continue; } - summary = g_markup_escape_text(data + 18, length - 18); + identifier = g_markup_escape_text(data + 18, length - 18); /* get PRIORITY field */ if ((rc = sd_journal_get_data(journal, "PRIORITY", &data, &length)) < 0) { @@ -255,9 +255,9 @@ int main(int argc, char **argv) { if (have_regex == 0 || regexec(®ex, message, 0, NULL, 0) == 0) { for (i = 0; i < 3; i++) { if (verbose > 0) - printf("Showing notification: %s: %s\n", summary, message); + printf("Showing notification: %s: %s\n", identifier, message); - if ((rc = notify(summary, message, icon, timeout, urgency)) == 0) + if ((rc = notify(identifier, message, icon, timeout, urgency)) == 0) break; fprintf(stderr, "Failed to show notification, reinitializing libnotify.\n"); @@ -272,7 +272,7 @@ int main(int argc, char **argv) { goto out40; } - free(summary); + free(identifier); free(message); } diff --git a/journal-notify.h b/journal-notify.h index 6be2b5f..159b2fe 100644 --- a/journal-notify.h +++ b/journal-notify.h @@ -26,7 +26,7 @@ #define DEFAULTICON "dialog-information" /*** notify ***/ -int notify(const char * summary, const char * body, const char * icon, +int notify(const char * identifier, const char * message, const char * icon, int timeout, uint8_t urgency); /*** main ***/ |