Quaketastic Style is a free, fast, and small automatic formatter for C and QuakeC. Fork of Artistic Style (astyle) 1.23, with a lot of code cut out. Works as a regular C formatter, with QuakeC-specific support added.
$frame,$cd,$originand other model directiveslocalvariable declarations- Entity frame definitions (
void() name = [$frame, next] { ... };) .as a field access operator (not pointer dereference)- Has different formatting styles
| Flag | Name | Description |
|---|---|---|
-A1 |
allman |
Broken braces |
-A2 |
k&r |
Linux braces |
-A3 |
stroustrup |
Linux braces, broken closing headers |
-A4 |
whitesmith |
Broken, indented braces |
-A5 |
banner |
Attached, indented braces |
-A6 |
gnu |
Broken braces, indented blocks (2 spaces) |
-A7 |
linux |
Linux braces (8 spaces) |
-A8 |
quakec |
QuakeC style (Allman, 4 spaces) |
Requires a C++14 compiler and make. Build settings live in config.mk.
git clone https://github.com/tunalad/qcstyle.git
cd qcstyle
make && make install # will install locallygit clone https://github.com/tunalad/qcstyle.git
cd qcstyle
make winPreview changes without writing:
qcstyle < myfile.qc
Format in place (creates a .orig backup):
qcstyle myfile.qc
Format in place without backup:
qcstyle -n myfile.qc
Run qcstyle --help for all options.
Based on Artistic Style by Jim Pattee.
GNU Lesser General Public License v3.0