Commit Graph

77 Commits

Author SHA1 Message Date
Mike Gelfand db3d40d0ed Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
Charles Kerr e127b20c05
chore: fix compiler warnings (#1412)
* chore: fix compiler warnings
2020-08-27 18:41:26 -05:00
Mike Gelfand ff8d0dbf3b Switch from UNUSED macro to TR_UNUSED macro
Since there is no way to mark parameters as [potentially] unused in
standard C and when using MSVC compiler, use the widely accepted
cast-to-void approach instead.
2020-08-18 14:19:55 +03:00
Mike Gelfand 98695fe3c1 Introduce our own assertion macros with finer control 2017-06-08 10:24:12 +03:00
Mike Gelfand e1d53855f4 Avoid declaring multiple variables on the same line 2017-05-01 18:46:41 +03:00
Mike Gelfand a762c770f2 Make conditional expressions explicitly boolean 2017-04-30 19:26:01 +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 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 605e2e89ad use evutil_socket_t instead of int to define socket types. Patch my mikedLd :) 2013-09-08 17:03:11 +00:00
Jordan Lee f75027d5e9 make all the log functions/structs/enums use a single 'tr_log' namespace, such as tr_logGetQueue, tr_logAddInfo, tr_logIsLevelActive 2013-01-25 23:34:20 +00:00
Jordan Lee ad3407567b (libT) copyediting: modify more files to the new indentation/whitespace formatting 2013-01-24 23:59:52 +00:00
Jordan Lee a2d2a10226 (trunk, libT) #5165: fix r13625 oops 2012-12-07 01:53:31 +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 6d4858d8dd (trunk) #4732 "allow switching between internal and system libnatpmp" -- fixed with patch scarabeus and applied by me, so any patch breakage is probably mine... ;) 2012-02-04 01:28:15 +00:00
Jordan Lee 1304aa0079 (trunk libT) still fiddling around with #includes -- this time removing unncecessary libT includes from libT .c files 2011-03-25 01:41:57 +00:00
Jordan Lee 375694eda9 (trunk) copyediting: remove some unneeded #includes, and annotate some needed ones 2011-03-24 21:49:42 +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 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 ae84dc70dd (trunk libT) #3836 "libevent2 support" -- finish moving to the libevent2 API mode. don't include the backwards-compatable API headers. 2010-12-24 08:58:41 +00:00
Charles Kerr 841be713d1 (trunk libT) #3383 "When port forwarding, check to see if the public port matches the private port" -- fixed 2010-07-05 21:04:17 +00:00
Charles Kerr 7936f0d5d1 (trunk libT) clean up #includes for event.h and evutil.h 2010-05-19 16:17:51 +00:00
Charles Kerr a694ac185c (trunk libT) #2982 "changing port number doesn't actually change until program restart" -- fixed in trunk for 1.90 2010-02-12 04:57:40 +00:00
Charles Kerr 13b03ba195 (trunk libT) #2892 "changing port number doesn't actually change until program restart" -- possible fix 2010-02-11 14:28:40 +00:00
Charles Kerr 1c8426cfee (trunk libT) fix some #include statements 2010-01-20 23:58:09 +00:00
Charles Kerr 5c26afdb52 happy new year! 2010-01-04 21:00:47 +00:00
Charles Kerr 21bd268aa9 (trunk libT) fix <assert.h> #includes 2010-01-01 22:14:50 +00:00
Charles Kerr 1c772bd1fe (trunk libT) finally get rid of the last remnants of tr_timer 2009-12-10 05:52:46 +00:00
Charles Kerr 78ead8c3dd (trunk) update the copyright notices 2009-12-05 02:19:24 +00:00
Charles Kerr ea072953c5 (trunk libT) one-liner fix for #2544 (launchpad 458735): crash in port forwarding if evtimer gets deleted 2009-10-30 03:20:53 +00:00
Charles Kerr c61f8987de (trunk libT) #2538 startup takes too long 2009-10-29 17:25:03 +00:00
Charles Kerr c85ee09fef (trunk) trunk's just been too stable lately. #2119: reload settings.json on SIGHUP 2009-10-23 03:41:36 +00:00
Charles Kerr 24746cff7f (trunk libT) minor #include futzing 2009-07-01 14:58:57 +00:00
Charles Kerr 1ae47c697d (trunk) silence some minor gcc warnings 2009-06-23 14:15:23 +00:00
Charles Kerr 1be7f51b3d (trunk libT) simplify the evtimer / struct timeval code a little 2009-06-15 03:24:40 +00:00
Charles Kerr a2b9fcc592 (trunk libT) possible fix for #2078: Assertion failed: (tv->tv_usec >= 0) 2009-06-12 23:01:35 +00:00
Charles Kerr bda5a11eb4 (trunk libT) probable fix for #2111: session-set causes crash on second attempt 2009-05-26 20:52:08 +00:00
Charles Kerr bc632a9360 (trunk libT) possible fix for the slow startup reported by livings and Waldorf 2009-05-20 17:35:41 +00:00
Charles Kerr da42fe8a7c (trunk libT) #2035: Transmission causes wakeups by unnecessary polling. 2009-05-14 13:42:29 +00:00
Charles Kerr 577edddaea (trunk libT) #1993: Check if UPNP port is still open. Patch from KyleK 2009-04-22 16:00:45 +00:00
Erick Turnquist 2719372bc6 (trunk) #1497 Options to listen on specific network sockets 2009-04-15 21:05:58 +00:00
Charles Kerr 14a400b7f6 (trunk libT) #1810: DoS vulnerability wrt incoming connections 2009-02-12 20:43:07 +00:00
Erick Turnquist 94b98030cb (trunk libT) stop using ipv4-mapped listener sockets. this should have the added effect of fixing #1789 2009-02-07 00:34:10 +00:00
Charles Kerr f945058de0 (trunk libT) minor torrent iteration cleanup. (wereHamster, charles) 2009-01-13 16:51:38 +00:00
Charles Kerr fe816d8135 (trunk) update the GPL code's copyright dates 2009-01-10 23:09:07 +00:00
Charles Kerr dfcc9173e5 (trunk libT) #include "session.h" cleanup from wereHamster 2008-12-23 17:27:15 +00:00