X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=pgntags.c;h=7e66de1c46104587c9324975edaf20282694e6cf;hp=6317c8b1769f410c931ff74c6073ab54c2c25177;hb=d016fb202fe45795e630e22ba516e754cf694ea6;hpb=2380bd9a886c088ba6040d99932c20cdf080fbbb diff --git a/pgntags.c b/pgntags.c index 6317c8b..7e66de1 100644 --- a/pgntags.c +++ b/pgntags.c @@ -1,23 +1,25 @@ /* * pgntags.c -- Functions to manage PGN tags - * XBoard $Id: pgntags.c,v 2.1 2003/10/27 19:21:00 mann Exp $ * - * Copyright 1995 Free Software Foundation, Inc. + * Copyright 1995,2009 Free Software Foundation, Inc. + * + * Enhancements Copyright 2005 Alessandro Scotti * * ------------------------------------------------------------------------ - * 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + * along with this program. If not, see http://www.gnu.org/licenses/. * + * * ------------------------------------------------------------------------ * * This file could well be a part of backend.c, but I prefer it this @@ -105,6 +107,10 @@ int ParsePGNTag(tag, gameInfo) else gameInfo->result = GameUnfinished; success = TRUE; + } else if (StrCaseCmp(name, "TimeControl") == 0) { +// int tc, mps, inc = -1; +// if(sscanf(value, "%d/%d", &mps, &tc) == 2 || ) + success = StrSavePtr(value, &gameInfo->timeControl) != NULL; } else if (StrCaseCmp(name, "FEN") == 0) { success = StrSavePtr(value, &gameInfo->fen) != NULL; } else if (StrCaseCmp(name, "SetUp") == 0) {