uncrustify source code

master
neingeist 10 years ago
parent ca15f19709
commit 8141a18cab

@ -35,6 +35,10 @@ cppcheck.txt: *.c *.h
tags: *.c
ctags -R .
.PHONY: uncrustify
uncrustify:
uncrustify -c uncrustify.cfg --no-backup *.c
mandelbrot: mandelbrot.c
$(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm

@ -6,7 +6,7 @@
double mean(double set[], int set_n) {
double sum = 0.0;
for(int i=0; i<set_n; i++) {
for (int i=0; i<set_n; i++) {
sum += set[i];
}
@ -40,7 +40,7 @@ double sample_stddev(double set[], int set_n) {
double set_min(double set[], int set_n) {
double min = MAXDOUBLE;
for(int i=0; i<set_n; i++) {
for (int i=0; i<set_n; i++) {
min=fmin(set[i], min);
}

@ -1,7 +1,7 @@
/*
Write a recursive function that searches for a target in a sorted array using
binay search, where the array, its size and the target are given as parameters.
*/
Write a recursive function that searches for a target in a sorted array using
binay search, where the array, its size and the target are given as parameters.
*/
#include <limits.h>
#include <stdio.h>
@ -51,7 +51,8 @@ int main(void) {
21090, 22277, 22624, 24634, 24877,
25367, 25586, 26706, 26720, 26958,
27478, 28269, 29142, 30630, 30804,
31984, 32398, 32588 };
31984, 32398, 32588
};
assert_sorted(a, 43);
assert(binsearch(a, 43, 912) == 0);

@ -254,7 +254,7 @@ int main(void) {
assert(list_elementat(foolist, list_length(foolist)+2) == NULL);
/* Free up remaining items and the list. */
while(!list_empty(foolist)) {
while (!list_empty(foolist)) {
list_node_t *el = list_elementat(foolist, 0);
free(list_remove(foolist, el));
}

@ -45,7 +45,7 @@ int main(void) {
{ "string", luaopen_string },
{ NULL, NULL}
};
for(luaL_Reg *lib = lualibs; lib->func; lib++) {
for (luaL_Reg *lib = lualibs; lib->func; lib++) {
printf("Loading %s\n", lib->name);
lib->func(L);
lua_setglobal(L, lib->name);

@ -4,7 +4,7 @@
int main() {
int i = 0xffff;
asm("movl $23, %0"
asm ("movl $23, %0"
: "=r" (i) /* output */
/* : no input */
/* : no clobbered */

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save