Maybe a little bug in Xboard 4.9.1

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28395
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Maybe a little bug in Xboard 4.9.1

Post by hgm »

I pushed an attempt to cure this to my source repository at winboard.nl. This breaks a line at the first space after the input buffer is half full.
User avatar
chrjly2
Posts: 15
Joined: Sat Aug 31, 2024 7:15 pm
Full name: Christophe Jolly

Re: Maybe a little bug in Xboard 4.9.1

Post by chrjly2 »

OliverBr wrote: Sat Sep 20, 2025 10:15 pm Hello together, hello @hgm, (How can I adress hgm in a forum post?)

I got a problem wit Xboard 4.9.1 (on Macosx) that I cannot load pgns, that have to many characters in one line.

E.g.: https://ccrl.live/pgns/The_Great_Kiwi_H ... el_2.0.pgn

I have to download and split them manually into a couple of lines.
If this a general issue, and if yes, maybe there could be a fix for it?

It would be very very kind! :)
Thank you.
I have the same problem with my xboard 4.9.1 when I load a pgn file downloaded from the CCRL live viewer.
Here is a sed command that format the pgn file into a one move per line pgn file:

sed -E 's/[0-9]+\. /\n&/g' input_file.pgn >output_file.pgn

Christophe
User avatar
Roland Chastain
Posts: 685
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Maybe a little bug in Xboard 4.9.1

Post by Roland Chastain »

hgm wrote: Fri Oct 10, 2025 7:30 pm I pushed an attempt to cure this to my source repository at winboard.nl. This breaks a line at the first space after the input buffer is half full.
Thank you. There would be a small correction to do:

Code: Select all

parser.c: In function 'ReadLine':
parser.c:292:43: error: 'PARSEBUF' undeclared (first use in this function); did you mean 'PARSEBUFSIZE'?
  292 |         if(c == ' ' && inPtr - inputBuf > PARSEBUF/2) break;  // break too-long lines
      |                                           ^~~~~~~~
      |                                           PARSEBUFSIZE
Qui trop embrasse mal étreint.

Author of Eschecs, a simple UCI chess GUI written in Pascal.
User avatar
hgm
Posts: 28395
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Maybe a little bug in Xboard 4.9.1

Post by hgm »

Sorry. :oops: I thought I had tested the patch by running "make", and that it compiled without errors. I must have done that before I actually saved the modified file from the editor.

Anyway, it should be fixed now.
Dave Gomboc
Posts: 27
Joined: Sun Aug 15, 2021 12:22 am
Full name: Dave Gomboc

Re: Maybe a little bug in Xboard 4.9.1

Post by Dave Gomboc »

hgm wrote: Sat Oct 11, 2025 6:57 pm Sorry. :oops: I thought I had tested the patch by running "make", and that it compiled without errors. I must have done that before I actually saved the modified file from the editor.

Anyway, it should be fixed now.
@hgm Hey, H.G., when you have a chance to reply to my personal email (from ~10 days ago), please also indicate whether these newest changes being discussed here should be or not be included in whatever level of permission you choose to provide. The sooner the issue in the email discussion gets resolved, the sooner I will be able to actually create a new point release for XBoard.