modified code style

This commit is contained in:
Lexxy Fox 2023-11-01 16:30:35 -05:00
parent a36ead2ceb
commit 32e512a798
3 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveMacros: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BasedOnStyle: LLVM
BinPackArguments: false
BinPackParameters: false

View File

@ -1,3 +1,5 @@
VERSION ?= 9.0.1
prefix ?= /usr/local
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin

View File

@ -225,14 +225,16 @@ static void draw(void) {
fflush(stdout);
T0 = t;
Frames = 0;
if ((t >= 999.0 * autoexit) && (autoexit)) cleanup();
if ((t >= 999.0 * autoexit) && (autoexit))
cleanup();
}
}
static void idle(void) {
static double t0 = -1.;
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
if (t0 < 0.0) t0 = t;
if (t0 < 0.0)
t0 = t;
dt = t - t0;
t0 = t;
@ -268,7 +270,7 @@ static void key(unsigned char k, int, int) {
Animate = !Animate;
update_idle_func();
break;
case 27: /* Escape */
case '\e':
cleanup();
default:
return;
@ -351,7 +353,7 @@ static void visible(int vis) {
}
void parse_args(int argc, char *argv[]) {
for (GLint i = 1; i < argc; i++) {
for (GLint i = 1; i < argc; i++)
if (strcmp(argv[i], "-info") == 0) {
printf("GL_VENDOR = %s\n", (char *)glGetString(GL_VENDOR));
printf("GL_RENDERER = %s\n", (char *)glGetString(GL_RENDERER));
@ -362,10 +364,8 @@ void parse_args(int argc, char *argv[]) {
autoexit = 30;
printf("Auto Exit after %i seconds.\n", autoexit);
fflush(stdout);
} else if (strcmp(argv[i], "-noanim") == 0) {
} else if (strcmp(argv[i], "-noanim") == 0)
Animate = GL_FALSE;
}
}
}
int main(int argc, char *argv[]) {