diff options
author | B. Watson <yalhcru@gmail.com> | 2016-08-16 04:21:07 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-08-20 07:50:03 +0700 |
commit | f186f2a2e350259164f978456b1aed456cdfa2d5 (patch) | |
tree | 3aac3c2e05a8dc74fc5ee9b14fc925c989a8a00f /desktop/wmtimer/compilefix.diff | |
parent | 787c93b8a8208711b3f5cba99e89e1f736e7874e (diff) | |
download | slackbuilds-f186f2a2e350259164f978456b1aed456cdfa2d5.tar.gz |
desktop/wmtimer: New maintainer, minor fixes.
Diffstat (limited to 'desktop/wmtimer/compilefix.diff')
-rw-r--r-- | desktop/wmtimer/compilefix.diff | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/desktop/wmtimer/compilefix.diff b/desktop/wmtimer/compilefix.diff new file mode 100644 index 0000000000..f8776af623 --- /dev/null +++ b/desktop/wmtimer/compilefix.diff @@ -0,0 +1,60 @@ +diff -Naur wmtimer-2.92.orig/wmtimer/wmtimer.c wmtimer-2.92/wmtimer/wmtimer.c +--- wmtimer-2.92.orig/wmtimer/wmtimer.c 2004-01-28 21:45:48.000000000 -0500 ++++ wmtimer-2.92/wmtimer/wmtimer.c 2016-08-16 04:10:54.620304460 -0400 +@@ -5,6 +5,8 @@ + #include <string.h> + #include <time.h> + #include <unistd.h> ++#include <stdlib.h> ++#include <ctype.h> + + #include <sys/wait.h> + #include <sys/param.h> +@@ -55,11 +57,6 @@ + int delete_event(GtkWidget *widget, GdkEvent *event, gpointer data); + void destroy(GtkWidget *widget, gpointer data); + +-// Functions to avoid 'implicit declaration' warnings +-int atoi(); +-char toupper(); +- +- + /******************************************************************************* + * Globals + ******************************************************************************/ +@@ -568,20 +565,21 @@ + ******************************************************************************/ + void callback(GtkWidget * widget, gpointer data) + { +- if ((char *) data == "alarm_button") ++ char *arg = (char *)data; ++ if (strcmp(arg, "alarm_button") == 0) + tmpMode = ALARM; +- else if ((char *) data == "timer_button") ++ else if (strcmp(arg, "timer_button") == 0) + tmpMode = TIMER; +- else if ((char *) data == "chrono_button") ++ else if (strcmp(arg, "chrono_button") == 0) + tmpMode = CHRONO; +- else if ((char *) data == "bell_button") ++ else if (strcmp(arg, "bell_button") == 0) + { + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) + tmpAction.bell = 1; + else + tmpAction.bell = 0; + } +- else if ((char *) data == "command_button") ++ else if (strcmp(arg, "command_button") == 0) + { + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) + { +@@ -596,7 +594,7 @@ + gtk_entry_set_editable(GTK_ENTRY (entry), FALSE); + } + } +- else if ((char *) data == "ok") ++ else if (strcmp(arg, "ok") == 0) + { + if (tmpAction.command) + strcpy(command, gtk_entry_get_text(GTK_ENTRY (entry))); |