mahjongg (sun) bug fix

Mark Holm markh at cvedc.UUCP
Thu Sep 8 15:13:37 AEST 1988


Sorry this took so long to get out, but things have been a little busy.
This patch fixes the last known bug that causes problems under Sun OS 4.0 and
on Sun 4's. It also makes the quit button a done button instead. Giving the 
option to close to icon or quit (via menu). Many thanks to Mike Adams for 
finding the bug!!

Run the following through patch while in the source directory:

=-=-=-=-cut=-=-=-=-cut=-=-=-=-=-cut=-=-=-=-=-cut=-=-=-=-=-cut=-=-==-=cut=-=-=-=
*** event.c	Mon Sep  5 16:01:46 1988
--- event.c.old	Fri Jul  8 17:04:24 1988
***************
*** 408,414 ****
  
      if ((event_id(event) == MS_MIDDLE) && selected[0].filled && !help_mode) {
  
! 	help_proc(selected[0].item, event);
  
      } else {
  
--- 408,414 ----
  
      if ((event_id(event) == MS_MIDDLE) && selected[0].filled && !help_mode) {
  
! 	help_proc();
  
      } else {
  
***************
*** 590,596 ****
  	case MS_MIDDLE:
  	if (selected[0].filled) { /* request for help */
  
! 	    help_proc(selected[0].item, event);
  
  	}
  	break;
--- 590,596 ----
  	case MS_MIDDLE:
  	if (selected[0].filled) { /* request for help */
  
! 	    help_proc();
  
  	}
  	break;
***************
*** 599,616 ****
      }
  }
  
! void quit_proc(item,value,event)
! Panel_item item;
! int        value;
! Event      *event;
  {
!     register int which;
! 
!     if (!value || event_id(event) == MS_LEFT) {
! 	window_set(main_frame, FRAME_CLOSED, TRUE, 0);
!     } else {
!         window_destroy(main_frame);
!     }
  }
  
  void new_proc()
--- 599,607 ----
      }
  }
  
! void quit_proc()
  {
!     window_destroy(main_frame);
  }
  
  void new_proc()
*** mahjongg.c	Tue Sep  6 06:35:31 1988
--- mahjongg.c.old	Mon Sep  5 15:15:17 1988
***************
*** 330,353 ****
  				 PANEL_SHOW_ITEM, TRUE,
  				 0);
  
!     /* reset default font for menu */
! 
!     window_set(message_panel, WIN_FONT, panel_font, 0);
! 
!     quit = panel_create_item(message_panel, PANEL_CHOICE,
                                   PANEL_LABEL_IMAGE,
                                     color_button(panel_button_image(message_panel,
! 								  "DONE",
  								  6,
                                       			          panel_font),
  						RED),
- 				 PANEL_LABEL_FONT, panel_font,
- 				 PANEL_CHOICE_STRINGS, "Close to Icon",
- 						       "Quit",
- 						       0,
- 				 PANEL_DISPLAY_LEVEL, PANEL_NONE,
- 				 PANEL_SHOW_MENU, TRUE,
- 				 PANEL_SHOW_MENU_MARK, FALSE,
  				 PANEL_NOTIFY_PROC, quit_proc,
  				 0);
  
--- 330,342 ----
  				 PANEL_SHOW_ITEM, TRUE,
  				 0);
  
!     quit = panel_create_item(message_panel, PANEL_BUTTON,
                                   PANEL_LABEL_IMAGE,
                                     color_button(panel_button_image(message_panel,
! 								  "QUIT",
  								  6,
                                       			          panel_font),
  						RED),
  				 PANEL_NOTIFY_PROC, quit_proc,
  				 0);
  


*** mahjongg.6.old	Wed Sep  7 22:05:28 1988
--- mahjongg.6	Wed Sep  7 22:08:51 1988
***************
*** 80,86 ****
  Dorothy Robinson (Prime-CV Beaverton) 		Tiles
  Jim Batch	 (Prime-CV Beaverton)		Theory and code help
  Gilbert Harrus   (Gip-Altair/INRIA)		Shuffling algorithm
! Jim Flar (??)	 (Sun)				New selection and help
  .fi
  .ad
  .SH BUGS
--- 80,87 ----
  Dorothy Robinson (Prime-CV Beaverton) 		Tiles
  Jim Batch	 (Prime-CV Beaverton)		Theory and code help
  Gilbert Harrus   (Gip-Altair/INRIA)		Shuffling algorithm
! Jim Graham	 (Sun)				New selection and help
! Mike Adams	 (Waterloo.edu)			Sun 4.0 Bug fix
  .fi
  .ad
  .SH BUGS
===========================================================================
Mark Holm                                ..tektronix!ogcvax!cvedc!exc!markh
Exceptions                                     ..sun!cvbnet!cvedc!exc!markh
126 NE Grant                                            Phone (503)648-8307
Hillsboro, Oregon 97124                   Messages only until after 6:00 PM



More information about the Comp.sources.bugs mailing list