@@ 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"); */
@@ 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