home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3015 < prev    next >
Encoding:
Internet Message Format  |  1991-03-08  |  3.4 KB

  1. From: matthew@sunpix.East.Sun.COM (Matthew Stier - Sun Visualization Products)
  2. Newsgroups: alt.sources
  3. Subject: Vue, a Sunview rasterfile viewer, patch #1
  4. Message-ID: <550@sunpix.East.Sun.COM>
  5. Date: 7 Mar 91 17:46:06 GMT
  6.  
  7.  
  8. I wrote Vue on a SunOS 4.0.x system.  Jwm@sun4.jhuapl.edu tried compiling it
  9. on a SunOS 3.5 system and ran into two problems.  The following patch is only
  10. needed to get Vue to compile on a SunOS 3.5 system.  All persons should add
  11. the patch to keep their source up to date.  With this patch I've also added
  12. revision control comments to the source file.
  13.  
  14.  
  15. *** vue.c.orig    Thu Mar  7 11:54:25 1991
  16. --- vue.c    Thu Mar  7 12:38:14 1991
  17. ***************
  18. *** 1,6 ****
  19.   /* 
  20. ! static char rcsID[] = "$Header: cshow.c,v 1.4 87/08/14 13:16:08 david Exp $"; 
  21. !  */
  22.   
  23.   /* Define general items */
  24.   #define PROGRAMNAME     "vue"
  25. --- 1,14 ----
  26. + #ifndef lint
  27. + static char author[] = "matthew.stier@east.sun.com"
  28. + static char patchlevel[] = "Vue: Release 1, Patchlevel 1"
  29.   /* 
  30. ! ** Release 1.1: Make 'vue' SunOS 3.5 compatible 
  31. ! **   Problems noted by jwm@sun4.jhuapl.edu:
  32. ! **     SunOS 3.5 does not support the 'props' option in frame menu.
  33. ! **     SunOS 3.5 does not support 'event_action()' macro.
  34. ! ** Release 1.0: Initial release
  35. ! */
  36. ! #endif /* lint */
  37.   
  38.   /* Define general items */
  39.   #define PROGRAMNAME     "vue"
  40. ***************
  41. *** 141,148 ****
  42. --- 149,158 ----
  43.       frame = window_create((Window) 0, FRAME,
  44.           FRAME_ARGC_PTR_ARGV,     &argc, argv,
  45.           FRAME_ICON,              icon,
  46. + #ifdef FRAME_PROPS_ACTION_PROC
  47.           FRAME_PROPS_ACTIVE,      TRUE,
  48.           FRAME_PROPS_ACTION_PROC, control_panel_proc,
  49. + #endif /* FRAME_PROPS_ACTION_PROC */
  50.           WIN_ERROR_MSG,            "Couldn't create frame",
  51.           0);
  52.   
  53. ***************
  54. *** 203,213 ****
  55.       Event *event;
  56.       caddr_t arg;
  57.   {
  58.       int item;
  59.   
  60.       /* If a mouse button is pressed inside the canvas, do its action */
  61.       if (event_is_button(event) && event_is_down(event)) {
  62. !         switch(event_action(event)) {
  63.               case MS_LEFT:   /* Goto previous image */
  64.                   skip  = (skip > 0 ? -1 : skip - 1);
  65.                   item  = (where ? where + skip : 1 + skip);
  66. --- 213,224 ----
  67.       Event *event;
  68.       caddr_t arg;
  69.   {
  70.       int item;
  71.   
  72.       /* If a mouse button is pressed inside the canvas, do its action */
  73.       if (event_is_button(event) && event_is_down(event)) {
  74. !         switch(event_id(event)) {
  75.               case MS_LEFT:   /* Goto previous image */
  76.                   skip  = (skip > 0 ? -1 : skip - 1);
  77.                   item  = (where ? where + skip : 1 + skip);
  78. ***************
  79. *** 254,260 ****
  80.           }
  81.       } else {
  82.           /* if the escape key is pressed, open the control panel */
  83. !         if (event_action(event) == ESCAPE_KEY)
  84.               control_panel_proc();
  85.           /* handle all other canvas events */
  86.           (void) window_default_event_proc(window, event, arg); 
  87. --- 265,271 ----
  88.           }
  89.       } else {
  90.           /* if the escape key is pressed, open the control panel */
  91. !         if (event_id(event) == ESCAPE_KEY)
  92.               control_panel_proc();
  93.           /* handle all other canvas events */
  94.           (void) window_default_event_proc(window, event, arg); 
  95. -- 
  96. Matthew Lee Stier    (mstier@east.Sun.COM)   |
  97. Sun Microsystems ---  RTP, NC  27709-3447    |     "Wisconsin   Escapee"
  98. uucp:  sun!mstier or mcnc!rti!sunpix!matthew |
  99. phone: (919) 469-8300 fax: (919) 460-8355    |
  100.