From 4ca03e4b4e79842ed8beaabac9a47ca45555534c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 3 Aug 2004 19:52:49 +0000 Subject: [PATCH] Pedantically use g types throughout. Tue Aug 3 15:50:55 2004 Matthias Clasen * glib/goption.[hc]: Pedantically use g types throughout. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-12 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ glib/goption.c | 20 ++++++++++---------- glib/goption.h | 16 ++++++++-------- 7 files changed, 68 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index cedf6b1..ddb0848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Tue Aug 3 15:50:55 2004 Matthias Clasen + + * glib/goption.[hc]: Pedantically use g types throughout. + +Tue Aug 3 14:58:20 2004 Matthias Clasen + + * glib/gutils.h: + * glib/gutils.c (glib_check_version): New function to + check the version of GLib at runtime. (#149175, Michael Natterer) + 2004-08-03 Anders Carlsson * glib/goption.h: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cedf6b1..ddb0848 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Tue Aug 3 15:50:55 2004 Matthias Clasen + + * glib/goption.[hc]: Pedantically use g types throughout. + +Tue Aug 3 14:58:20 2004 Matthias Clasen + + * glib/gutils.h: + * glib/gutils.c (glib_check_version): New function to + check the version of GLib at runtime. (#149175, Michael Natterer) + 2004-08-03 Anders Carlsson * glib/goption.h: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index cedf6b1..ddb0848 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,13 @@ +Tue Aug 3 15:50:55 2004 Matthias Clasen + + * glib/goption.[hc]: Pedantically use g types throughout. + +Tue Aug 3 14:58:20 2004 Matthias Clasen + + * glib/gutils.h: + * glib/gutils.c (glib_check_version): New function to + check the version of GLib at runtime. (#149175, Michael Natterer) + 2004-08-03 Anders Carlsson * glib/goption.h: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index cedf6b1..ddb0848 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Tue Aug 3 15:50:55 2004 Matthias Clasen + + * glib/goption.[hc]: Pedantically use g types throughout. + +Tue Aug 3 14:58:20 2004 Matthias Clasen + + * glib/gutils.h: + * glib/gutils.c (glib_check_version): New function to + check the version of GLib at runtime. (#149175, Michael Natterer) + 2004-08-03 Anders Carlsson * glib/goption.h: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index cedf6b1..ddb0848 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Tue Aug 3 15:50:55 2004 Matthias Clasen + + * glib/goption.[hc]: Pedantically use g types throughout. + +Tue Aug 3 14:58:20 2004 Matthias Clasen + + * glib/gutils.h: + * glib/gutils.c (glib_check_version): New function to + check the version of GLib at runtime. (#149175, Michael Natterer) + 2004-08-03 Anders Carlsson * glib/goption.h: diff --git a/glib/goption.c b/glib/goption.c index 24944b6..20c203c 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -42,7 +42,7 @@ typedef struct { union { gchar *str; struct { - int len; + gint len; gchar **data; } array; } allocated; @@ -380,10 +380,10 @@ print_help (GOptionContext *context, } static gboolean -parse_int (const char *arg_name, - const char *arg, - gint *result, - GError **error) +parse_int (const gchar *arg_name, + const gchar *arg, + gint *result, + GError **error) { gchar *end; glong tmp = strtol (arg, &end, 0); @@ -573,7 +573,7 @@ parse_arg (GOptionContext *context, case G_OPTION_ARG_INT: { - int data; + gint data; if (!parse_int (option_name, value, &data, @@ -622,7 +622,7 @@ parse_short_option (GOptionContext *context, GError **error, gboolean *parsed) { - int j; + gint j; for (j = 0; j < group->n_entries; j++) { @@ -683,7 +683,7 @@ parse_long_option (GOptionContext *context, GError **error, gboolean *parsed) { - int j; + gint j; for (j = 0; j < group->n_entries; j++) { @@ -1123,8 +1123,8 @@ void g_option_group_add_entries (GOptionGroup *group, const GOptionEntry *entries) { - int n_entries; - int i; + gint n_entries; + gint i; g_return_if_fail (entries != NULL); diff --git a/glib/goption.h b/glib/goption.h index 0f42e16..b2a2147 100644 --- a/glib/goption.h +++ b/glib/goption.h @@ -76,15 +76,15 @@ GQuark g_option_context_error_quark (void) G_GNUC_CONST; struct _GOptionEntry { - const char *long_name; - char short_name; - int flags; + const gchar *long_name; + gchar short_name; + gint flags; - GOptionArg arg; - gpointer arg_data; + GOptionArg arg; + gpointer arg_data; - const char *description; - const char *arg_description; + const gchar *description; + const gchar *arg_description; }; GOptionContext *g_option_context_new (const gchar *parameter_string); @@ -113,7 +113,7 @@ GOptionGroup *g_option_context_get_main_group (GOptionContext *context); GOptionGroup *g_option_group_new (const gchar *name, const gchar *description, - const char *help_description, + const gchar *help_description, gpointer user_data, GDestroyNotify destroy); void g_option_group_set_parse_hooks (GOptionGroup *group, -- 2.7.4