Scott, could you revise this and apply it to the HEAD branch? The bug fixes 
could maybe be applied on older branch too?

The patch contains 3 things:

- I found a bug in win32/winterm.c in WM_KILLFOCUS where hdc wouldn't be 
initialized before use. That would fix the bugs 1059530 and 927616.

- I found a bug in win32/tn5250-win.c where on quit the pointer stream would be 
deleted two times. It is first deleted on tn5250_session_destroy() so there is 
no need to delete it again. That would fix 927616 too?

- I added initialization of the new function pointers in Tn5250Terminal in 
winterm.c.

Could the bugs before 2003 be closed? :)

Look at the attach tn5250.patch file.

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

All we need is the safety and stability of Windows joined with the ease of use 
and software availability of Linux.



----- CUT HERE -----
Index: win32/tn5250-win.c
===================================================================
RCS file: /cvsroot/tn5250/tn5250/win32/tn5250-win.c,v
retrieving revision 1.10
diff -u -r1.10 tn5250-win.c
--- win32/tn5250-win.c  6 Aug 2002 22:09:17 -0000       1.10
+++ win32/tn5250-win.c  24 Feb 2005 15:39:42 -0000
@@ -200,8 +200,9 @@
            tn5250_terminal_term(term);
      if (sess != NULL)
            tn5250_session_destroy(sess);
-     if (stream != NULL)
-           tn5250_stream_destroy(stream);
+     /* The stream as already been destroyed in tn5250_session_destroy()
+      * if (stream != NULL)
+      *      tn5250_stream_destroy(stream); */
      if (config != NULL)
            tn5250_config_unref (config);
  
Index: win32/winterm.c
===================================================================
RCS file: /cvsroot/tn5250/tn5250/win32/winterm.c,v
retrieving revision 1.22
diff -u -r1.22 winterm.c
--- win32/winterm.c     29 Mar 2004 21:45:19 -0000      1.22
+++ win32/winterm.c     24 Feb 2005 15:40:03 -0000
@@ -417,8 +417,11 @@
    r->getkey = win32_terminal_getkey;
    r->beep = win32_terminal_beep;
    r->config = win32_terminal_set_config;
-
-
+   r->enhanced = NULL;
+   r->create_window = NULL;
+   r->destroy_window = NULL;
+   r->create_scrollbar = NULL;
+   r->destroy_scrollbar = NULL;
    return r;
 }
 
@@ -1956,7 +1959,9 @@
            return 0;
   
         case WM_KILLFOCUS:
+           hdc = GetDC(hwnd);
            win32_hide_caret(hdc, globTerm);
+           ReleaseDC(hwnd, hdc);
            globTerm->data->is_focused = 0;
            return 0;
----- CUT HERE -----



This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].