-DG_DISABLE_DEPRECATED
authorOwen Taylor <otaylor@redhat.com>
Mon, 26 Mar 2001 19:23:17 +0000 (19:23 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 26 Mar 2001 19:23:17 +0000 (19:23 +0000)
Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>

* 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.

19 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
gcompat.h [deleted file]
gdate.h
glib.h
glib/Makefile.am
glib/gdate.h
glib/glib.h
glib/gmain.h
gmain.h
tests/timeloop.c
timeloop.c

index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index 12e494f856d8e9c7d70c743eaa354f70fae89897..588c4c82053b7049ac4a9aa1ed50742fe7449420 100644 (file)
@@ -1,3 +1,14 @@
+Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        [ Patch from DindinX  <David.Odin@bigfoot.com>, added docs ]
index cd0f9649c65f31df1836d44f37ccb1bc742ae254..846fde012ccf23d8c04ff979a14e965c10f6a59e 100644 (file)
@@ -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 (file)
index 10ef445..0000000
--- a/gcompat.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* GLIB - Library of useful routines for C programming
- *
- * Copyright (C) 2000 Ali Abdin <aliabdin@aucegypt.edu>
- *
- * 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 <gmacros.h>
-
-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 c5fa2dc2c360692e3636f9b683976fcdcb33f3b1..0ef73af50cf030027050b0937d8aabca6bb92a5f 100644 (file)
--- 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 937e319193c7461fe27cec2e0dc2b7596bd9a33e..9cbd7e4d488efd824fe19194dbe0e94a92649465 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -32,7 +32,6 @@
 #include <gasyncqueue.h>
 #include <gbacktrace.h>
 #include <gcache.h>
-#include <gcompat.h>
 #include <gcompletion.h>
 #include <gconvert.h>
 #include <gdataset.h>
index cd0f9649c65f31df1836d44f37ccb1bc742ae254..846fde012ccf23d8c04ff979a14e965c10f6a59e 100644 (file)
@@ -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      \
index c5fa2dc2c360692e3636f9b683976fcdcb33f3b1..0ef73af50cf030027050b0937d8aabca6bb92a5f 100644 (file)
@@ -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__ */
index 937e319193c7461fe27cec2e0dc2b7596bd9a33e..9cbd7e4d488efd824fe19194dbe0e94a92649465 100644 (file)
@@ -32,7 +32,6 @@
 #include <gasyncqueue.h>
 #include <gbacktrace.h>
 #include <gcache.h>
-#include <gcompat.h>
 #include <gcompletion.h>
 #include <gconvert.h>
 #include <gdataset.h>
index 193876f2f32671c3f10242c0ba235c6ccd111184..70a64de1a732b98da43330eb35003d89453308f3 100644 (file)
@@ -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 193876f2f32671c3f10242c0ba235c6ccd111184..70a64de1a732b98da43330eb35003d89453308f3 100644 (file)
--- 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, 
index d81922a46f80fbd1cae6b55d0a65ca1de315034b..cec5700ca083d3995db0b8f57a296d6e73b44ebf 100644 (file)
@@ -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",
index d81922a46f80fbd1cae6b55d0a65ca1de315034b..cec5700ca083d3995db0b8f57a296d6e73b44ebf 100644 (file)
@@ -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",