Mike,

Thanks for fixing the compiler warning messages.  Unfortunately, this fix
causes tn5250 to not work at all -- it'll end with "assertion failed"
immediately after starting.  (before I even see my signon screen)

The problem is in the tn5250_char_map_printable_p() function in utility.c.

The old code (that was giving warnings) looked like this:

   switch (data) {
     /*
        Ideographic Shift-In and Shift-Out.
   case 0x0e:
   case 0x0f:
     */
      return 0;
   }
   return 1;

This code will always return 1, since the "return 0" is unreachable.  And
this actually works... :)

the new code looks like this:

   switch (data)
     {
       /*
          Ideographic Shift-In and Shift-Out. 
          case 0x0e:
          case 0x0f:
       */
     default: 
       return 0;
       break;
     }
   return 1;


This code always returns 0, which makes the emulator unusuable.  (every
character is unprintable!)

What you probably meant to do was something like this:

   switch (data)
     {
       /*
          Ideographic Shift-In and Shift-Out. 
          case 0x0e:
          case 0x0f:
               return 0;
       */
     default: 
       break;
     }
   return 1;

Since that "return 0" is done (used to be done) when an ideographic 
shift-in or shift-out character was encountered.  Of course, the entire
switch statement seems pointless, this way!  heck, the entire function
seems pointless... :)

But anyway, that fixes my assertion, and lets me use the emulator
again...

-Scott


+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to [EMAIL PROTECTED]
| To subscribe to this list send email to [EMAIL PROTECTED]
| To unsubscribe from this list send email to [EMAIL PROTECTED]
| Questions should be directed to the list owner/operator: [EMAIL PROTECTED]
+---

Reply via email to