|
A couple of months ago I emailed the patch below to Mike & he said he'd look it over when he got a chance, but I guess TurboLinux is keeping him *really* busy :-) The patch is for 0.17.1 but 0.16.0pre2 appears to have the same bugs. This patch is for the following bugs in TN5250: 1. In DFU, the cursor positions to the Format field (1st input-capable field), instead of the RECNBR field. 2. In DFU (or any field-exit-required field), when FieldExit is pressed, the last character is removed. 3. Minor misspelling in curses_terminal_getkey(). The DFU cursor problem occurs because DFU sends the screen in 3 WTD commands (using TN5250_RECORD_OPCODE_OUTPUT_ONLY). The 1st WTD has an IC order (to the RECNBR field) but the keyboard isn't unlocked til the 3rd WTD. The old code was setting the cursor on each WTD (when the keyboard is locked). The new code sets it only on a "Lock-to-Unlock transition", as mentioned in RFC 1205 section 5.2. However, the cursor fix caused cursor-positioning to break when the screen is restored after switching to a new job with System Request option 1, or to a group job with the Attention key. It appears that neither the Restore Screen opcode nor the Restore Screen command are sent by the system unless you put a Restore Screen command (x'12') in the screen you send to the system on Save Screen, so I put one in (in tn5250_wtd_context_convert_nosrc()). This allows tn5250_write_to_display() to check for TN5250_RECORD_OPCODE_RESTORE_SCR. --Dave Here's the patch: Index: cursesterm.c =================================================================== RCS file: /tn5250/tn5250/src/cursesterm.c,v retrieving revision 1.28 diff -r1.28 cursesterm.c 1056c1056 < TN5250_LOG(("curses_getch: recevied 0x%02X.\n", ch)); --- > TN5250_LOG(("curses_getch: received 0x%02X.\n", ch)); Index: display.c =================================================================== RCS file: /tn5250/tn5250/src/display.c,v retrieving revision 1.36 diff -r1.36 display.c 532c532 < if (This->pending_insert) --- > if (This->pending_insert) { 534c534,535 < else { --- > This->pending_insert = 0; > } else { 872a874,875 > int pre_FER_clear = 0; > 900c903 < tn5250_display_indicator_clear (This, TN5250_DISPLAY_IND_FER); --- > pre_FER_clear = 1; 1022a1026,1028 > } > if (pre_FER_clear) { > tn5250_display_indicator_clear (This, TN5250_DISPLAY_IND_FER); Index: session.c =================================================================== RCS file: /tn5250/tn5250/src/session.c,v retrieving revision 1.51 diff -r1.51 session.c 534c534 < tn5250_display_clear_pending_insert (This->display); --- > 579d578 < tn5250_session_clear_unit(This); 758a758,759 > int will_be_unlocked; > int cur_opcode; 850a852,854 > will_be_unlocked = ((CC2 & TN5250_SESSION_CTL_UNLOCK) != 0); > cur_opcode = tn5250_record_opcode(This->record); > 853c857,858 < else if(is_x_system) { --- > else if((is_x_system && will_be_unlocked) || > cur_opcode == TN5250_RECORD_OPCODE_RESTORE_SCR) { Index: wtd.c =================================================================== RCS file: /tn5250/tn5250/src/wtd.c,v retrieving revision 1.10 diff -r1.10 wtd.c 148a149,151 > tn5250_wtd_context_putc (This, ESC); > tn5250_wtd_context_putc (This, CMD_RESTORE_SCREEN); > Jason Felice wrote: <snip> > Side note: Last call for bugs in 0.16.0pre1 - (yes, I've been ignoring > the list a little > lately - it's this work thing *sigh* - I don't think I missed any bugs, > tho). If I'm being > a dunce and there are bugs, let me know - I'd like to wrap up 0.16.0 > next week. <snip> +--- | This is the LINUX5250 Mailing List! | To submit a new message, send your mail to LINUX5250@midrange.com. | To subscribe to this list send email to LINUX5250-SUB@midrange.com. | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.