~laumann/C

413fc2afed8f30cf2c7892f00e2bc36326a81f64 — Thomas Bracht Laumann Jespersen 9 years ago b5e9174
A few changes

 - Some forgotten uncommitted test changes in conway.c
 - redblacktree: Makefile: Added -O2 flag to CFLAGS
 - redblacktree: Makefile: Added clean_graphs to PHONY
2 files changed, 8 insertions(+), 4 deletions(-)

M conway/conway.c
M redblacktree/Makefile
M conway/conway.c => conway/conway.c +6 -1
@@ 148,7 148,7 @@ updatescr(WINDOW *win, int **ary, int rows, int cols)
	for (i=0; i < rows; i++)
		for (j=0; j < cols; j++)
			if (ary[i][j])
				mvwaddch(win, j, i, ACS_CKBOARD);
				mvwaddch(win, j, i, ACS_BOARD);
	wrefresh(win);
}



@@ 187,6 187,7 @@ int main(int argc, char *argv[])
	ary0[41][16] = 1;
	ary0[41][17] = 1;

	int rmax, cmax;

	/* ncurses! */
	initscr();


@@ 197,6 198,10 @@ int main(int argc, char *argv[])
	int **current, **next;
	int aoeu = 0;

	getmaxyx(stdscr, rmax, cmax);
	mvprintw(rmax-2, 0, "This screen has %d rows and %d columns.\n", rmax, cmax);
	getch();

	updatescr(stdscr, ary0, nrows, ncols);
	/* print_ary(ary0, nrows, ncols); */
	/* printf("\n"); */

M redblacktree/Makefile => redblacktree/Makefile +2 -3
@@ 1,6 1,6 @@

CC=gcc
CFLAGS=-Wall
CFLAGS=-Wall -O2
LIB=redblacktree.c
HDRS=redblacktree.h



@@ 14,7 14,6 @@ rbdel: rbdel.c $(LIB) $(HDRS)
	@echo "Building 'rbdel'"
	$(CC) $(CFLAGS) -o $@ $< $(LIB)


%.ps: %.dot
	dot -q -Tps -o$@ $<



@@ 24,4 23,4 @@ clean: clean-graphs
clean-graphs:
	@rm -fv *.ps *.dot

.PHONY: clean
.PHONY: clean clean-graphs