source: trunk/libtransmission/ptrarray.h @ 2843

Last change on this file since 2843 was 2843, checked in by charles, 15 years ago

update version.sh to exclude third-party. add $Id:$ to the new files s.t. version.sh will find them.

File size: 1.6 KB
Line 
1/*
2 * This file Copyright (C) 2007 Charles Kerr <charles@rebelbase.com>
3 *
4 * This file is licensed by the GPL version 2.  Works owned by the
5 * Transmission project are granted a special exemption to clause 2(b)
6 * so that the bulk of its code can remain under the MIT license.
7 * This exemption does not extend to derived works not owned by
8 * the Transmission project.
9 *
10 * $Id:
11 */
12
13#ifndef _TR_POINTERS_H_
14#define _TR_POINTERS_H_
15
16/**
17 * A simple pointer array that resizes itself dynamically.
18 */
19typedef struct tr_ptrArray_s tr_ptrArray_t;
20
21tr_ptrArray_t * tr_ptrArrayNew         ( void );
22void            tr_ptrArrayFree        ( tr_ptrArray_t* );
23void**          tr_ptrArrayPeek        ( tr_ptrArray_t*, int * size );
24void**          tr_ptrArrayBase        ( tr_ptrArray_t* );
25void            tr_ptrArrayClear       ( tr_ptrArray_t* );
26int             tr_ptrArrayInsert      ( tr_ptrArray_t*, void*, int pos );
27int             tr_ptrArrayAppend      ( tr_ptrArray_t*, void* );
28void            tr_ptrArrayErase       ( tr_ptrArray_t*, int begin, int end );
29int             tr_ptrArraySize        ( const tr_ptrArray_t* );
30int             tr_ptrArrayEmpty       ( const tr_ptrArray_t* );
31
32int             tr_ptrArrayInsertSorted( tr_ptrArray_t*, void*,
33                                         int compare(const void*,const void*) );
34void*           tr_ptrArrayRemoveSorted( tr_ptrArray_t*, void*,
35                                         int compare(const void*,const void*) );
36void*           tr_ptrArrayFindSorted  ( tr_ptrArray_t*, void*,
37                                         int compare(const void*,const void*) );
38
39#endif
Note: See TracBrowser for help on using the repository browser.