Updated copyright notice to 2015
[xboard.git] / winboard / wsettings.c
index 99efab5..6cf8d59 100644 (file)
@@ -1,7 +1,7 @@
 /*\r
  * woptions.h -- Options dialog box routines for WinBoard\r
  *\r
- * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.\r
+ * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.\r
  *\r
  * ------------------------------------------------------------------------\r
  *\r
@@ -120,7 +120,7 @@ void
 LayoutOptions(int firstOption, int endOption, char *groupName, Option *optionList)\r
 {\r
     int i, b = strlen(groupName), stop, prefix, right, nextOption, firstButton = buttons;\r
-    Control lastType, nextType;\r
+    Control lastType, nextType=Label;\r
 \r
     nextOption = firstOption;\r
     while(nextOption < endOption) {\r
@@ -380,7 +380,6 @@ int
 GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)\r
 // read out all controls, and if value is altered, remember it and send it to the engine\r
 {\r
-    HANDLE hwndCombo;\r
     int i, k, new=0, changed=0, len;\r
     char **choices, newText[MSG_SIZ], buf[MSG_SIZ], *text;\r
     BOOL success;\r
@@ -424,7 +423,6 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)
                break;\r
            case ComboBox:\r
                choices = (char**) optionList[j].textValue;\r
-               hwndCombo = GetDlgItem(hDlg, 2001+2*i);\r
                success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ );\r
                if(!success) break;\r
                new = -1;\r
@@ -577,7 +575,7 @@ void AddOption(int x, int y, Control type, int i)
     int extra, num = ES_NUMBER;\r
 \r
     switch(type) {\r
-       case Slider+100:\r
+       case Spin+100:\r
            num = 0; // needs text control for accepting negative numbers\r
        case Slider:\r
        case Spin:\r
@@ -888,8 +886,7 @@ int MatchOK()
 \r
 void PseudoOK(HWND hDlg)\r
 {\r
-    void (*saveOK)();\r
-    saveOK = okFunc; okFunc = 0;\r
+    okFunc = 0;\r
     GetOptionValues(hDlg, activeCps, activeList);\r
     EndDialog( hDlg, 0 );\r
     comboCallback = NULL; activeCps = NULL;\r