format
This commit is contained in:
parent
58de3bbbeb
commit
edd75c58f6
6 changed files with 36 additions and 14 deletions
20
.clang-format
Normal file
20
.clang-format
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
UseTab: Always
|
||||||
|
TabWidth: 8
|
||||||
|
AlignConsecutiveAssignments:
|
||||||
|
Enabled: true
|
||||||
|
AlignConsecutiveDeclarations:
|
||||||
|
Enabled: true
|
||||||
|
IndentWidth: 8
|
||||||
|
PointerAlignment: Left
|
||||||
|
ColumnLimit: 0
|
||||||
|
AllowShortIfStatementsOnASingleLine: Always
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortFunctionsOnASingleLine: Empty
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
SpaceBeforeParens: Never
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
|
SortIncludes: false
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
||||||
|
#IndentPPDirectives: AfterHash
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
MwWidget root, window, opengl;
|
MwWidget root, window, opengl;
|
||||||
|
|
||||||
static void resize(MwWidget handle, void* user, void* client){
|
static void resize(MwWidget handle, void* user, void* client) {
|
||||||
int ww = MwGetInteger(window, MwNwidth);
|
int ww = MwGetInteger(window, MwNwidth);
|
||||||
int wh = MwGetInteger(window, MwNheight);
|
int wh = MwGetInteger(window, MwNheight);
|
||||||
|
|
||||||
|
|
@ -14,17 +14,17 @@ static void resize(MwWidget handle, void* user, void* client){
|
||||||
glViewport(0, 0, ww, wh);
|
glViewport(0, 0, ww, wh);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tick(MwWidget handle, void* user, void* client){
|
static void tick(MwWidget handle, void* user, void* client) {
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
MwOpenGLSwapBuffer(opengl);
|
MwOpenGLSwapBuffer(opengl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* gl_load(const char* name){
|
static void* gl_load(const char* name) {
|
||||||
return MwOpenGLGetProcAddress(opengl, name);
|
return MwOpenGLGetProcAddress(opengl, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(){
|
int main() {
|
||||||
MwLibraryInit();
|
MwLibraryInit();
|
||||||
|
|
||||||
root = MwVaCreateWidget(NULL, "root", NULL, 0, 0, 0, 0,
|
root = MwVaCreateWidget(NULL, "root", NULL, 0, 0, 0, 0,
|
||||||
|
|
|
||||||
2
external/milsko
vendored
2
external/milsko
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 012650f06f489d1219ba492118d2f35d25e93ce2
|
Subproject commit 75749697ba25330127fdca110fda9098d65719e3
|
||||||
2
format.sh
Executable file
2
format.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
clang-format --verbose -i `find include server client -name "*.c" -or -name "*.h"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <af_common.h>
|
#include <af_common.h>
|
||||||
|
|
||||||
int main(int argc, char** argv){
|
int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue