totem-pl-parser r180 - in trunk: . lib plparse
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem-pl-parser r180 - in trunk: . lib plparse
- Date: Wed, 27 Aug 2008 08:42:53 +0000 (UTC)
Author: hadess
Date: Wed Aug 27 08:42:53 2008
New Revision: 180
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=180&view=rev
Log:
2008-08-27 Bastien Nocera <hadess hadess net>
* configure.in:
* lib/Makefile.am:
* lib/memmem.c:
* lib/totem_internal.h:
* plparse/totem-pl-parser-podcast.c (totem_pl_parser_is_rss),
(totem_pl_parser_is_atom), (totem_pl_parser_is_opml):
* plparse/totem-pl-parser-qt.c (totem_pl_parser_is_quicktime):
* plparse/totem-pl-parser-wm.c (totem_pl_parser_is_asx):
Remove internal copy, and use of, memmem, use glib's g_strstr_len()
instead (Closes: #548612)
Removed:
trunk/lib/memmem.c
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/lib/Makefile.am
trunk/lib/totem_internal.h
trunk/plparse/totem-pl-parser-podcast.c
trunk/plparse/totem-pl-parser-qt.c
trunk/plparse/totem-pl-parser-wm.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Aug 27 08:42:53 2008
@@ -26,10 +26,10 @@
AC_PROG_LIBTOOL()
PKG_PROG_PKG_CONFIG
-dnl Use local version of asprintf/memmem when not on the current system.
-AC_CHECK_FUNCS(asprintf memmem)
+dnl Use local version of asprintf when not on the current system.
+AC_CHECK_FUNCS(asprintf)
AC_CONFIG_LIBOBJ_DIR([lib])
-AC_REPLACE_FUNCS([asprintf memmem])
+AC_REPLACE_FUNCS([asprintf])
AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
Modified: trunk/lib/Makefile.am
==============================================================================
--- trunk/lib/Makefile.am (original)
+++ trunk/lib/Makefile.am Wed Aug 27 08:42:53 2008
@@ -11,5 +11,5 @@
libtotem_glibc_la_SOURCES =
libtotem_glibc_la_LIBADD = @LTLIBOBJS@
-EXTRA_DIST = asprintf.c memmem.c
+EXTRA_DIST = asprintf.c
Modified: trunk/lib/totem_internal.h
==============================================================================
--- trunk/lib/totem_internal.h (original)
+++ trunk/lib/totem_internal.h Wed Aug 27 08:42:53 2008
@@ -14,8 +14,3 @@
int totem_private_asprintf(char **string, const char *format, ...);
#endif
-#ifndef HAVE_MEMMEM
-#define memmem(s, slen, p, plen) totem_private_memmem(s, slen, p, plen)
-
-void *totem_private_memmem(register const void *s, size_t slen, register const void *p, size_t plen);
-#endif
Modified: trunk/plparse/totem-pl-parser-podcast.c
==============================================================================
--- trunk/plparse/totem-pl-parser-podcast.c (original)
+++ trunk/plparse/totem-pl-parser-podcast.c Wed Aug 27 08:42:53 2008
@@ -50,11 +50,9 @@
if (len > MIME_READ_CHUNK_SIZE)
len = MIME_READ_CHUNK_SIZE;
- if (memmem (data, len,
- RSS_NEEDLE, strlen (RSS_NEEDLE)) != NULL)
+ if (g_strstr_len (data, len, RSS_NEEDLE) != NULL)
return RSS_MIME_TYPE;
- if (memmem (data, len,
- RSS_NEEDLE2, strlen (RSS_NEEDLE2)) != NULL)
+ if (g_strstr_len (data, len, RSS_NEEDLE2) != NULL)
return RSS_MIME_TYPE;
return NULL;
@@ -68,8 +66,7 @@
if (len > MIME_READ_CHUNK_SIZE)
len = MIME_READ_CHUNK_SIZE;
- if (memmem (data, len,
- ATOM_NEEDLE, strlen (ATOM_NEEDLE)) != NULL)
+ if (g_strstr_len (data, len, ATOM_NEEDLE) != NULL)
return ATOM_MIME_TYPE;
return NULL;
@@ -83,8 +80,7 @@
if (len > MIME_READ_CHUNK_SIZE)
len = MIME_READ_CHUNK_SIZE;
- if (memmem (data, len,
- OPML_NEEDLE, strlen (OPML_NEEDLE)) != NULL)
+ if (g_strstr_len (data, len, OPML_NEEDLE) != NULL)
return OPML_MIME_TYPE;
return NULL;
Modified: trunk/plparse/totem-pl-parser-qt.c
==============================================================================
--- trunk/plparse/totem-pl-parser-qt.c (original)
+++ trunk/plparse/totem-pl-parser-qt.c Wed Aug 27 08:42:53 2008
@@ -57,8 +57,7 @@
if (g_str_has_prefix (data, "SMILtext") != FALSE)
return QUICKTIME_META_MIME_TYPE;
- if (memmem (data, len,
- QT_NEEDLE, strlen (QT_NEEDLE)) != NULL)
+ if (g_strstr_len (data, len, QT_NEEDLE) != NULL)
return QUICKTIME_META_MIME_TYPE;
return NULL;
Modified: trunk/plparse/totem-pl-parser-wm.c
==============================================================================
--- trunk/plparse/totem-pl-parser-wm.c (original)
+++ trunk/plparse/totem-pl-parser-wm.c Wed Aug 27 08:42:53 2008
@@ -51,14 +51,11 @@
if (len > MIME_READ_CHUNK_SIZE)
len = MIME_READ_CHUNK_SIZE;
- if (memmem (data, len,
- ASX_NEEDLE, strlen (ASX_NEEDLE)) != NULL)
+ if (g_strstr_len (data, len, ASX_NEEDLE) != NULL)
return ASX_MIME_TYPE;
- if (memmem (data, len,
- ASX_NEEDLE2, strlen (ASX_NEEDLE2)) != NULL)
+ if (g_strstr_len (data, len, ASX_NEEDLE2) != NULL)
return ASX_MIME_TYPE;
- if (memmem (data, len,
- ASX_NEEDLE3, strlen (ASX_NEEDLE3)) != NULL)
+ if (g_strstr_len (data, len, ASX_NEEDLE3) != NULL)
return ASX_MIME_TYPE;
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]