~ubuntu-branches/ubuntu/quantal/transmission/quantal

« back to all changes in this revision

Viewing changes to libtransmission/ptrarray.c

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda, Krzysztof Klimonda, Chris Coulson
  • Date: 2010-03-03 02:55:26 UTC
  • mfrom: (1.1.34 upstream) (2.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100303025526-qcjmpnlvk9jv3y5o
Tags: 1.92-0ubuntu1
[ Krzysztof Klimonda ]
* New upstream release (LP: #538034), rebased on debian testing.
  Remaining changes:
  - debian/control:
    + Added replaces & provides clutch (now included as part of transmission).
      Can be removed in lucid+1
    + Added liblaunchpad-integration-dev and lsb-release to Build-Depends
  - debian/rules:
    + create a po template during package build.
  - debian/patches/01_lpi.patch:
    + integrate transmission with launchpad
  - debian/patches/20_add_x-ubuntu-gettext-domain.diff:
    + add x-ubuntu-gettext-domain to .desktop file.
  - debian/transmission-daemon.default:
    - remove --auth from OPTIONS
  - debian/control, debian/rules:
    + build transmission gtk+ client with both gconf and libcanberra support.
  - debian/patches/dont_build_libevent.patch:
    + disable libevent in configure.ac and Makefile.am because we use autotools
      to regenerate build files.
  - lucid/debian/patches/updateminiupnpcstrings_double_escape_slash.patch:
    + Deleted as the bug is fixed upstream
* Fixes bugs:
  - Fix directory selection error in GTK+ 2.19 (LP: #518692)
  - Transmission "Set Location" - dialog doesn't disappear (LP: #529037)
  - The "Torrent Options" dialog's Torrent Priority row gets too much
    vertical stretch (LP: #527299)
  - "Open Folder" behavior can be confusing for single-file torrents
    (LP: #505861)
* Refreshed 99_autoreconf.patch

[ Chris Coulson ]
* debian/patches/disable_web_ui.patch:
  - Disable the web UI by default again (LP: #542194)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * This exemption does not extend to derived works not owned by
8
8
 * the Transmission project.
9
9
 *
10
 
 * $Id: ptrarray.c 10209 2010-02-15 16:44:02Z charles $
 
10
 * $Id: ptrarray.c 10348 2010-03-10 16:35:11Z charles $
11
11
 */
12
12
 
13
13
#include <assert.h>
73
73
                   void        * ptr,
74
74
                   int           pos )
75
75
{
76
 
    if( pos < 0 || pos > t->n_items )
77
 
        pos = t->n_items;
78
 
 
79
76
    if( t->n_items >= t->n_alloc )
80
77
    {
81
78
        t->n_alloc = MAX( FLOOR, t->n_alloc * 2 );
82
79
        t->items = tr_renew( void*, t->items, t->n_alloc );
83
80
    }
84
81
 
85
 
    memmove( t->items + pos + 1,
86
 
             t->items + pos,
87
 
             sizeof( void* ) * ( t->n_items - pos ) );
 
82
    if( pos < 0 || pos > t->n_items )
 
83
        pos = t->n_items;
 
84
    else
 
85
        memmove( t->items + pos + 1,
 
86
                 t->items + pos,
 
87
                 sizeof( void* ) * ( t->n_items - pos ) );
88
88
 
89
89
    t->items[pos] = ptr;
90
90
    t->n_items++;