Rev 1 | Rev 66 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 65 | ||
---|---|---|---|
Line 215... | Line 215... | ||
215 | fieldstart = char_index + 1; // skip the leading brace |
215 | fieldstart = char_index + 1; // skip the leading brace |
216 | 216 | ||
217 | while ((fieldstart < file_size) && isspace (file_data[fieldstart])) |
217 | while ((fieldstart < file_size) && isspace (file_data[fieldstart])) |
218 | fieldstart++; // skip any leading spaces |
218 | fieldstart++; // skip any leading spaces |
219 | 219 | ||
220 | // |
220 | // move through all the other characters... |
221 | for (fieldstop = fieldstart; fieldstop < file_size; fieldstop++) |
221 | for (fieldstop = fieldstart; fieldstop < file_size; fieldstop++) |
222 | if (file_data[fieldstop] == '}') |
222 | if (file_data[fieldstop] == '}') |
223 | break; // and stop at the first closing brace we find |
223 | break; // and stop at the first closing brace we find |
224 | 224 | ||
225 | char_index = fieldstop + 1; // remember where to continue reading (that is, after the closing brace) |
225 | char_index = fieldstop + 1; // remember where to continue reading (that is, after the closing brace) |
Line 233... | Line 233... | ||
233 | if (pgn_comment[0] != 0) |
233 | if (pgn_comment[0] != 0) |
234 | wcscat_s (pgn_comment, WCHAR_SIZEOF (pgn_comment), L" "); |
234 | wcscat_s (pgn_comment, WCHAR_SIZEOF (pgn_comment), L" "); |
235 | length = wcslen (pgn_comment); |
235 | length = wcslen (pgn_comment); |
236 | ConvertToWideChar (&pgn_comment[length], WCHAR_SIZEOF (pgn_comment) - length, &file_data[fieldstart]); |
236 | ConvertToWideChar (&pgn_comment[length], WCHAR_SIZEOF (pgn_comment) - length, &file_data[fieldstart]); |
237 | ConvertCRLFsToSingleSpaces (pgn_comment); // linearize string |
237 | ConvertCRLFsToSingleSpaces (pgn_comment); // linearize string |
- | 238 | ||
- | 239 | continue; // and proceed to the next data |
|
- | 240 | } |
|
- | 241 | ||
- | 242 | // else is it a numeric annotation glyph ? if so, just ignore it (FIXME: better support this) |
|
- | 243 | else if (file_data[char_index] == '$') |
|
- | 244 | { |
|
- | 245 | while ((char_index < file_size) && !isspace (file_data[char_index])) |
|
- | 246 | char_index++; // figure out where it stops |
|
- | 247 | while ((char_index < file_size) && isspace (file_data[char_index])) |
|
- | 248 | char_index++; // figure out where the next word starts |
|
238 | 249 | ||
239 | continue; // and proceed to the next data |
250 | continue; // and proceed to the next data |
240 | } |
251 | } |
241 | 252 | ||
242 | // else is it a game result ? |
253 | // else is it a game result ? |