X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwengineo.c;h=ff7b3b1b4d49f076f21256a8a1a155a981c63a44;hb=5044bd45730eb785494c8a3ffc29cf05ead43068;hp=942f593449c6df29a9fdc96972d87ea53d72baa7;hpb=ea750683ac62717dd7346de17b5ae072622ff92a;p=xboard.git diff --git a/winboard/wengineo.c b/winboard/wengineo.c index 942f593..ff7b3b1 100644 --- a/winboard/wengineo.c +++ b/winboard/wengineo.c @@ -4,21 +4,23 @@ * Author: Alessandro Scotti (Dec 2005) * * ------------------------------------------------------------------------ - * 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 */ @@ -117,9 +119,9 @@ typedef struct { int an_move_count; } EngineOutputData; -static VerifyDisplayMode(); +static void VerifyDisplayMode(); static void UpdateControls( EngineOutputData * ed ); -static SetEngineState( int which, int state, char * state_data ); +static void SetEngineState( int which, int state, char * state_data ); // front end static HICON LoadIconEx( int id ) @@ -246,9 +248,9 @@ static void ResizeWindowControls( HWND hDlg, int mode ) { RECT rc; int headerHeight = GetHeaderHeight(); - int labelHeight = GetControlHeight( hDlg, IDC_EngineLabel1 ); - int labelOffset = H_MARGIN + ICON_SIZE + H_MARGIN; - int labelDeltaY = ICON_SIZE - labelHeight; +// int labelHeight = GetControlHeight( hDlg, IDC_EngineLabel1 ); +// int labelOffset = H_MARGIN + ICON_SIZE + H_MARGIN; +// int labelDeltaY = ICON_SIZE - labelHeight; int clientWidth; int clientHeight; int maxControlWidth; @@ -446,7 +448,7 @@ void DoClearMemo(int which) // back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments -static SetEngineState( int which, int state, char * state_data ) +static void SetEngineState( int which, int state, char * state_data ) { int x_which = 1 - which; @@ -579,6 +581,7 @@ char GetEngineColor( int which ) result = cps->twoMachinesColor[0]; result = result == 'w' ? ENGINE_COLOR_WHITE : ENGINE_COLOR_BLACK; break; + default: ; // does not happen, but suppresses pedantic warnings } } @@ -616,6 +619,7 @@ static int IsEnginePondering( int which ) if( GetEngineColor( which ) != GetActiveEngineColor() ) result = TRUE; } break; + default: ; // does not happen, but suppresses pedantic warnings } return result; @@ -632,7 +636,7 @@ static void SetDisplayMode( int mode ) } // pure back end -static VerifyDisplayMode() +static void VerifyDisplayMode() { int mode; @@ -682,7 +686,7 @@ static void SetEngineColorIcon( int which ) // pure back end, now SetWindowText is called via wrapper DoSetWindowText static void UpdateControls( EngineOutputData * ed ) { - int isPondering = FALSE; +// int isPondering = FALSE; char s_label[MAX_NAME_LENGTH + 32]; @@ -725,7 +729,7 @@ static void UpdateControls( EngineOutputData * ed ) SetEngineState( ed->which, STATE_THINKING, "" ); } else if( gameMode == AnalyzeMode || gameMode == AnalyzeFile - || gameMode == IcsObserving && appData.icsEngineAnalyze) { // [HGM] ICS-analyze + || (gameMode == IcsObserving && appData.icsEngineAnalyze)) { // [HGM] ICS-analyze char buf[64]; int time_secs = ed->time / 100; int time_mins = time_secs / 60;