tomato/external/toxcore/c-toxcore/other/astyle
2024-01-09 16:39:05 +01:00
..
astylerc Merge commit '9ace11a0e2843cbde4af2b6ff7b49bcc6d429f78' 2024-01-09 16:39:05 +01:00
format-source Merge commit '227425b90e9a671118026689dd30967e127a1090' as 'external/toxcore/c-toxcore' 2023-07-25 11:53:09 +02:00
pre-commit Merge commit '227425b90e9a671118026689dd30967e127a1090' as 'external/toxcore/c-toxcore' 2023-07-25 11:53:09 +02:00
README.md Merge commit '227425b90e9a671118026689dd30967e127a1090' as 'external/toxcore/c-toxcore' 2023-07-25 11:53:09 +02:00

This directory can house various tools and utilities.

How to use astyle

Manually

For all files

Run from toxcore directory:

astyle --options=./other/astyle/astylerc ./toxcore/*.c ./toxcore/*.h ./testing/*.c ./toxav/*.c ./toxav/*.h ./other/*.c ./other/bootstrap_daemon/*.c ./toxencryptsave/*.c ./toxencryptsave/*.h ./auto_tests/*.c

For selected file

Run from toxcore directory, e.g. for tox.h file:

astyle --options=./other/astyle/astylerc ./toxcore/tox.h

Automatically, as pre-commit hook (*NIX only)

Copy astylerc to toxcore/.git/hooks

Why

astylerc - this file can be used in the pre-commit hook to try its best at making the code conform to the coding style of toxcore.

Furthermore, it is being used to format tox.h after using apidsl to generate it.