worked on premove bug
[xboard.git] / xboard.h
index 03e2d5c..5806d53 100644 (file)
--- a/xboard.h
+++ b/xboard.h
-/*\r
- * xboard.h -- Parameter definitions for X front end\r
- * $Id: xboard.h,v 2.1 2003/10/27 19:21:00 mann Exp $\r
- *\r
- * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.\r
- * Enhancements Copyright 1992-95 Free Software Foundation, Inc.\r
- *\r
- * The following terms apply to Digital Equipment Corporation's copyright\r
- * interest in XBoard:\r
- * ------------------------------------------------------------------------\r
- * All Rights Reserved\r
- *\r
- * Permission to use, copy, modify, and distribute this software and its\r
- * documentation for any purpose and without fee is hereby granted,\r
- * provided that the above copyright notice appear in all copies and that\r
- * both that copyright notice and this permission notice appear in\r
- * supporting documentation, and that the name of Digital not be\r
- * used in advertising or publicity pertaining to distribution of the\r
- * software without specific, written prior permission.\r
- *\r
- * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\r
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\r
- * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\r
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\r
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\r
- * SOFTWARE.\r
- * ------------------------------------------------------------------------\r
- *\r
- * The following terms apply to the enhanced version of XBoard distributed\r
- * by the Free Software Foundation:\r
- * ------------------------------------------------------------------------\r
- * This program 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
- *\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
- *\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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
- * ------------------------------------------------------------------------\r
- */\r
-\r
-#include <stdio.h>\r
-\r
-#define ICS_LOGON    ".icsrc"\r
-#define INFOFILE     "xboard.info"\r
-#define MANPAGE      "xboard.6"\r
-#define CLOCK_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"\r
-#define COORD_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"\r
-#define DEFAULT_FONT "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*"\r
-#define COLOR_SHOUT             "green"\r
-#define COLOR_SSHOUT            "green,black,1"\r
-#define COLOR_CHANNEL1          "cyan"\r
-#define COLOR_CHANNEL           "cyan,black,1"\r
-#define COLOR_KIBITZ            "magenta,black,1"\r
-#define COLOR_TELL              "yellow,black,1"\r
-#define COLOR_CHALLENGE         "red,black,1"\r
-#define COLOR_REQUEST           "red"\r
-#define COLOR_SEEK              "blue"\r
-#define COLOR_NORMAL            "default"\r
-\r
-typedef struct {\r
-    char *name;\r
-    int squareSize;\r
-    int lineGap;\r
-    int clockFontPxlSize;\r
-    int coordFontPxlSize;\r
-    int fontPxlSize;\r
-    int smallLayout;\r
-    int tinyLayout;\r
-    int minScreenSize;\r
-} SizeDefaults;\r
-\r
-#define SIZE_DEFAULTS \\r
-{ { "Titanic",  129, 4, 34, 14, 14, 0, 0, 1200 }, \\r
-  { "Colossal", 116, 4, 34, 14, 14, 0, 0, 1200 }, \\r
-  { "Giant",    108, 3, 34, 14, 14, 0, 0, 1024 }, \\r
-  { "Huge",     95, 3, 34, 14, 14, 0, 0, 1024 }, \\r
-  { "Big",      87, 3, 34, 14, 14, 0, 0, 864 }, \\r
-  { "Large",    80, 3, 34, 14, 14, 0, 0, 864 }, \\r
-  { "Bulky",    72, 3, 34, 12, 14, 0, 0, 864 }, \\r
-  { "Medium",   64, 3, 34, 12, 14, 0, 0, 768 }, \\r
-  { "Moderate", 58, 3, 34, 12, 14, 0, 0, 768 }, \\r
-  { "Average",  54, 2, 30, 11, 12, 0, 0, 600 }, \\r
-  { "Middling", 49, 2, 24, 10, 12, 0, 0, 600 }, \\r
-  { "Mediocre", 45, 2, 20, 10, 12, 1, 0, 600 }, \\r
-  { "Small",    40, 2, 20, 10, 12, 1, 0, 480 }, \\r
-  { "Slim",     37, 2, 20, 10, 12, 1, 0, 480 }, \\r
-  { "Petite",   33, 1, 15, 9,  11, 1, 0, 480 }, \\r
-  { "Dinky",    29, 1, 15, 9,  11, 1, 0, 480 }, \\r
-  { "Teeny",    25, 1, 12, 8,  11, 1, 1, 480 }, \\r
-  { "Tiny",     21, 1, 12, 8,  11, 1, 1, 0 }, \\r
-  { NULL, 0, 0, 0, 0, 0, 0 } }\r
-\r
-#define BORDER_X_OFFSET 3\r
-#define BORDER_Y_OFFSET 27\r
-#define FIRST_CHESS_PROGRAM    "./fmax"\r
-#define SECOND_CHESS_PROGRAM   "./fmax"\r
-#define FIRST_DIRECTORY                "./Fairy-Max"\r
-#define SECOND_DIRECTORY       "./Fairy-Max"\r
-\r
-/* Default to no flashing (the "usual" XBoard behavior) */\r
-#define FLASH_COUNT    0               /* Number of times to flash */\r
-#define FLASH_RATE     5               /* Flashes per second */\r
-\r
-/* Default delay per character (in msec) while sending login script */\r
-#define MS_LOGIN_DELAY  0\r
-\r
-typedef int (*FileProc) P((FILE *f, int n, char *title));\r
-void CatchDeleteWindow(Widget w, String procname);\r
-\r
-#define TOPLEVEL 1 /* preference item; 1 = make popup windows toplevel */\r
-\r
+/*
+ * xboard.h -- Parameter definitions for X front end
+ *
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts.
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * The following terms apply to Digital Equipment Corporation's copyright
+ * interest in XBoard:
+ * ------------------------------------------------------------------------
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * ------------------------------------------------------------------------
+ *
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
+ * ------------------------------------------------------------------------
+ *
+ * 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 3 of the License, or (at
+ * your option) any later version.
+ *
+ * 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, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include <stdio.h>
+
+#define ICS_LOGON    ".icsrc"
+#define INFOFILE     "xboard.info"
+#define MANPAGE      "xboard.6"
+#define CLOCK_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
+#define COORD_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
+#define DEFAULT_FONT "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*"
+#define COLOR_SHOUT             "green"
+#define COLOR_SSHOUT            "green,black,1"
+#define COLOR_CHANNEL1          "cyan"
+#define COLOR_CHANNEL           "cyan,black,1"
+#define COLOR_KIBITZ            "magenta,black,1"
+#define COLOR_TELL              "yellow,black,1"
+#define COLOR_CHALLENGE         "red,black,1"
+#define COLOR_REQUEST           "red"
+#define COLOR_SEEK              "blue"
+#define COLOR_NORMAL            "default"
+#define COLOR_LOWTIMEWARNING    "red"
+
+typedef struct {
+    char *name;
+    int squareSize;
+    int lineGap;
+    int clockFontPxlSize;
+    int coordFontPxlSize;
+    int fontPxlSize;
+    int smallLayout;
+    int tinyLayout;
+    int minScreenSize;
+} SizeDefaults;
+
+#define SIZE_DEFAULTS \
+{ { "Titanic",  129, 4, 34, 14, 14, 0, 0, 1200 }, \
+  { "Colossal", 116, 4, 34, 14, 14, 0, 0, 1200 }, \
+  { "Giant",    108, 3, 34, 14, 14, 0, 0, 1024 }, \
+  { "Huge",     95, 3, 34, 14, 14, 0, 0, 1024 }, \
+  { "Big",      87, 3, 34, 14, 14, 0, 0, 864 }, \
+  { "Large",    80, 3, 34, 14, 14, 0, 0, 864 }, \
+  { "Bulky",    72, 3, 34, 12, 14, 0, 0, 864 }, \
+  { "Medium",   64, 3, 34, 12, 14, 0, 0, 768 }, \
+  { "Moderate", 58, 3, 34, 12, 14, 0, 0, 768 }, \
+  { "Average",  54, 2, 30, 11, 12, 0, 0, 600 }, \
+  { "Middling", 49, 2, 24, 10, 12, 0, 0, 600 }, \
+  { "Mediocre", 45, 2, 20, 10, 12, 1, 0, 600 }, \
+  { "Small",    40, 2, 20, 10, 12, 1, 0, 480 }, \
+  { "Slim",     37, 2, 20, 10, 12, 1, 0, 480 }, \
+  { "Petite",   33, 1, 15, 9,  11, 1, 0, 480 }, \
+  { "Dinky",    29, 1, 15, 9,  11, 1, 0, 480 }, \
+  { "Teeny",    25, 1, 12, 8,  11, 1, 1, 480 }, \
+  { "Tiny",     21, 1, 12, 8,  11, 1, 1, 0 }, \
+  { NULL, 0, 0, 0, 0, 0, 0 } }
+
+#define BORDER_X_OFFSET 3
+#define BORDER_Y_OFFSET 27
+#define FIRST_CHESS_PROGRAM    "fairymax"
+#define SECOND_CHESS_PROGRAM   "fairymax"
+
+/* Default to no flashing (the "usual" XBoard behavior) */
+#define FLASH_COUNT    0               /* Number of times to flash */
+#define FLASH_RATE     5               /* Flashes per second */
+
+/* Default delay per character (in msec) while sending login script */
+#define MS_LOGIN_DELAY  0
+
+typedef int (*FileProc) P((FILE *f, int n, char *title));
+void CatchDeleteWindow(Widget w, String procname);
+
+#define TOPLEVEL 1 /* preference item; 1 = make popup windows toplevel */
+