summaryrefslogtreecommitdiffstats
path: root/ext/gdk_pixbuf
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
commit6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch)
tree82b5546809a42a56a7bc18bacf8ed6e209ad006e /ext/gdk_pixbuf
parentd07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff)
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'ext/gdk_pixbuf')
-rw-r--r--ext/gdk_pixbuf/gst_loader.c29
-rw-r--r--ext/gdk_pixbuf/gstgdkanimation.c122
-rw-r--r--ext/gdk_pixbuf/gstgdkpixbuf.c89
3 files changed, 121 insertions, 119 deletions
diff --git a/ext/gdk_pixbuf/gst_loader.c b/ext/gdk_pixbuf/gst_loader.c
index 95fd5af7..f10c90b0 100644
--- a/ext/gdk_pixbuf/gst_loader.c
+++ b/ext/gdk_pixbuf/gst_loader.c
@@ -41,7 +41,8 @@ typedef struct
/* our own stuff - we're much better at keeping fields small :p */
GstGdkAnimation *ani;
gboolean initialized;
-} GstLoaderContext;
+}
+GstLoaderContext;
GST_DEBUG_CATEGORY_STATIC (gst_loader_debug);
#define GST_CAT_DEFAULT gst_loader_debug
@@ -56,13 +57,13 @@ gst_loader_init (GError ** error)
if (!g_thread_supported ()) {
g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED,
- "The GStreamer loader requires threading support.");
+ "The GStreamer loader requires threading support.");
return FALSE;
}
if (!gst_init_check (0, NULL)) {
g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED,
- "GStreamer could not be initialized.");
+ "GStreamer could not be initialized.");
return FALSE;
}
@@ -119,15 +120,15 @@ gst_loader_load_increment (gpointer context_pointer, const guchar * buf,
gst_gdk_animation_add_data (context->ani, buf, size);
if (!context->initialized
&& (iter =
- gdk_pixbuf_animation_get_iter (GDK_PIXBUF_ANIMATION (context->ani),
- NULL)) != NULL) {
+ gdk_pixbuf_animation_get_iter (GDK_PIXBUF_ANIMATION (context->ani),
+ NULL)) != NULL) {
int width =
- gdk_pixbuf_animation_get_width (GDK_PIXBUF_ANIMATION (context->ani));
+ gdk_pixbuf_animation_get_width (GDK_PIXBUF_ANIMATION (context->ani));
int height =
- gdk_pixbuf_animation_get_height (GDK_PIXBUF_ANIMATION (context->ani));
+ gdk_pixbuf_animation_get_height (GDK_PIXBUF_ANIMATION (context->ani));
GdkPixbuf *pixbuf =
- gdk_pixbuf_animation_get_static_image (GDK_PIXBUF_ANIMATION (context->
- ani));
+ gdk_pixbuf_animation_get_static_image (GDK_PIXBUF_ANIMATION (context->
+ ani));
g_object_unref (iter);
GST_LOG_OBJECT (context->ani, "initializing loader");
@@ -138,9 +139,9 @@ gst_loader_load_increment (gpointer context_pointer, const guchar * buf,
if (context->prepared_func) {
GST_LOG_OBJECT (context->ani, "calling prepared_func %p",
- context->prepared_func);
+ context->prepared_func);
context->prepared_func (pixbuf, GDK_PIXBUF_ANIMATION (context->ani),
- context->user_data);
+ context->user_data);
}
context->initialized = TRUE;
@@ -187,7 +188,7 @@ gst_loader_load_animation (FILE * f, GError ** error)
g_free (filename);
if (iter == NULL) {
g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
- "could not create an image");
+ "could not create an image");
g_object_unref (ani);
GST_INFO ("could not create an image");
return NULL;
@@ -211,7 +212,7 @@ gst_loader_load (FILE * f, GError ** error)
GST_ERROR_OBJECT (ani, "Could not get an image in _pixbuf_load");
g_object_unref (ani);
g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
- "Could not get an image from file.");
+ "Could not get an image from file.");
return NULL;
}
@@ -250,7 +251,7 @@ fill_info (GdkPixbufFormat * info)
{" free", "xxxx ", 80},
/* ASF */
{"\060\046\262\165\216\146\317\021\246\331 \252 \142\316\154",
- " z z ", 100},
+ " z z ", 100},
{NULL, NULL, 0}
};
diff --git a/ext/gdk_pixbuf/gstgdkanimation.c b/ext/gdk_pixbuf/gstgdkanimation.c
index df58c5be..202ead64 100644
--- a/ext/gdk_pixbuf/gstgdkanimation.c
+++ b/ext/gdk_pixbuf/gstgdkanimation.c
@@ -54,18 +54,18 @@ gst_gdk_animation_get_type (void)
NULL,
NULL,
gst_gdk_animation_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (GstGdkAnimation),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
NULL,
};
object_type = g_type_register_static (GDK_TYPE_PIXBUF_ANIMATION,
- "GstGdkAnimation", &object_info, 0);
+ "GstGdkAnimation", &object_info, 0);
GST_DEBUG_CATEGORY_INIT (gst_gdk_animation_debug, "gstloader_animation", 0,
- "GStreamer GdkPixbuf loader - GdkAnimation class");
+ "GStreamer GdkPixbuf loader - GdkAnimation class");
}
return object_type;
@@ -179,15 +179,15 @@ gst_gdk_animation_iter_get_type (void)
NULL,
NULL,
gst_gdk_animation_iter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (GstGdkAnimationIter),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
gst_gdk_animation_iter_init,
};
object_type = g_type_register_static (GDK_TYPE_PIXBUF_ANIMATION_ITER,
- "GdkPixbufAniAnimIter", &object_info, 0);
+ "GdkPixbufAniAnimIter", &object_info, 0);
}
return object_type;
@@ -266,12 +266,12 @@ gst_gdk_animation_iter_create_pipeline (GstGdkAnimationIter * iter)
);
gst_caps_append (caps, GST_CAPS_NEW ("pixbuf_filter24",
- "video/x-raw-rgb",
- "endianness", GST_PROPS_INT (G_BIG_ENDIAN),
- "bpp", GST_PROPS_INT (24),
- "red_mask", GST_PROPS_INT (0xFF0000),
- "green_mask", GST_PROPS_INT (0x00FF00),
- "blue_mask", GST_PROPS_INT (0x0000FF)
+ "video/x-raw-rgb",
+ "endianness", GST_PROPS_INT (G_BIG_ENDIAN),
+ "bpp", GST_PROPS_INT (24),
+ "red_mask", GST_PROPS_INT (0xFF0000),
+ "green_mask", GST_PROPS_INT (0x00FF00),
+ "blue_mask", GST_PROPS_INT (0x0000FF)
));
iter->pipeline = gst_element_factory_make ("pipeline", "main_pipeline");
@@ -323,7 +323,7 @@ gst_gdk_animation_iter_create_pipeline (GstGdkAnimationIter * iter)
if (!gst_element_link_filtered (colorspace, sink, caps))
goto error;
if (gst_element_set_state (iter->pipeline,
- GST_STATE_PLAYING) != GST_STATE_SUCCESS)
+ GST_STATE_PLAYING) != GST_STATE_SUCCESS)
goto error;
return TRUE;
@@ -346,7 +346,7 @@ gst_gdk_animation_iter_may_advance (GstGdkAnimationIter * iter)
data_amount = lseek (iter->ani->temp_fd, 0, SEEK_CUR);
g_assert (data_amount >= 0);
g_assert (gst_element_query (gst_bin_get_by_name (GST_BIN (iter->pipeline),
- "source"), GST_QUERY_POSITION, &bytes, &offset));
+ "source"), GST_QUERY_POSITION, &bytes, &offset));
if (data_amount - offset > GST_GDK_BUFFER_SIZE)
return TRUE;
@@ -394,7 +394,7 @@ gst_gdk_animation_iter_create_pixbuf (GstGdkAnimationIter * iter)
GstPad *pad;
GstCaps *caps;
GstElement *fakesink =
- gst_bin_get_by_name (GST_BIN (iter->pipeline), "sink");
+ gst_bin_get_by_name (GST_BIN (iter->pipeline), "sink");
g_assert (fakesink);
pad = gst_element_get_pad (fakesink, "sink");
g_assert (pad);
@@ -402,13 +402,13 @@ gst_gdk_animation_iter_create_pixbuf (GstGdkAnimationIter * iter)
g_assert (caps);
g_assert (GST_CAPS_IS_FIXED (caps));
g_assert (gst_caps_has_fixed_property (caps, "bpp") &&
- gst_caps_has_fixed_property (caps, "width") &&
- gst_caps_has_fixed_property (caps, "height"));
+ gst_caps_has_fixed_property (caps, "width") &&
+ gst_caps_has_fixed_property (caps, "height"));
gst_caps_get_int (caps, "width", &ani->width);
gst_caps_get_int (caps, "height", &ani->height);
gst_caps_get_int (caps, "bpp", &ani->bpp);
GST_DEBUG_OBJECT (ani, "found format (width %d, height %d, bpp %d)",
- ani->width, ani->height, ani->bpp);
+ ani->width, ani->height, ani->bpp);
}
g_assert (GST_BUFFER_SIZE (buf) == ani->width * ani->height * ani->bpp / 8);
if (ani->bpp == 32) {
@@ -473,12 +473,12 @@ gst_gdk_animation_iter_advance (GdkPixbufAnimationIter * anim_iter,
((GstClockTime) current_time->tv_sec - iter->start.tv_sec) * GST_SECOND;
if (iter->start.tv_usec > current_time->tv_usec) {
offset -=
- ((GstClockTime) iter->start.tv_usec -
- current_time->tv_usec) * GST_SECOND / G_USEC_PER_SEC;
+ ((GstClockTime) iter->start.tv_usec -
+ current_time->tv_usec) * GST_SECOND / G_USEC_PER_SEC;
} else {
offset +=
- ((GstClockTime) current_time->tv_usec -
- iter->start.tv_usec) * GST_SECOND / G_USEC_PER_SEC;
+ ((GstClockTime) current_time->tv_usec -
+ iter->start.tv_usec) * GST_SECOND / G_USEC_PER_SEC;
}
GST_DEBUG_OBJECT (iter,
"advancing to %ld:%ld (started at %ld:%ld) need offset %"
@@ -487,18 +487,18 @@ gst_gdk_animation_iter_advance (GdkPixbufAnimationIter * anim_iter,
if (!iter->just_seeked
&& offset - iter->last_timestamp > GST_GDK_MAX_DELAY_TO_SEEK) {
GST_INFO_OBJECT (iter,
- "current pipeline timestamp is too old (%" G_GUINT64_FORMAT " vs %"
- G_GUINT64_FORMAT "), seeking there", iter->last_timestamp, offset);
+ "current pipeline timestamp is too old (%" G_GUINT64_FORMAT " vs %"
+ G_GUINT64_FORMAT "), seeking there", iter->last_timestamp, offset);
if (gst_element_send_event (gst_bin_get_by_name (GST_BIN (iter->pipeline),
- "sink"),
- gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, offset))) {
+ "sink"),
+ gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, offset))) {
iter->last_timestamp = offset;
iter->just_seeked = TRUE;
} else {
GST_WARNING_OBJECT (iter,
- "seek to %" G_GUINT64_FORMAT " didn't work. Iterating there...",
- offset);
+ "seek to %" G_GUINT64_FORMAT " didn't work. Iterating there...",
+ offset);
}
} else if (iter->just_seeked) {
iter->just_seeked = FALSE;
@@ -507,17 +507,17 @@ gst_gdk_animation_iter_advance (GdkPixbufAnimationIter * anim_iter,
while (TRUE) {
if (g_queue_is_empty (iter->buffers)) {
if (iter->eos)
- return FALSE;
+ return FALSE;
if (gst_gdk_animation_get_more_buffers (iter))
- continue;
+ continue;
break;
}
if (GST_BUFFER_TIMESTAMP (g_queue_peek_head (iter->buffers)) > offset)
break;
if (buffer) {
GST_LOG_OBJECT (iter, "unreffing buffer %p, because timestamp too low (%"
- G_GUINT64_FORMAT " vs %" G_GUINT64_FORMAT ")",
- buffer, GST_BUFFER_TIMESTAMP (buffer), offset);
+ G_GUINT64_FORMAT " vs %" G_GUINT64_FORMAT ")",
+ buffer, GST_BUFFER_TIMESTAMP (buffer), offset);
gst_data_unref (GST_DATA (buffer));
}
buffer = GST_BUFFER (g_queue_pop_head (iter->buffers));
@@ -547,7 +547,7 @@ gst_gdk_animation_iter_get_delay_time (GdkPixbufAnimationIter * anim_iter)
return -1;
}
if (!gst_gdk_animation_get_more_buffers (iter))
- return -1; /* FIXME? */
+ return -1; /* FIXME? */
}
delay =
@@ -593,52 +593,52 @@ gst_gdk_animation_get_static_image (GdkPixbufAnimation * animation)
GST_LOG_OBJECT (ani, "trying to create pixbuf");
g_get_current_time (&tv);
iter =
- GST_GDK_ANIMATION_ITER (gdk_pixbuf_animation_get_iter (animation, &tv));
+ GST_GDK_ANIMATION_ITER (gdk_pixbuf_animation_get_iter (animation, &tv));
if (iter) {
guint64 offset;
GstBuffer *buf;
GstFormat time = GST_FORMAT_TIME;
if (!gst_element_query (gst_bin_get_by_name (GST_BIN (iter->pipeline),
- "sink"), GST_QUERY_TOTAL, &time, &offset)) {
- offset = 0;
+ "sink"), GST_QUERY_TOTAL, &time, &offset)) {
+ offset = 0;
}
if (offset > 120 * GST_SECOND) {
- offset = 120 * GST_SECOND;
+ offset = 120 * GST_SECOND;
} else if (offset < 120 * GST_SECOND && offset >= 10 * GST_SECOND) {
- offset = offset / 2;
+ offset = offset / 2;
}
g_assert (time == GST_FORMAT_TIME);
GST_LOG_OBJECT (ani,
- "using time offset %" G_GUINT64_FORMAT " for creating static image",
- offset);
+ "using time offset %" G_GUINT64_FORMAT " for creating static image",
+ offset);
while ((buf = g_queue_pop_head (iter->buffers)) != NULL) {
- gst_data_unref (GST_DATA (buf));
+ gst_data_unref (GST_DATA (buf));
}
/* now we do evil stuff, be sure to get rid of the iterator afterwards */
if (!gst_element_send_event (gst_bin_get_by_name (GST_BIN (iter->
- pipeline), "sink"),
- gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, offset))) {
- GST_INFO_OBJECT (ani, "seeking didn't work. Using next image");
+ pipeline), "sink"),
+ gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, offset))) {
+ GST_INFO_OBJECT (ani, "seeking didn't work. Using next image");
}
do {
- if (g_queue_is_empty (iter->buffers)) {
- if (iter->eos)
- return FALSE;
- if (gst_gdk_animation_get_more_buffers (iter))
- continue;
- }
+ if (g_queue_is_empty (iter->buffers)) {
+ if (iter->eos)
+ return FALSE;
+ if (gst_gdk_animation_get_more_buffers (iter))
+ continue;
+ }
} while (FALSE);
if (!g_queue_is_empty (iter->buffers)) {
- gst_gdk_animation_iter_create_pixbuf (iter);
- ani->pixbuf =
- gst_gdk_animation_iter_get_pixbuf (GDK_PIXBUF_ANIMATION_ITER
- (iter));
- g_object_ref (ani->pixbuf);
+ gst_gdk_animation_iter_create_pixbuf (iter);
+ ani->pixbuf =
+ gst_gdk_animation_iter_get_pixbuf (GDK_PIXBUF_ANIMATION_ITER
+ (iter));
+ g_object_ref (ani->pixbuf);
} else {
- g_assert (ani->pixbuf == NULL);
+ g_assert (ani->pixbuf == NULL);
}
/* DiE iterator, DiE */
g_object_unref (iter);
diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.c b/ext/gdk_pixbuf/gstgdkpixbuf.c
index 9691782d..6670a368 100644
--- a/ext/gdk_pixbuf/gstgdkpixbuf.c
+++ b/ext/gdk_pixbuf/gstgdkpixbuf.c
@@ -58,22 +58,22 @@ static GstStaticPadTemplate gst_gdk_pixbuf_sink_template =
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("image/png; "
- "image/jpeg; "
- "image/gif; "
- "image/x-icon; "
- "application/x-navi-animation; "
- "image/x-cmu-raster; "
- "image/x-sun-raster; "
- "image/x-pixmap; "
- "image/tiff; "
- "image/x-portable-anymap; "
- "image/x-portable-bitmap; "
- "image/x-portable-graymap; "
- "image/x-portable-pixmap; "
- "image/bmp; "
- "image/x-bmp; "
- "image/x-MS-bmp; "
- "image/vnd.wap.wbmp; " "image/x-bitmap; " "image/x-tga")
+ "image/jpeg; "
+ "image/gif; "
+ "image/x-icon; "
+ "application/x-navi-animation; "
+ "image/x-cmu-raster; "
+ "image/x-sun-raster; "
+ "image/x-pixmap; "
+ "image/tiff; "
+ "image/x-portable-anymap; "
+ "image/x-portable-bitmap; "
+ "image/x-portable-graymap; "
+ "image/x-portable-pixmap; "
+ "image/bmp; "
+ "image/x-bmp; "
+ "image/x-MS-bmp; "
+ "image/vnd.wap.wbmp; " "image/x-bitmap; " "image/x-tga")
);
static GstStaticPadTemplate gst_gdk_pixbuf_src_template =
@@ -125,7 +125,7 @@ static GstCaps *
gst_gdk_pixbuf_get_capslist (void)
{
return gst_caps_copy (gst_static_caps_get (&gst_gdk_pixbuf_sink_template.
- static_caps));
+ static_caps));
}
#else
static GstCaps *
@@ -184,8 +184,9 @@ gst_gdk_pixbuf_get_type (void)
0,
(GInstanceInitFunc) gst_gdk_pixbuf_init,
};
+
plugin_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstGdkPixbuf", &plugin_info, 0);
+ "GstGdkPixbuf", &plugin_info, 0);
}
return plugin_type;
}
@@ -216,7 +217,7 @@ gst_gdk_pixbuf_class_init (GstGdkPixbufClass * klass)
g_object_class_install_property (gobject_class, ARG_SILENT,
g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?",
- FALSE, G_PARAM_READWRITE));
+ FALSE, G_PARAM_READWRITE));
gobject_class->set_property = gst_gdk_pixbuf_set_property;
gobject_class->get_property = gst_gdk_pixbuf_get_property;
@@ -266,15 +267,15 @@ gst_gdk_pixbuf_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
- push_buffer = TRUE;
- got_eos = TRUE;
- break;
+ push_buffer = TRUE;
+ got_eos = TRUE;
+ break;
case GST_EVENT_DISCONTINUOUS:
- dump_buffer = TRUE;
- break;
+ dump_buffer = TRUE;
+ break;
default:
- gst_pad_event_default (pad, event);
- return;
+ gst_pad_event_default (pad, event);
+ return;
}
}
@@ -289,37 +290,37 @@ gst_gdk_pixbuf_chain (GstPad * pad, GstData * _data)
GError *error = NULL;
if (!gdk_pixbuf_loader_close (filter->pixbuf_loader, &error)) {
- GST_ELEMENT_ERROR (filter, LIBRARY, SHUTDOWN, (NULL), (error->message));
- g_error_free (error);
- return;
+ GST_ELEMENT_ERROR (filter, LIBRARY, SHUTDOWN, (NULL), (error->message));
+ g_error_free (error);
+ return;
}
pixbuf = gdk_pixbuf_loader_get_pixbuf (filter->pixbuf_loader);
if (filter->image_size == 0) {
- GstCaps *caps;
+ GstCaps *caps;
- filter->width = gdk_pixbuf_get_width (pixbuf);
- filter->height = gdk_pixbuf_get_height (pixbuf);
- filter->rowstride = gdk_pixbuf_get_rowstride (pixbuf);
- filter->image_size = filter->rowstride * filter->height;
+ filter->width = gdk_pixbuf_get_width (pixbuf);
+ filter->height = gdk_pixbuf_get_height (pixbuf);
+ filter->rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ filter->image_size = filter->rowstride * filter->height;
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (filter->srcpad));
- gst_caps_set_simple (caps,
- "width", G_TYPE_INT, filter->width,
- "height", G_TYPE_INT, filter->height,
- "framerate", G_TYPE_DOUBLE, filter->framerate, NULL);
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (filter->srcpad));
+ gst_caps_set_simple (caps,
+ "width", G_TYPE_INT, filter->width,
+ "height", G_TYPE_INT, filter->height,
+ "framerate", G_TYPE_DOUBLE, filter->framerate, NULL);
- gst_pad_set_explicit_caps (filter->srcpad, caps);
+ gst_pad_set_explicit_caps (filter->srcpad, caps);
}
outbuf = gst_pad_alloc_buffer (filter->srcpad, GST_BUFFER_OFFSET_NONE,
- filter->image_size);
+ filter->image_size);
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (buf);
memcpy (GST_BUFFER_DATA (outbuf), gdk_pixbuf_get_pixels (pixbuf),
- filter->image_size);
+ filter->image_size);
gst_pad_push (filter->srcpad, GST_DATA (outbuf));
@@ -344,7 +345,7 @@ gst_gdk_pixbuf_chain (GstPad * pad, GstData * _data)
}
gdk_pixbuf_loader_write (filter->pixbuf_loader, GST_BUFFER_DATA (buf),
- GST_BUFFER_SIZE (buf), &error);
+ GST_BUFFER_SIZE (buf), &error);
gst_buffer_unref (buf);
}
@@ -450,7 +451,7 @@ plugin_init (GstPlugin * plugin)
"gdk pixbuf loader");
if (!gst_element_register (plugin, "gdkpixbufdec", GST_RANK_NONE,
- GST_TYPE_GDK_PIXBUF))
+ GST_TYPE_GDK_PIXBUF))
return FALSE;
#ifdef enable_typefind