/soc/2013/ankitkv/gobjectification: 429c7bf66fc5: Merged default...
Ankit Vani
a at nevitus.org
Sun Feb 9 11:50:08 EST 2014
Changeset: 429c7bf66fc53f57289f4d05e2b81eacacb514f2
Author: Ankit Vani <a at nevitus.org>
Date: 2014-02-09 22:18 +0530
Branch: gtkdoc-conversion
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/429c7bf66fc5
Description:
Merged default branch
diffstat:
pidgin/Makefile.am | 6 -
pidgin/Makefile.mingw | 2 -
pidgin/gtksourceiter.c | 766 -------------------------
pidgin/gtksourceiter.h | 67 --
pidgin/gtksourceundomanager.c | 1197 ----------------------------------------
pidgin/gtksourceundomanager.h | 93 ---
pidgin/gtksourceview-marshal.c | 95 ---
pidgin/gtksourceview-marshal.h | 32 -
8 files changed, 0 insertions(+), 2258 deletions(-)
diffs (truncated from 2315 to 300 lines):
diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -77,9 +77,6 @@ libpidgin_la_SOURCES = \
gtksession.c \
gtksmiley.c \
gtksound.c \
- gtksourceiter.c \
- gtksourceundomanager.c \
- gtksourceview-marshal.c \
gtkstatus-icon-theme.c \
gtkstatusbox.c \
gtkthemes.c \
@@ -130,9 +127,6 @@ libpidgin_la_headers = \
gtksession.h \
gtksmiley.h \
gtksound.h \
- gtksourceiter.h \
- gtksourceundomanager.h \
- gtksourceview-marshal.h \
gtkstatus-icon-theme.h \
gtkstatusbox.h \
pidginstock.h \
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -92,8 +92,6 @@ PIDGIN_C_SRC = \
gtkscrollbook.c \
gtksmiley.c \
gtksound.c \
- gtksourceiter.c \
- gtksourceundomanager.c \
gtkstatus-icon-theme.c \
gtkstatusbox.c \
gtkthemes.c \
diff --git a/pidgin/gtksourceiter.c b/pidgin/gtksourceiter.c
deleted file mode 100644
--- a/pidgin/gtksourceiter.c
+++ /dev/null
@@ -1,766 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * gtksourceiter.c
- *
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * The following copyright notice applies to this file:
- *
- * Copyright (C) 2000 - 2005 Paolo Maggi
- * Copyright (C) 2002, 2003 Jeroen Zwartepoorte
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-
-/*
- * Parts of this file are copied from the gedit and glimmer project.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "gtksourceiter.h"
-
-#define GTK_TEXT_UNKNOWN_CHAR 0xFFFC
-
-/* this function acts like g_utf8_offset_to_pointer() except that if it finds a
- * decomposable character it consumes the decomposition length from the given
- * offset. So it's useful when the offset was calculated for the normalized
- * version of str, but we need a pointer to str itself. */
-static const gchar *
-pointer_from_offset_skipping_decomp (const gchar *str, gint offset)
-{
- gchar *casefold, *normal;
- const gchar *p, *q;
-
- p = str;
- while (offset > 0)
- {
- q = g_utf8_next_char (p);
- casefold = g_utf8_casefold (p, q - p);
- normal = g_utf8_normalize (casefold, -1, G_NORMALIZE_NFD);
- offset -= g_utf8_strlen (normal, -1);
- g_free (casefold);
- g_free (normal);
- p = q;
- }
- return p;
-}
-
-static const gchar *
-g_utf8_strcasestr (const gchar *haystack, const gchar *needle)
-{
- gsize needle_len;
- gsize haystack_len;
- const gchar *ret = NULL;
- gchar *p;
- gchar *casefold;
- gchar *caseless_haystack;
- gint i;
-
- g_return_val_if_fail (haystack != NULL, NULL);
- g_return_val_if_fail (needle != NULL, NULL);
-
- casefold = g_utf8_casefold (haystack, -1);
- caseless_haystack = g_utf8_normalize (casefold, -1, G_NORMALIZE_NFD);
- g_free (casefold);
-
- needle_len = g_utf8_strlen (needle, -1);
- haystack_len = g_utf8_strlen (caseless_haystack, -1);
-
- if (needle_len == 0)
- {
- ret = (gchar *)haystack;
- goto finally_1;
- }
-
- if (haystack_len < needle_len)
- {
- ret = NULL;
- goto finally_1;
- }
-
- p = (gchar*)caseless_haystack;
- needle_len = strlen (needle);
- i = 0;
-
- while (*p)
- {
- if ((strncmp (p, needle, needle_len) == 0))
- {
- ret = pointer_from_offset_skipping_decomp (haystack, i);
- goto finally_1;
- }
-
- p = g_utf8_next_char (p);
- i++;
- }
-
-finally_1:
- g_free (caseless_haystack);
-
- return ret;
-}
-
-static const gchar *
-g_utf8_strrcasestr (const gchar *haystack, const gchar *needle)
-{
- gsize needle_len;
- gsize haystack_len;
- const gchar *ret = NULL;
- gchar *p;
- gchar *casefold;
- gchar *caseless_haystack;
- gint i;
-
- g_return_val_if_fail (haystack != NULL, NULL);
- g_return_val_if_fail (needle != NULL, NULL);
-
- casefold = g_utf8_casefold (haystack, -1);
- caseless_haystack = g_utf8_normalize (casefold, -1, G_NORMALIZE_NFD);
- g_free (casefold);
-
- needle_len = g_utf8_strlen (needle, -1);
- haystack_len = g_utf8_strlen (caseless_haystack, -1);
-
- if (needle_len == 0)
- {
- ret = (gchar *)haystack;
- goto finally_1;
- }
-
- if (haystack_len < needle_len)
- {
- ret = NULL;
- goto finally_1;
- }
-
- i = haystack_len - needle_len;
- p = g_utf8_offset_to_pointer (caseless_haystack, i);
- needle_len = strlen (needle);
-
- while (1)
- {
- if (strncmp (p, needle, needle_len) == 0)
- {
- ret = pointer_from_offset_skipping_decomp (haystack, i);
- goto finally_1;
- }
-
- if (p > caseless_haystack)
- p = g_utf8_prev_char (p);
- else
- goto finally_1;
-
- i--;
- }
-
-finally_1:
- g_free (caseless_haystack);
-
- return ret;
-}
-
-static gboolean
-g_utf8_caselessnmatch (const char *s1, const char *s2,
- gssize n1, gssize n2)
-{
- gchar *casefold;
- gchar *normalized_s1;
- gchar *normalized_s2;
- gint len_s1;
- gint len_s2;
- gboolean ret = FALSE;
-
- g_return_val_if_fail (s1 != NULL, FALSE);
- g_return_val_if_fail (s2 != NULL, FALSE);
- g_return_val_if_fail (n1 > 0, FALSE);
- g_return_val_if_fail (n2 > 0, FALSE);
-
- casefold = g_utf8_casefold (s1, n1);
- normalized_s1 = g_utf8_normalize (casefold, -1, G_NORMALIZE_NFD);
- g_free (casefold);
-
- casefold = g_utf8_casefold (s2, n2);
- normalized_s2 = g_utf8_normalize (casefold, -1, G_NORMALIZE_NFD);
- g_free (casefold);
-
- len_s1 = strlen (normalized_s1);
- len_s2 = strlen (normalized_s2);
-
- if (len_s1 < len_s2)
- goto finally_2;
-
- ret = (strncmp (normalized_s1, normalized_s2, len_s2) == 0);
-
-finally_2:
- g_free (normalized_s1);
- g_free (normalized_s2);
-
- return ret;
-}
-
-static void
-forward_chars_with_skipping (GtkTextIter *iter,
- gint count,
- gboolean skip_invisible,
- gboolean skip_nontext,
- gboolean skip_decomp)
-{
- gint i;
-
- g_return_if_fail (count >= 0);
-
- i = count;
-
- while (i > 0)
- {
- gboolean ignored = FALSE;
-
- /* minimal workaround to avoid the infinite loop of bug #168247.
- * It doesn't fix the problemjust the symptom...
- */
- if (gtk_text_iter_is_end (iter))
- return;
-
- if (skip_nontext && gtk_text_iter_get_char (iter) == GTK_TEXT_UNKNOWN_CHAR)
- ignored = TRUE;
-
-#if 0
- if (!ignored && skip_invisible &&
- /* _gtk_text_btree_char_is_invisible (iter)*/ FALSE)
- ignored = TRUE;
-#endif
-
- if (!ignored && skip_decomp)
- {
- /* being UTF8 correct sucks; this accounts for extra
- offsets coming from canonical decompositions of
- UTF8 characters (e.g. accented characters) which
- g_utf8_normalize() performs */
- gchar *normal;
- gchar buffer[6];
- gint buffer_len;
-
- buffer_len = g_unichar_to_utf8 (gtk_text_iter_get_char (iter), buffer);
More information about the Commits
mailing list