|
Post by Stefan on Oct 19, 2022 17:08:40 GMT -5
R,
I don't recall exactly, but I seem to remember that ISPF/PDF offered HEX VERT and HEX DATA 'views' back in the day (no idea what it does nowadays). I vaguely think that HEX VERT was similar to what SPFLite does, and HEX DATA was the horizontal, spaced-out-originals view which you're proposing. I agree that the HEX DATA view is easier to work with, especially when editing the hex values, simply because, when typing, the cursor moves left-to-right and not upper-to-lower line. Same as you, I rarely need to see the whole file in HEX - usually just a few lines.
I often 'jump into HEX' , make some changes and 'jump back out'. (I've even programmed PF9 for HEX ON/OFF, together with HIDE ON/OFF). I think UNDO is the wrong command to 'undo' the display for the simple reasons that (a) the concept of ON/OFF is already established and (b) that it would also UNDO any changes the user made while in HEX view. I don't think we need a MX line command. The primary HEX command is fine, especially given the infrequent use.
So I'd prefer that we enhance HEX ON | OFF | ? to HEX DATA | VERT | OFF | ? where HEX DATA and HEX VERT both imply ON and HEX OFF switches back to normal view. As HEX is a profile option, the preferred mode mode (VERT or DATA) would be user-defined in the profile. While I like the concept of an XCOLS line command, I would much prefer it if HEX DATA command would automatically change visible COLS lines to the double spacing (because I run with COLS ON in all profiles),
|
|
|
Post by Stefan on Oct 20, 2022 3:37:56 GMT -5
A context-sensitive COLS line is an interesting thought, but it would mean that the code for COLS would have to be significantly rewritten. I was hoping to avoid unnecessary George problems, since I have thoroughly tormented and throttled him recently. I should make nice here. <snip>
LOL Really? That's the most difficult coding part of the entire suggestion?
A simple COLS-Line-Value = 'normal COLS line with a blank inserted after each character"
Redraw the display
For HEX OFF, set the COLS-line-Value back to normal and redraw display.
I don't know(!), but given that the =COLS> lines use up a line pointer but the line is empty, I suspect that the display routine "fills in" the data the user sees.
As for the H'<chars-here>' notation, I'm sorry but I can't see an iuse for it.
Most often when I need a HEX value, it is because the 'char' associated with it is not a "enterable-from-keyboard" character. If I want it as a character, I open KEYMAP and pick the code I want from the 'Character Map' (which conveniently stays open after closing KEYMAP is I want others too). If I need the hex representation as a number, my phone works as a hex calculator, so I just type in the hex.
|
|
|
Post by George on Oct 21, 2022 10:25:30 GMT -5
Well, the COLS aspect is the trivial part of this. The change to support either hex VERT or hex DATA is a whopping huge change. And Robert, please don't say 'sleep on it and it will become simple', since it won't. This affects the guts of how data is entered and how the screen is positioned. The logical cursor position (which tracks physical cursor to logical cursor) will have to be enhanced. Screen display routines also needs enhancing. Screen scrolling also needs enhancing. And a significant # of KB commands that directly update the on-screen data will need changing. Don't hold your breath on this one. George [Added] BTW, the ISPF implementation of HEX DATA is NOT the way you seem to be picturing it. See attached.
|
|
|
Post by Stefan on Oct 21, 2022 12:03:55 GMT -5
Yes, you're right. The HEX DATA display is almost unusable because the hex digits for each byte are 'side-by-side' but the actual text isn't double-spaced. Forget I mentioned HEX DATA.
|
|
|
Post by George on Oct 21, 2022 14:07:28 GMT -5
Robert: My concern was simply the format you used
000001 A B C 7 8 9 000002 414243373839 which would be really tough to handle.
George
|
|
|
Post by George on Oct 21, 2022 15:28:47 GMT -5
Robert: OK then, mark me confused.
Are you asking for an alternative HEX display (like HEX DATA)?
Or are you asking for some new literal type string?
The example in your previous post is still confusing. It is a "how to simulate a new display"? Is it "this is what I want SPFLite to do for me if I do xxx"?
I've really no idea what you're asking for.
George
|
|
|
Post by George on Oct 23, 2022 10:07:06 GMT -5
Robert: OK, clearer. It seemed like a simple macro would do it, so here's a HX macro to use as a Line Command. It just inserts the display as NOTE lines following the selected line. No real error checking in there, it's just a demo.
George
' HX.macro ' Display a line's data in horizontal hex as NOTE lines ' DIM OLine, WLine, HLine, CLine, cnum AS STRING DIM i, j, k, LPtr as long if Is_Primary_Cmd then Halt(fail,"HX is Only available as a line command") LPtr = Get_Src1_LPtr ' Get LPtr OLine = Get_Line$(Lptr) ' Get actual text
'----- Build the display lines CLine = repeat$(len(OLine), "- ") ' Start COLS line for i = 1 to len(OLine) ' Char by char WLine += mid$(OLine, i, 1) + " " ' Wide version of line HLine += Hex$(asc(mid$(OLine, i, 1)), 2) ' Hex version of line IF MOD(i, 10) = 0 THEN ' Add + and Column indexes cnum = FORMAT$(i, "#####") ' MID$(CLine, (i * 2) - 1, LEN(cnum)) = cnum ' ELSEIF MOD(i, 5) = 0 THEN ' MID$(CLine, (i * 2) - 1, 1) = "+" ' END IF ' next i '
SPF_CMD("LINE Note !" + tstr$(LPtr)) ' Insert result as NOTE lines Set_Line(LPtr + 1, HLine) ' SPF_CMD("LINE Note !" + tstr$(LPtr)) ' Set_Line(LPtr + 1, WLine) ' SPF_CMD("LINE Note !" + tstr$(LPtr)) ' Set_Line(LPtr + 1, CLine) ' Halt(0) ' Done
|
|
|
Post by George on Oct 23, 2022 10:43:14 GMT -5
Robert: Certainly you can cut/paste NOTE line data.
George
|
|
|
Post by George on Oct 23, 2022 15:52:11 GMT -5
Good, I was going to add the line range, but got tied up doing other stuff.
George
|
|