#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Mosaic-2.6-patches Mosaic-2.5-patches
# Wrapped by sjoerd@ansjovis on Fri Nov  8 17:06:43 1996
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Mosaic-2.6-patches' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Mosaic-2.6-patches'\"
else
echo shar: Extracting \"'Mosaic-2.6-patches'\" \(13851 characters\)
sed "s/^X//" >'Mosaic-2.6-patches' <<'END_OF_FILE'
X*** HTML-PSformat.c-	Tue Apr  4 13:24:48 1995
X--- HTML-PSformat.c	Thu Sep  5 09:38:46 1996
X***************
X*** 1419,1430 ****
X  		fg_color.pixel = fg_pixel;
X  		bg_color.pixel = bg_pixel;
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			DefaultColormap (XtDisplay (hw->html.view),
X! 			DefaultScreen (XtDisplay (hw->html.view))),
X  			&fg_color);
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			DefaultColormap (XtDisplay (hw->html.view),
X! 			DefaultScreen (XtDisplay (hw->html.view))),
X  			&bg_color);
X  	}
X  	
X--- 1419,1428 ----
X  		fg_color.pixel = fg_pixel;
X  		bg_color.pixel = bg_pixel;
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			hw->core.colormap,
X  			&fg_color);
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			hw->core.colormap,
X  			&bg_color);
X  	}
X  	
X*** HTML.c-	Tue Jun 13 22:33:54 1995
X--- HTML.c	Fri Nov  8 10:51:42 1996
X***************
X*** 581,586 ****
X--- 581,595 ----
X                  XtRImmediate, (caddr_t) NULL
X          },
X                      
X+ #ifdef VISUAL
X+ 	{
X+ 		WbNvisual,
X+ 		WbCVisual, XtRVisual,
X+ 		sizeof(Visual *),
X+ 		XtOffset(HTMLWidget, html.visual),
X+ 		XtRImmediate, CopyFromParent
X+ 	},
X+ #endif
X  };
X  
X  
X***************
X*** 1805,1810 ****
X--- 1814,1838 ----
X  		new->html.num_visitedAnchor_underlines = MAX_UNDERLINES;
X  	} 
X  
X+ #ifdef VISUAL
X+ 	if (new->html.visual == NULL)
X+ 	{
X+ 		new->html.visual = DefaultVisual(XtDisplay(new),
X+ 					DefaultScreen(XtDisplay(new)));
X+ 	}
X+ 	{
X+ 		XVisualInfo vinfo, *vptr;
X+ 		int i;
X+ 		vinfo.visualid = XVisualIDFromVisual(new->html.visual);
X+ 		vptr = XGetVisualInfo(XtDisplay(new), VisualIDMask, &vinfo, &i);
X+ 		if (vptr->depth != new->core.depth)
X+ 		{
X+ 			XtWarning("HTML: visual depth does not match window depth.");
X+ 		}
X+ 		XFree((char *) vptr);
X+ 	}
X+ #endif
X+ 
X  	/*
X  	 * Parse the raw text with the HTML parser.  And set the formatted 
X  	 * element list to NULL.
X***************
X*** 4021,4027 ****
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(current), DefaultColormapOfScreen(XtScreen(current)));
X  		FreeImages(current);
X  
X  		/*
X--- 4049,4055 ----
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(current), current->core.colormap);
X  		FreeImages(current);
X  
X  		/*
X***************
X*** 4853,4858 ****
X--- 4881,4978 ----
X  }
X  
X  
X+ #ifdef HAVE_HTMLGETACTIONS
X+ /*
X+  * Convenience function to return the ACTIONs of all active forms in the
X+  * document.
X+  * Function returns an array of strings and fills num_actions passed.
X+  * If there are no ACTIONs NULL returned.
X+  */
X+ char **
X+ #ifdef _NO_PROTO
X+ HTMLGetActions(w, num_actions)
X+ 	Widget w;
X+ 	int *num_actions;
X+ #else
X+ HTMLGetActions(Widget w, int *num_actions)
X+ #endif
X+ {
X+ 	HTMLWidget hw = (HTMLWidget)w;
X+ 	int cnt;
X+ 	struct ele_rec *start;
X+ 	struct form_rec *s;
X+ 	struct ele_rec *list;
X+ 	struct ele_rec *eptr;
X+ 	char **harray;
X+ 
X+ 	list = NULL;
X+ 	cnt = 0;
X+ 	/*
X+ 	 * Construct a linked list of all the diffeent actions, counting
X+ 	 * then as we go.
X+ 	 */
X+ 	s = hw->html.form_list;
X+ 	while (s != NULL)
X+ 	{
X+ 		if (s->action != NULL)
X+ 		{
X+ 			/*
X+ 			 * Check to see if we already have
X+ 			 * this action in our list.
X+ 			 */
X+ 			eptr = list;
X+ 			while (eptr != NULL)
X+ 			{
X+ 				if (strcmp(eptr->anchorHRef,
X+ 					s->action) == 0)
X+ 				{
X+ 					break;
X+ 				}
X+ 				eptr = eptr->next;
X+ 			}
X+ 			/*
X+ 			 * This action is not, in our list.  Add it.
X+ 			 */
X+ 			if (eptr == NULL)
X+ 			{
X+ 				eptr = (struct ele_rec *)
X+ 					malloc(sizeof(struct ele_rec));
X+ 				eptr->anchorHRef = s->action;
X+ 				eptr->next = list;
X+ 				list = eptr;
X+ 				cnt++;
X+ 			}
X+ 		}
X+ 		s = s->next;
X+ 	}
X+ 
X+ 	if (cnt == 0)
X+ 	{
X+ 		*num_actions = 0;
X+ 		return(NULL);
X+ 	}
X+ 	else
X+ 	{
X+ 		*num_actions = cnt;
X+ 		harray = (char **)malloc(sizeof(char *) * cnt);
X+ 		eptr = list;
X+ 		cnt--;
X+ 		while (eptr != NULL)
X+ 		{
X+ 			harray[cnt] = (char *)
X+ 				malloc(strlen(eptr->anchorHRef) + 1);
X+ 			strcpy(harray[cnt], eptr->anchorHRef);
X+ 			start = eptr;
X+ 			eptr = eptr->next;
X+ 			free((char *)start);
X+ 			cnt--;
X+ 		}
X+ 		return(harray);
X+ 	}
X+ }
X+ #endif /* HAVE_HTMLGETACTIONS */
X+ 
X+ 
X  /*
X   * Convenience function to return the SRCs of all images in the
X   * document.
X***************
X*** 5029,5035 ****
X  {
X  	HTMLWidget hw = (HTMLWidget)w;
X  
X! 	FreeColors(XtDisplay(w), DefaultColormapOfScreen(XtScreen(w)));
X  	FreeImages(hw);
X  }
X  
X--- 5149,5155 ----
X  {
X  	HTMLWidget hw = (HTMLWidget)w;
X  
X! 	FreeColors(XtDisplay(w), hw->core.colormap);
X  	FreeImages(hw);
X  }
X  
X***************
X*** 5555,5561 ****
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(hw),DefaultColormapOfScreen(XtScreen(hw)));
X  		FreeImages(hw);
X  
X  		/*
X--- 5675,5681 ----
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(hw),hw->core.colormap);
X  		FreeImages(hw);
X  
X  		/*
X*** HTML.h-	Mon Jul  3 21:07:04 1995
X--- HTML.h	Fri Nov  8 10:50:03 1996
X***************
X*** 88,93 ****
X--- 88,97 ----
X  extern char *HTMLGetText ();
X  extern char *HTMLGetTextAndSelection ();
X  extern char **HTMLGetHRefs ();
X+ #ifndef ORIGINAL
X+ #define HAVE_HTMLGETACTIONS
X+ extern char **HTMLGetActions ();
X+ #endif
X  extern char **HTMLGetImageSrcs ();
X  extern void *HTMLGetWidgetInfo ();
X  extern void HTMLFreeWidgetInfo ();
X***************
X*** 108,113 ****
X--- 112,120 ----
X  extern char *HTMLGetTextAndSelection (Widget w, char **startp, char **endp,
X  					char **insertp);
X  extern char **HTMLGetHRefs (Widget w, int *num_hrefs);
X+ #ifndef ORIGINAL
X+ extern char **HTMLGetActions (Widget w, int *num_actions);
X+ #endif
X  extern char **HTMLGetImageSrcs (Widget w, int *num_srcs);
X  extern void *HTMLGetWidgetInfo (Widget w);
X  extern void HTMLFreeWidgetInfo (void *ptr);
X***************
X*** 505,510 ****
X--- 512,520 ----
X  #define WbNverticalScrollBar	 "verticalScrollBar"
X  #define WbNhorizontalScrollBar	 "horizontalScrollBar"
X  #define WbNsupSubFont            "supSubFont"    /* amb */
X+ #ifdef VISUAL
X+ #define WbNvisual		"visual"
X+ #endif
X  
X  /*
X   * New resource classes
X***************
X*** 554,559 ****
X--- 564,572 ----
X  #define WbCVerticalScrollBar	 "VerticalScrollBar"
X  #define WbCHorizontalScrollBar	 "HorizontalScrollBar"
X  #define WbCSupSubFont            "SupSubFont"  /* amb */
X+ #ifdef VISUAL
X+ #define WbCVisual		"Visual"
X+ #endif
X  
X  
X  typedef struct _HTMLClassRec *HTMLWidgetClass;
X*** HTMLP.h-	Wed Jan 11 01:03:31 1995
X--- HTMLP.h	Wed Nov 15 10:41:25 1995
X***************
X*** 209,214 ****
X--- 209,217 ----
X  	FormInfo		*form_list;
X  
X          struct ele_rec          *cached_tracked_ele;
X+ #ifdef VISUAL
X+ 	Visual			*visual;
X+ #endif
X  } HTMLPart;
X  
X  
X*** HTMLimages.c-	Wed Jan 11 01:03:32 1995
X--- HTMLimages.c	Thu Sep  5 09:33:04 1996
X***************
X*** 266,272 ****
X--- 266,281 ----
X  /*
X   * Make am image of appropriate depth for display from image data.
X   */
X+ #ifdef VISUAL
X  XImage *
X+ MakeImage(hw, data, width, height, depth, img_info)
X+ 	HTMLWidget hw;
X+ 	unsigned char *data;
X+ 	int width, height;
X+ 	int depth;
X+ 	ImageInfo *img_info;
X+ #else
X+ XImage *
X  MakeImage(dsp, data, width, height, depth, img_info)
X  	Display *dsp;
X  	unsigned char *data;
X***************
X*** 273,278 ****
X--- 282,288 ----
X  	int width, height;
X  	int depth;
X  	ImageInfo *img_info;
X+ #endif
X  {
X  	int linepad, shiftnum;
X  	int shiftstart, shiftstop, shiftinc;
X***************
X*** 285,290 ****
X--- 295,303 ----
X  	int bmap_order;
X  	unsigned long c;
X  	int rshift, gshift, bshift;
X+ #ifdef VISUAL
X+ 	Display *dsp = XtDisplay(hw);
X+ #endif
X  
X  	switch(depth)
X  	{
X***************
X*** 294,300 ****
X--- 307,317 ----
X  		bcopy(data, bit_data, (width * height));
X  		bytesperline = width;
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			width, height, 8, bytesperline);
X  		break;
X***************
X*** 347,353 ****
X--- 364,374 ----
X  		}
X  		bytesperline = (width + linepad) * depth / 8;
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			(width + linepad), height, 8, bytesperline);
X  		break;
X***************
X*** 382,388 ****
X--- 403,413 ----
X  		}
X  
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			width, height, 16, 0);
X  		break;
X***************
X*** 389,395 ****
X--- 414,424 ----
X  	    case 24:
X  		bit_data = (unsigned char *)malloc(width * height * 4);
X  
X+ #ifdef VISUAL
X+ 		theVisual = hw->html.visual;
X+ #else
X  		theVisual = DefaultVisual(dsp, DefaultScreen(dsp));
X+ #endif
X  		rshift = highbit(theVisual->red_mask) - 7;
X  		gshift = highbit(theVisual->green_mask) - 7;
X  		bshift = highbit(theVisual->blue_mask) - 7;
X***************
X*** 423,429 ****
X--- 452,462 ----
X  		}
X  
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			width, height, 32, 0);
X  		break;
X***************
X*** 527,533 ****
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  	}
X  
X  	if ((anchored == True)&&(anchored_image.image == (Pixmap)NULL))
X--- 560,566 ----
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			hw->core.depth);
X  	}
X  
X  	if ((anchored == True)&&(anchored_image.image == (Pixmap)NULL))
X***************
X*** 548,554 ****
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  		pix = XCreatePixmap(
X  			XtDisplay(hw->html.view),
X                          XtWindow(hw->html.view),
X--- 581,587 ----
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			hw->core.depth);
X  		pix = XCreatePixmap(
X  			XtDisplay(hw->html.view),
X                          XtWindow(hw->html.view),
X***************
X*** 555,561 ****
X  			DelayedImage_width,
X  			(DelayedImage_height + AnchoredImage_height +
X  				IMAGE_BORDER),
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  		XSetForeground(XtDisplay(hw), hw->html.drawGC,
X  			hw->core.background_pixel);
X  		XFillRectangle(XtDisplay(hw->html.view), pix,
X--- 588,594 ----
X  			DelayedImage_width,
X  			(DelayedImage_height + AnchoredImage_height +
X  				IMAGE_BORDER),
X! 			hw->core.depth);
X  		XSetForeground(XtDisplay(hw), hw->html.drawGC,
X  			hw->core.background_pixel);
X  		XFillRectangle(XtDisplay(hw->html.view), pix,
X***************
X*** 640,646 ****
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  	}
X  	return(no_image.image);
X  }
X--- 673,679 ----
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			hw->core.depth);
X  	}
X  	return(no_image.image);
X  }
X***************
X*** 687,694 ****
X--- 720,731 ----
X  	unsigned long white_pixel;
X  
X  	/* find the visual class. */
X+ #ifdef VISUAL
X+ 	vinfo.visualid = XVisualIDFromVisual(hw->html.visual);
X+ #else
X  	vinfo.visualid = XVisualIDFromVisual(DefaultVisual(XtDisplay(hw),
X  		DefaultScreen(XtDisplay(hw))));
X+ #endif
X  	vptr = XGetVisualInfo(XtDisplay(hw), VisualIDMask, &vinfo, &i);
X  	Vclass = vptr->class;
X  	if (vptr->depth == 1)
X***************
X*** 726,732 ****
X  		else
X  		{
X  			FindColor(XtDisplay(hw),
X! 				DefaultColormapOfScreen(XtScreen(hw)),
X  				&tmpcolr);
X  			Mapping[i] = tmpcolr.pixel;
X  		}
X--- 763,769 ----
X  		else
X  		{
X  			FindColor(XtDisplay(hw),
X! 				hw->core.colormap,
X  				&tmpcolr);
X  			Mapping[i] = tmpcolr.pixel;
X  		}
X***************
X*** 849,857 ****
X--- 886,900 ----
X  			}
X  		}
X  
X+ #ifdef VISUAL
X+ 		tmpimage = MakeImage(hw, tmpdata,
X+ 			img_info->width, img_info->height,
X+ 			hw->core.depth, img_info);
X+ #else
X  		tmpimage = MakeImage(XtDisplay(hw), tmpdata,
X  			img_info->width, img_info->height,
X  			DefaultDepthOfScreen(XtScreen(hw)), img_info);
X+ #endif
X  
X                  /* Caught by Purify; should be OK. */
X                  free (tmpdata);
X***************
X*** 859,865 ****
X  		Img = XCreatePixmap(XtDisplay(hw->html.view),
X  			XtWindow(hw->html.view),
X  			img_info->width, img_info->height,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  	}
X  
X  	if ((tmpimage == NULL)||(Img == (Pixmap)NULL))
X--- 902,908 ----
X  		Img = XCreatePixmap(XtDisplay(hw->html.view),
X  			XtWindow(hw->html.view),
X  			img_info->width, img_info->height,
X! 			hw->core.depth);
X  	}
X  
X  	if ((tmpimage == NULL)||(Img == (Pixmap)NULL))
X*** HTMLwidgets.c-	Wed Sep  4 15:07:08 1996
X--- HTMLwidgets.c	Wed Sep  4 23:00:01 1996
X***************
X*** 2564,2569 ****
X--- 2564,2574 ----
X                                  Widget child;
X                                  XmString xmstr;
X  				argcnt = 0;
X+ #ifdef VISUAL
X+ 				XtSetArg(arg[argcnt], XmNvisual, hw->html.visual); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNdepth, hw->core.depth); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNcolormap, hw->core.colormap); argcnt++;
X+ #endif
X  				pulldown = XmCreatePulldownMenu(hw->html.view,
X  					widget_name, arg, argcnt);
X  
X***************
X*** 2628,2633 ****
X--- 2633,2643 ----
X  					 */
X  					value = (char *)hist;
X  				}
X+ #ifdef VISUAL
X+ 				XtSetArg(arg[argcnt], XmNvisual, hw->html.visual); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNdepth, hw->core.depth); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNcolormap, hw->core.colormap); argcnt++;
X+ #endif
X  				w = XmCreateOptionMenu(hw->html.view,
X  					widget_name, arg, argcnt);
X                                  argcnt = 0;
END_OF_FILE
if test 13851 -ne `wc -c <'Mosaic-2.6-patches'`; then
    echo shar: \"'Mosaic-2.6-patches'\" unpacked with wrong size!
fi
# end of 'Mosaic-2.6-patches'
fi
if test -f 'Mosaic-2.5-patches' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Mosaic-2.5-patches'\"
else
echo shar: Extracting \"'Mosaic-2.5-patches'\" \(13881 characters\)
sed "s/^X//" >'Mosaic-2.5-patches' <<'END_OF_FILE'
X*** HTML-PSformat.c-	Wed Jan 11 01:03:29 1995
X--- HTML-PSformat.c	Fri Nov  8 12:57:42 1996
X***************
X*** 1344,1355 ****
X  		fg_color.pixel = fg_pixel;
X  		bg_color.pixel = bg_pixel;
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			DefaultColormap (XtDisplay (hw->html.view),
X! 			DefaultScreen (XtDisplay (hw->html.view))),
X  			&fg_color);
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			DefaultColormap (XtDisplay (hw->html.view),
X! 			DefaultScreen (XtDisplay (hw->html.view))),
X  			&bg_color);
X  	}
X  	
X--- 1344,1353 ----
X  		fg_color.pixel = fg_pixel;
X  		bg_color.pixel = bg_pixel;
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			hw->core.colormap,
X  			&fg_color);
X  		XQueryColor (XtDisplay (hw->html.view),
X! 			hw->core.colormap,
X  			&bg_color);
X  	}
X  	
X*** HTML.c-	Wed Jan 11 01:03:29 1995
X--- HTML.c	Fri Nov  8 14:19:12 1996
X***************
X*** 578,583 ****
X--- 578,592 ----
X                  XtRImmediate, (caddr_t) NULL
X          },
X                      
X+ #ifdef VISUAL
X+ 	{
X+ 		WbNvisual,
X+ 		WbCVisual, XtRVisual,
X+ 		sizeof(Visual *),
X+ 		XtOffset(HTMLWidget, html.visual),
X+ 		XtRImmediate, CopyFromParent
X+ 	},
X+ #endif
X  };
X  
X  
X***************
X*** 1768,1773 ****
X--- 1777,1801 ----
X  		new->html.num_visitedAnchor_underlines = MAX_UNDERLINES;
X  	} 
X  
X+ #ifdef VISUAL
X+ 	if (new->html.visual == NULL)
X+ 	{
X+ 		new->html.visual = DefaultVisual(XtDisplay(new),
X+ 					DefaultScreen(XtDisplay(new)));
X+ 	}
X+ 	{
X+ 		XVisualInfo vinfo, *vptr;
X+ 		int i;
X+ 		vinfo.visualid = XVisualIDFromVisual(new->html.visual);
X+ 		vptr = XGetVisualInfo(XtDisplay(new), VisualIDMask, &vinfo, &i);
X+ 		if (vptr->depth != new->core.depth)
X+ 		{
X+ 			XtWarning("HTML: visual depth does not match window depth.");
X+ 		}
X+ 		XFree((char *) vptr);
X+ 	}
X+ #endif
X+ 
X  	/*
X  	 * Parse the raw text with the HTML parser.  And set the formatted 
X  	 * element list to NULL.
X***************
X*** 3960,3966 ****
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(current), DefaultColormapOfScreen(XtScreen(current)));
X  		FreeImages(current);
X  
X  		/*
X--- 3988,3994 ----
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(current), current->core.colormap);
X  		FreeImages(current);
X  
X  		/*
X***************
X*** 4784,4789 ****
X--- 4812,4909 ----
X  }
X  
X  
X+ #ifdef HAVE_HTMLGETACTIONS
X+ /*
X+  * Convenience function to return the ACTIONs of all active forms in the
X+  * document.
X+  * Function returns an array of strings and fills num_actions passed.
X+  * If there are no ACTIONs NULL returned.
X+  */
X+ char **
X+ #ifdef _NO_PROTO
X+ HTMLGetActions(w, num_actions)
X+ 	Widget w;
X+ 	int *num_actions;
X+ #else
X+ HTMLGetActions(Widget w, int *num_actions)
X+ #endif
X+ {
X+ 	HTMLWidget hw = (HTMLWidget)w;
X+ 	int cnt;
X+ 	struct ele_rec *start;
X+ 	struct form_rec *s;
X+ 	struct ele_rec *list;
X+ 	struct ele_rec *eptr;
X+ 	char **harray;
X+ 
X+ 	list = NULL;
X+ 	cnt = 0;
X+ 	/*
X+ 	 * Construct a linked list of all the diffeent actions, counting
X+ 	 * then as we go.
X+ 	 */
X+ 	s = hw->html.form_list;
X+ 	while (s != NULL)
X+ 	{
X+ 		if (s->action != NULL)
X+ 		{
X+ 			/*
X+ 			 * Check to see if we already have
X+ 			 * this action in our list.
X+ 			 */
X+ 			eptr = list;
X+ 			while (eptr != NULL)
X+ 			{
X+ 				if (strcmp(eptr->anchorHRef,
X+ 					s->action) == 0)
X+ 				{
X+ 					break;
X+ 				}
X+ 				eptr = eptr->next;
X+ 			}
X+ 			/*
X+ 			 * This action is not, in our list.  Add it.
X+ 			 */
X+ 			if (eptr == NULL)
X+ 			{
X+ 				eptr = (struct ele_rec *)
X+ 					malloc(sizeof(struct ele_rec));
X+ 				eptr->anchorHRef = s->action;
X+ 				eptr->next = list;
X+ 				list = eptr;
X+ 				cnt++;
X+ 			}
X+ 		}
X+ 		s = s->next;
X+ 	}
X+ 
X+ 	if (cnt == 0)
X+ 	{
X+ 		*num_actions = 0;
X+ 		return(NULL);
X+ 	}
X+ 	else
X+ 	{
X+ 		*num_actions = cnt;
X+ 		harray = (char **)malloc(sizeof(char *) * cnt);
X+ 		eptr = list;
X+ 		cnt--;
X+ 		while (eptr != NULL)
X+ 		{
X+ 			harray[cnt] = (char *)
X+ 				malloc(strlen(eptr->anchorHRef) + 1);
X+ 			strcpy(harray[cnt], eptr->anchorHRef);
X+ 			start = eptr;
X+ 			eptr = eptr->next;
X+ 			free((char *)start);
X+ 			cnt--;
X+ 		}
X+ 		return(harray);
X+ 	}
X+ }
X+ #endif /* HAVE_HTMLGETACTIONS */
X+ 
X+ 
X  /*
X   * Convenience function to return the SRCs of all images in the
X   * document.
X***************
X*** 4960,4966 ****
X  {
X  	HTMLWidget hw = (HTMLWidget)w;
X  
X! 	FreeColors(XtDisplay(w), DefaultColormapOfScreen(XtScreen(w)));
X  	FreeImages(hw);
X  }
X  
X--- 5080,5086 ----
X  {
X  	HTMLWidget hw = (HTMLWidget)w;
X  
X! 	FreeColors(XtDisplay(w), hw->core.colormap);
X  	FreeImages(hw);
X  }
X  
X***************
X*** 5486,5492 ****
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(hw),DefaultColormapOfScreen(XtScreen(hw)));
X  		FreeImages(hw);
X  
X  		/*
X--- 5606,5612 ----
X  		/*
X  		 * Free any old colors and pixmaps
X  		 */
X! 		FreeColors(XtDisplay(hw),hw->core.colormap);
X  		FreeImages(hw);
X  
X  		/*
X*** HTML.h-	Sun Mar 12 07:40:28 1995
X--- HTML.h	Fri Nov  8 14:26:35 1996
X***************
X*** 88,93 ****
X--- 88,97 ----
X  extern char *HTMLGetText ();
X  extern char *HTMLGetTextAndSelection ();
X  extern char **HTMLGetHRefs ();
X+ #ifndef ORIGINAL
X+ #define HAVE_HTMLGETACTIONS
X+ extern char **HTMLGetActions ();
X+ #endif
X  extern char **HTMLGetImageSrcs ();
X  extern void *HTMLGetWidgetInfo ();
X  extern void HTMLFreeWidgetInfo ();
X***************
X*** 108,113 ****
X--- 112,121 ----
X  extern char *HTMLGetTextAndSelection (Widget w, char **startp, char **endp,
X  					char **insertp);
X  extern char **HTMLGetHRefs (Widget w, int *num_hrefs);
X+ #ifndef ORIGINAL
X+ #define HAVE_HTMLGETACTIONS
X+ extern char **HTMLGetActions (Widget w, int *num_actions);
X+ #endif
X  extern char **HTMLGetImageSrcs (Widget w, int *num_srcs);
X  extern void *HTMLGetWidgetInfo (Widget w);
X  extern void HTMLFreeWidgetInfo (void *ptr);
X***************
X*** 503,508 ****
X--- 511,519 ----
X  #define WbNverticalScrollBar	 "verticalScrollBar"
X  #define WbNhorizontalScrollBar	 "horizontalScrollBar"
X  #define WbNsupSubFont            "supSubFont"    /* amb */
X+ #ifdef VISUAL
X+ #define WbNvisual		"visual"
X+ #endif
X  
X  /*
X   * New resource classes
X***************
X*** 552,557 ****
X--- 563,571 ----
X  #define WbCVerticalScrollBar	 "VerticalScrollBar"
X  #define WbCHorizontalScrollBar	 "HorizontalScrollBar"
X  #define WbCSupSubFont            "SupSubFont"  /* amb */
X+ #ifdef VISUAL
X+ #define WbCVisual		"Visual"
X+ #endif
X  
X  
X  typedef struct _HTMLClassRec *HTMLWidgetClass;
X*** HTMLP.h-	Wed Jan 11 01:03:31 1995
X--- HTMLP.h	Wed Nov 15 10:44:05 1995
X***************
X*** 209,214 ****
X--- 209,217 ----
X  	FormInfo		*form_list;
X  
X          struct ele_rec          *cached_tracked_ele;
X+ #ifdef VISUAL
X+ 	Visual			*visual;
X+ #endif
X  } HTMLPart;
X  
X  
X*** HTMLimages.c-	Wed Jan 11 01:03:32 1995
X--- HTMLimages.c	Fri Nov  8 14:24:31 1996
X***************
X*** 266,272 ****
X--- 266,281 ----
X  /*
X   * Make am image of appropriate depth for display from image data.
X   */
X+ #ifdef VISUAL
X  XImage *
X+ MakeImage(hw, data, width, height, depth, img_info)
X+ 	HTMLWidget hw;
X+ 	unsigned char *data;
X+ 	int width, height;
X+ 	int depth;
X+ 	ImageInfo *img_info;
X+ #else
X+ XImage *
X  MakeImage(dsp, data, width, height, depth, img_info)
X  	Display *dsp;
X  	unsigned char *data;
X***************
X*** 273,278 ****
X--- 282,288 ----
X  	int width, height;
X  	int depth;
X  	ImageInfo *img_info;
X+ #endif
X  {
X  	int linepad, shiftnum;
X  	int shiftstart, shiftstop, shiftinc;
X***************
X*** 285,290 ****
X--- 295,303 ----
X  	int bmap_order;
X  	unsigned long c;
X  	int rshift, gshift, bshift;
X+ #ifdef VISUAL
X+ 	Display *dsp = XtDisplay(hw);
X+ #endif
X  
X  	switch(depth)
X  	{
X***************
X*** 294,300 ****
X--- 307,317 ----
X  		bcopy(data, bit_data, (width * height));
X  		bytesperline = width;
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			width, height, 8, bytesperline);
X  		break;
X***************
X*** 347,353 ****
X--- 364,374 ----
X  		}
X  		bytesperline = (width + linepad) * depth / 8;
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			(width + linepad), height, 8, bytesperline);
X  		break;
X***************
X*** 382,388 ****
X--- 403,413 ----
X  		}
X  
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			width, height, 16, 0);
X  		break;
X***************
X*** 389,395 ****
X--- 414,424 ----
X  	    case 24:
X  		bit_data = (unsigned char *)malloc(width * height * 4);
X  
X+ #ifdef VISUAL
X+ 		theVisual = hw->html.visual;
X+ #else
X  		theVisual = DefaultVisual(dsp, DefaultScreen(dsp));
X+ #endif
X  		rshift = highbit(theVisual->red_mask) - 7;
X  		gshift = highbit(theVisual->green_mask) - 7;
X  		bshift = highbit(theVisual->blue_mask) - 7;
X***************
X*** 423,429 ****
X--- 452,462 ----
X  		}
X  
X  		newimage = XCreateImage(dsp,
X+ #ifdef VISUAL
X+ 			hw->html.visual,
X+ #else
X  			DefaultVisual(dsp, DefaultScreen(dsp)),
X+ #endif
X  			depth, ZPixmap, 0, (char *)bit_data,
X  			width, height, 32, 0);
X  		break;
X***************
X*** 527,533 ****
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  	}
X  
X  	if ((anchored == True)&&(anchored_image.image == (Pixmap)NULL))
X--- 560,566 ----
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			hw->core.depth);
X  	}
X  
X  	if ((anchored == True)&&(anchored_image.image == (Pixmap)NULL))
X***************
X*** 548,554 ****
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  		pix = XCreatePixmap(
X  			XtDisplay(hw->html.view),
X                          XtWindow(hw->html.view),
X--- 581,587 ----
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			hw->core.depth);
X  		pix = XCreatePixmap(
X  			XtDisplay(hw->html.view),
X                          XtWindow(hw->html.view),
X***************
X*** 555,561 ****
X  			DelayedImage_width,
X  			(DelayedImage_height + AnchoredImage_height +
X  				IMAGE_BORDER),
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  		XSetForeground(XtDisplay(hw), hw->html.drawGC,
X  			hw->core.background_pixel);
X  		XFillRectangle(XtDisplay(hw->html.view), pix,
X--- 588,594 ----
X  			DelayedImage_width,
X  			(DelayedImage_height + AnchoredImage_height +
X  				IMAGE_BORDER),
X! 			hw->core.depth);
X  		XSetForeground(XtDisplay(hw), hw->html.drawGC,
X  			hw->core.background_pixel);
X  		XFillRectangle(XtDisplay(hw->html.view), pix,
X***************
X*** 640,646 ****
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  	}
X  	return(no_image.image);
X  }
X--- 673,679 ----
X                          hw->html.foreground,
X  #endif /* MOTIF */
X  			hw->core.background_pixel,
X! 			hw->core.depth);
X  	}
X  	return(no_image.image);
X  }
X***************
X*** 687,694 ****
X--- 720,731 ----
X  	unsigned long white_pixel;
X  
X  	/* find the visual class. */
X+ #ifdef VISUAL
X+ 	vinfo.visualid = XVisualIDFromVisual(hw->html.visual);
X+ #else
X  	vinfo.visualid = XVisualIDFromVisual(DefaultVisual(XtDisplay(hw),
X  		DefaultScreen(XtDisplay(hw))));
X+ #endif
X  	vptr = XGetVisualInfo(XtDisplay(hw), VisualIDMask, &vinfo, &i);
X  	Vclass = vptr->class;
X  	if (vptr->depth == 1)
X***************
X*** 726,732 ****
X  		else
X  		{
X  			FindColor(XtDisplay(hw),
X! 				DefaultColormapOfScreen(XtScreen(hw)),
X  				&tmpcolr);
X  			Mapping[i] = tmpcolr.pixel;
X  		}
X--- 763,769 ----
X  		else
X  		{
X  			FindColor(XtDisplay(hw),
X! 				hw->core.colormap,
X  				&tmpcolr);
X  			Mapping[i] = tmpcolr.pixel;
X  		}
X***************
X*** 849,857 ****
X--- 886,900 ----
X  			}
X  		}
X  
X+ #ifdef VISUAL
X+ 		tmpimage = MakeImage(hw, tmpdata,
X+ 			img_info->width, img_info->height,
X+ 			hw->core.depth, img_info);
X+ #else
X  		tmpimage = MakeImage(XtDisplay(hw), tmpdata,
X  			img_info->width, img_info->height,
X  			DefaultDepthOfScreen(XtScreen(hw)), img_info);
X+ #endif
X  
X                  /* Caught by Purify; should be OK. */
X                  free (tmpdata);
X***************
X*** 859,865 ****
X  		Img = XCreatePixmap(XtDisplay(hw->html.view),
X  			XtWindow(hw->html.view),
X  			img_info->width, img_info->height,
X! 			DefaultDepthOfScreen(XtScreen(hw)));
X  	}
X  
X  	if ((tmpimage == NULL)||(Img == (Pixmap)NULL))
X--- 902,908 ----
X  		Img = XCreatePixmap(XtDisplay(hw->html.view),
X  			XtWindow(hw->html.view),
X  			img_info->width, img_info->height,
X! 			hw->core.depth);
X  	}
X  
X  	if ((tmpimage == NULL)||(Img == (Pixmap)NULL))
X*** HTMLwidgets.c-	Sun Mar 12 07:39:38 1995
X--- HTMLwidgets.c	Fri Nov  8 14:24:26 1996
X***************
X*** 2564,2569 ****
X--- 2564,2574 ----
X                                  Widget child;
X                                  XmString xmstr;
X  				argcnt = 0;
X+ #ifdef VISUAL
X+ 				XtSetArg(arg[argcnt], XmNvisual, hw->html.visual); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNdepth, hw->core.depth); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNcolormap, hw->core.colormap); argcnt++;
X+ #endif
X  				pulldown = XmCreatePulldownMenu(hw->html.view,
X  					widget_name, arg, argcnt);
X  
X***************
X*** 2628,2633 ****
X--- 2633,2643 ----
X  					 */
X  					value = (char *)hist;
X  				}
X+ #ifdef VISUAL
X+ 				XtSetArg(arg[argcnt], XmNvisual, hw->html.visual); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNdepth, hw->core.depth); argcnt++;
X+ 				XtSetArg(arg[argcnt], XmNcolormap, hw->core.colormap); argcnt++;
X+ #endif
X  				w = XmCreateOptionMenu(hw->html.view,
X  					widget_name, arg, argcnt);
X                                  argcnt = 0;
END_OF_FILE
if test 13881 -ne `wc -c <'Mosaic-2.5-patches'`; then
    echo shar: \"'Mosaic-2.5-patches'\" unpacked with wrong size!
fi
# end of 'Mosaic-2.5-patches'
fi
echo shar: End of shell archive.
exit 0
