From 42e7128fb24d4f9bf1bd20bc2c4dcf7a7e269276 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 22 Apr 2018 01:09:04 +0200 Subject: [PATCH] Add debugging code --- src/applets/cpufreq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/applets/cpufreq.c b/src/applets/cpufreq.c index 989d880..70b7cb4 100644 --- a/src/applets/cpufreq.c +++ b/src/applets/cpufreq.c @@ -111,6 +111,9 @@ static Cpufreq * _cpufreq_init(PanelAppletHelper * helper, GtkWidget ** widget) error_set("%s: %s", applet.name, _("No support detected")); return NULL; } +#ifdef DEBUG + fprintf(stderr, "DEBUG: %s() \"%s\"\n", __func__, p); +#endif if((cpufreq = malloc(sizeof(*cpufreq))) == NULL) { error_set("%s: %s", applet.name, strerror(errno)); @@ -192,6 +195,9 @@ static gboolean _cpufreq_on_timeout(gpointer data) } if(cpufreq->current == freq) return TRUE; +#ifdef DEBUG + fprintf(stderr, "DEBUG: %s() %d\n", __func__, freq); +#endif cpufreq->current = freq; snprintf(buf, sizeof(buf), "%4" PRId64, cpufreq->current); gtk_label_set_text(GTK_LABEL(cpufreq->label), buf);