From 7cd8540542f18ce6256eec32c716e759a58634ad Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 29 Nov 2002 14:20:53 +0000 Subject: [PATCH] revert fix because GST_DEBUG_LEAVE("") doesn't work with it Original commit message from CVS: revert fix because GST_DEBUG_LEAVE("") doesn't work with it --- gst/gst.c | 10 ++-- gst/gstcaps.h | 26 ---------- gst/gstevent.h | 13 ----- gst/gstformat.h | 13 ----- gst/gstinfo.c | 5 +- gst/gstinfo.h | 153 ++++-------------------------------------------------- gst/gstlog.h | 13 ----- gst/gstpad.h | 38 -------------- gst/gstprops.h | 11 +--- gst/parse/parse.l | 12 ----- 10 files changed, 17 insertions(+), 277 deletions(-) diff --git a/gst/gst.c b/gst/gst.c index c4b752c..1573a45 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -95,7 +95,7 @@ enum { /* default scheduler, 'basicomega', can be changed in * gstscheduler.c in function gst_scheduler_factory_class_init */ -static const struct poptOption gstreamer_options[] = { +static const struct poptOption options[] = { {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL}, {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, "Print the GStreamer version", NULL}, {"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, "Make all warnings fatal", NULL}, @@ -126,7 +126,7 @@ static const struct poptOption gstreamer_options[] = { const struct poptOption * gst_init_get_popt_table (void) { - return gstreamer_options; + return options; } /** @@ -186,15 +186,15 @@ gst_init_with_popt_table (int *argc, char **argv[], gchar **temp; const struct poptOption *options; /* this is probably hacky, no? */ - struct poptOption options_with[] = { + const struct poptOption options_with[] = { {NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL}, - {NULL, NUL, POPT_ARG_INCLUDE_TABLE, gstreamer_options, 0, "GStreamer options:", NULL}, + {NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) gst_init_get_popt_table(), 0, "GStreamer options:", NULL}, {NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) popt_options, 0, "Application options:", NULL}, POPT_TABLEEND }; const struct poptOption options_without[] = { {NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL}, - {NULL, NUL, POPT_ARG_INCLUDE_TABLE, gstreamer_options, 0, "GStreamer options:", NULL}, + {NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) gst_init_get_popt_table(), 0, "GStreamer options:", NULL}, POPT_TABLEEND }; diff --git a/gst/gstcaps.h b/gst/gstcaps.h index 1d259cb..6dae7c2 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -58,26 +58,6 @@ struct _GstCaps { /* factory macros which make it easier for plugins to instantiate */ -#ifdef G_HAVE_ISO_VARARGS -#define GST_CAPS_NEW(name, type, ...) \ -gst_caps_new ( \ - name, \ - type, \ - gst_props_new ( \ - __VA_ARGS__, \ - NULL)) - -#define GST_CAPS_FACTORY(factoryname, ...) \ -static GstCaps* \ -factoryname (void) \ -{ \ - static GstCaps *caps = NULL; \ - if (!caps) { \ - caps = gst_caps_chain (__VA_ARGS_, NULL); \ - } \ - return caps; \ -} -#elif defined(G_HAVE_GNUC_VARARGS) #define GST_CAPS_NEW(name, type, a...) \ gst_caps_new ( \ name, \ @@ -96,7 +76,6 @@ factoryname (void) \ } \ return caps; \ } -#endif #define GST_CAPS_GET(fact) (fact)() @@ -129,13 +108,8 @@ void gst_caps_set_type_id (GstCaps *caps, guint16 type_id); GstCaps* gst_caps_set_props (GstCaps *caps, GstProps *props); GstProps* gst_caps_get_props (GstCaps *caps); -#ifdef G_HAVE_ISO_VARARGS -#define gst_caps_set(caps, ...) gst_props_set ((caps)->properties, __VA_ARGS__) -#define gst_caps_get(caps, ...) gst_props_get ((caps)->properties, __VA_ARGS__) -#elif defined(G_HAVE_GNUC_VARARGS) #define gst_caps_set(caps, name, args...) gst_props_set ((caps)->properties, name, ##args) #define gst_caps_get(caps, name, args...) gst_props_get ((caps)->properties, name, ##args) -#endif #define gst_caps_get_int(caps,name,res) gst_props_entry_get_int(gst_props_get_entry((caps)->properties,name),res) #define gst_caps_get_float(caps,name,res) gst_props_entry_get_float(gst_props_get_entry((caps)->properties,name),res) diff --git a/gst/gstevent.h b/gst/gstevent.h index 71d6886..543a76e 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -78,18 +78,6 @@ typedef struct GstEventFlag flags; } GstEventMask; -#ifdef G_HAVE_ISO_VARARGS -#define GST_EVENT_MASK_FUNCTION(functionname, ...) \ -static const GstEventMask* \ -functionname (GstPad *pad) \ -{ \ - static const GstEventMask masks[] = { \ - __VA_ARGS__, \ - { 0, } \ - }; \ - return masks; \ -} -#elif defined(G_HAVE_GNUC_VARARGS) #define GST_EVENT_MASK_FUNCTION(functionname, a...) \ static const GstEventMask* \ functionname (GstPad *pad) \ @@ -100,7 +88,6 @@ functionname (GstPad *pad) \ }; \ return masks; \ } -#endif /* seek events, extends GstEventFlag */ typedef enum { diff --git a/gst/gstformat.h b/gst/gstformat.h index ec24900..b7c0944 100644 --- a/gst/gstformat.h +++ b/gst/gstformat.h @@ -48,18 +48,6 @@ struct _GstFormatDefinition gchar *description; }; -#ifdef G_HAVE_ISO_VARARGS -#define GST_FORMATS_FUNCTION(functionname, ...) \ -static const GstFormat* \ -functionname (GstPad *pad) \ -{ \ - static const GstFormat formats[] = { \ - __VA_ARGS__, \ - 0 \ - }; \ - return formats; \ -} -#elif defined(G_HAVE_GNUC_VARARGS) #define GST_FORMATS_FUNCTION(functionname, a...) \ static const GstFormat* \ functionname (GstPad *pad) \ @@ -70,7 +58,6 @@ functionname (GstPad *pad) \ }; \ return formats; \ } -#endif void _gst_format_initialize (void); diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 2b24513..ed577e8 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -81,9 +81,8 @@ static gchar *_gst_info_category_strings[] = { "REFCOUNTING", "EVENT", "PARAMS", - "", - "", - "CALL_TRACE", + + [30] = "CALL_TRACE", }; /** diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 8319181..89d467d 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -31,15 +31,6 @@ #include #endif -#ifdef HAVE_FUNC -#define FUNCTION __func__ -#elif HAVE_PRETTY_FUNCTION -#define FUNCTION __PRETTY_FUNCTION__ -#elif HAVE_FUNCTION -#define FUNCTION __FUNCTION__ -#else -#define FUNCTION "" -#endif /***** are we in the core or not? *****/ #ifdef __GST_PRIVATE_H__ @@ -145,38 +136,17 @@ G_GNUC_UNUSED static gchar *_debug_string = NULL; -#ifdef G_HAVE_ISO_VARARGS - -#ifdef GST_DEBUG_ENABLED -#define GST_DEBUG(cat, ...) G_STMT_START{ \ - if ((1< -#ifdef G_HAVE_ISO_VARARGS - -#ifdef DEBUG -# define PRINT(...) printf(__VAR_ARGS__) -#else -#define PRINT(...) -#endif - -#elif defined(G_HAVE_GNUC_VARARGS) - #ifdef DEBUG # define PRINT(a...) printf(##a) #else #define PRINT(a...) #endif -#endif - #define CHAR(x) PRINT ("char: %c\n", *yytext); return *yytext; #define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp) -- 2.7.4