MailMan | 1 Apr 2005 14:30

Guidelines for LINUX5250 mailing list

Monthly posting of the guidelines for participation in the LINUX5250
Mailing List.

Answers to common questions, including installation issues for FreeBSD,
Linux and Windows are included in the documentation in the README file
in the source tarball, the manual included with the Windows installer,
and the other documentation found on our web site at
http://tn5250.sourceforge.net

Answers to other questions which may have already been asked are available in
the linux5250 email list archive, which is available at
http://archive.midrange.com/linux5250/

Keep to the subject.  The topic of the list is the Linux Tn5250
Emulation project.   (Though, the name "Linux" is a misnomer, since
the software will work in Microsoft Windows and any modern Unix or
Unix-like operating system)

When quoting messages, do not quote the entire message.  Just quote the
parts that are needed to make the appropriate references.

Flames are absolutely prohibited.  If you disagree with someone, feel
free to argue the facts, but no personal attacks will be tolerated.

The official language of the LINUX5250 Mailing List is English.

Do not post personal messages.  Please use direct E-Mail.  This list is
international in scope and personal messages just end up costing money.

Please do not use HTML to format messages ... not everyone has a HTML
(Continue reading)

James Rich | 1 Apr 2005 19:39

word wrap

Hey everyone,

I've run into a problem implementing word wrap.  When a word doesn't fit 
at the end of a field, I need to put it on the next field and pad with 
blanks.  However, I need to distinguish between blanks I use for padding 
and those blanks the user entered.  My best idea so far is to use special 
characters and then modify the functions for display to replace them with 
blanks.  Initially I have chosen to use hex FE since my charts show that 
as a non-existent character in both EBCDIC and ASCII.  Interestingly, it 
still maps to a character.  I think this idea is the way to go (it is 
working) but I need a non-blank character that can't possibly be a valid 
display character.  Any suggestions?

All the code for this is in cvs.  Take a look tn5250_display_wordwrap(). 
The character I need to use is #defined as TN5250_DISPLAY_WORD_WRAP_SPACE. 
Note that currently word wrap doesn't work on data entry, but does work on
incoming data from the iSeries and using the delete key.  You can enter
data, it just won't be wrapped properly.

btw - a lot of changes have gone into cvs recently.  We now have complete
for cursor progression (forward and back), continuous fields, the CREATE
WINDOW structured field, an option to play a sound file instead of 
beep (Jason Felice wrote it), and a new option to lp5250d to run it as a
different user.  x5250 0.4.7 and latest cvs makes a pretty nice emulator.

James Rich

It's not the software that's free; it's you.
 	- billyskank on Groklaw
--

-- 
(Continue reading)

phil | 1 Apr 2005 19:49

Re: word wrap

James Rich wrote:

> Hey everyone,
> 
> I've run into a problem implementing word wrap.  When a word doesn't fit 
> at the end of a field, I need to put it on the next field and pad with 
> blanks.  However, I need to distinguish between blanks I use for padding 
> and those blanks the user entered.  My best idea so far is to use 
> special characters and then modify the functions for display to replace 
> them with blanks.  Initially I have chosen to use hex FE since my charts 
> show that as a non-existent character in both EBCDIC and ASCII.  
> Interestingly, it still maps to a character.  I think this idea is the 
> way to go (it is working) but I need a non-blank character that can't 
> possibly be a valid display character.  Any suggestions?
> 

How about 0x00?
I don't understand.
Assuming this is driven by keyboard interrupt, If the last char a user 
entered on line 1 is space, you don't need to word wrap. just
position the cursor on the line 2.  If the last char was non space,
just grab the last word.

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
(Continue reading)

James Rich | 1 Apr 2005 20:07

Re: word wrap

On Fri, 1 Apr 2005, phil wrote:

> James Rich wrote:
>> 
>> I've run into a problem implementing word wrap.  When a word doesn't fit at 
>> the end of a field, I need to put it on the next field and pad with blanks. 
>> However, I need to distinguish between blanks I use for padding and those 
>> blanks the user entered.  My best idea so far is to use special characters 
>> and then modify the functions for display to replace them with blanks. 
>> Initially I have chosen to use hex FE since my charts show that as a 
>> non-existent character in both EBCDIC and ASCII.  Interestingly, it still 
>> maps to a character.  I think this idea is the way to go (it is working) 
>> but I need a non-blank character that can't possibly be a valid display 
>> character.  Any suggestions?
>
> How about 0x00?
> I don't understand.
> Assuming this is driven by keyboard interrupt, If the last char a user 
> entered on line 1 is space, you don't need to word wrap. just
> position the cursor on the line 2.  If the last char was non space,
> just grab the last word.

It doesn't always come from the keyboard.  Nor can you only worry about 
the case where a user is typing at the end of a line.  What about if the 
user is inserting text somewhere else in the line?  Or deleting text?  The 
text that is sent from the iSeries is not wrapped, the emulator has to 
handle that itself.  All these cases except the first (using typing at end 
of line) are now handled.

James Rich
(Continue reading)

phil | 1 Apr 2005 20:19

Re: word wrap

> 
> It doesn't always come from the keyboard.  Nor can you only worry about 
> the case where a user is typing at the end of a line.  What about if the 
> user is inserting text somewhere else in the line?  Or deleting text?  
> The text that is sent from the iSeries is not wrapped, 

I see. Well, ...
The source code for Tk text box I'm sure has the code you need.
Don't know how readable.  But it would handle all your cases.

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

Scott Klement | 1 Apr 2005 20:53
Favicon

Re: word wrap

Hi James,

> I've run into a problem implementing word wrap.  When a word doesn't fit at 
> the end of a field, I need to put it on the next field and pad with blanks. 
> However, I need to distinguish between blanks I use for padding and those 
> blanks the user entered.

TN5250 already keeps track of how many spaces are used for padding and how 
many the user entered. The spaces that the user typed will be set to 
actual spaces (x'40' in EBCDIC).  The spaces that the user hasn't typed in 
that are just padding on the screen will be x'00'

Case in point... look at the tn5250_display_kf_end() function.  It 
determines the end of the field by searching for the last character that's 
not x'00' (err, "\0", since this is C not RPG)

Go to a command-line (on a 5250 screen) and type 10 spaces, then move the 
cursor back to the start with the arrow keys, then hit the END key and 
you'll see that it'll move right back to right after the last space you 
typed.  It doesn't go all the way to the end of the field...   then look 
at the code in tn5250_display_kf_end and see how it works.

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.
(Continue reading)

James Rich | 1 Apr 2005 21:04

Re: word wrap

On Fri, 1 Apr 2005, Scott Klement wrote:

>> I've run into a problem implementing word wrap.  When a word doesn't fit at 
>> the end of a field, I need to put it on the next field and pad with blanks. 
>> However, I need to distinguish between blanks I use for padding and those 
>> blanks the user entered.
>
> TN5250 already keeps track of how many spaces are used for padding and how 
> many the user entered. The spaces that the user typed will be set to actual 
> spaces (x'40' in EBCDIC).  The spaces that the user hasn't typed in that are 
> just padding on the screen will be x'00'

Ok, I was on the right track, just using the wrong value.  Changing it to 
nulls did the trick.  Thank you.

James Rich

It's not the software that's free; it's you.
 	- billyskank on Groklaw
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

Ruel, Marc-Antoine | 1 Apr 2005 23:39

Small patch 1/2

I just finished merging.

I have 2 patches to submit.

First, I removed the last static variable in sslstream.c. At the same time, I set some pointers to NULL after
terminal deletion (because I found a bug in win32 port and it is easier to fix when the deleted pointers are
set to null). Finally, I added parenthesis for comprehension (and to remove compiler warnings) to this
"(1 << (sb_buf[i]+1))" instead of 
"(1 << sb_buf[i]+1)".

Second patch follows shortly. (the win32 port update)

M-A

**** CUT HERE ****
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tn5250/tn5250/ChangeLog,v
retrieving revision 1.229
diff -u -r1.229 ChangeLog
--- ChangeLog	1 Apr 2005 06:42:52 -0000	1.229
+++ ChangeLog	1 Apr 2005 21:36:38 -0000
 <at>  <at>  -1,3 +1,7  <at>  <at> 
+2005-04-01 Marc-Antoine Ruel <maruel@...>
+- Removed last static variable in sslstream
+- Small cosmetic changes
+
 2005-03-31 James Rich <james@...>
 - Add support for delete in word wrap fields.
 - Fix bug involving cursor movement at end of continuous subfields.
(Continue reading)

Ruel, Marc-Antoine | 2 Apr 2005 00:17

win32 port patch

I updated the win32 port since it wouldn't compile anymore.

I dropped the patch there:
http://agora.ulaval.ca/~nisyl5/5250/win32.patch.gz

- I removed the dependency on glib.
- I fixed 2 bugs about DC misuse.
- I added font selection support so the user can change the window size. It's not as cool as the dynamic font
resizing of the ActiveX but it is still more usable than before.
- I fixed a double-deletion of the stream.
- I added the tn5250_win32_terminal_enhanced() function (it is still empty).

I finished the keyboard remapping of the ActiveX. If anyone want to try it out, contact me offlist until I can
get it updated in the cvs.

Marc-Antoine Ruel, ing. jr.
Cardinal Health Canada
330 St-Vallier Est, Suite 330
Québec (Québec) G1K 9C5
(418) 872-0172 x8931 

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

(Continue reading)

James Rich | 2 Apr 2005 02:24

Re: win32 port patch

On Fri, 1 Apr 2005, Ruel, Marc-Antoine wrote:

> I updated the win32 port since it wouldn't compile anymore.
>
> I dropped the patch there:
> http://agora.ulaval.ca/~nisyl5/5250/win32.patch.gz

Both patches have now been applied.  The second patch failed when trying 
to patch ChangeLog because it included the changes from the first patch 
(i.e. it was a diff of the original ChangeLog, not the patched ChangeLog). 
Everything else applied just fine.  Thank you so much!

James Rich

It's not the software that's free; it's you.
 	- billyskank on Groklaw
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.


Gmane