Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: chuck@trantor.harris-atd.com (Chuck Musciano) Newsgroups: comp.sys.sun Subject: Patch for tooltool, version 2.0 (patch included) Message-ID: <8901251314.AA29891@trantor.harris-atd.com> Date: 3 Feb 89 16:45:34 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 140 Approved: Sun-Spots@rice.edu Original-Date: Wed, 25 Jan 89 08:13:21 EST X-Sun-Spots-Digest: Volume 7, Issue 138, message 10 of 10 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@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 '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 X #include X #include X #include X #include X #include X! #include X X #include X #include X--- 17,28 ---- X #include X #include X #include X+ #include X+ X #include X #include X #include X! #include X X #include X #include 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