Suppress Read Modified nulls, clear on CLEAR, add NVT scrolling margins #363

Manually merged
binjovi-bot merged 1 commit from fix/3270-nulls-clear-nvt-margins into trunk 2026-10-26 11:05:56 +00:00
Owner

Four protocol fixes, each with a failing test first:

  • Operator Enter and PF keys on a formatted 3270 screen sent each null
    cell as a space (0x40), because the builder encoded field cells from
    their glyphs. IBM GA23-0059 Read Modified suppresses nulls anywhere in
    the field data, and the host Read Modified path already did. The
    builder now skips a null cell with the rule the unformatted builder
    uses. A typed space is EBCDIC 0x40 and stays. A field that Erase EOF
    cleared now goes out as its SBA alone. Seven tests had synthetic cells
    with a glyph and no raw byte; they now carry real raw bytes.
  • CLEAR in an LU-LU session sent the short-read AID but kept the screen,
    the field attributes and the cursor. After the AID is sent, the session
    now returns to the default size, fills the buffer with nulls, removes
    every field attribute and moves the cursor to address 0. A failed send
    leaves the session as it was.
  • Insert Line and Delete Line in embedded NVT data kept the cursor
    column. ECMA-48 8.3.67 and 8.3.32 move it to the line home position.
  • Embedded NVT data now honors the DEC top and bottom scrolling margins
    (CSI Pt ; Pb r). Line feed, index, next line, reverse index, auto-wrap,
    insert line, delete line, scroll up and scroll down act inside the
    region; a line feed below it does not scroll. The margins are clamped
    where they are used, so a screen resize cannot index outside the
    screen. The fuzz entry for the parser still holds.

Not fixed: the parser wraps at once at the last column instead of
deferring the wrap to the next character, as a VT100 does.

Checks in the zig-builder:v22 image: zig fmt --check, zig build check,
the package contract and target selection scripts (full check profile),
and 60 s of zig build test --fuzz with no crash.

Four protocol fixes, each with a failing test first: - Operator Enter and PF keys on a formatted 3270 screen sent each null cell as a space (0x40), because the builder encoded field cells from their glyphs. IBM GA23-0059 Read Modified suppresses nulls anywhere in the field data, and the host Read Modified path already did. The builder now skips a null cell with the rule the unformatted builder uses. A typed space is EBCDIC 0x40 and stays. A field that Erase EOF cleared now goes out as its SBA alone. Seven tests had synthetic cells with a glyph and no raw byte; they now carry real raw bytes. - CLEAR in an LU-LU session sent the short-read AID but kept the screen, the field attributes and the cursor. After the AID is sent, the session now returns to the default size, fills the buffer with nulls, removes every field attribute and moves the cursor to address 0. A failed send leaves the session as it was. - Insert Line and Delete Line in embedded NVT data kept the cursor column. ECMA-48 8.3.67 and 8.3.32 move it to the line home position. - Embedded NVT data now honors the DEC top and bottom scrolling margins (CSI Pt ; Pb r). Line feed, index, next line, reverse index, auto-wrap, insert line, delete line, scroll up and scroll down act inside the region; a line feed below it does not scroll. The margins are clamped where they are used, so a screen resize cannot index outside the screen. The fuzz entry for the parser still holds. Not fixed: the parser wraps at once at the last column instead of deferring the wrap to the next character, as a VT100 does. Checks in the zig-builder:v22 image: zig fmt --check, zig build check, the package contract and target selection scripts (full check profile), and 60 s of zig build test --fuzz with no crash.
Suppress Read Modified nulls, clear on CLEAR, add NVT scrolling margins
All checks were successful
binjovi/ci Binjovi completed the frozen plan
84047933c7
Four protocol fixes, each with a failing test first:

- Operator Enter and PF keys on a formatted 3270 screen sent each null
  cell as a space (0x40), because the builder encoded field cells from
  their glyphs. IBM GA23-0059 Read Modified suppresses nulls anywhere in
  the field data, and the host Read Modified path already did. The
  builder now skips a null cell with the rule the unformatted builder
  uses. A typed space is EBCDIC 0x40 and stays. A field that Erase EOF
  cleared now goes out as its SBA alone. Seven tests had synthetic cells
  with a glyph and no raw byte; they now carry real raw bytes.
- CLEAR in an LU-LU session sent the short-read AID but kept the screen,
  the field attributes and the cursor. After the AID is sent, the session
  now returns to the default size, fills the buffer with nulls, removes
  every field attribute and moves the cursor to address 0. A failed send
  leaves the session as it was.
- Insert Line and Delete Line in embedded NVT data kept the cursor
  column. ECMA-48 8.3.67 and 8.3.32 move it to the line home position.
- Embedded NVT data now honors the DEC top and bottom scrolling margins
  (CSI Pt ; Pb r). Line feed, index, next line, reverse index, auto-wrap,
  insert line, delete line, scroll up and scroll down act inside the
  region; a line feed below it does not scroll. The margins are clamped
  where they are used, so a screen resize cannot index outside the
  screen. The fuzz entry for the parser still holds.

Not fixed: the parser wraps at once at the last column instead of
deferring the wrap to the next character, as a VT100 does.

Checks in the zig-builder:v22 image: zig fmt --check, zig build check,
the package contract and target selection scripts (full check profile),
and 60 s of zig build test --fuzz with no crash.
binjovi-bot manually merged commit 84047933c7 into trunk 2026-10-26 11:05:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/zelnet!363
No description provided.