From bf83d5a03bf856e34bd0a6e2656a5b2dcfe8aafb Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Mon, 15 Mar 2010 00:58:16 +0100 Subject: Move around files to remove some vanity directories. Also remove the obsolete IDL file stub. (bzr r9194) --- src/algorithms/CMakeLists.txt | 6 -- src/algorithms/Makefile_insert | 5 -- src/algorithms/find-if-before.h | 51 --------------- src/algorithms/find-last-if.h | 51 --------------- src/algorithms/longest-common-suffix.h | 114 --------------------------------- src/algorithms/makefile.in | 17 ----- 6 files changed, 244 deletions(-) delete mode 100644 src/algorithms/CMakeLists.txt delete mode 100644 src/algorithms/Makefile_insert delete mode 100644 src/algorithms/find-if-before.h delete mode 100644 src/algorithms/find-last-if.h delete mode 100644 src/algorithms/longest-common-suffix.h delete mode 100644 src/algorithms/makefile.in (limited to 'src/algorithms') diff --git a/src/algorithms/CMakeLists.txt b/src/algorithms/CMakeLists.txt deleted file mode 100644 index 0ac17f57c..000000000 --- a/src/algorithms/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -#SET(algorithms_SRC -#find-if-before.h -#find-last-if.h -#longest-common-suffix.h -#) -#ADD_LIBRARY(algorithms STATIC ${algorithms_SRC}) \ No newline at end of file diff --git a/src/algorithms/Makefile_insert b/src/algorithms/Makefile_insert deleted file mode 100644 index dff5b578d..000000000 --- a/src/algorithms/Makefile_insert +++ /dev/null @@ -1,5 +0,0 @@ - -algorithms/all: - -algorithms/clean: - diff --git a/src/algorithms/find-if-before.h b/src/algorithms/find-if-before.h deleted file mode 100644 index 6a0f63be6..000000000 --- a/src/algorithms/find-if-before.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Inkscape::Algorithms::find_if_before - finds the position before - * the first value that satisifes - * the predicate - * - * Authors: - * MenTaLguY - * - * Copyright (C) 2005 MenTaLguY - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef SEEN_INKSCAPE_ALGORITHMS_FIND_IF_BEFORE_H -#define SEEN_INKSCAPE_ALGORITHMS_FIND_IF_BEFORE_H - -#include - -namespace Inkscape { - -namespace Algorithms { - -template -inline ForwardIterator find_if_before(ForwardIterator start, - ForwardIterator end, - UnaryPredicate pred) -{ - ForwardIterator before=end; - while ( start != end && !pred(*start) ) { - before = start; - ++start; - } - return ( start != end ) ? before : end; -} - -} - -} - -#endif - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : diff --git a/src/algorithms/find-last-if.h b/src/algorithms/find-last-if.h deleted file mode 100644 index 1ffd63b9c..000000000 --- a/src/algorithms/find-last-if.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Inkscape::Algorithms::find_last_if - * - * Authors: - * MenTaLguY - * - * Copyright (C) 2004 MenTaLguY - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef SEEN_INKSCAPE_ALGORITHMS_FIND_LAST_IF_H -#define SEEN_INKSCAPE_ALGORITHMS_FIND_LAST_IF_H - -#include - -namespace Inkscape { - -namespace Algorithms { - -template -inline ForwardIterator find_last_if(ForwardIterator start, ForwardIterator end, - UnaryPredicate pred) -{ - ForwardIterator last_found(end); - while ( start != end ) { - start = std::find_if(start, end, pred); - if ( start != end ) { - last_found = start; - ++start; - } - } - return last_found; -} - -} - -} - -#endif - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : diff --git a/src/algorithms/longest-common-suffix.h b/src/algorithms/longest-common-suffix.h deleted file mode 100644 index 04d2b179d..000000000 --- a/src/algorithms/longest-common-suffix.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Inkscape::Algorithms::longest_common_suffix - * - * Authors: - * MenTaLguY - * - * Copyright (C) 2004 MenTaLguY - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef SEEN_INKSCAPE_ALGORITHMS_LONGEST_COMMON_SUFFIX_H -#define SEEN_INKSCAPE_ALGORITHMS_LONGEST_COMMON_SUFFIX_H - -#include -#include -#include "util/list.h" - -namespace Inkscape { - -namespace Algorithms { - -/** - * Time costs: - * - * The case of sharing a common successor is handled in O(1) time. - * - * If \a a is the longest common suffix, then runs in O(len(rest of b)) time. - * - * Otherwise, runs in O(len(a) + len(b)) time. - */ - -template -ForwardIterator longest_common_suffix(ForwardIterator a, ForwardIterator b, - ForwardIterator end) -{ - typedef typename std::iterator_traits::value_type value_type; - return longest_common_suffix(a, b, end, std::equal_to()); -} - -template -ForwardIterator longest_common_suffix(ForwardIterator a, ForwardIterator b, - ForwardIterator end, BinaryPredicate pred) -{ - if ( a == end || b == end ) { - return end; - } - - /* Handle in O(1) time the common cases of identical lists or tails. */ - { - /* identical lists? */ - if ( a == b ) { - return a; - } - - /* identical tails? */ - ForwardIterator tail_a(a); - ForwardIterator tail_b(b); - if ( ++tail_a == ++tail_b ) { - return tail_a; - } - } - - /* Build parallel lists of suffixes, ordered by increasing length. */ - - using Inkscape::Util::List; - using Inkscape::Util::cons; - ForwardIterator lists[2] = { a, b }; - List suffixes[2]; - - for ( int i=0 ; i < 2 ; i++ ) { - for ( ForwardIterator iter(lists[i]) ; iter != end ; ++iter ) { - if ( iter == lists[1-i] ) { - // the other list is a suffix of this one - return lists[1-i]; - } - - suffixes[i] = cons(iter, suffixes[i]); - } - } - - /* Iterate in parallel through the lists of suffix lists from shortest to - * longest, stopping before the first pair of suffixes that differs - */ - - ForwardIterator longest_common(end); - - while ( suffixes[0] && suffixes[1] && - pred(**suffixes[0], **suffixes[1]) ) - { - longest_common = *suffixes[0]; - ++suffixes[0]; - ++suffixes[1]; - } - - return longest_common; -} - -} - -} - -#endif /* !SEEN_INKSCAPE_ALGORITHMS_LONGEST_COMMON_SUFFIX_H */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : diff --git a/src/algorithms/makefile.in b/src/algorithms/makefile.in deleted file mode 100644 index 112aae15d..000000000 --- a/src/algorithms/makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Convenience stub makefile to call the real Makefile. - -@SET_MAKE@ - -OBJEXT = @OBJEXT@ - -# Explicit so that it's the default rule. -all: - cd .. && $(MAKE) algorithms/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) algorithms/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) -- cgit v1.2.3