1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
3 Copyright (C) 2002-2007 Ben Kibbey <bjk@luxsci.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #define COPYRIGHT "Copyright (C) 2002-2007 " PACKAGE_BUGREPORT
23 #define LINE_GRAPHIC(c) ((!config.linegraphics) ? ' ' : c)
24 #define ROWTOMATRIX(r) ((8 - r) * 2 + 2 - 1)
25 #define COLTOMATRIX(c) ((c == 1) ? 1 : c * 4 - 3)
26 #define BOARD_HEIGHT 18
27 #define BOARD_WIDTH 34
28 #define STATUS_HEIGHT 14
29 #define STATUS_WIDTH (COLS - BOARD_WIDTH)
30 #define TAG_HEIGHT LINES - STATUS_HEIGHT
31 #define TAG_WIDTH (COLS - BOARD_WIDTH)
32 #define HISTORY_HEIGHT (LINES - BOARD_HEIGHT)
33 #define HISTORY_WIDTH (COLS - STATUS_WIDTH)
34 #define MAX_VALUE_WIDTH (COLS - 8)
53 static char gameexp
[255];
54 static char moveexp
[255];
55 struct itimerval clock_timer
;
57 int markstart
= -1, markend
= -1;
59 char loadfile
[FILENAME_MAX
];
64 // Loaded filename from the command line or from the file input dialog.
67 NO_FILE
, PGN_FILE
, FEN_FILE
, EPD_FILE
70 const char *history_menu_help_str
= {
71 " UP/DOWN - previous/next menu item\n" \
72 " HOME/END - first/last menu item\n" \
73 " PGDN/PGUP - next/previous page\n" \
74 " a-zA-Z0-9 - jump to item\n" \
75 " CTRL-a - annotate the selected move\n" \
76 " ENTER - view annotation\n" \
77 " CTRL-d - toggle board details\n" \
81 const char *mainhelp
= {
82 "p - play mode keys\n" \
83 "h - history mode keys\n" \
84 "e - board edit mode keys\n" \
85 "g - global game keys"
88 const char *naghelp
= {
89 " UP/DOWN - previous/next menu item\n" \
90 " HOME/END - first/last menu item\n" \
91 " PGDN/PGUP - next/previous page\n" \
92 " a-zA-Z0-9 - jump to item\n" \
93 " SPACE - toggle selected item\n" \
94 " CTRL-X - quit with changes"
102 char *notify
; // The status window notification line buffer.
105 int curses_initialized
;
107 // When in history mode a full step is to the next move of the same playing
108 // side. Half stepping is alternating sides.
111 void update_all(GAME g
);
112 void update_status_notify(GAME g
, char *fmt
, ...);
113 void edit_tags(GAME g
, BOARD b
, int edit
);
114 void add_custom_tags(TAG
***t
);
115 static void free_userdata_once(GAME g
);
117 #ifndef HAVE_PROGNAME