home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16223 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.1 KB  |  35 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!mcsun!sun4nl!ruuinf!markov
  3. From: markov@cs.ruu.nl (Mark Overmars)
  4. Subject: Bug in menus in FORMS LIBRARY Version 2.1
  5. Sender: network-news@cs.ruu.nl
  6. Message-ID: <1992Nov10.200057.14525@cs.ruu.nl>
  7. Date: Tue, 10 Nov 1992 20:00:57 GMT
  8. Organization: Utrecht University, Dept. of Computer Science
  9. Keywords: GUI FORMS
  10. Lines: 23
  11.  
  12. I am sorry to say that there is a bug in the menu object class in the new
  13. release of the Forms Library that only happens under particular versions of
  14. the operating system (not under the release I was running). It has to do with
  15. malloc and free (as usual). The error is in the routine fl_clear_menu in the
  16. file menu.c. Please replace this routine by the following code:
  17.  
  18.  
  19. void fl_clear_menu(FL_OBJECT *ob)
  20. /* Clears the menu object */
  21. {
  22.   int i;
  23.   SPEC *sp = ((SPEC *)(ob->spec));
  24.   sp->val = 0;
  25.   for (i=1; i <= sp->numitems; i++)
  26.     { free(sp->items[i]); free(sp->shortcut[i]); sp->mode[i] = PUP_NONE; }
  27.   sp->numitems = 0;
  28. }
  29.  
  30. Tomorrow on I will change the version in our archive to version 2.1a
  31. that corrects this bug. Sorry for this.
  32.  
  33. Mark Overmars
  34.  
  35.