bugXBoard - Bugs: bug #27650, Line wrap in ICS mode

 
 

bug #27650: Line wrap in ICS mode

Submitter:  None
Submitted:  Sat 10 Oct 2009 09:52:30 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Ready For Test
Assigned to:  nematocyst Open/Closed:  Closed
Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 17 Oct 2009 12:39:14 PM UTC, comment #11: 

I only tested XBoard.
All options work like expected. Also resizing xterm did update "width".

The minor differences between internal and ICS wrapping can be ignored.

Anonymous
Sat 17 Oct 2009 05:18:31 AM UTC, comment #10: 

I added various things to support internal line wrapping.  This works both in XBoard and Winboard, but it's off by default in Winboard.

To use:
 1) add -useInternalWrap to command line
 2) make sure -keepLineBreaksICS is false (it is by default)
 3) you can -wrapContinuationSequence "foo" to customize wrapped lines (default is "\\   " just like most ICS)

In XBoard, the defaults for 1) and 2) are such that internal wrapping will occur.

Additionally, both Winboard and XBoard now auto-update the server's width setting based on the actual client width.  For XBoard, this may not work if the ioctl() and signal() functions don't support the types used.  This should optimize the screen use as much as possible, both for ICS commands that obey the width, and for commands that wrap instead.

The patches are in git now.  Please try them and report back.

Eric Mullins <nematocyst>
Group Member
Sat 10 Oct 2009 05:50:03 PM UTC, comment #9: 

If the ICS splits the line in the middle of a style12 board, that would screw things up for other interfaces besides xboard, wouldn't it?  So I'd think we could get the ICS folks to fix that, though it's nice to tolerate it if we can.

Can we arrange to join lines only if they are part of a style12 board? I.e., we've seen the <12> (or whatever the marker is, I'm not sure I remembered right).

A small bit of irony: the reason WinBoard has a nice custom widget for the board console is that the native Windows console windows are truly horrible, much worse than an xterm.  The first version of WinBoard used the native console windows, just like xboard uses the xterm you started it from, and it was unusable.  So I unhappily put in a lot of work writing a replacement, but I never got around to doing it for xboard because the xterm wasn't as nice, but was tolerable to me.

Tim Mann <mann>
Group administrator
Sat 10 Oct 2009 04:19:27 PM UTC, comment #8: 

The problem seems to be not the board that is sent during the game, but the initial board of a move list. This is split up according to the ICS "width" variable. And the default setting of the width variable is such that it already causes problems.

There is not a whole lot of choice between open-source ICS codes...

H.G. Muller

Anonymous
Sat 10 Oct 2009 04:15:31 PM UTC, comment #7: 

I think catoring to an ICS server that actually splits up style12 lines (or anything not really intended to be seen by users) is just encouraging more of that.

If a server is really splitting style12, then it deserves to have the weak client support it will get.

Eric Mullins <nematocyst>
Group Member
Sat 10 Oct 2009 03:28:50 PM UTC, comment #6: 

There is a bug in the splicing code... somewhere.  I tried to track it down once and made little progress.  It's noticeable if you finger some people with long finger notes.  eg.  EJD, Opinel, etc.  (at FICS)

The ICS servers have a width variable that some commands obey with internal formatting, and some obey by splitting lines and providing the "\   " continuation sequence.

I may have a chance to do this today: add code so that when the font changes or when the window width changes, a command is sent to the ICS giving the correct width.  That way the server and client are dealing with text optimally.

Eric Mullins <nematocyst>
Group Member
Sat 10 Oct 2009 03:21:36 PM UTC, comment #5: 

Unfortunately this is not true for every ICS (in particular not for the open-source Lasker 2.2.3 code). Also, board that are part of a move list (with non-standard opening position) seem to be more critical. I just had to patch the code this mornning, because although I could play  game of Capablanca Chess on ICS using WinBoard, I could not summon up the game afterwards with the smoves command, because the board line was broken, and joined in a wrong way, with a space too many. Some ICS remove the space at which they break the line, but apparently others do leave it dangling at the end of the upper line.

Solving it in the board parser is a bit difficult.

The true problem is that an xterm is really too primitive a device to make an acceptable console. It does not even seem possible to edit the line you are typing using arrow keys. I am not really an XBoard user, I am used to WinBoard, and compared to that XBoard in ICS mode is truly appalling. The long-term solution to this problem is therefore to crank up the quaity of the ICS console to WinBoard level.

WinBoard 4.4.1 will have separate chat windows anyway. (Not available in XBoard, though).

H.G. Muller

Anonymous
Sat 10 Oct 2009 03:01:17 PM UTC, comment #4: 

I checked at FICS: style12 board strings don't get split, even
with width set to 32 (=minimum).
So I removed the rejoining code and found no problems so far.
Output is "nicely wrapped" again. I consider this solved for me. No action from your side required :-)

Anonymous
Sat 10 Oct 2009 01:53:13 PM UTC, comment #3: 

The reason is, that it is completely annoying, if a line en
ds in the middle of a w
ord. :-)

And I don't see a way how to make xterm do that kind of wrap.

Also, to make the ICS aware of my console width I just need to set the width variable (FICS).

Just rejoining board12 strings isn't an option?

Ok, I try to fix that myself.
Probably even better to forget the whole upgrade plan.




Anonymous
Sat 10 Oct 2009 11:36:55 AM UTC, comment #2: 

Sorry, I meant to write: "XBoard 4.4 does re-join the lines ..."

Anonymous
Sat 10 Oct 2009 11:32:58 AM UTC, comment #1: 

Indeed, XBoard 4.4 does not join the lines that were broken off by the ICS. This is intended behavior. The ICS console itself should be responsible for the wrapping, which might be different for each user: not everyone might use a window of the same width, and the ICS is not aware how wide the console window is. So it makes more sense to do this at the client side.

More importantly, the board12 style can be so wide that the ICS puts a line break in it, and the XBoard board parser chokes on this. Joining continuation lines guarantees that XBoard will understand all boards the ICS sends it, no matter how wide.

Is there any reason not to join the lines?

H.G.Muller

Anonymous
Sat 10 Oct 2009 09:52:30 AM UTC, original submission:  

In xboard 4.2.7 : If e.g. a tell is longer than the xterm width
the word that doesn't fit gets wrapped to the next line starting with "\  ".

In xboard 4.4.1.pre this is not done anymore.
(FICS variable width is set correctly)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by apersaud (Updated the item)
  • -email is unavailable- added by mann (Posted a comment)
  • -email is unavailable- added by nematocyst (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-23 apersaud Open/ClosedOpen Closed
    2009-10-17 nematocyst Assigned toNone nematocyst
        StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code