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