Official patch #12 for calctool v2.4; please apply it.
Rich Burridge
richb at sunaus.oz
Tue Aug 14 14:51:38 AEST 1990
This is official patch #12 for calctool v2.4; please apply it.
It make the following changes:
* Removed the XSynchronize() call from xview.c. This was only needed
for debugging.
* From Daniel Yang <dyang at doorknob.Sun.COM>
According to the helpfile, the operators CON, EXCH, FUN, STO, RCL, <,
and > all require a digit between 0 and 9, but when any of these are
selected, the HEX digits are displayed as well. Since these aren't
legal parameters, these should not be displayed.
* From Daniel Yang <dyang at doorknob.Sun.COM>
The initial base for calctool is DEC, but the HEX digits are
incorrectly displayed.
* From Daniel Yang <dyang at doorknob.Sun.COM>
Fixup typos in the helpfile text.a
* From Rick Stevenson <rick at ptabris.oz.au>
x11.c: Pyramid's cc warns about illegal operation on geometry.
if (!geometry) should be if (geometry[0] != '\0')
* From Rick Stevenson <rick at ptabris.oz.au>
Overflow with the factorial function was incorrect.
* The position of the numeric output in the display item with the
XView version has been corrected.
* The memory register window is now coming up correctly (positioned
to the right of the main calctool frame).
Use Larry Walls patch program to apply this patch, then recompile and
reinstall.
If you are missing any previous patches for calctool, then they can be
obtained via the archive mail server by sending a message to
rb-archive-server at Aus.Sun.COm containing the line:
send calctool patchn
where n is the patch number you need. You might also need to include
a path line in this message, so that the archive server knows how to
send the file back to you. Such a path line might be:
path uunet.uu.net!hostname!username
Rich Burridge, DOMAIN: richb at Aus.Sun.COM
Sun Microsystems. ACSNET: richb at sunaus.sun.oz
PHONE: +61 2 413 2666 UUCP: {uunet,mcvax,ukc}!munnari!sunaus.oz!richb
------CUT HERE------patch.12------CUT HERE------
------- calctool.c -------
*** /tmp/da00778 Tue Aug 14 14:40:01 1990
--- calctool.c Tue Aug 14 13:24:33 1990
***************
*** 352,357 ****
--- 352,358 ----
hyperbolic = 0 ; /* Normal trig functions initially. */
inverse = 0 ; /* No inverse functions initially. */
base = DEC ; /* Initial base. */
+ grey_buttons(base) ;
ttype = DEG ; /* Initial trigonometric type. */
dtype = FIX ; /* Initial number display mode. */
down = 0 ; /* No mouse presses initially. */
------- functions.c -------
*** /tmp/da00781 Tue Aug 14 14:40:02 1990
--- functions.c Tue Aug 14 13:39:56 1990
***************
*** 203,211 ****
{
i = val ;
a = 1.0 ;
! while ((i > 0) && (a != HUGE))
{
a = multiply(a, (float) i) ;
i-- ;
}
}
--- 203,212 ----
{
i = val ;
a = 1.0 ;
! while (i > 0)
{
a = multiply(a, (float) i) ;
+ if (error) break ;
i-- ;
}
}
***************
*** 372,378 ****
do_pending()
{
! grey_buttons(HEX) ; /* Reshow all the keys. */
switch (pending)
{
case '#' : do_constant() ; /* CON */
--- 373,379 ----
do_pending()
{
! if (base != DEC) grey_buttons(DEC) ; /* Reshow all the keys. */
switch (pending)
{
case '#' : do_constant() ; /* CON */
------- x11.c -------
*** /tmp/da00784 Tue Aug 14 14:40:03 1990
--- x11.c Tue Aug 14 13:32:32 1990
***************
*** 296,302 ****
screen = DefaultScreen(dpy) ;
! if (!geometry)
STRCPY(geometry, XGetDefault(dpy, progname, "Geometry")) ;
foregnd = BlackPixel(dpy, screen) ;
--- 296,302 ----
screen = DefaultScreen(dpy) ;
! if (*geometry == '\0')
STRCPY(geometry, XGetDefault(dpy, progname, "Geometry")) ;
foregnd = BlackPixel(dpy, screen) ;
------- Makefile -------
*** /tmp/da00787 Tue Aug 14 14:40:04 1990
--- Makefile Tue Aug 14 14:39:32 1990
***************
*** 109,116 ****
# library files are not in a standard place, then the following
# two lines should be uncommented, and set appropriately.
#
! X11INCDIR = -I$(OPENWINHOME)/include
! X11LIBDIR = -L$(OPENWINHOME)/lib
#-------------------------------------------------------------------------
# If you are compiling the XView version, then the following two lines
# should be uncommented.
--- 109,116 ----
# library files are not in a standard place, then the following
# two lines should be uncommented, and set appropriately.
#
! #X11INCDIR = -I$(OPENWINHOME)/include
! #X11LIBDIR = -L$(OPENWINHOME)/lib
#-------------------------------------------------------------------------
# If you are compiling the XView version, then the following two lines
# should be uncommented.
------- README -------
*** /tmp/da00790 Tue Aug 14 14:40:04 1990
--- README Tue Aug 14 13:38:26 1990
***************
*** 78,85 ****
Thanks go also to James Buster, David Weaver, Steve Damron, Mike Bender,
Charles Tierney, Trevor Watson, Marla Berg, David Hough, Jeff Donsbach,
Mel Melchner, Peter Allott, Skip Gilbrech, Tom Friedel, Keith McNeill
! Stephen Frede, Johan Vromans, David Karr, Steve Alexander and Gary
! Bartlett for bug reports and/or bug fixes plus sugggested enhancements.
Suggestions for furthur improvement would be most welcome, plus bugs,
comments and flames.
--- 78,86 ----
Thanks go also to James Buster, David Weaver, Steve Damron, Mike Bender,
Charles Tierney, Trevor Watson, Marla Berg, David Hough, Jeff Donsbach,
Mel Melchner, Peter Allott, Skip Gilbrech, Tom Friedel, Keith McNeill
! Stephen Frede, Johan Vromans, David Karr, Steve Alexander, Gary Bartlett,
! Steve Nahm, Daniel Yang and Rick Stevenson for bug reports and/or bug fixes
! plus sugggested enhancements.
Suggestions for furthur improvement would be most welcome, plus bugs,
comments and flames.
------- calctool.help -------
*** /tmp/da00793 Tue Aug 14 14:40:05 1990
--- calctool.help Tue Aug 14 13:27:46 1990
***************
*** 51,57 ****
Hex D (decimal 13) ( d ).
This selection is valid only if
! the current base is hexidecimal.
_DEC _
Change base to decimal ( D ).
--- 51,57 ----
Hex D (decimal 13) ( d ).
This selection is valid only if
! the current base is hexadecimal.
_DEC _
Change base to decimal ( D ).
***************
*** 63,80 ****
Hex E (decimal 14) ( e ).
This selection is valid only if
! the current base is hexidecimal.
_HEX _
! Change base to hexidecimal ( H ).
The display value is shown in
! hexidecimal. A maximum of 12
digits are allowed.
_F _
Hex F (decimal 15) ( f ).
This selection is valid only if
! the current base is hexidecimal.
_FIX _
Fixed Notation ( ^n ).
--- 63,80 ----
Hex E (decimal 14) ( e ).
This selection is valid only if
! the current base is hexadecimal.
_HEX _
! Change base to hexadecimal ( H ).
The display value is shown in
! hexadecimal. A maximum of 12
digits are allowed.
_F _
Hex F (decimal 15) ( f ).
This selection is valid only if
! the current base is hexadecimal.
_FIX _
Fixed Notation ( ^n ).
***************
*** 147,153 ****
Hex A (decimal 10) ( a ).
This selection is valid only if
! the current base is hexidecimal.
_> _
Right shift n ( > ).
--- 147,153 ----
Hex A (decimal 10) ( a ).
This selection is valid only if
! the current base is hexadecimal.
_> _
Right shift n ( > ).
***************
*** 158,164 ****
Hex B (decimal 11) ( b ).
This selection is valid only if
! the current base is hexidecimal.
_% _
Percentage ( % ).
--- 158,164 ----
Hex B (decimal 11) ( b ).
This selection is valid only if
! the current base is hexadecimal.
_% _
Percentage ( % ).
***************
*** 170,176 ****
Hex C (decimal 12) ( c ).
This selection is valid only if
! the current base is hexidecimal.
_clr _
Clear display ( Delete ).
--- 170,176 ----
Hex C (decimal 12) ( c ).
This selection is valid only if
! the current base is hexadecimal.
_clr _
Clear display ( Delete ).
***************
*** 351,357 ****
This operation takes the last
number and performs an
! arithemetic division by the
next number entered.
_NOT _
Logical NOT ( ~ ).
--- 351,357 ----
This operation takes the last
number and performs an
! arithmetic division by the
next number entered.
_NOT _
Logical NOT ( ~ ).
***************
*** 368,379 ****
how many digits of precision are
to be displayed.
_EXP _
! Enter exponental number ( E ).
This operation starts exponential
input. Any numbers typed from now
on are the exponent. If no
! numerical input had occured upto
this point, then a mantissa of
1.0 is assumed.
_TAN _
--- 368,379 ----
how many digits of precision are
to be displayed.
_EXP _
! Enter exponential number ( E ).
This operation starts exponential
input. Any numbers typed from now
on are the exponent. If no
! numerical input had occurred upto
this point, then a mantissa of
1.0 is assumed.
_TAN _
***************
*** 427,433 ****
This operation takes the last
number and performs an
! arithemetic subtraction of the
next number entered.
_QUIT_
Quit calctool ( q or Q ).
--- 427,433 ----
This operation takes the last
number and performs an
! arithmetic subtraction of the
next number entered.
_QUIT_
Quit calctool ( q or Q ).
------- patchlevel.h -------
*** /tmp/da00796 Tue Aug 14 14:40:06 1990
--- patchlevel.h Tue Aug 14 12:52:41 1990
***************
*** 14,17 ****
* reported to me then an attempt will be made to fix them.
*/
! #define PATCHLEVEL 11
--- 14,17 ----
* reported to me then an attempt will be made to fix them.
*/
! #define PATCHLEVEL 12
------- TODO -------
*** /tmp/da00799 Tue Aug 14 14:40:06 1990
--- TODO Tue Aug 14 14:35:39 1990
***************
*** 23,32 ****
3/ The following problems exist with the XView version:
! a) The memory register window is coming up in the wrong place.
! This is because of bug 1022495 (xview/library).
!
! b) The DEL (.) key on the right hand keypad generates ASCII 127
which is the same as the Delete key.
--- 23,29 ----
3/ The following problems exist with the XView version:
! a) The DEL (.) key on the right hand keypad generates ASCII 127
which is the same as the Delete key.
***************
*** 35,40 ****
--- 32,41 ----
a) The size of the calctool icon on the monochrome version is incorrect.
b) The right mouse button currently does not bring up a popup menu.
+
+ 5/ From Syd Weinstein <syd at sinc.dsi.com>
+ int and frac do not work right if the number is too large for a long.
+ (Sun386i, 4.0.2, SunView)
Enhancements:
------- xview.c -------
*** /tmp/da00802 Tue Aug 14 14:40:07 1990
--- xview.c Tue Aug 14 14:37:54 1990
***************
*** 235,241 ****
--- 235,253 ----
draw_regs()
{
+ Rect frect, rrect ;
+
make_registers() ;
+
+ /* Force the register popup to appear to the right of the main calctool
+ * frame if it's not already being displayed.
+ */
+ if (xv_get(rframe, XV_SHOW)) return ;
+ frame_get_rect(frame, &frect) ;
+ frame_get_rect(rframe, &rrect) ;
+ rrect.r_left = frect.r_left + frect.r_width + 5 ;
+ rrect.r_top = frect.r_top + 21 ;
+ frame_set_rect(rframe, &rrect) ;
XV_SET(rframe, XV_SHOW, TRUE, 0) ;
}
***************
*** 254,260 ****
if (ctype == KEYCANVAS) window = xid_cpw ;
else if (ctype == REGCANVAS) window = xid_rcpw ;
! if (ctype == KEYCANVAS && y == items[(int) DISPLAYITEM].y) x += 100 ;
if (iscolor) gc_val.foreground = palette[color] ;
else
{
--- 266,272 ----
if (ctype == KEYCANVAS) window = xid_cpw ;
else if (ctype == REGCANVAS) window = xid_rcpw ;
! if (ctype == KEYCANVAS && y == items[(int) DISPLAYITEM].y) x += 70 ;
if (iscolor) gc_val.foreground = palette[color] ;
else
{
***************
*** 561,573 ****
gc_val.background = backgnd ;
gc_val.graphics_exposures = False ;
gc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
- XSynchronize(dpy, 1) ;
load_colors() ; /* Load the calctool colormap. */
bfont = get_font(BIGFONT) ;
nfont = get_font(NORMALFONT) ;
! nfont_width = 6 ;
sfont = get_font(SMALLFONT) ;
}
--- 573,584 ----
gc_val.background = backgnd ;
gc_val.graphics_exposures = False ;
gc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
load_colors() ; /* Load the calctool colormap. */
bfont = get_font(BIGFONT) ;
nfont = get_font(NORMALFONT) ;
! nfont_width = nfont->max_bounds.rbearing - nfont->min_bounds.lbearing ;
sfont = get_font(SMALLFONT) ;
}
------- CHANGES -------
*** /tmp/da00805 Tue Aug 14 14:40:08 1990
--- CHANGES Tue Aug 14 14:36:18 1990
***************
*** 231,233 ****
--- 231,264 ----
* From Steve Nahm <sxn at Eng.Sun.COM>
The XView version didn't correctly run under Open Windows v2.0(FCS).
+
+ v2.4 - patchlevel 12. - Posted to comp.sources.bugs (August 1990).
+
+ * Removed the XSynchronize() call from xview.c. This was only needed
+ for debugging.
+
+ * From Daniel Yang <dyang at doorknob.Sun.COM>
+ According to the helpfile, the operators CON, EXCH, FUN, STO, RCL, <,
+ and > all require a digit between 0 and 9, but when any of these are
+ selected, the HEX digits are displayed as well. Since these aren't
+ legal parameters, these should not be displayed.
+
+ * From Daniel Yang <dyang at doorknob.Sun.COM>
+ The initial base for calctool is DEC, but the HEX digits are
+ incorrectly displayed.
+
+ * From Daniel Yang <dyang at doorknob.Sun.COM>
+ Fixup typos in the helpfile text.a
+
+ * From Rick Stevenson <rick at ptabris.oz.au>
+ x11.c: Pyramid's cc warns about illegal operation on geometry.
+ if (!geometry) should be if (geometry[0] != '\0')
+
+ * From Rick Stevenson <rick at ptabris.oz.au>
+ Overflow with the factorial function was incorrect.
+
+ * The position of the numeric output in the display item with the
+ XView version has been corrected.
+
+ * The memory register window is now coming up correctly (positioned
+ to the right of the main calctool frame).
More information about the Comp.sources.bugs
mailing list