Patch for tooltool, version 2.0 (patch included)

Chuck Musciano chuck at trantor.harris-atd.com
Sat Feb 4 02:45:34 AEST 1989


This is the first patch for tooltool, moving it from version 2.0 to
version 2.0a.  It fixes a bug in using ++ and -- with text gadgets,
improves upon the determination of mouse offsets with large fonts, and
cleans up how applications are determined to be executable.

As always, the latest and greatest version of tooltool, with all patches
installed, is available from trantor.harris-atd.com (26.13.0.98) via
anonymous ftp, in the /pub/suntools/tooltool directory.

Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck at trantor.harris-atd.com

#! /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:  patch
# Wrapped by chuck at melmac on Wed Jan 25 08:08:12 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patch'\"
else
echo shar: Extracting \"'patch'\" \(3066 characters\)
sed "s/^X//" >'patch' <<'END_OF_FILE'
X*** events.c.orig	Fri Jan  6 13:52:37 1989
X--- events.c	Wed Jan 25 08:00:25 1989
X***************
X*** 234,241 ****
X  	a_ptr	a;
X  
X  	if (tt_mouse_chars) {
X! 	   x = event_x(event) / tt_a_font->pf_char['0'].pc_pr->pr_size.x + tt_mouse_base;
X! 	   y = event_y(event) / tt_a_font->pf_char['0'].pc_pr->pr_size.y + tt_mouse_base;
X  	   }
X  	else {
X  	   x = event_x(event) + tt_mouse_base;
X--- 234,241 ----
X  	a_ptr	a;
X  
X  	if (tt_mouse_chars) {
X! 	   x = event_x(event) / charwidth_of(tt_a_font) + tt_mouse_base;
X! 	   y = event_y(event) / charheight_of(tt_a_font) + tt_mouse_base;
X  	   }
X  	else {
X  	   x = event_x(event) + tt_mouse_base;
X*** expr.c.orig	Fri Jan  6 13:52:37 1989
X--- expr.c	Fri Jan  6 14:19:01 1989
X***************
X*** 179,185 ****
X  	      			   break;*/
X  	      default		 : abend("cannot assign a value to a button or menu");
X  	      }
X! 	else if (is_array(l))
X  	   l->value = dup_array(r->value);
X  	else if (is_number(l))
X  	   l->number = r->number;
X--- 179,185 ----
X  	      			   break;*/
X  	      default		 : abend("cannot assign a value to a button or menu");
X  	      }
X! 	if (is_array(l))
X  	   l->value = dup_array(r->value);
X  	else if (is_number(l))
X  	   l->number = r->number;
X*** misc.c.orig	Fri Jan  6 13:52:38 1989
X--- misc.c	Wed Jan 25 07:53:56 1989
X***************
X*** 17,26 ****
X  #include	<stdio.h>
X  #include	<ctype.h>
X  #include	<sgtty.h>
X  #include	<sys/types.h>
X  #include	<sys/stat.h>
X  #include	<sys/dir.h>
X! #include	<pwd.h>
X  
X  #include	<suntool/sunview.h>
X  #include	<suntool/icon_load.h>
X--- 17,28 ----
X  #include	<stdio.h>
X  #include	<ctype.h>
X  #include	<sgtty.h>
X+ #include	<pwd.h>
X+ 
X  #include	<sys/types.h>
X  #include	<sys/stat.h>
X  #include	<sys/dir.h>
X! #include	<sys/file.h>
X  
X  #include	<suntool/sunview.h>
X  #include	<suntool/icon_load.h>
X***************
X*** 442,448 ****
X  	      *q = '\0';
X  	      strcat(full_path, "/");
X  	      strcat(full_path, s);
X! 	      if (stat(full_path, &buf) == 0 && ((buf.st_mode & S_IFMT) == S_IFREG) && (tt_perm_of(&buf) & 01))
X  	         return(full_path);
X  	      q = full_path;
X  	      if (*p++ == '\0')
X--- 444,450 ----
X  	      *q = '\0';
X  	      strcat(full_path, "/");
X  	      strcat(full_path, s);
X! 	      if (stat(full_path, &buf) == 0 && ((buf.st_mode & S_IFMT) == S_IFREG) && access(full_path, X_OK) == 0)
X  	         return(full_path);
X  	      q = full_path;
X  	      if (*p++ == '\0')
X*** patchlevel.h.orig	Fri Jan  6 13:52:40 1989
X--- patchlevel.h	Wed Jan 25 08:05:23 1989
X***************
X*** 4,8 ****
X--- 4,16 ----
X  /*									*/
X  /*	Date	     Version	Comments				*/
X  /*	01 Dec 88      2.0	Initial release				*/
X+ /*	25 Jan 89      2.0a	Small bug fixes:			*/
X+ /*				   Fixed ++ and -- when used with text	*/
X+ /*				   	fields.				*/
X+ /*				   Changed to use access(2) to deter-	*/
X+ /*				   	mine executability of applica-	*/
X+ /*				   	tion.				*/
X+ /*				   Fixed bug in computing mouse offsets	*/
X+ /*				   	when large fonts were used.	*/
X  /*									*/
X  /************************************************************************/
END_OF_FILE
if test 3066 -ne `wc -c <'patch'`; then
    echo shar: \"'patch'\" unpacked with wrong size!
fi
# end of 'patch'
fi
echo shar: End of shell archive.
exit 0



More information about the Comp.sys.sun mailing list