~ubuntu-branches/ubuntu/wily/xmms2/wily

« back to all changes in this revision

Viewing changes to src/lib/xmmstypes/coll.c

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2008-07-04 16:23:34 UTC
  • mfrom: (1.1.5 upstream) (6.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080704162334-b3esbkcapt8wbrk4
Tags: 0.5DrLecter-2ubuntu1
* Merge from debian unstable (LP: #241098), remaining changes:
  + debian/control:
    + Update Maintainer field
    + add lpia to xmms2-plugin-alsa supported architectures
    + Added liba52-0.7.4-dev to build depends
  + debian/rules: Added patch, patch-stamp and unpatch
  + changed 01_gcc4.3.patch:
    + src/include/xmmsclient/xmmsclient++/helpers.h: Added #include <climits>
* New upstream relase fixes LP: #212566, #222341

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  XMMS2 - X Music Multiplexer System
2
 
 *  Copyright (C) 2003-2007 XMMS2 Team
 
2
 *  Copyright (C) 2003-2008 XMMS2 Team
3
3
 *
4
4
 *  PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5
5
 *
68
68
 * Increases the references for the #xmmsc_coll_t
69
69
 *
70
70
 * @param coll the collection to reference.
 
71
 * @return coll
71
72
 */
72
 
void
 
73
xmmsc_coll_t *
73
74
xmmsc_coll_ref (xmmsc_coll_t *coll)
74
75
{
75
 
        x_return_if_fail (coll);
 
76
        x_return_val_if_fail (coll, NULL);
 
77
 
76
78
        coll->ref++;
 
79
 
 
80
        return coll;
77
81
}
78
82
 
79
83
/**
306
310
 
307
311
        x_return_val_if_fail (coll, 0);
308
312
 
309
 
        if ((index >= coll->idlist_size) || (newindex >= coll->idlist_size)) {
 
313
        if ((index >= coll->idlist_size - 1) || (newindex >= coll->idlist_size - 1)) {
310
314
                return 0;
311
315
        }
312
316
 
340
344
 
341
345
        x_return_val_if_fail (coll, 0);
342
346
 
 
347
        if (index >= coll->idlist_size - 1) {
 
348
                return 0;
 
349
        }
 
350
 
343
351
        coll->idlist_size--;
344
352
        for (i = index; i < coll->idlist_size; i++) {
345
353
                coll->idlist[i] = coll->idlist[i + 1];