Age | Commit message (Collapse) | Author |
|
We didn't install it before, only `tox-bootstrapd`.
|
|
|
|
|
|
Not only the second time it fails.
|
|
We check that:
* The license is GPLv3.
* .travis.yml conforms with the toktok style specification.
* There exists a README.md file.
|
|
See https://github.com/ninja-build/ninja/issues/814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application
using c99. The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b,
and POSIX.1c applications. Likewise, it is invalid to compile an XPG6
or a POSIX.1-2001 application with anything other than a c99 or later
compiler. Therefore, Solaris libc forces an error in both cases.
|
|
|
|
Reduced by, e.g.:
* `file_transfer_test`: 33% of the `clock_gettime` calls.
* `tox_many_test`: 53% of the `clock_gettime` calls.
Other tests will see similar improvements. Real world applications will
be closer to 40-50% improvement, since tox_many_test has 100 nodes, while
file_transfer_test has 2 nodes.
|
|
|
|
Limited to 4GiB. That ought to be enough for any save file.
|
|
|
|
|
|
* Use Camel_Snake_Case for type names.
* Use at least 4 characters for constant names. I.e. `END` is a type
name, but `RETURN` is a constant name. This is because `DHT` is a type
name (yay consistency).
* Using `min_*` functions instead of MIN, we can avoid a cast.
* Use `for`-loops for for-each-frame semantics instead of `while`.
* Don't use assignments as expressions.
* `++i` instead of `i++`.
* Function pointers are dereferenced automatically, so no need to
manually do so.
* Avoid void pointers that lie about not being spaghetti code. Toxcore
and toxav are both spaghetti and shouldn't pretend anything else.
* Don't use empty statements (e.g. no `;;` anywhere in the code).
|
|
Instead of importing a well-known file. This gives toktok-stack more
freedom in where and how it wants to define its interface, as long as it
provides the configurations requested ("linux" and "clang").
|
|
|
|
* Fix `toxav_get_tox` to return tox, not messenger.
* Fix the casts from Tox* to Messenger* in toxav_old.c.
* Pass Tox instead of Messenger to public group AV callbacks.
|
|
Somehow it still works because the lower levels can deal with
inconsistent/broken state, but this lets us avoid that broken state in
the first place. If a friend connection doesn't exist, we don't add it to
our group.
|
|
* Constant-style macros can't be function call expressions. These must be
function calls themselves.
* Assignments can't be used as expressions.
* Therefore: `while` loops should not be used as a `for-each`
construct. Use `for`, instead.
|
|
This checks that (some of) the code follows some simplicity and naming
guidelines set by the tool.
|
|
|
|
This probably doesn't happen, but it can in theory, so we avoid it.
|
|
* No anonymous structs.
* No assignment expressions.
* Only one declarator per struct member declaration.
* Named callback types only, no inline types.
* No `;` empty statements.
* `++i` instead of `i++`.
Avoiding a cast in toxav_old.c avoids some potential (and real) bugs.
|
|
* Named callback types only.
* No anonymous enums or structs.
* `++i` instead of `i++`.
* Don't use enums to specify integer constants. Enums should be
enumerations. All values of an enum type should be listed[1].
[1] I don't know what to do about bit masks yet, but given that enums by
C standard can only go up to 32767 portably and 2^31 in reality, they are
probably not useful for 64 bit bit masks.
|
|
|
|
* Don't use anonymous enums (`typedef enum { ... } Name;`).
* Don't use macros to generate structs (too magical, hard to grep).
* Assign output parameter once, and don't access it a lot in the
function body.
* Don't pass type names as parameters to macros (this is C, we don't have
templates, sorry).
* All function-like macros must be do-while(0).
* `++i` instead of `i++`.
* No assignment-expressions.
* No void-casts.
|
|
The void pointer here only adds opportunity to introduce bugs and doesn't
actually make things more layered. It's just the code lying about being
layered while it's actually spaghetti.
|
|
|
|
|
|
Forward declarations are problematic, as they easily allow introducing
cyclic dependencies.
|
|
* Comments in macros must be `//` style.
* No inner structs.
* Named callback types.
* `++i` instead of `i++`.
* No assignments as expressions.
|
|
These always fail at present. We'll need to look into making them not
always fail so we can enable them and get some useful signal from them.
|
|
This avoids its dependency on FreeBSD.
|
|
|
|
This is always true due to the condition function, but if we introduce a
bug that makes the condition not be applied, this causes undefined
behaviour.
|
|
Also remove the use of a VLA in a context where there can be unbounded
memory allocations.
|
|
|
|
|
|
We use functions for this instead.
|
|
The enumerators won't change, but the type name will change in 0.3.0.
Reasoning:
- Type names in toxcore start with an uppercase letter and either have at
least one lowercase letter in them, or are less than 4 characters long.
- Constants consist of 4 or more uppercase letters or underscores.
By these rules, "DHT" is a type name, but "TOX_USER_STATUS" is a
constant. We provide Tox_User_Status as an alternative for now, and will
switch to that in 0.3.0, removing the UPPER_CASE versions.
|
|
|