Changeset 3098


Ignore:
Timestamp:
Oct 28, 2013, 7:24:00 AM (8 years ago)
Author:
Peter
Message:

merge release 0.10.3 into trunk

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Makefile.am

    r3049 r3098  
    9494  esac
    9595
    96 maintainer-check-local: syntax-check mc_installcheck yat-pc-check \
    97   mc_without_samtools
     96maintainer-check-local:
     97  $(MAKE) $(AM_MAKEFLAGS) syntax-check
     98  $(MAKE) $(AM_MAKEFLAGS) mc_installcheck
     99  $(MAKE) $(AM_MAKEFLAGS) mc_without_samtools
     100  $(MAKE) $(AM_MAKEFLAGS) yat-pc-check
    98101
    99102mc_installcheck:
     
    170173  $(MAKE) $(AM_MAKEFLAGS) release
    171174  $(MAKE) $(AM_MAKEFLAGS) svn-tag
    172   $(MAKE) $(AM_MAKEFLAGS) annaounce.txt
     175  $(MAKE) $(AM_MAKEFLAGS) announce.txt
    173176  $(MAKE) $(AM_MAKEFLAGS) upload
    174177
  • trunk/NEWS

    r3068 r3098  
    1818
    1919yat 0.10.x series from http://dev.thep.lu.se/yat/svn/branches/0.10-stable
     20
     21version 0.10.3 (released 28 October 2013)
     22  - utility::replace(string&, string, string) is now implemented (bug #768)
     23
     24  A complete list of closed tickets can be found here [[br]]
     25  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.10.3
    2026
    2127version 0.10.2 (released 4 April 2013)
  • trunk/build_support/gen_announce.sh.in

    r3018 r3098  
    33#@configure_input@
    44
    5 # Copyright (C) 2011, 2012 Peter Johansson
     5# Copyright (C) 2011, 2012, 2013 Peter Johansson
    66#
    77# This file is part of yat, http://dev.thep.lu.se/yat
     
    2020# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
    2121
    22 # default config values
    23 # you can override these values in a file config.txt
    24 sf_user=peter31042
    25 
    26 # read config.txt if it exists
    27 test -f config.txt && . config.txt
     22set -e
    2823
    2924distdir=@PACKAGE@-@VERSION@
    3025dist_archive="${distdir}.tar.gz"
    31 
    32 
    33 # Create text for release announcement text
    34 write_announce_mail ()
    35 {
    3626
    3727cat <<EOF
     
    6656
    6757EOF
    68 }
    69 
    70 set -e
    71 
    72 make release
    73 make svn-tag
    74 echo "write announcement.txt"
    75 write_announce_mail > announcement.txt
    76 
    77 echo "upload to sourceforge"
    78 scp ${dist_archive} ${dist_archive}.MD5 $sf_user,libyat@frs.sourceforge.net:/home/frs/project/l/li/libyat/.
  • trunk/m4/version.m4

    r3018 r3098  
    7272# yat-0.10.1 7:1:0
    7373# yat-0.10.2 7:2:0
     74# yat-0.10.3 7:3:0
    7475#
    7576# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/test/utility.cc

    r3082 r3098  
    66  Copyright (C) 2009, 2010, 2011 Peter Johansson
    77  Copyright (C) 2012 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2013 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    5960void test_fnmatch(test::Suite& suite);
    6061bool test_fnmatch(bool, std::string, std::string);
     62void test_replace(test::Suite& suite);
    6163
    6264template<typename InputIterator, typename Key>
     
    216218  test_dirname(suite);
    217219  test_fnmatch(suite);
     220  test_replace(suite);
    218221
    219222  return suite.return_value();
     
    643646  return false;
    644647}
     648
     649
     650void test_replace(test::Suite& suite)
     651{
     652  std::string s = "Some magic string!!!";
     653  utility::replace(s, "magic", "arbitrary");
     654  if (!suite.add(s=="Some arbitrary string!!!"))
     655    suite.err() << "error: " << s << "\n";
     656}
  • trunk/yat/utility/utility.cc

    r2943 r3098  
    66  Copyright (C) 2010 Peter Johansson
    77  Copyright (C) 2012 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2013 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    187188
    188189
     190  void replace(std::string& str, std::string old_value, std::string new_value)
     191  {
     192    assert(old_value.size());
     193    std::string result;
     194    std::back_insert_iterator<std::string> out(result);
     195    std::string::iterator c = str.begin();
     196    while (c!=str.end()) {
     197      if (str.end() - c >= static_cast<int>(old_value.size()) &&
     198          std::equal(old_value.begin(), old_value.end(), c)) {
     199        std::copy(new_value.begin(), new_value.end(), out);
     200        c += old_value.size();
     201      }
     202      else {
     203        *out = *c;
     204        ++c;
     205      }
     206    }
     207    str.swap(result);
     208  }
     209
     210
    189211}}} // end of namespace utility, yat and thep
Note: See TracChangeset for help on using the changeset viewer.