Commit Graph

33 Commits

Author SHA1 Message Date
Charles Kerr 677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Mike Gelfand 5b29fe1556 Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
Mike Gelfand 14370e5353 Fix a number of other style inconsistencies met along the way (part 2) 2017-05-01 18:47:49 +03:00
Mike Gelfand dadffa2c0f Align type qualifiers to the right (code style)
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand d7930984ef Adjust uncrustify config, reformat all but Mac client
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).

The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand 2248d3670f Get rid of $Id$ SVN keywords in source files 2016-09-02 23:10:15 +03:00
Jordan Lee 1af60ad6ad use '#pragma once' instead of #ifndef..#define..#endif guards 2016-03-29 16:37:21 +00:00
Jordan Lee 02cff80c2d Copyedit the license's revised text: (1) remove unnecessary repitition use of the word 'license' from the top of the header and source files (2) add the standard 'we hope it's useful, but no warranty' clause to COPYING (3) make explicit that linking OpenSSL is allowed (see https://people.gnome.org/~markmc/openssl-and-the-gpl.html for background) (4) sync the Qt and GTK+ clients' license popups with COPYING's revised text 2014-01-21 03:10:30 +00:00
Jordan Lee 4b9626bb83 Licensing changes:
1. add the option the code to be used under GPLv2 or GPLv3; previously only GPLv2 was allowed

2. add the "proxy option" as described in GPLv3 so we can add future licenses without having to bulk-edit everything again :)

3. remove the awkward "exception for MIT code in Mac client" clause; it was unnecessary and confusing.
2014-01-19 01:09:44 +00:00
Jordan Lee 4904b923fb (trunk) restore copyright year as suggested in email by rms 2014-01-18 20:56:57 +00:00
Jordan Lee 104d4aa772 don't inline functions that can't be inlined. 2012-12-13 02:00:45 +00:00
Jordan Lee 3d38723ad9 Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). 2012-12-05 17:29:46 +00:00
Jordan Lee 18b90f60bc (trunk libt) in tr_bitfieldSetRaw(), add a `bounded' argument for cases where we know how large the final bitfield will be. This can be used ensure that the excess bits at the end of the array are zeroed out and safe for bitfield.c's countArray() function. 2011-09-26 22:50:42 +00:00
Jordan Lee 0560b14cfe #4496 'freeze when having a huge torrent' -- add a bitfield helper function to init the bitfield from an array of flags. 2011-09-20 23:39:40 +00:00
Jordan Lee 17894f258c remove unneeded include 2011-04-04 21:42:04 +00:00
Jordan Lee 210068410d (trunk libT) merge tr_bitfieldTestFast() and tr_bitfieldTest() 2011-03-30 04:23:20 +00:00
Jordan Lee 3660c44934 (trunk libT) handle situations where we don't know the bitfield's upper bound in advance. This comes up sometimes with magnet links. 2011-03-30 04:14:57 +00:00
Jordan Lee 947134bbb3 (trunk libT) more completion and bitfield cleanup: (1) fix regression in tr_cpSizeWhenDone() reported by Waldorf, (2) make simple one-liner functions inlined 2011-03-29 01:17:18 +00:00
Jordan Lee 83c0e4f011 (trunk libT) break the mac build and introduce new crashes.
This is partially to address #4145 "Downloads stuck at 100%" by refactoring the bitset, bitfield, and tr_completion; however, the ripple effect is larger than usual so things may get worse in the short term before getting better.

livings124: to fix the mac build, remove bitset.[ch] from xcode
2011-03-28 16:31:05 +00:00
Jordan Lee b4d36aeb54 (trunk) #4138 "use stdbool.h instead of tr_bool" -- done. 2011-03-22 15:19:54 +00:00
Jordan Lee 2b9db3c242 (trunk libT) #4048 "use bitsets instead of bitfield in tr_completion" -- done.
Excuse the sprawl. Much of this didn't fit into self-contained commits.
2011-02-23 03:54:04 +00:00
Jordan Lee 094b726316 (trunk libT) remove unused code: tr_bitfieldIsEmpty() 2011-02-21 15:43:41 +00:00
Jordan Lee 32237dbdb0 (trunk libT) remove unused functions: tr_bitsetDifference() tr_bitfieldDifference() 2011-02-21 15:36:07 +00:00
Jordan Lee 879a2afcbd Update the copyright year in the source code comments.
The Berne Convention says that the copyright year is moot, so instead of adding another year to each file as in previous years, I've removed the year altogether from the source code comments in libtransmission, gtk, qt, utils, daemon, and cli.

Juliusz's copyright notice in tr-dht and Johannes' copyright notice in tr-lpd have been left alone; it didn't seem appropriate to modify them.
2011-01-19 13:48:47 +00:00
Charles Kerr e5bb3205a1 (trunk) Join the 21st century and use only 1 space at the end sentences. This commit is nearly as important as the semi-annual ones that remove trailing spaces from the ends of lines of code... :) 2010-12-27 19:18:17 +00:00
Charles Kerr 80f69ee7d3 (trunk) fix svn properties on several files. Thanks ot Elbandi for suggesting this 2010-10-01 13:33:39 +00:00
Charles Kerr 9eb07e9b16 (trunk) No code changes here... filling in some of the blanks in the "peers" and "utils" doxygen groups' documentation. 2010-01-19 19:37:00 +00:00
Charles Kerr 6ce8085243 (trunk) housekeeping: (1) add standard svn properties for $Id$ substitution in some files (2) add #include guards in a couple of libtransmission headers (3) refresh build instructions in README 2010-01-14 14:20:49 +00:00
Charles Kerr 5c26afdb52 happy new year! 2010-01-04 21:00:47 +00:00
Charles Kerr 6b8fb48d64 (trunk libT) replace the TR_INLINE macro with the standard "inline" keyword, since we require inline functions anyway 2010-01-01 22:26:35 +00:00
Charles Kerr 78ead8c3dd (trunk) update the copyright notices 2009-12-05 02:19:24 +00:00
Charles Kerr cb79214854 (trunk) remove trailing spaces 2009-08-10 20:04:08 +00:00
Charles Kerr 8e676171d4 (trunk libT) move tr_bitfield into its own, package-visible source files. this may break the mac build temporarily until the xcode file gets synced 2009-06-15 00:11:06 +00:00