X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fechochar.c;fp=test%2Fechochar.c;h=e3011388cb68b32d19244e26b74fe701a9c8eb95;hp=9f2d11c5bb9476796ac87a67c2f43ba0e0cbd535;hb=eb312e0bb90463a33aa8a53f825b32dc189af023;hpb=574a94bc3d70682bde48f7f10d3c12a58e581e27 diff --git a/test/echochar.c b/test/echochar.c index 9f2d11c5..e3011388 100644 --- a/test/echochar.c +++ b/test/echochar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006 Free Software Foundation, Inc. * + * Copyright (c) 2006,2007 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: echochar.c,v 1.3 2006/12/03 00:14:29 tom Exp $ + * $Id: echochar.c,v 1.4 2007/06/30 17:54:56 tom Exp $ * * Demonstrate the echochar function (compare to dots.c). * Thomas Dickey - 2006/11/4 @@ -107,7 +107,7 @@ main( if (use_colors) { start_color(); if (COLOR_PAIRS > 0) { - my_pairs = calloc(COLOR_PAIRS, sizeof(*my_pairs)); + my_pairs = calloc((unsigned) COLOR_PAIRS, sizeof(*my_pairs)); } use_colors = (my_pairs != 0); } @@ -146,10 +146,10 @@ main( } } if (opt_r) { - addch(p); + addch(UChar(p)); refresh(); } else { - echochar(p); + echochar(UChar(p)); } ++total_chars; }