1c4e4227faa77026eeb633e2e575bedf1897daa3 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: make sure line break recommendation matches edit configuration
In the .vimrc and .dir-locals.el we suggest a line width of 119. We should recommend the same in CODING_STYLE. |
fa195fa775e548a15c0cc21d4c8611fd0286245a |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: elaborate on usage of C99 fixed size integer types |
ec566e4c7cee67ec2c39475ef08f18a9f1b80efd |
|
19-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
update CODING_STYLE |
041f793b6b1e4b86edc909b4b2867463b3ef3efd |
|
08-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
update CODING_STYLE |
c7ddad5148de6e41445f62a80fb6846dce1a6856 |
|
06-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
update CODING_STYLE |
8ac5aaa9fa47622e480391886c34f052f5ff909d |
|
01-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
update CODING_STYLE with various additions |
59f448cf15f94bc5ebfd5b254de6f2441d02fbec |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: never use the off_t unless glibc makes us use it
off_t is a really weird type as it is usually 64bit these days (at least
in sane programs), but could theoretically be 32bit. We don't support
off_t as 32bit builds though, but still constantly deal with safely
converting from off_t to other types and back for no point.
Hence, never use the type anymore. Always use uint64_t instead. This has
various benefits, including that we can expose these values directly as
D-Bus properties, and also that the values parse the same in all cases. |
54c1f2d761b506132a709a7e8573c7b54d048cf0 |
|
05-Sep-2015 |
David Herrmann <dh.herrmann@gmail.com> |
CODING_STYLE: mandate alphabetical include order
systemd-internal headers must not rely on include order. That means, they
either must contain forward-declarations of used types/functions, or they
must include all dependencies on their own. Therefore, there is no reason
to mandate an include order on the call-side.
However, global includes should always be ordered first. We don't want
local definitions to leak into global includes, possible changing their
behavior. Apparently, namespacing is a complex problem that people are
incapable of implementing properly..
Apart from "global before local", there is no reason to mandate a random
include order (which we happen to do right now). Instead, mandate
alphabetical ordering. The current rules do not have any benefit at all.
They neither reduce include-complexity, nor allow easy auditing of
include files. But with alphabetical ordering, we get duplicate-detection
for free, it gets *much much* easier to figure out whether a header is
already included, and it is trivial to add new headers. |
cad6982291a0e3cae4b8b1fad140ffd512e2835c |
|
31-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: say that "for (;;)" is better than "while (1)" |
11c9f1e48a683fb2e78ee531016099d567baa19a |
|
17-Jun-2015 |
Simon McVittie <simon.mcvittie@collabora.co.uk> |
Stop talking about the "XDG" version of basename()
XDG refers to X Desktop Group, a former name for freedesktop.org.
This group is responsible for specifications like basedirs,
.desktop files and icon naming, but as far as I know, it has never
tried to redefine basename().
I think these references were meant to say XPG (X/Open Portability
Guide), a precursor of POSIX. POSIX is better-known and less easily
confused with XDG, and is how the basename(3) man page describes
the libgen.h version of basename().
The other version of basename() is glibc-specific and is described
in basename(3) as "the GNU version"; specifically mention that
version, to disambiguate. |
1811232c4cc5d93cb02d93ed448a712e88e30868 |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document order in which to #include headers |
8cb1cc8dc339be9f96cd290882d775cccfc4d7e7 |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document that we should avoid kernel types like u32 |
0fef704c6fbb07cb0289eadc405f49286aa70e53 |
|
15-May-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document that EXIT_FAILURE and EXIT_SUCCESS should be used |
a5ecb0cec25befafdee1e32c6f24cda8e29f89af |
|
15-May-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document best practices when initializing structs |
42706f47c918b035dee82f4bad15bf6499592d1c |
|
15-May-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document alloca() DONTS |
2708526c4ade0473b95f6c93d21f6d516b89a924 |
|
22-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document that we prefer /* comments */ over // comments |
ba780c116fc919c58fad07f45f4e800a062af63e |
|
21-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document how destructors should work |
9ff3e22aa93fe461f8971f2468c65dc928fadc9e |
|
03-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: mention that dup() should not be used |
3dbafa39b08025350e7b17f4874a343c789ff9b3 |
|
02-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: clarify that exit() is never OK to call |
918315e457ca36cab94ff3b6060e143968c99ace |
|
10-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: mention casting of function invocations to (void) |
ddb64d82708da0cdd0a88fa433260d2e60bffb64 |
|
28-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
update TODO |
eef46c372f64f40dd75415b2c504c73138719c8d |
|
11-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we include libgen.h, immediately undefine basename()
Also, document in adjacent comments and in CODING_STYLE why we do that. |
699eee62d1b1ad8af1ca944a1b500b6c3096de0d |
|
10-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: elaborate on O_CLOEXEC a bit |
798d3a524ea57aaf40cb53858aaa45ec702f012d |
|
04-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reindent man pages to 2ch |
dd4540da0e1f983540d862cc657df7161a3bdd06 |
|
30-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: clarify that we really should use O_CLOEXEC everywhere |
7f8bf08f9036de419ad14c55b61eda74c6659d3a |
|
27-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: don't clobber arguments on failure |
61f33134fc9231e07e1b9519b140d68139e9fad0 |
|
22-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: clarify that single-line if blocks should not be enclosed in {} |
06b643e7f5a3b79005dd57497897ab7255fe3659 |
|
30-Aug-2014 |
Ruben Kerkhof <ruben@rubenkerkhof.com> |
Fix a few more typos |
3fdbc8205885f117b7dea289b44217310663e731 |
|
21-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: document that we don't break lines at 80ch |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there. |
8e5edf8d42d3c441e4b09aa1dbbaf2cb605c1328 |
|
28-Jun-2014 |
Jan Engelhardt <jengelh@inai.de> |
doc: use expanded forms for written style |
45df8656ebb1b0559a75993d1508fc61c2d39829 |
|
28-Jun-2014 |
Jan Engelhardt <jengelh@inai.de> |
doc: typographical improvements and choice of words |
8d0e0ddda6501479eb69164687c83c1a7667b33a |
|
28-Jun-2014 |
Jan Engelhardt <jengelh@inai.de> |
doc: grammatical corrections |
865cc19a34cd9a3ff98a7b3754747f4904f56faa |
|
25-May-2014 |
Jonathan Boulle <jonathanboulle@gmail.com> |
Fix several small typos |
d3a485135a98184cba28992752834a1bb4769003 |
|
09-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
extend CODING_STYLE document a bit |
f168c27313e4d7b0aabee037dc9c78a5799f0597 |
|
03-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
trivial coding style clean ups
- Add space between if/for and the opening parentheses
- Place the opening brace on same line as the function (not for udev)
From the CODING_STYLE
Try to use this:
void foo() {
}
instead of this:
void foo()
{
} |
c170f3a41bc69ad1eab2dba40cede865f2532bbc |
|
08-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
analyze: various cleanups
Update systemd-analyze to follow the coding style of the other tools
more closely. Also, update the CODING_STYLE to document this for future
additions.
Changes:
- Always use usec_t for time units, so that we always use the same types
everywhere, and format times the same way as everywhere else.
- Add "static" to global variables
- Make sure we can always distuingish OOM and other errors: ensure we
always return useful error codes from all functions.
- Always free unit_times array |
01233fc71296bc78c2de14b755236ced752500f7 |
|
29-Jan-2013 |
Tollef Fog Heen <tfheen@err.no> |
Clarify sentence |
ee7326a636ae11747fa1d281d1131952a60a0903 |
|
01-Oct-2012 |
Tollef Fog Heen <tfheen@err.no> |
Minor typo |
f49f49ba133daf18c7690c733755eeaad075b858 |
|
01-Oct-2012 |
Tollef Fog Heen <tfheen@err.no> |
Be consistent about "." vs no "." at the end of lines" |
35b8ca3aaf8cb044ad76675dfcad89e000dd4a5c |
|
28-Feb-2011 |
Harald Hoyer <harald@redhat.com> |
Spelling Corrections
Just some lame spelling corrections with no functionality. |
debf93a4d6d691d8904e7f485ac6579844abadf4 |
|
14-Feb-2010 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: minor updates |
e1cc7a01bb4663b4aea307cf22368bb5568a9e46 |
|
18-Nov-2009 |
Lennart Poettering <lennart@poettering.net> |
CODING_STYLE: add missing - |
6091827530d6dd43479d6709fb6e9f745c11e900 |
|
18-Nov-2009 |
Lennart Poettering <lennart@poettering.net> |
initial commit |