X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Fhanoi.c;h=02eade7c330649aa119195ca05b07bc67b9e649e;hb=b6d0d9ad9e372e856f01a4c283cf784a15993903;hp=3366e93a3312257dd8fd1d845a34b8c631e1276a;hpb=1d7867d33e6954be7c7121b1028ad6768f487752;p=ncurses.git diff --git a/test/hanoi.c b/test/hanoi.c index 3366e93a..02eade7c 100644 --- a/test/hanoi.c +++ b/test/hanoi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2012 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 * @@ -41,7 +41,7 @@ * * Date: 05.Nov.90 * - * $Id: hanoi.c,v 1.31 2010/11/14 01:01:07 tom Exp $ + * $Id: hanoi.c,v 1.32 2012/06/09 20:30:32 tom Exp $ */ #include @@ -57,7 +57,7 @@ #define MIDPEG 39 #define RIGHTPEG 59 -#define LENTOIND(x) (((x)-1)/2) +#define LENTOIND(x) (((int)(x)-1)/2) #define OTHER(a,b) (3-((a)+(b))) struct Peg { @@ -255,7 +255,7 @@ DisplayTiles(void) memset(TileBuf, ' ', len); TileBuf[len] = '\0'; if (has_colors()) - (void) attrset(COLOR_PAIR(LENTOIND(len))); + (void) attrset((attr_t) COLOR_PAIR(LENTOIND(len))); else (void) attrset(A_REVERSE); MvAddStr(BASELINE - (SlotNo + 1),