diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-21 06:13:36 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-21 06:13:36 +0800 |
commit | e9a7215277ccb59d126cd0981d148744068ed148 (patch) | |
tree | 16ce2125e88d3cd92a10f7eded7c4ae958455a69 | |
parent | 3acbe7a46f8c3af807ed56b997e2995e45a2fafe (diff) | |
download | gsoc2013-evolution-e9a7215277ccb59d126cd0981d148744068ed148.tar.gz gsoc2013-evolution-e9a7215277ccb59d126cd0981d148744068ed148.tar.zst gsoc2013-evolution-e9a7215277ccb59d126cd0981d148744068ed148.zip |
Fix compiler warnings - Federico
svn path=/trunk/; revision=170
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/alarm.h | 2 | ||||
-rw-r--r-- | calendar/cal-util/calobj.c | 9 | ||||
-rw-r--r-- | calendar/calendar.c | 3 | ||||
-rw-r--r-- | calendar/calobj.c | 9 | ||||
-rw-r--r-- | calendar/eventedit.c | 5 | ||||
-rw-r--r-- | calendar/gncal-full-day.c | 1 | ||||
-rw-r--r-- | calendar/gnome-cal.c | 3 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm.h | 2 | ||||
-rw-r--r-- | calendar/gui/alarm.h | 2 | ||||
-rw-r--r-- | calendar/gui/calendar.c | 3 | ||||
-rw-r--r-- | calendar/gui/eventedit.c | 5 | ||||
-rw-r--r-- | calendar/gui/gncal-full-day.c | 1 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 3 | ||||
-rw-r--r-- | calendar/gui/main.c | 6 | ||||
-rw-r--r-- | calendar/gui/view-utils.c | 1 | ||||
-rw-r--r-- | calendar/main.c | 6 | ||||
-rw-r--r-- | calendar/pcs/calobj.c | 9 | ||||
-rw-r--r-- | calendar/timeutil.c | 1 | ||||
-rw-r--r-- | calendar/timeutil.h | 5 | ||||
-rw-r--r-- | calendar/view-utils.c | 1 |
21 files changed, 45 insertions, 37 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b0943c052f..c89a0336a1 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +1998-04-20 Federico Mena Quintero <federico@nuclecu.unam.mx> + + * calobj.c (duration_callback): Pass the correct pointer type to + is_date_in_list(). + 1998-04-20 Miguel de Icaza <miguel@nuclecu.unam.mx> * calobj.c (duration_callback): Take exception dates into diff --git a/calendar/alarm.h b/calendar/alarm.h index 39f7281ce7..079eb79121 100644 --- a/calendar/alarm.h +++ b/calendar/alarm.h @@ -1,6 +1,8 @@ #ifndef ALARM_H #define ALARM_H +#include <time.h> + typedef void (*AlarmFunction)(time_t time, void *closuse); void alarm_init (void); diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c index b57f660a7b..60cb2f29d5 100644 --- a/calendar/cal-util/calobj.c +++ b/calendar/cal-util/calobj.c @@ -928,7 +928,7 @@ generate (iCalObject *ico, time_t reference, calendarfn cb, void *closure) s_t = mktime (&dt_start); if (ico->exdate && is_date_in_list (ico->exdate, &dt_start)) - return; + return 1; e_t = mktime (&dt_end); @@ -1111,9 +1111,12 @@ static int duration_callback (iCalObject *ico, time_t start, time_t end, void *closure) { int *count = closure; + struct tm *tm; - if (ico->exdate && is_date_in_list (ico->exdate, &start)) - return; + tm = localtime (&start); + + if (ico->exdate && is_date_in_list (ico->exdate, tm)) + return 1; (*count)++; if (ico->recur->duration == *count) { diff --git a/calendar/calendar.c b/calendar/calendar.c index a32efae1e0..c9cc4fe984 100644 --- a/calendar/calendar.c +++ b/calendar/calendar.c @@ -14,6 +14,7 @@ #include <config.h> +#include "alarm.h" #include "calendar.h" #include "timeutil.h" #include "versit/vcc.h" @@ -64,7 +65,6 @@ add_alarm (iCalObject *obj, time_t start, time_t end, void *closure) void ical_object_try_alarms (iCalObject *obj) { - GList *alarms, *p; int ao, po, od, mo; int max_o; @@ -83,7 +83,6 @@ ical_object_try_alarms (iCalObject *obj) void calendar_add_alarms (Calendar *cal) { - time_t now = time (NULL); GList *events = cal->events; for (; events; events=events->next) diff --git a/calendar/calobj.c b/calendar/calobj.c index b57f660a7b..60cb2f29d5 100644 --- a/calendar/calobj.c +++ b/calendar/calobj.c @@ -928,7 +928,7 @@ generate (iCalObject *ico, time_t reference, calendarfn cb, void *closure) s_t = mktime (&dt_start); if (ico->exdate && is_date_in_list (ico->exdate, &dt_start)) - return; + return 1; e_t = mktime (&dt_end); @@ -1111,9 +1111,12 @@ static int duration_callback (iCalObject *ico, time_t start, time_t end, void *closure) { int *count = closure; + struct tm *tm; - if (ico->exdate && is_date_in_list (ico->exdate, &start)) - return; + tm = localtime (&start); + + if (ico->exdate && is_date_in_list (ico->exdate, tm)) + return 1; (*count)++; if (ico->recur->duration == *count) { diff --git a/calendar/eventedit.c b/calendar/eventedit.c index 94096841db..d711be4055 100644 --- a/calendar/eventedit.c +++ b/calendar/eventedit.c @@ -1151,11 +1151,6 @@ ee_rp_init_rule (EventEditor *ee) } static void -sensitize_by_toggle (GtkToggleButton *toggle, gpointer data) -{ -} - -static void ee_rp_init_ending_date (EventEditor *ee) { GtkWidget *frame; diff --git a/calendar/gncal-full-day.c b/calendar/gncal-full-day.c index c18866957b..28815bbfe6 100644 --- a/calendar/gncal-full-day.c +++ b/calendar/gncal-full-day.c @@ -343,7 +343,6 @@ new_appointment (GtkWidget *widget, gpointer data) GncalFullDay *fullday; GtkWidget *ee; iCalObject *ico; - time_t lower, upper; fullday = GNCAL_FULL_DAY (data); diff --git a/calendar/gnome-cal.c b/calendar/gnome-cal.c index af7b801f94..a7b5402e0d 100644 --- a/calendar/gnome-cal.c +++ b/calendar/gnome-cal.c @@ -8,6 +8,7 @@ #include <gnome.h> #include <unistd.h> #include <signal.h> +#include <sys/wait.h> #include "calendar.h" #include "gnome-cal.h" #include "gncal-full-day.h" @@ -319,7 +320,7 @@ execute (char *command, int close_standard) sigaction (SIGINT, &save_intr, NULL); sigaction (SIGQUIT, &save_quit, NULL); - for (i = (close_standard ? 0 : 3); i < 4096; i++) + for (i = (close_standard ? 0 : 3); i < top; i++) close (i); /* FIXME: As an excercise to the reader, copy the diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h index 39f7281ce7..079eb79121 100644 --- a/calendar/gui/alarm-notify/alarm.h +++ b/calendar/gui/alarm-notify/alarm.h @@ -1,6 +1,8 @@ #ifndef ALARM_H #define ALARM_H +#include <time.h> + typedef void (*AlarmFunction)(time_t time, void *closuse); void alarm_init (void); diff --git a/calendar/gui/alarm.h b/calendar/gui/alarm.h index 39f7281ce7..079eb79121 100644 --- a/calendar/gui/alarm.h +++ b/calendar/gui/alarm.h @@ -1,6 +1,8 @@ #ifndef ALARM_H #define ALARM_H +#include <time.h> + typedef void (*AlarmFunction)(time_t time, void *closuse); void alarm_init (void); diff --git a/calendar/gui/calendar.c b/calendar/gui/calendar.c index a32efae1e0..c9cc4fe984 100644 --- a/calendar/gui/calendar.c +++ b/calendar/gui/calendar.c @@ -14,6 +14,7 @@ #include <config.h> +#include "alarm.h" #include "calendar.h" #include "timeutil.h" #include "versit/vcc.h" @@ -64,7 +65,6 @@ add_alarm (iCalObject *obj, time_t start, time_t end, void *closure) void ical_object_try_alarms (iCalObject *obj) { - GList *alarms, *p; int ao, po, od, mo; int max_o; @@ -83,7 +83,6 @@ ical_object_try_alarms (iCalObject *obj) void calendar_add_alarms (Calendar *cal) { - time_t now = time (NULL); GList *events = cal->events; for (; events; events=events->next) diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c index 94096841db..d711be4055 100644 --- a/calendar/gui/eventedit.c +++ b/calendar/gui/eventedit.c @@ -1151,11 +1151,6 @@ ee_rp_init_rule (EventEditor *ee) } static void -sensitize_by_toggle (GtkToggleButton *toggle, gpointer data) -{ -} - -static void ee_rp_init_ending_date (EventEditor *ee) { GtkWidget *frame; diff --git a/calendar/gui/gncal-full-day.c b/calendar/gui/gncal-full-day.c index c18866957b..28815bbfe6 100644 --- a/calendar/gui/gncal-full-day.c +++ b/calendar/gui/gncal-full-day.c @@ -343,7 +343,6 @@ new_appointment (GtkWidget *widget, gpointer data) GncalFullDay *fullday; GtkWidget *ee; iCalObject *ico; - time_t lower, upper; fullday = GNCAL_FULL_DAY (data); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index af7b801f94..a7b5402e0d 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -8,6 +8,7 @@ #include <gnome.h> #include <unistd.h> #include <signal.h> +#include <sys/wait.h> #include "calendar.h" #include "gnome-cal.h" #include "gncal-full-day.h" @@ -319,7 +320,7 @@ execute (char *command, int close_standard) sigaction (SIGINT, &save_intr, NULL); sigaction (SIGQUIT, &save_quit, NULL); - for (i = (close_standard ? 0 : 3); i < 4096; i++) + for (i = (close_standard ? 0 : 3); i < top; i++) close (i); /* FIXME: As an excercise to the reader, copy the diff --git a/calendar/gui/main.c b/calendar/gui/main.c index 92c68898e8..00c13edb16 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -12,10 +12,12 @@ #include <pwd.h> #include <sys/types.h> +#include "alarm.h" #include "calendar.h" #include "eventedit.h" #include "gnome-cal.h" #include "main.h" +#include "timeutil.h" /* The username, used to set the `owner' field of the event */ char *user_name; @@ -439,6 +441,8 @@ dump_events (void) exit (0); } +extern time_t get_date (); + static error_t parse_an_arg (int key, char *arg, struct argp_state *state) { @@ -477,8 +481,6 @@ static struct argp parser = int main(int argc, char *argv[]) { - GnomeClient *client; - argp_program_version = VERSION; bindtextdomain(PACKAGE, GNOMELOCALEDIR); diff --git a/calendar/gui/view-utils.c b/calendar/gui/view-utils.c index 0c074bd944..a6c7676885 100644 --- a/calendar/gui/view-utils.c +++ b/calendar/gui/view-utils.c @@ -37,7 +37,6 @@ view_utils_draw_events (GtkWidget *widget, GdkWindow *window, GdkGC *gc, GdkRect int font_height; int x, y, max_y; char buf [40]; - int len; struct tm tm_start, tm_end; char *str; iCalObject *ico; diff --git a/calendar/main.c b/calendar/main.c index 92c68898e8..00c13edb16 100644 --- a/calendar/main.c +++ b/calendar/main.c @@ -12,10 +12,12 @@ #include <pwd.h> #include <sys/types.h> +#include "alarm.h" #include "calendar.h" #include "eventedit.h" #include "gnome-cal.h" #include "main.h" +#include "timeutil.h" /* The username, used to set the `owner' field of the event */ char *user_name; @@ -439,6 +441,8 @@ dump_events (void) exit (0); } +extern time_t get_date (); + static error_t parse_an_arg (int key, char *arg, struct argp_state *state) { @@ -477,8 +481,6 @@ static struct argp parser = int main(int argc, char *argv[]) { - GnomeClient *client; - argp_program_version = VERSION; bindtextdomain(PACKAGE, GNOMELOCALEDIR); diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c index b57f660a7b..60cb2f29d5 100644 --- a/calendar/pcs/calobj.c +++ b/calendar/pcs/calobj.c @@ -928,7 +928,7 @@ generate (iCalObject *ico, time_t reference, calendarfn cb, void *closure) s_t = mktime (&dt_start); if (ico->exdate && is_date_in_list (ico->exdate, &dt_start)) - return; + return 1; e_t = mktime (&dt_end); @@ -1111,9 +1111,12 @@ static int duration_callback (iCalObject *ico, time_t start, time_t end, void *closure) { int *count = closure; + struct tm *tm; - if (ico->exdate && is_date_in_list (ico->exdate, &start)) - return; + tm = localtime (&start); + + if (ico->exdate && is_date_in_list (ico->exdate, tm)) + return 1; (*count)++; if (ico->recur->duration == *count) { diff --git a/calendar/timeutil.c b/calendar/timeutil.c index df72390bc8..85652d3146 100644 --- a/calendar/timeutil.c +++ b/calendar/timeutil.c @@ -212,7 +212,6 @@ time_t time_week_begin (time_t t) { struct tm tm; - time_t retval; tm = *localtime (&t); tm.tm_mday -= tm.tm_wday; diff --git a/calendar/timeutil.h b/calendar/timeutil.h index f78b1acee7..9c9d2d8a80 100644 --- a/calendar/timeutil.h +++ b/calendar/timeutil.h @@ -18,8 +18,9 @@ time_t time_from_start_duration (time_t start, char *duration); char *isodate_from_time_t (time_t t); int get_time_t_hour (time_t t); -time_t time_add_week (time_t time, int weeks); +time_t time_add_minutes (time_t time, int minutes); time_t time_add_day (time_t time, int days); +time_t time_add_week (time_t time, int weeks); time_t time_add_year (time_t time, int years); @@ -36,8 +37,6 @@ time_t time_year_begin (int year); time_t time_year_end (int year); time_t time_week_begin (time_t t); time_t parse_date (char *str); -time_t time_add_minutes (time_t time, int minutes); -time_t time_add_day (time_t time, int days); void print_time_t (time_t t); diff --git a/calendar/view-utils.c b/calendar/view-utils.c index 0c074bd944..a6c7676885 100644 --- a/calendar/view-utils.c +++ b/calendar/view-utils.c @@ -37,7 +37,6 @@ view_utils_draw_events (GtkWidget *widget, GdkWindow *window, GdkGC *gc, GdkRect int font_height; int x, y, max_y; char buf [40]; - int len; struct tm tm_start, tm_end; char *str; iCalObject *ico; |