X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fknight.c;h=b1215fcc9d954bda9df593e87d437dcbc970147e;hp=604be1ec984fa81ab97d0ee5ad9c83e2ecdaa184;hb=1385381954c39dc95558adc87fad457046959cc1;hpb=64f44b13d30e0a7bc2921a9d43755423f81564fd diff --git a/test/knight.c b/test/knight.c index 604be1ec..b1215fcc 100644 --- a/test/knight.c +++ b/test/knight.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -33,7 +33,7 @@ * Eric S. Raymond July 22 1995. Mouse support * added September 20th 1995. * - * $Id: knight.c,v 1.33 2012/12/09 00:14:28 tom Exp $ + * $Id: knight.c,v 1.35 2013/02/03 00:16:59 tom Exp $ */ #include @@ -123,9 +123,9 @@ init_program(void) (void) init_pair(PLUS_COLOR, (short) COLOR_RED, (short) bg); (void) init_pair(MINUS_COLOR, (short) COLOR_GREEN, (short) bg); - trail |= COLOR_PAIR(TRAIL_COLOR); - plus |= COLOR_PAIR(PLUS_COLOR); - minus |= COLOR_PAIR(MINUS_COLOR); + trail |= (chtype) COLOR_PAIR(TRAIL_COLOR); + plus |= (chtype) COLOR_PAIR(PLUS_COLOR); + minus |= (chtype) COLOR_PAIR(MINUS_COLOR); } #ifdef NCURSES_MOUSE_VERSION (void) mousemask(BUTTON1_CLICKED, (mmask_t *) NULL); @@ -306,7 +306,7 @@ find_next_move(int *y, int *x) unsigned j, k; int found = -1; int first = -1; - int next = 0; + int next = -1; int oldy, oldx; int newy, newx; bool result = FALSE;