The following are patches for NCSA Mosaic 2.7b5. You will notice them to be in news or mail form because they are posted and mailed to various lists and newsgroups.
The following will fix a mailto bug where if you do not have valid information in your GECOS field that causes Mosaic to NULL out your author name would cause a coredump. It now specified unknown.
*** gui.c.orig Mon Jul 22 22:45:11 1996
--- gui.c Mon Jul 22 22:38:28 1996
***************
*** 4586,4590 ****
char *default_author_email = get_pref_string(eDEFAULT_AUTHOR_EMAIL);
! if(!default_author_name) {
if (!pw || !pw->pw_gecos) {
default_author_name = strdup("Unknown");
--- 4586,4590 ----
char *default_author_email = get_pref_string(eDEFAULT_AUTHOR_EMAIL);
! if(!default_author_name || !*default_author_name) {
if (!pw || !pw->pw_gecos) {
default_author_name = strdup("Unknown");
***************
*** 4600,4604 ****
}
}
! if(!default_author_email) {
if (!pw || !pw->pw_name) {
default_author_email =
--- 4600,4604 ----
}
}
! if(!default_author_email || !*default_author_email) {
if (!pw || !pw->pw_name) {
default_author_email =
***************
*** 4612,4615 ****
--- 4612,4626 ----
}
}
+
+ /* Check again just to make absolutely sure something is there */
+ if (!default_author_name || !*default_author_name) {
+ default_author_name = strdup("Unknown");
+ }
+ if(!default_author_email || !*default_author_email) {
+ default_author_email =
+ (char *) malloc(strlen("UNKNOWN")+strlen(machine)+2);
+ sprintf(default_author_email,"UNKNOWN@%s",machine);
+ }
+
set_pref(eDEFAULT_AUTHOR_NAME, (void *)default_author_name);
set_pref(eDEFAULT_AUTHOR_EMAIL, (void *)default_author_email);
The following patch takes care of the multiple declaration of the comment card variable.
*** comment.h.orig Mon Jul 22 21:43:54 1996 --- comment.h Mon Jul 22 21:42:13 1996 *************** *** 65,70 **** /* variables below */ ! #ifndef _COMMENT_H ! #define _COMMENT_H char *comment_card_html_top= \ --- 65,69 ---- /* variables below */ ! #ifdef _COMMENT_H char *comment_card_html_top= \ *** comment.c.orig Mon Jul 22 21:45:51 1996 --- comment.c Mon Jul 22 21:42:44 1996 *************** *** 63,67 **** --- 63,69 ---- #include "mosaic.h" #include "gui.h" + #define _COMMENT_H #include "comment.h" + #undef _COMMENT_H
The following patch will fix the problems inherent with detaching the toolbar.
*** HTML.c.orig Mon Jul 22 21:18:09 1996
--- HTML.c Mon Jul 22 21:22:03 1996
***************
*** 949,954 ****
- #define MAX_Y_EXP_DIFF 10 /*pixels between exposes to make one expose area*/
-
/*
* Process an expose event in the View (or drawing area). This
--- 949,952 ----
***************
*** 1055,1089 ****
}
- if (width==(-666) && height==(-666)) {
- x = nx;
- y = ny;
- width = nwidth;
- height = nheight;
-
- continue;
- }
-
x1 = x + width;
y1 = y + height;
-
- /* The following block makes sure the exposure area is not
- incredibly HUGE...like one widget at the top and another
- at the bottom causing the whole page to be drawn over and
- over. --SWP */
- if ((y>(ny+nheight) &&
- (y-(ny+nheight))>MAX_Y_EXP_DIFF) ||
- (y1<ny &&
- (ny-y1)>MAX_Y_EXP_DIFF)) {
- #ifndef DISABLE_TRACE
- if (htmlwTrace) {
- DebugHook(x, y, width, height);
- }
- #endif
-
- ViewRedisplay(hw, x, y, width, height);
- width=height=(-666);
-
- continue;
- }
if (x > nx) {
--- 1053,1058 ----
This patch is the correct way to fix what I had added to the PNG lib. What I originally added worked, but there were strange cases where it could have done weird stuff.
From: pckizer@nostrum.com (Philip Kizer)
Function names changed for new handling methods in libpng, and required to
be located after one of the init functions:
*** Mosaic-src/src/readPNG.c.orig Sun Jun 30 07:30:00 1996
--- Mosaic-src/src/readPNG.c Fri Jul 19 00:03:25 1996
***************
*** 161,163 ****
/* SWP -- Hopefully to fix cores on bad PNG files */
! png_set_message_fn(png_ptr,png_get_msg_ptr(png_ptr),NULL,NULL);
--- 161,163 ----
/* SWP -- Hopefully to fix cores on bad PNG files */
! /* png_set_message_fn(png_ptr,png_get_msg_ptr(png_ptr),NULL,NULL); */
***************
*** 166,167 ****
--- 166,171 ----
png_read_init(png_ptr);
+
+ /* SWP -- Hopefully to fix cores on bad PNG files */
+ /* PCK -- Moved to after png_read_init() as per libpng 0.88+ */
+ png_set_error_fn(png_ptr,png_get_error_ptr(png_ptr),NULL,NULL); /* PCK */
_________________________________________________________ Philip Kizer ______
pckizer@nostrum.com