summaryrefslogtreecommitdiff
path: root/other
AgeCommit message (Collapse)Author
2016-11-02Compile as C++ for windows builds.iphydf
Compiling as C++ changes nothing semantically, but ensures that we don't break C++ compatibility while also retaining C compatibility. C++ compatibility is useful for tooling and additional diagnostics and analyses.
2016-10-26Error if format_test can't be executed.iphydf
This ensures that on Travis, format_test will always be executed, or the build fails.
2016-10-06Set log level for DEBUG=ON to LOG_DEBUG.iphydf
We use TRACE=ON (cmake flag) to enable LOG_TRACE. This way, a regular build can enable DEBUG while not paying the price of TRACE. This is particularly important for FFI bindings (especially Python), where invoking callbacks can be an expensive operation.
2016-10-05Add option to build tox-bootstrapdMaxim Biro
When cross-compiling to <target> from Linux, cmake might find native Linux libconfig and decide to build tox-bootstrapd. If the target is Windows, this will fail, as tox-bootstrapd can't be built for Windows in the first place. If the target is Linux of some other architecture, then using host native libconfig will fail too. Thus an option is needed to guard against this.
2016-10-04Align things nicerMaxim Biro
2016-10-04Use TEST_TIMEOUT_SECONDS cmake flag on TravisMaxim Biro
2016-10-02Rebuild apidsl'd headers in cmake.iphydf
- Moved apidsl headers next to their generated versions. In the future, perhaps all (or most) headers will be apidsl-generated, so the sources should stay together. - Try to find apidsl/apigen binary and astyle binary and use it for the format test. Don't run the format test if these can't be found.
2016-10-01Minor documentation fixes.iphydf
- Fixed incorrect parameter names (documented name didn't match code name). - Removed `@return` from functions that return `void`. - Make sure every parameter is documented. This required moving the planes and strides documentation to the function docs.
2016-10-01Import the hstox SUT interface from hstox.iphydf
We'll maintain it in the c-toxcore repo, where it belongs.
2016-09-30Remove return after no-return situation (and other cleanups).iphydf
Cleanups: - Fix header guards to not use reserved names. - Avoid name shadowing. - Removed an unused variable found by avoiding name shadowing.
2016-09-29Merge branch 'master' of https://github.com/irungentoo/toxcoreiphydf
2016-09-28Add version-sync script to update all places with versions.iphydf
This will update tox.in.h only. Currently, you will still need to manually update tox.h. An upcoming PR (#154) will update tox.h as part of the build.
2016-09-28Updated to match current toxav.hnobody
2016-09-28v0.0.0 => v0.0.1Gregory Mullen (grayhatter)
2016-09-25Work around bug in opencv3 headers.iphydf
OpenCV 3.1 doesn't define cvRound in C, only in C++. Thus, we now need to compile av_test as C++ code.
2016-09-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-09-24Minor cleanups: unused vars, unreachable code, static globals.iphydf
- All global variables should be static unless they have an explicit extern declaration in a header file. - `to_compare` was not used in encryptsave and toxav tests. - `break` in switch cases is not required directly after `return`, `goto`, or a noreturn function like `abort`.
2016-09-21Make group callbacks statelessJfreegman
2016-09-20Add OSX and Windows build to travis config.iphydf
Tests for Windows are disabled for now, until we figure out which tests can successfully run on wine and select only those.
2016-09-19Revert "Make ToxAV stateless"iphydf
This reverts commit 21f8db12c45bd56293262cd4abfb73cd9abec821. It is currently broken. Incoming call callbacks are not invoked, and instead the client goes offline immediately.
2016-09-19Add STRICT_ABI cmake flag to generate export lists.iphydf
Enabling this flag will generate and use an LD version script. It ensures that the dynamic libraries (libtoxcore.so, libtoxav.so) only export the symbols that are defined in their public API (tox.h and toxav.h, respectively).
2016-09-19Changed the umask to 077 so that the keys file is not readable/writable by ↵arza
other users.
2016-09-19Included sys/stat.h.arza
2016-09-17Complete old groupchat conversion to new APIJfreegman
2016-09-17ApiDSL'ing old group chats (now: conference).iphydf
2016-09-17Make ToxAV statelessGregory Mullen (grayhatter)
2016-09-16Ensure that all TODOs have an owner.iphydf
In the future, all TODOs added either need a bug number (TODO(#NN)) or a person's github user name. By default, I made irungentoo the owner of all toxcore TODOs, mannol the owner of toxav TODOs, and myself the owner of API TODOs.
2016-09-16Clean up Travis build a bit in preparation for osx/win.iphydf
2016-09-16Remove format-source from travis script.iphydf
This test is already performed by `make test` later on. We originally had it in the Travis script to make it fail fast when the format is wrong, but there is also some value in running all tests despite format errors. Fixes #83. There are no more relevant phases that would benefit from the padding lines proposed.
2016-09-13Add some astyle options to make it do more.iphydf
It now enforces a bit more formatting. In particular, padding inside parentheses is removed. I would like it to remove padding after unary operators, but there seems to be no option for that.
2016-09-11Use "phase" script for travis build phases.iphydf
This is the first step towards unifying travis configs for toxcore, hstox, and qtox.
2016-09-11Use TokTok's apidsl instead of the iphydf one.iphydf
2016-09-10make the majority of the callbacks stateless and add some status to a testcasemichael bishop
2016-09-09Minor cleanups: header reordering, adding {}.iphydf
I hadn't done this for the "fun" code, yet. Also, we should include system headers after our own headers. "In general, a module should be implemented by one or more .cpp files. Each of these .cpp files should include the header that defines their interface first. This ensures that all of the dependences of the module header have been properly added to the module header itself, and are not implicit. System headers should be included after user headers for a translation unit." -- http://llvm.org/docs/CodingStandards.html#a-public-header-file-is-a-module
2016-09-09Use `const` for version numbers.iphydf
ApiDSL generates the lowercase function declarations for us and puts them in the right namespace (TOX_, TOXAV_).
2016-09-08Add address sanitizer option to cmake file.iphydf
2016-09-07Print a message about missing astyle in format-source.iphydf
2016-09-06Improve static and const correctness.iphydf
- Any non-externally-visible declarations should be `static`. - Casting away the `const` qualifier from pointers-to-const is dangerous. All but one instance of this are now correct. The one instance where we can't keep `const` is one where toxav code actually writes to a chunk of memory marked as `const`. This code also assumes 4 byte alignment of data packets. I don't know whether that is a valid assumption, but it's likely unportable, and *not* obviously correct. - Replaced empty parameter lists with `(void)` to avoid passing parameters to it. Empty parameter lists are old style declarations for unknown number and type of arguments. - Commented out (as `#if DHT_HARDENING` block) the hardening code that was never executed. - Minor style fix: don't use `default` in enum-switches unless the number of enumerators in the default case is very large. In this case, it was 2, so we want to list them both explicitly to be warned about missing one if we add one in the future. - Removed the only two function declarations from nTox.h and put them into nTox.c. They are not used outside and nTox is not a library.
2016-09-06Improve C standard compliance.iphydf
- Don't cast between object and function pointers. - Use standard compliant `__VA_ARGS__` in macros. - Add explicit `__extension__` on unnamed union in struct (it's a GNU extension). - Remove ; after function definitions. - Replace `const T foo = 3;` for integral types `T` with `enum { foo = 3 };`. Folding integral constants like that as compile time constants is a GNU extension. Arrays allocated with `foo` as dimension are VLAs on strictly compliant C99 compilers. - Replace empty initialiser list `{}` with zero-initialiser-list `{0}`. The former is a GNU extension meaning the latter. - Cast `T*` (where `T != void`) to `void *` in format arguments. While any object pointer can be implicitly converted to and from `void *`, this conversion does not happen in variadic function calls. - Replace arithmetic on `void *` with arithmetic on `char *`. The former is non-compliant. - Replace non-`int`-derived types (like `uint16_t`, which is `short`-derived) in bit fields with `int`-derived types. Using any type other than `int` or `unsigned int` (or any of their aliases) in bit fields is a GNU extension.
2016-09-06Make friend requests statelessGregory Mullen (grayhatter)
Messenger is slightly twisty when it comes to sending connection status callbacks It will very likely need at the very least a partial refactor to clean it up a bit. Toxcore shouldn't need void *userdata as deep as is currently does. (amend 1) Because of the nature of toxcore connection callbacks, I decided to change this commit from statelessness for connections changes to statelessness for friend requests. It's simpler this was and doesn't include doing anything foolish in the time between commits. group fixup because grayhatter doesn't want to do it "arguably correct" is not how you write security sensitive code Clear a compiler warning about types within a function.
2016-09-01Sort #includes in all source files.iphydf
2016-08-31Remove redundant `return` statements.iphydf
2016-08-31Add braces to all if statements.iphydf
2016-08-30Add missing #includes to headers and rename tox_old to tox_group.iphydf
Also, no longer #include the group code into tox.c. Instead, compile it separately in tox_group.c. This is a bit less surprising to someone looking around the code. Having some implementations in a .h file is certainly a bit surprising to a disciplined C programmer, especially when there is no technical reason to do it.
2016-08-29Add getters/setters for options.iphydf
2016-08-27Move logging to a callback.iphydf
This removes the global logger (which by the way was deleted when the first tox was killed, so other toxes would then stop logging). Various bits of the code now carry a logger or pass it around. It's a bit less transparent now, but now there is no need to have a global logger, and clients can decide what to log and where.
2016-08-24Add cmake test for apidsl.iphydf
2016-08-22Make Message received receipts statelessGregory Mullen (grayhatter)
2016-08-22Make Friend User Status statelessGregory Mullen (grayhatter)
2016-08-20Make the friend message callback statelessGregory Mullen (grayhatter)