file-roller r2288 - in trunk: . src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2288 - in trunk: . src
- Date: Mon, 2 Jun 2008 15:39:35 +0000 (UTC)
Author: paobac
Date: Mon Jun 2 15:39:34 2008
New Revision: 2288
URL: http://svn.gnome.org/viewvc/file-roller?rev=2288&view=rev
Log:
2008-06-02 Paolo Bacchilega <paobac svn gnome org>
* src/file-utils.c (build_uri):
use g_str_has_prefix, g_str_has_suffix instead of g_str_starts_with and
g_str_ends_with, as suggested by Paolo Borelli in bug #536241
* src/glib-utils.c:
* src/glib-utils.h:
removed g_str_starts_with and g_str_ends_with
Modified:
trunk/ChangeLog
trunk/src/file-utils.c
trunk/src/glib-utils.c
trunk/src/glib-utils.h
Modified: trunk/src/file-utils.c
==============================================================================
--- trunk/src/file-utils.c (original)
+++ trunk/src/file-utils.c Mon Jun 2 15:39:34 2008
@@ -500,7 +500,7 @@
va_start (args, base);
while ((child = va_arg (args, const char *)) != NULL) {
- if (! g_str_ends_with (uri->str, "/") && ! g_str_starts_with (child, "/"))
+ if (! g_str_has_suffix (uri->str, "/") && ! g_str_has_prefix (child, "/"))
g_string_append (uri, "/");
g_string_append (uri, child);
}
Modified: trunk/src/glib-utils.c
==============================================================================
--- trunk/src/glib-utils.c (original)
+++ trunk/src/glib-utils.c Mon Jun 2 15:39:34 2008
@@ -632,20 +632,3 @@
return result;
}
-
-
-gboolean
-g_str_starts_with (const char *s,
- const char *c)
-{
- return strncmp (s, c, strlen (c)) == 0;
-}
-
-
-gboolean
-g_str_ends_with (const char *s,
- const char *c)
-{
- int c_len = strlen (c);
- return strncmp (s + strlen (s) - c_len, c, c_len) == 0;
-}
Modified: trunk/src/glib-utils.h
==============================================================================
--- trunk/src/glib-utils.h (original)
+++ trunk/src/glib-utils.h Mon Jun 2 15:39:34 2008
@@ -67,11 +67,6 @@
void g_ptr_array_reverse (GPtrArray *array);
const char * get_static_string (const char *s);
-gboolean g_str_starts_with (const char *s,
- const char *c);
-gboolean g_str_ends_with (const char *s,
- const char *c);
-
/**/
#ifndef __GNUC__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]