[alt.sources] Vue, a Sunview rasterfile viewer, patch #1

matthew@sunpix.East.Sun.COM (Matthew Stier - Sun Visualization Products) (03/08/91)

I wrote Vue on a SunOS 4.0.x system.  Jwm@sun4.jhuapl.edu tried compiling it
on a SunOS 3.5 system and ran into two problems.  The following patch is only
needed to get Vue to compile on a SunOS 3.5 system.  All persons should add
the patch to keep their source up to date.  With this patch I've also added
revision control comments to the source file.


*** vue.c.orig	Thu Mar  7 11:54:25 1991
--- vue.c	Thu Mar  7 12:38:14 1991
***************
*** 1,6 ****
  /* 
! static char rcsID[] = "$Header: cshow.c,v 1.4 87/08/14 13:16:08 david Exp $"; 
!  */
  
  /* Define general items */
  #define PROGRAMNAME     "vue"
--- 1,14 ----
+ #ifndef lint
+ static char author[] = "matthew.stier@east.sun.com"
+ static char patchlevel[] = "Vue: Release 1, Patchlevel 1"
  /* 
! ** Release 1.1: Make 'vue' SunOS 3.5 compatible 
! **   Problems noted by jwm@sun4.jhuapl.edu:
! **     SunOS 3.5 does not support the 'props' option in frame menu.
! **     SunOS 3.5 does not support 'event_action()' macro.
! ** Release 1.0: Initial release
! */
! #endif /* lint */
  
  /* Define general items */
  #define PROGRAMNAME     "vue"
***************
*** 141,148 ****
--- 149,158 ----
      frame = window_create((Window) 0, FRAME,
          FRAME_ARGC_PTR_ARGV,     &argc, argv,
          FRAME_ICON,              icon,
+ #ifdef FRAME_PROPS_ACTION_PROC
          FRAME_PROPS_ACTIVE,      TRUE,
          FRAME_PROPS_ACTION_PROC, control_panel_proc,
+ #endif /* FRAME_PROPS_ACTION_PROC */
          WIN_ERROR_MSG,            "Couldn't create frame",
          0);
  
***************
*** 203,213 ****
      Event *event;
      caddr_t arg;
  {
      int item;
  
      /* If a mouse button is pressed inside the canvas, do its action */
      if (event_is_button(event) && event_is_down(event)) {
!         switch(event_action(event)) {
              case MS_LEFT:   /* Goto previous image */
                  skip  = (skip > 0 ? -1 : skip - 1);
                  item  = (where ? where + skip : 1 + skip);
--- 213,224 ----
      Event *event;
      caddr_t arg;
  {
+ 
      int item;
  
      /* If a mouse button is pressed inside the canvas, do its action */
      if (event_is_button(event) && event_is_down(event)) {
!         switch(event_id(event)) {
              case MS_LEFT:   /* Goto previous image */
                  skip  = (skip > 0 ? -1 : skip - 1);
                  item  = (where ? where + skip : 1 + skip);
***************
*** 254,260 ****
          }
      } else {
          /* if the escape key is pressed, open the control panel */
!         if (event_action(event) == ESCAPE_KEY)
              control_panel_proc();
          /* handle all other canvas events */
          (void) window_default_event_proc(window, event, arg); 
--- 265,271 ----
          }
      } else {
          /* if the escape key is pressed, open the control panel */
!         if (event_id(event) == ESCAPE_KEY)
              control_panel_proc();
          /* handle all other canvas events */
          (void) window_default_event_proc(window, event, arg); 
-- 
Matthew Lee Stier    (mstier@east.Sun.COM)   |
Sun Microsystems ---  RTP, NC  27709-3447    |     "Wisconsin   Escapee"
uucp:  sun!mstier or mcnc!rti!sunpix!matthew |
phone: (919) 469-8300 fax: (919) 460-8355    |