X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwevalgraph.c;h=af03f580e1fc438dff364ba1647a5adf2d7a0a88;hb=bb1c4f8ed2489e4891fe044532a35107d33174d2;hp=997bd171bb452b30cc7770655da8d4f5e5d37c4f;hpb=0efdc4c5ef60cf4c15e9dddf3658d2115e4d5d93;p=xboard.git diff --git a/winboard/wevalgraph.c b/winboard/wevalgraph.c index 997bd17..af03f58 100644 --- a/winboard/wevalgraph.c +++ b/winboard/wevalgraph.c @@ -3,22 +3,26 @@ * * Author: Alessandro Scotti (Dec 2005) * + * Copyright 2005 Alessandro Scotti + * * ------------------------------------------------------------------------ - * This program is free software; you can redistribute it and/or modify + * + * GNU XBoard is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU XBoard is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * ------------------------------------------------------------------------ - */ + * along with this program. If not, see http://www.gnu.org/licenses/. * + * + *------------------------------------------------------------------------ + ** See the file ChangeLog for a revision history. */ + #include "config.h" #include /* required for all Windows applications */ @@ -143,21 +147,14 @@ static VOID DrawAxisSegmentHoriz( int value, BOOL drawValue ) if( drawValue ) { SIZE stSize; - char buf[8]; + char buf[MSG_SIZ], *b = buf; int cbBuf; - if( value > 0 ) { - buf[0] = '+'; - itoa( value, buf+1, 10 ); - } - else { - itoa( value, buf, 10 ); - } + if( value > 0 ) *b++ = '+'; + sprintf(b, "%d", value); cbBuf = strlen( buf ); - GetTextExtentPoint32( hdcPB, buf, cbBuf, &stSize ); - TextOut( hdcPB, MarginX - stSize.cx - 2, y - stSize.cy / 2, buf, cbBuf ); } }