5 ** Copyright (C) 1998 Kurt Van den Branden
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program; if not, write to the Free Software
19 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 int type
; /* LOGMOVE, LOGREMGIPF, LOGREMROW */
37 char start
[3]; /* from , , startpos */
38 char end
[3]; /* endmove, , endpos */
39 char player
; /* piece , owner , owner */
40 listheader
* plist
; /* , pos , pieces */
47 #define loglength(log) lllength (log->moves)
48 #define logitemnr(log,nr) (logitem *) llitembynr (log->moves, nr)
49 #define logitem_type(logitem) logitem->type
50 #define logitem_start(logitem) logitem->start
51 #define logitem_end(logitem) logitem->end
52 #define logitem_player(logitem) logitem->player
53 #define logitem_plist(logitem) logitem->plist
59 gamelog
* newlog (const char * type
, const char * wname
, const char * bname
);
60 void deletelog (gamelog
* log
);
61 int addtolog (gamelog
* log
, int type
, char * data
);
62 int logtofile (gamelog
* log
, FILE * fp
);
63 xmlite_entity
* logtoxml (gamelog
* log
);
64 gamelog
* logfromxml (xmlite_entity
* root
);
65 gamelog
* logfromfile (FILE * fp
);
66 listheader
* logtobrowser (gamelog
* log
);
67 int remlastmove (gamelog
* log
);