diff --git a/ChangeLog b/ChangeLog index 12e494f85..588c4c820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 12e494f85..588c4c820 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Mon Mar 26 14:14:53 2001 Owen Taylor + + * Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED + + * gmain.h timeloop.c: Surround the cruftiest stuff with + #ifndef G_DISABLE_DEPRECATED. + + * gcompat.h gdate.h: Move compat defines back to + gdate.h, surround with #ifndef G_DISABLE_DEPRECATED. + Remove gcompat.h. + Mon Mar 26 13:34:50 2001 Owen Taylor [ Patch from DindinX , added docs ] diff --git a/Makefile.am b/Makefile.am index cd0f9649c..846fde012 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = 1.4 SUBDIRS = . gobject gmodule gthread docs tests build INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \ - -DG_DISABLE_COMPAT_H -DGLIB_COMPILATION + -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION EXTRA_DIST = \ ChangeLog.pre-1-2 \ @@ -97,7 +97,6 @@ glibinclude_HEADERS = \ gasyncqueue.h \ gbacktrace.h \ gcache.h \ - gcompat.h \ gcompletion.h \ gconvert.h \ gdataset.h \ diff --git a/gcompat.h b/gcompat.h deleted file mode 100644 index 10ef4457e..000000000 --- a/gcompat.h +++ /dev/null @@ -1,45 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * - * Copyright (C) 2000 Ali Abdin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __G_COMPAT_H__ -#define __G_COMPAT_H__ - -#include - -G_BEGIN_DECLS - -#ifndef G_DISABLE_COMPAT_H - -#define g_date_weekday g_date_get_weekday -#define g_date_month g_date_get_month -#define g_date_year g_date_get_year -#define g_date_day g_date_get_day -#define g_date_julian g_date_get_julian -#define g_date_day_of_year g_date_get_day_of_year -#define g_date_monday_week_of_year g_date_get_monday_week_of_year -#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year -#define g_date_days_in_month g_date_get_days_in_month -#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year -#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year - -#endif /* G_DISABLE_COMPAT_H */ - -G_END_DECLS - -#endif /* __G_COMPAT_H__ */ diff --git a/gdate.h b/gdate.h index c5fa2dc2c..0ef73af50 100644 --- a/gdate.h +++ b/gdate.h @@ -218,6 +218,22 @@ gsize g_date_strftime (gchar *s, const gchar *format, GDate *date); +#ifndef G_DISABLE_DEPRECATED + +#define g_date_weekday g_date_get_weekday +#define g_date_month g_date_get_month +#define g_date_year g_date_get_year +#define g_date_day g_date_get_day +#define g_date_julian g_date_get_julian +#define g_date_day_of_year g_date_get_day_of_year +#define g_date_monday_week_of_year g_date_get_monday_week_of_year +#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year +#define g_date_days_in_month g_date_get_days_in_month +#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year +#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year + +#endif /* G_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __G_DATE_H__ */ diff --git a/glib.h b/glib.h index 937e31919..9cbd7e4d4 100644 --- a/glib.h +++ b/glib.h @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/glib/Makefile.am b/glib/Makefile.am index cd0f9649c..846fde012 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = 1.4 SUBDIRS = . gobject gmodule gthread docs tests build INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \ - -DG_DISABLE_COMPAT_H -DGLIB_COMPILATION + -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION EXTRA_DIST = \ ChangeLog.pre-1-2 \ @@ -97,7 +97,6 @@ glibinclude_HEADERS = \ gasyncqueue.h \ gbacktrace.h \ gcache.h \ - gcompat.h \ gcompletion.h \ gconvert.h \ gdataset.h \ diff --git a/glib/gdate.h b/glib/gdate.h index c5fa2dc2c..0ef73af50 100644 --- a/glib/gdate.h +++ b/glib/gdate.h @@ -218,6 +218,22 @@ gsize g_date_strftime (gchar *s, const gchar *format, GDate *date); +#ifndef G_DISABLE_DEPRECATED + +#define g_date_weekday g_date_get_weekday +#define g_date_month g_date_get_month +#define g_date_year g_date_get_year +#define g_date_day g_date_get_day +#define g_date_julian g_date_get_julian +#define g_date_day_of_year g_date_get_day_of_year +#define g_date_monday_week_of_year g_date_get_monday_week_of_year +#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year +#define g_date_days_in_month g_date_get_days_in_month +#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year +#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year + +#endif /* G_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __G_DATE_H__ */ diff --git a/glib/glib.h b/glib/glib.h index 937e31919..9cbd7e4d4 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/glib/gmain.h b/glib/gmain.h index 193876f2f..70a64de1a 100644 --- a/glib/gmain.h +++ b/glib/gmain.h @@ -233,6 +233,8 @@ void g_get_current_time (GTimeVal *result); /* ============== Compat main loop stuff ================== */ +#ifndef G_DISABLE_DEPRECATED + /* Legacy names for GMainLoop functions */ #define g_main_new(is_running) g_main_loop_new (NULL, is_running); @@ -241,12 +243,6 @@ void g_get_current_time (GTimeVal *result); #define g_main_destroy(loop) g_main_loop_unref(loop) #define g_main_is_running(loop) g_main_loop_is_running(loop) -/* Source manipulation by ID */ -gboolean g_source_remove (guint tag); -gboolean g_source_remove_by_user_data (gpointer user_data); -gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, - gpointer user_data); - /* Functions to manipulate the default main loop */ @@ -255,6 +251,14 @@ gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, #define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) +#endif /* G_DISABLE_DEPRECATED */ + +/* Source manipulation by ID */ +gboolean g_source_remove (guint tag); +gboolean g_source_remove_by_user_data (gpointer user_data); +gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, + gpointer user_data); + /* Idles and timeouts */ guint g_timeout_add_full (gint priority, guint interval, diff --git a/gmain.h b/gmain.h index 193876f2f..70a64de1a 100644 --- a/gmain.h +++ b/gmain.h @@ -233,6 +233,8 @@ void g_get_current_time (GTimeVal *result); /* ============== Compat main loop stuff ================== */ +#ifndef G_DISABLE_DEPRECATED + /* Legacy names for GMainLoop functions */ #define g_main_new(is_running) g_main_loop_new (NULL, is_running); @@ -241,12 +243,6 @@ void g_get_current_time (GTimeVal *result); #define g_main_destroy(loop) g_main_loop_unref(loop) #define g_main_is_running(loop) g_main_loop_is_running(loop) -/* Source manipulation by ID */ -gboolean g_source_remove (guint tag); -gboolean g_source_remove_by_user_data (gpointer user_data); -gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, - gpointer user_data); - /* Functions to manipulate the default main loop */ @@ -255,6 +251,14 @@ gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, #define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) +#endif /* G_DISABLE_DEPRECATED */ + +/* Source manipulation by ID */ +gboolean g_source_remove (guint tag); +gboolean g_source_remove_by_user_data (gpointer user_data); +gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, + gpointer user_data); + /* Idles and timeouts */ guint g_timeout_add_full (gint priority, guint interval, diff --git a/tests/timeloop.c b/tests/timeloop.c index d81922a46..cec5700ca 100644 --- a/tests/timeloop.c +++ b/tests/timeloop.c @@ -124,7 +124,7 @@ input_callback (GIOChannel *source, n_active_children--; if (n_active_children == 0) - g_main_quit (loop); + g_main_loop_quit (loop); return FALSE; } @@ -193,8 +193,8 @@ main (int argc, char **argv) create_child (); getrusage (RUSAGE_SELF, &old_usage); - loop = g_main_new (FALSE); - g_main_run (loop); + loop = g_main_loop_new (NULL, FALSE); + g_main_loop_run (loop); getrusage (RUSAGE_SELF, &new_usage); printf ("Elapsed user: %g\n", diff --git a/timeloop.c b/timeloop.c index d81922a46..cec5700ca 100644 --- a/timeloop.c +++ b/timeloop.c @@ -124,7 +124,7 @@ input_callback (GIOChannel *source, n_active_children--; if (n_active_children == 0) - g_main_quit (loop); + g_main_loop_quit (loop); return FALSE; } @@ -193,8 +193,8 @@ main (int argc, char **argv) create_child (); getrusage (RUSAGE_SELF, &old_usage); - loop = g_main_new (FALSE); - g_main_run (loop); + loop = g_main_loop_new (NULL, FALSE); + g_main_loop_run (loop); getrusage (RUSAGE_SELF, &new_usage); printf ("Elapsed user: %g\n",