X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fhanoi.c;h=3ee64b0a0d1453017e05f9271e55fe7c91e053e6;hp=00e3b77dbb8d8f1103f49358901e45305d8c468a;hb=0eb88fc5281804773e2a0c7a488a4452463535ce;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c diff --git a/test/hanoi.c b/test/hanoi.c index 00e3b77d..3ee64b0a 100644 --- a/test/hanoi.c +++ b/test/hanoi.c @@ -14,7 +14,7 @@ * * Date: 05.Nov.90 * - * $Id: hanoi.c,v 1.14 1997/05/06 23:07:55 tom Exp $ + * $Id: hanoi.c,v 1.16 1999/10/23 15:01:01 tom Exp $ */ #include @@ -118,8 +118,10 @@ unsigned char AutoFlag = 0; fprintf(stderr, "Min screen length 24 lines\n"); return EXIT_FAILURE; } - if(AutoFlag) + if(AutoFlag) { + curs_set(0); leaveok(stdscr, TRUE); /* Attempt to remove cursor */ + } InitTiles(NTiles); DisplayTiles(); if(AutoFlag) { @@ -148,7 +150,6 @@ unsigned char AutoFlag = 0; } } } - curs_set(1); endwin(); return EXIT_SUCCESS; } @@ -191,7 +192,7 @@ InitTiles(int NTiles) static void DisplayTiles(void) { - int Line, Peg, SlotNo; + int Line, peg, SlotNo; char TileBuf[BUFSIZ]; erase(); @@ -212,16 +213,16 @@ DisplayTiles(void) attrset(A_NORMAL); /* Draw tiles */ - for(Peg=0; Peg