🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25132

Small bug in UWM GetButton.c, V10R4

#25132
From: jmsellens
Date: Sun, 15 Feb 1987 20:10
56 lines
2140 bytes
icon_str is not always dealt with properly in UWM, GetButton.c.  The
RCS header defines this file as version 10.5 dated 86/11/19.  This
bug also appears in the X V10R3 distribution.  Context diff follows.
Fixes are due to Ian! Allen (idallen@watmath).

John Sellens -- Logic Programming and Artificial Intelligence Group

{decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdragon!jmsellens
jmsellens@dragon.waterloo.{edu,CDN} jsellens@watmta.BITNET
jmsellens%dragon@waterloo.csnet


*** GetButton.c.orig	Sun Feb 15 15:01:24 1987
--- GetButton.c.new	Sun Feb 15 15:05:22 1987
***************
*** 191,197 ****
--- 191,201 ----
               */
              if (icon_str_len > 0) {
  		icon_str_len = 0;
+ #ifdef waterloo
+ 		icon_str[0] = '\0';
+ #else
  		icon_str = '\0';
+ #endif
  	    }
          }
          else if (key_char < IFontInfo.firstchar ||
***************
*** 228,240 ****
--- 232,256 ----
      /*
       * Set the window name to the new string.
       */
+ #ifdef waterloo
+     /* note that icon_str can be NULL at this point.  A quick fix to
+        stop mem faults ... */
+ #define ICONSTR	(icon_str ? icon_str : "")
+ 
+     XStoreName(icon_info.assoc_wind, ICONSTR);
+ #else
      XStoreName(icon_info.assoc_wind, icon_str);
+ #endif
  
      /*
       * Determine the new icon window configuration.
       */
      icon_h = IFontInfo.height + (VIconPad << 1);
+ #ifdef waterloo
+     icon_w = XQueryWidth(ICONSTR, IFont);
+ #else
      icon_w = XQueryWidth(icon_str, IFont);
+ #endif
      if (icon_w == 0) {
          icon_w = icon_h;
      }
Technical Details
Message-ID: <8702152109.AA21792@ATHENA>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ucbvax!watmath.waterloo.edu!jmsellens

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ucbvax!watmath.waterloo.edu!jmsellens
From: jmsellens@watmath.waterloo.edu.UUCP
Newsgroups: comp.windows.x
Subject: Small bug in UWM GetButton.c, V10R4
Message-ID: <8702152109.AA21792@ATHENA>
Date: Sun, 15-Feb-87 15:10:22 EST
Article-I.D.: ATHENA.8702152109.AA21792
Posted: Sun Feb 15 15:10:22 1987
Date-Received: Mon, 16-Feb-87 01:52:46 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 56