Commit Graph

42 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
Mike Gelfand 10cdd7f790 Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
Mike Gelfand 13bbaeec76 Use field initializers for readability 2017-06-24 13:30:33 +03:00
Mike Gelfand 1e3d20422a Reduce for loop variables scope 2017-05-14 01:38:31 +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 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 d7f4478679 (trunk, libT) #5735 'segfault iside node_alloc' -- fixed with patch by benjarobin 2014-07-06 20:06:45 +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 d112a813e9 make accessing tr_list's recycle nodes threadsafe. patch by mike.did, fixes #5352 2013-08-25 16:27:19 +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 46dd6f17ab (trunk libT) oops, r12313 committed the wrong version of list.c 2011-04-05 00:59:49 +00:00
Jordan Lee e0f6ade71e (trunk libT) keep a pool of reusable tr_list nodes 2011-04-05 00:56:56 +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 e7cf05a6ba (trunk libT) #3427 "use shortest-job-first scheduling for verifying local data" -- patch from wateenellende and sadface 2010-07-19 14:44:24 +00:00
Charles Kerr 4f5670f9c0 (trunk libT) #2842 "Transmission crashes randomly on ARM-based Synology NAS" -- experimental commit based on giovannibajo's suggestion in comment:39 about the list struct's alignment 2010-04-23 23:45:44 +00:00
Charles Kerr 0d91f3cadf (trunk libT) more documentation and doxygen markup 2010-01-06 00:18:33 +00:00
Charles Kerr 5c26afdb52 happy new year! 2010-01-04 21:00:47 +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 07046a26b2 (trunk libT) inline some one-liners 2009-06-30 16:40:34 +00:00
Charles Kerr ce9eff1fb2 (trunk libT) #1743: potential threading issue in tr_list. only affects 1.50b[1-3] 2009-01-24 02:33:25 +00:00
Charles Kerr fe816d8135 (trunk) update the GPL code's copyright dates 2009-01-10 23:09:07 +00:00
Charles Kerr 3a01d2e619 (trunk libT) recycle the tr_list nodes when possible 2008-12-29 17:28:14 +00:00
Charles Kerr 5d1c109fc4 (trunk libT) speed improvments from wereHamster 2008-12-22 19:16:06 +00:00
Charles Kerr 94a491aefb (trunk libT) remove unused functions tr_list_insert_sorted(), tr_list_foreach(). make tr_list_find_data() private. 2008-12-22 17:35:10 +00:00
Charles Kerr 9594112d27 updated email address 2008-12-16 00:20:44 +00:00
Charles Kerr b824c704b7 first batch of portability changes based on spry's winport:
(1) added tr_getcwd(), a simple portability wrapper for getcwd()
(2) cli: show the help page if no command-line arguments are provided
(3) daemon: use tr_wait() intead of sleep()
(4) daemon: SIGQUIT, SIGPIPE, SIGHUP aren't defined on windows
(5) libtransmission: a couple of small cleanups to bencode.c, list.c, web.c
(6) libtransmission: win32 portability fixes to platform.c
2008-10-13 22:26:02 +00:00
Charles Kerr cc89872dd4 run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened 2008-09-23 19:11:04 +00:00
Charles Kerr b860119cd3 minor text cleanup 2008-08-01 16:43:22 +00:00
Charles Kerr ce6c33b7bf set copyright info to 2008 2008-01-01 17:20:20 +00:00
Charles Kerr c28a94d04c fix a couple of memory corruption errors while trying to track down tiennou's report on peer-msgs.c:pulse() -> inout.c:163 assertion failure. 2007-09-28 14:27:56 +00:00
Mitchell Livingston 76da1185ca merge encryption branch to trunk (xcode project is still out of date) 2007-09-20 16:32:01 +00:00
Charles Kerr ea49180f94 $Id$ 2007-08-18 17:19:49 +00:00
Charles Kerr 26dabf816e make list less error-prone by changing the API s.t. we're guaranteed to update the list's pointer correctly. 2007-08-14 14:18:54 +00:00
Charles Kerr 34b4d0b7f9 fix r2306 double-free crash reported by Gimp_, webaake 2007-07-09 16:30:20 +00:00
Charles Kerr 08f787291a remove the "peer is asking for too many blocks!" warning reported by Gimp_ by changing from a fixed-size array to a linked lists of incoming requests 2007-07-09 04:37:16 +00:00