Commit Graph

90 Commits

Author SHA1 Message Date
Charles Kerr da855a7257
refactor: use std mutex/lock intead of bespoke (#2194)
* refactor: use std mutex/lock intead of bespoke
2021-11-20 15:20:45 -06:00
Charles Kerr 6571be2b95
feat: add tr_strvPath() (#2134)
* feat: add tr_strvJoin

* feat: add tr_strvPath
2021-11-12 18:10:04 -06:00
Charles Kerr cc204e0b2c
refactor: prefer "using" over "typedef" (#1883)
* refactor: prefer "using" over "typedef"
2021-10-06 09:26:07 -05:00
Mike Gelfand db3d40d0ed Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
Mike Gelfand 5b29fe1556 Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
Mike Gelfand 4f9d9ad92b Code style change leftovers
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +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 b82f6009dd Maintain lock file(s) corresponding to session ID 2016-09-27 20:53:10 +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 5fbd24fda5 fix a handful of minor compiler warnings, mostly in the unit tests, eg field width shortening or implicit signed/unsigned conversions 2016-03-29 03:04:54 +00:00
Mike Gelfand 2e6d5c8bc9 Add more booleans to the picture 2015-05-31 22:13:31 +00:00
Jordan Lee b33a7d4dc1 (trunk, libt) #4160 - the slow slog to catch trunk up to mike.dld's 4160 diff continues. This step applies 4160-03b-file.patch, which replaces native file operations with the tr_sys_file_*() portability wrappers added in r14321. 2014-07-28 04:13:38 +00:00
Mitchell Livingston 0e01879974 Use built-in _WIN32 macro instead of WIN32 2014-07-04 00:00:07 +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 74d0f305a6 move platform.c's quota code into its own file. Fixes FTBFS reported in bug #5389 and is also a nice piece of encapsulation. Patch by rb07 2013-07-08 17:07:31 +00:00
Jordan Lee cd09204a6e (trunk) first draft of changing the FreeSpace API to behave as https://trac.transmissionbt.com/ticket/4076#comment:25 -- libT, rpc, qt, and gtk implementations. 2013-02-09 04:05:03 +00:00
Jordan Lee 4cbe6a64e1 (trunk, libT) #3833 'freespace' argument for 'session-get' RPC method -- apply taem's 0003-Cache-download-dir-s-block-device-and-FS-type.patch​ to cache the download dir's block device and FS type 2012-12-27 19:45:01 +00:00
Jordan Lee 5024dbfd22 (trunk, libT) #3833 'freespace' argument for 'session-get' RPC method -- apply taem's 0001-Check-for-available-quota-when-getting-free-disk-spa.patch​ to check for available quota when getting free disk space 2012-12-27 19:39:44 +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 ae972b50c4 utils.h's public function tr_realpath() function relies on the private constant TR_MAX_PATH. Make TR_MAX_PATH public. 2011-10-25 15:57:10 +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
Jordan Lee 69a3b8bbab (trunk, daemon) #3833 "'freespace' argument for 'session-get' RPC method" -- committing patch from taem, reardon, and rb07 2011-01-05 04:41:19 +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 922b47c652 (trunk libT) #3490 "Ambiguous use of directory separators" -- fixed. 2010-08-05 19:54:44 +00:00
Charles Kerr 4ad26f7910 (trunk libT) a couple more minor -Wconversion warnings 2010-07-01 05:39:54 +00:00
Charles Kerr 08628333d1 (trunk libT) part of rb07's win32 portability patches from ticket #3311 2010-06-21 16:44:35 +00:00
Charles Kerr 0051b8a110 re-tweak the previous commit based on feedback from kklimonda 2010-05-06 17:02:31 +00:00
Charles Kerr 2ea9f78eff (trunk libT) tweak MAX_PATH_LENGTH a little for better portability -- defer to limits.h's definition when present 2010-05-06 15:07:18 +00:00
Charles Kerr 0fc7e232a4 (trunk libT) bump MAX_PATH_LENGTH from 2048 to 4096 based on report from kklimonda that the latter number is correct on Ubuntu 2010-04-29 13:57:58 +00:00
Charles Kerr 1357a75d40 (trunk libT) #2911 "requirement of javascript/transmission.js for webinterface unnecessary" -- implemented in trunk for 2.00 2010-03-19 18:48:37 +00:00
Charles Kerr fad8f285a8 (trunk libT) use jch's suggestion of having a per-session page-aligned memory buffer for general reuse. (http://trac.transmissionbt.com/ticket/2551#comment:5) 2010-02-23 07:20:57 +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 e61e0fcd3d (trunk libT) improved API documentation / commenting for doxygen 2010-01-01 22:13:27 +00:00
Charles Kerr ed6e95eef3 (trunk) add #include guards to prevent non-libtransmission files from #including implementation headers 2009-12-15 00:51:39 +00:00
Charles Kerr 78ead8c3dd (trunk) update the copyright notices 2009-12-05 02:19:24 +00:00
Charles Kerr 61e95595b8 (trunk) move tr_lockfile from libtransmission/ to gtk/, since the gtk client is the only one who uses it anymore 2009-08-14 12:53:08 +00:00
Charles Kerr cb79214854 (trunk) remove trailing spaces 2009-08-10 20:04:08 +00:00
Charles Kerr 452cb27f9e (trunk libT) re-start work on making libT doxygen friendly. still a long ways to go on this. 2009-05-29 19:17:12 +00:00
Charles Kerr 141847b902 (trunk libT) update the copyrights on some files that no longer have old code in them 2009-01-07 06:53:29 +00:00
Charles Kerr d463cdb509 (trunk libT) eliminate a couple more unnecessary malloc() + free() pairs 2008-12-30 03:29:09 +00:00
Charles Kerr f761311018 (trunk libT) avoid a few more unnecessary malloc() + free() pairs 2008-12-30 00:56:10 +00:00
Charles Kerr 798bac0fcb (trunk libT) omit unnecessary malloc/free calls in peer-io 2008-12-29 19:01:47 +00:00
Charles Kerr 788b397ecc (trunk libT) more semantic cleanup: tr_handle->tr_session, int->tr_bool, int->tr_port 2008-12-14 11:21:11 +00:00