1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(trunk libT) remove unused code

This commit is contained in:
Charles Kerr 2010-06-28 13:42:45 +00:00
parent 45b0c1d858
commit 8a835610c6
5 changed files with 2 additions and 45 deletions

View file

@ -61,16 +61,6 @@ tr_completion * tr_cpConstruct( tr_completion *, tr_torrent * );
tr_completion * tr_cpDestruct( tr_completion * );
static inline tr_completion* tr_cpNew( tr_torrent * tor )
{
return tr_cpConstruct( tr_new0( tr_completion, 1 ), tor );
}
static inline void tr_cpFree( tr_completion * cp )
{
tr_free( tr_cpDestruct( cp ) );
}
/**
*** General
**/

View file

@ -38,7 +38,6 @@ int tr_open_file_for_writing( const char * filename );
void tr_close_file( int fd );
int64_t tr_lseek( int fd, int64_t offset, int whence );
ssize_t tr_pread(int fd, void *buf, size_t count, off_t offset);
ssize_t tr_pwrite(int fd, const void *buf, size_t count, off_t offset);
int tr_prefetch(int fd, off_t offset, size_t count);

View file

@ -57,18 +57,6 @@ enum { TR_IO_READ, TR_IO_PREFETCH,
TR_IO_WRITE
};
int64_t
tr_lseek( int fd, int64_t offset, int whence )
{
#if defined( HAVE_LSEEK64 )
return lseek64( fd, (off64_t)offset, whence );
#elif defined( WIN32 )
return _lseeki64( fd, offset, whence );
#else
return lseek( fd, (off_t)offset, whence );
#endif
}
/* returns 0 on success, or an errno on failure */
static int
readOrWriteBytes( tr_session * session,

View file

@ -320,31 +320,13 @@ tr_verifyAdd( tr_torrent * tor,
}
static int
compareVerifyByTorrent( const void * va,
const void * vb )
compareVerifyByTorrent( const void * va, const void * vb )
{
const struct verify_node * a = va;
const tr_torrent * b = vb;
const tr_torrent * b = vb;
return a->torrent - b;
}
tr_bool
tr_verifyInProgress( const tr_torrent * tor )
{
tr_bool found = FALSE;
tr_lock * lock = getVerifyLock( );
tr_lockLock( lock );
assert( tr_isTorrent( tor ) );
found = ( tor == currentNode.torrent )
|| ( tr_list_find( verifyList, tor, compareVerifyByTorrent ) != NULL );
tr_lockUnlock( lock );
return found;
}
void
tr_verifyRemove( tr_torrent * tor )
{

View file

@ -29,8 +29,6 @@ void tr_verifyAdd( tr_torrent * tor,
void tr_verifyRemove( tr_torrent * tor );
tr_bool tr_verifyInProgress( const tr_torrent * tor );
void tr_verifyClose( tr_session * );
/* @} */