
/*  @(#)ChangeLog 1.43 02/02/27
 *
 *  Copyright (c) 1987-2002 Sun Microsystems, Inc.
 *  All Rights Reserved.
 */

Calctool change history.
========================

v4.0.0 - 26th February 2002.

  26th February 2002 - Rich Burridge <rich.burridge@Sun.COM>

  Preparation for releasing the calctool sources to the community:

  - Added "#define OWTOOLKIT_WARNING_DISABLED" to calctool_ui.c and xview.c

  - Added code into calctool_ui.c from:

    /net/dtserver/export/src_998/MASTER_OL3.0/external/DeskSet/V3_release:
    .../audiotool/guide/libguidexv/group.h
    .../audiotool/guide/libguide/guide.h
    .../audiotool/guide/libguidexv/group_impl.h

    This file also includes dummy routines for:

    group_destroy()
    group_set()
    group_get()
    group_init()

    and a definition for group_pkg.

- Created dsdefs.h which includes definitions from:

    /net/dtserver/export/src_300/PMASTER_OL300/external/DeskSet:
    .../libdeskset/ds_popup.h
    .../libdeskset/ds_xlib.h

    Adjusted calctool_ui.c and xview.c to call this.

  - Create dsfuns.c which includes code from:

    /net/dtserver/export/src_300/PMASTER_OL300/external/DeskSet:
    .../libdeskset/ds_xlib.c
    .../libdeskset/ds_popup.c
    .../libdeskset/ds_pathname.c
    .../libdeskset/ds_hostname.c

  - Fixed up one of the compiler warnings in xview.c

  - Adjusted the build environment to use autoconf and automake.

  - Moved all the image file into the .../calctool/calctool directory, and
    adjusted calctool_ui.c, graphics.c and xview.c accordingly.

  - Adjusted all the copyright notices to have dates upto 2002.

  - Fixed up most of the warnings generated by the Gnu compiler and lint.

  - Removed patchlevel.h and replaced it with VERSION from config.h

  - Adjusted the code to K&R style.

  - Removed the "calctool_" prefix on all names in calctool_ui.c and
    calctool_ui.h (and calls in xview.c).

  - Created AUTHORS, NEWS and README files.

  - Adjusted the calctool manual pages to remove references to the Solaris
    User's Guide and the note to indicate that the OpenWindows environment
    may no longer be supported in a future release.

----

v3.2 - patchlevel 74 [richb] - 8 July 1993.

* Files changed: patchlevel.h CHANGES calctool.c graphics.c text.c

* Fixed #1136161 - Hexadecimal results are displayed in lower case letters.
                   This involved backing out the changed made in patch #72
                   for bug #1132402. The real fix is that the country shouldn't
                   have translated hexidecimal a-f.

----

v3.2 - patchlevel 73 [richb] - 6 July 1993.

* Files changed: patchlevel.h CHANGES functions.c

* Fixed #1135862 - exponent key inconsistent with handheld calculators after
                   memory op. Calctool nows sets the value of v->new_input to
                   zero after retrieving a value from a memory register.

----

v3.2 - patchlevel 72 [richb] - 7 June 1993.

* Files changed: patchlevel.h CHANGES calctool.c text.c graphics.c

* Work on #1132402 - the digits[] string now gets the hexidecimal values from
                     the specific locale translated strings.

----

v3.2 - patchlevel 71 [richb] - 3 June 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1130988 - calctool dumps core when Help key on left keypad is
                   pressed over a button.

----

v3.2 - patchlevel 70 [richb] - 18 May 1993.

* Files changed: patchlevel.h CHANGES functions.c

* Fixed #1128221 - Inconsistent behaviour using logical operators for numbers
                   wider than 32 bits.

----

v3.2 - patchlevel 69 [richb] - 17 May 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1077543 - -WG and -position do not work properly for calctool.

----

v3.2 - patchlevel 68 [richb] - 10 May 1993.

* Files changed: patchlevel.h CHANGES calctool.h extern.h graphics.c calctool.c

* Fixed #1127530 - help information for right-handed style should be provided.

----

v3.2 - patchlevel 67 [richb] - 10 May 1993.
 
* Files changed: patchlevel.h CHANGES calctool.h graphics.c xview.c
 
* Fixed #1126997 - Can't make multiple selections from the Mode pinup menu.

----

v3.2 - patchlevel 66 [wmui] - 8 Apr 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1125006 - calctool refuses to come up when non-C locale is specified
                   but not installed.

----

v3.2 - patchlevel 65 [richb] - 7 Apr 1993.

* Files changed: patchlevel.h CHANGES calctool.h graphics.c xview.c

* Fixed #1125145 - In scientific mode, Trig->degrees causes calctool to core
                   dump.

----

v3.2 - patchlevel 64 [richb] - 25 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1122701 - calctool dumps core when can't load OpenWindows.BoldFont
                   and RegularFont.

----

v3.2 - patchlevel 63 [richb] - 25 Mar 1993.

* Files changed: patchlevel.h CHANGES get.c

* Fixed #1102821 - changing numeric base doesn't change the base in constants.

----

v3.2 - patchlevel 62 [richb] - 25 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c calctool.h graphics.c

* Fixed #1121424 - selecting numeric string in i18nl4 calctool by mouse,
                   it will be widely spaced.

----

v3.2 - patchlevel 61 [richb] - 24 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1121451 - memory window is empty when you bring it up the first time.

----

v3.2 - patchlevel 60 [richb] - 24 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1105881 - i18nl4 calctool: numeric string move left when input
                 numeric.

----

v3.2 - patchlevel 59 [richb] - 24 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1117773 - Calctool cannot resize in ja locale.

----

v3.2 - patchlevel 58 [richb] - 24 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1113962 - Calctool always uses a small scale font.

----

v3.2 - patchlevel 57 [richb] - 16 Mar 1993.

* Files changed: patchlevel.h CHANGES calctool.G xview.c

* Fixed #1122078 - Calctool: props sheet is truncated on right side.

----

v3.2 - patchlevel 56 [richb] - 16 Mar 1993.

* Files changed: patchlevel.h CHANGES xview.c

* Fixed #1117296 - s493_alpha4.3 calctool creates many property windows.

----

v3.2 - patchlevel 55 [wmui] - 23 Feb 1993.

* Files changed: patchlevel.h CHANGES extern.h functions.c graphics.c text.c

* Fixed #1104942 (MOWN3.1 buyback) - Spot help did not work.

* Fixed #1117786 - Calctool writes localized values to resource database.
                   Resource attribute/value pairs should be in ASCII.

----

v3.2 - patchlevel 54 [richb] - 14 Jan 1992.

* Files changed: CHANGES patchlevel.h calctool.c extern.h get.c

* Fixed #1111170 - It's a needed fix for international locales. It will fail
                   in all multi-byte locales. Text strings written to the X
                   resources files should not be localised.

----

v3.2 - patchlevel 53 [richb] - 14 Jan 1992.

* Files changed: CHANGES patchlevel.h functions.c

* Fixed #1110771 -  put an LGET() around the three offending strings.

----

v3.2 - patchlevel 52 [richb] - 14 Jan 1992.

* Files changed: CHANGES patchlevel.h functions.c xview.c

* Fixed #1113318 - the difference between the previous version of calctool
                   and this one is that the mode window is now pinned when
                   it's first bought up.

----

v3.2 - patchlevel 51 [richb] - 14 Jan 1992.

Files changed: CHANGES patchlevel.h xview.c

* Fixed #1114403 - the menu was being created with a frame as owner instead
                   of NULL.

----

v3.2 - patchlevel 50 [richb] - 14 Jan 1992.

* Files changed: CHANGES patchlevel.h calctool.G

* Fixed #1108519 - "Properties" is now "Properties...".

----

v3.2 - patchlevel 49 [jffowler] - 02 Nov 1992.

* Files changed: CHANGES patchlevel.h xview.c

* Temporary fix - commented out all XV_SET's of WIN_USE_IM to prevent 
  xv_error_proc from being called, just to get calctool up for 493.

----

v3.2 - patchlevel 48 [jffowler] - 23 Oct 1992.

* Files changed: CHANGES patchlevel.h xview.c

* Fixed coredump - moved setting of v above first xv_set where setting 
  WIN_USE_IM was causing xv_error_proc to be called before v was set.    

----

v3.2 - patchlevel 47 [richb] - 22 Oct 1992.

* Files changed: CHANGES patchlevel.h graphics.c

* Fixed bug #1105557 - added a check to the process_str() routine to test
                       if v->error is set. If yes, then processing of the
                       selection is aborted at that point.

* Transferring bug #1105415 to xview/library.

----

v3.2 - patchlevel 46 [richb] - 22 Oct 1992.

* Files changed: CHANGES patchlevel.h functions.c

* Fixed bug #1104803 - calctool didn't always reset the display correctly
                       after an error condition.

----

v3.2 - patchlevel 45 [richb] - 22 Oct 1992.

* Files changed: CHANGES patchlevel.h functions.c mp.c calctool.h

* Fixed bug #1105387 - tan(90 degrees) now produces an error message, and
  Fixed bug #1102842 - tan(180 degrees) now produces 0.00 (rather than -0.00).
                       A check is now made for cos(x) == 0.0. If yes, then
                       it's an overflow error. Tan(x) is now calculated as:
                       sin(x) / cos(x). Removed mptan() function from mp.c.

* Fixed bug #1102604 - 0! now produces 1 (rather than "Error").

* Closed #1102877 - not a bug. Compared result against xcalc and two handheld
                    calculators.

----

v3.2 - patchlevel 44 [richb] - 19 Oct 1992.

* Files changed: CHANGES patchlevel.h xview.c

* Adjusted the put_resource() routine in xview.c to give a pointer to the
  XrmDatabase, and not call by reference.

----

v3.2 - patchlevel 43 [richb] - 13 Oct 1992.

* Files changed: CHANGES patchlevel.h calctool.h xview.c text.c functions.c
                 get.c filemgr.G

* Changed the "Set Default" button on the property sheet to "Save as Defaults".

* Fixed bug #1093905 - calctool will now look at the X resource:
                       OpenWindows.beep first and set the v->beep variable
                       accordingly. If the DeskSet calctool X resource:
                       deskset.calctool.beep is also set, this will override.

* Fixed bug #1093948 - problem with exponential numbers and memory registers.
                       Adjustments to the do_expno() routine in functions.c,
                       and do_sto_rcl() needed to set v->new_input when
                       retrieving a number from a memory register.

* Fixed bug #1098178 - allowed the character string "%s %1d already exists."
                       to be localised. New message in mess[(int) MESS_CON].

* Fixed bug #1100331 - the ibool() routine wasn't returning the correct
                       integer boolean value for hexadecimal 100000000.

* Fixed bug #1100441 - the second parameter to a call to mppwr() in
                       MPstr_to_num() in display.c should have been using an
                       integer not an MP number.

* Reclassified the xcalc bug #1093951 under x11news/program.

* Bug #1102406 isn't a bug. It displays "Error" in the calctool displays and
  beeps (assuming beeping is set), forcing the user to clear the calculator.

----

[All previous changes were by Rich Burridge <rich.burridge@Sun.COM>]

v3.2 - patchlevel 42.  5 Oct 1992.

* Fixed ifdef'd OW18N code that referenced X->frame to Calctool_kframe->kframe.

----

v3.2 - patchlevel 41.  4 June 1992.

* Moved various routines, that are common to several Deskset tools, over to
  libdeskset and adjusted the files accordingly.

* Calctool would core dump when trying to retrieve the default menu string
  for the menus associated with various calctool "buttons". Added a new routine
  to xview.c called get_def_menu_str() which now correctly returns this.
  Removed the str variable from the menu_entry struct, and adjusted the code
  for this change (made menu_entries an array of char).

----

v3.2 - patchlevel 40.  1 May 1992.

* Fixed bug #1090718 - a check is made to see if the mode or memory windows
                       should be displayed, and they now no longer appear if
                       calctool is started iconically. A frame event interpose
                       handler has been added for the main calctool frame, so
                       that the current window state (open/closed) can be
                       tracked dynamically.

----

v3.2 - patchlevel 39.  22 April 1992.

* Fixed bug #1084790 - calctool now recognises the -icon_font and
                       Icon.font.name options.

----

v3.2 - patchlevel 38.  22 April 1992.

* Calctool has been changed so the default is a right-handed calculator. The
  manual pages have been updated.

* Made the calctool menus pinnable.

----

v3.2 - patchlevel 37.  15 April 1992.

* DevGuided calctool and removed unwanted code.

* Changed the first place calctool looks for it's defaults from
  /usr/lib/X11/app-defaults/Deskset to $OPENWINHOME/lib/app-defaults/Deskset.
  This fixes rfe #1087119.

* Calctools' initial size was incorrect if started with a -scale of large or
  extra_large.

* Fixed bug 1087908 - the constant window is now initially pinned.

* Fixed bug 1087911 - the function window is now initially pinned.

----

v3.2 - patchlevel 36. 23rd March 1992.

* Add and remove WIN_USE_IM (I18N level 4 XView attribute).  See bugid 1083920

----

v3.2 - patchlevel 35. 27th February 1992.

* Due to the changes introduced in patch #31 for the localisation
  of the keyboard equivalents of the calctool buttons, when calctool
  was used in "right-hand" mode, the translated values were incorrect.
  Fixes bug #1084210.

----

v3.2 - patchlevel 34. 24th February 1992.
 
* Ran purify on calctool. Found various memory leaks/corruptions.
  Plugged 'em. Fixes #1083925.

----

v3.2 - patchlevel 33. 19th February 1992.

* More work on #1077702. Adjustment to the way the hyperbolic
  trig functions work. If calctool is display in degrees or
  gradients, then the input should not be converted to radians.
  Similarily, the output should not be converted back to degrees
  or gradients.

----

v3.2 - patchlevel 32. 19th February 1992.

* calctool tried to use a localised "deskset" and "Deskset" strings
  when reading and writing its X resources. Fixes #1083402.

----

v3.2 - patchlevel 31. 19th February 1992.

* The keyboard equivalents for the calctool buttons and menu entries
  have been localised. Calctool code has been adjusted to use these
  localised values, rather than the previously hard-wired values. At
  present, only a single character is allowed for each keyboard
  equivalent, and it will be taken from the first character in the
  localised string. A definition IS_KEY() has been added to calctool.h
  and used extensively in the code in case a multi-byte character
  comparison is needed. Fixed bug #1082353.

----

v3.2 - patchlevel 30. 14th February 1992.

* If no initial size is given for calctool, then it will determine the
  length of the longest button label (includes the mode button labels),
  and adjust the size so that the full text for that button can be
  displayed, and the remainder of the buttons are the same size. With
  the English version, all calctool button labels should be four
  characters long, so there should be no visible change. Note that
  calctool could then be resized smaller and as much of the label as
  possible will be displayed, and if there is more text for that label,
  then the final label character will be a '>' character. Fixes bug
  #1079649.

----

v3.2 - patchlevel 29. 13th February 1992.

* The Apply, Set defaults and Reset buttons were not being centralised
  on the calctool property sheet. Fixes bug #1082182.

----

v3.2 - patchlevel 28. 18th January 1992.

* Line up the panel choice labels in the properties sheet using
  PANEL_LABEL_FONT to figure out the label string length
  (Font_string_dims).  This is an i18n fix.  File affected - xview.c.

----

v3.2 - patchlevel 27. 17th January 1992.

* The inverse cosine of 1.0 was incorrect. It should have returned
  0.0. Fixes bug #1077702.

----

v3.2 - patchlevel 26. 17th January 1992.

* Fixup from Doug Twilleager and Jackson Wong to get calctool to
  work under jup_prebeta3. Variables bminh and bminw were not
  initialised to zero in init_size() in get.c.

----

v3.2 - patchlevel 25. 16th January 1992.

* Calctool was incorrectly recognising the +Wn and -Wn command line
  options. Fixes bug #1079394.

* Small changes to the way that -fg color and -bg color are handled:

  - If the -bg command line option is present or the
    window.color.background resource set, then it will no longer change
    the background color of the button areas.

  - If the deskset.calctool.textColor resource is set, then -fg will
    not override it.

  - If the deskset.calctool.memRegisterColor resource is set, then -bg
    will not override it.

  - If the deskset.calctool.displayColor resource is set, then -bg
    will not override it.

----

v3.2 - patchlevel 24. 31st December 1991.

* Calctool ignored the -fg and -bg color command line options when
  painting the calctool canvases. Calctool has lots of X resources
  to allow you to set the color of different items. If -fg and/or
  -bg is present, they now override these X resources as follows:

  deskset.calctool.decDigitColor:        not changed
  deskset.calctool.hexDigitColor:        not changed
  deskset.calctool.arithOpColor:         not changed
  deskset.calctool.adjustColor:          not changed
  deskset.calctool.portionColor:         not changed
  deskset.calctool.functionColor:        not changed
  deskset.calctool.mainModeColor:        not changed
  deskset.calctool.portionLogicalColor:  not changed
  deskset.calctool.bitLogicalColor:      not changed
  deskset.calctool.finColor:             not changed
  deskset.calctool.trigModeColor:        not changed
  deskset.calctool.trigColor:            not changed
  deskset.calctool.sciColor:             not changed
  deskset.calctool.backgroundColor:      background color
  deskset.calctool.displayColor:         background color
  deskset.calctool.memRegisterColor:     background color
  deskset.calctool.textColor:            foreground color

  The -reverse command line option switches the foreground and
  background colors. Fixes bug #1077714.

----

v3.2 - patchlevel 23. 31st December 1991.

* Calctool didn't allow the user to set an alternative calctool icon
  image via the -icon_image command line option. Calctool checks if
  the image filename given exists and is readable. If it isn't, then
  it displays an error message and the generic XView usage message
  and exits. If the file does exist, but isn't an icon file, then
  XView silently ignores it. Perhaps a bug should be opened against
  xview/library, to generate an error message for such a case. Fixes
  bug #1077709.

----

v3.2 - patchlevel 22. 30th December 1991.

* Calctool tries to localise the command line text strings. This is
  incorrect. Created a new routine called init_cmdline_opts(),
  which initialises the command line options (instead of in init_text(),
  and gets called before init_Xvars(). The search for -name is also
  done before init_Xvars(), because the xv_init() call strips it out.
  write_cmdline() was also writing out the -name command line option
  (if present) for a "Save Workspace". As this is now a generic XView
  tool command line argument, this is no longer needed.  Fixes bug
  #1077907.

----

v3.2 - patchlevel 21. 27th December 1991.

* Calctool didn't allow you to set the icon label with the
  -icon_label command line option. Fixes bug #1077710.

----

v3.2 - patchlevel 20. 27th December 1991.

* Incorrect parameters to the -size command line argument
  (ie. -size fubar) caused the tool to hang whilst trying to parse
  it's command line arguments. In fact, any command line argument
  that didn't start with - or + would cause it to hang.

  An XView error procedure has been added to calctool. This is
  called whenever there is an XView error. Invalid command line
  arguments that cause XView errors will cause this routine to be
  called. An attempt is made to try to determine if this is the case
  (as opposed to an XView error at a later stage in the game). In the
  former case, the error message is printed out, followed by the
  XView usage message (equivalent of -help), then the program exits.
  If calctool has already started (v->started = 1), then if the
  error procedure is called, then calctool will print the error
  message and try to resume, and hope the error is recoverable.
  Fixes bug 1077706.

----

v3.2 - patchlevel 19. 27th December 1991.

* Calctool didn't handle the command line option -size correctly if
  one of the two size parameters was too small. It automatically
  reset to the smallest size for both width and height. Calctool has
  now been changed to one adjust the single dimension that was too
  small. Fixes bug #1077705.

----

v3.2 - patchlevel 18. 24th December 1991.

* Problems with the -title option. If you specified -title '' then
  calctool wasn't displaying a blank titleline. Note that the XView
  defaults_get_string() call strips off leading and trailing spaces.
  Under SVR4, specifying a titleline, caused a core dump. This was
  due to tool_label not being initially set to NULL in make_frames().
  Fixes bug #1077708.

----

v3.2 - patchlevel 17. 24th December 1991.

* calctool ignores -font <fontname> on the command line. To be more
  correct, this font is only used in the XView panel popups such as
  the property sheet, the constant and function windows and the Asc
  window. Calctool can use upto four different fonts; these can be
  set via X resources, and are:

  deskset.calctool.buttonFont:         button labels.
  deskset.calctool.modeFont:           mode line labels.
  deskset.calctool.memoryFont:         memory window popup text.
  deskset.calctool.displayFont:        display line font.

  It is assumed that specifying a font using either the -font or -fn
  command line option will override *all* of these. In other words,
  this means that all text will be drawn in that font. Not a perfect
  solution. Fixes bug #1077704.

----

v3.2 - patchlevel 16. 24th December 1991.

* If the user is displaying in fixed point mode, and the number is
  smaller then the current degree of accuracy, then the number is
  displayed to the number of numeric places specified, and not
  converted to scientific notation. Fixes bug #1077703.

----

v3.2 - patchlevel 15. 23rd December 1991.

* The memory register popup window was being incorrectly repainted.
  The width value for the amount of background to be colored was
  incorrect. Particularily noticable with colored background and
  non-standard fonts. Fixes bug #1077541.

----

v3.2 - patchlevel 14. 23rd December 1991.

* Converting 0.00 (decimal) to binary resulted in 0.10. The problem
  here was the MPstr_to_num() routine in display.c was assuming the
  string to be converted was always in the current base. Added an
  extra parameter to the MPstr_to_num() call; the base to use to do
  the conversion.  Fixes #1077537.

----

v3.2 - patchlevel 13. 23rd December 1991.

* The result of the online help example for the financial Pmt
  calculation was incorrect. It should have been 1142.06 (to two
  decimal places), and not 1142.29. All financial online help
  example results are now given correct to 2DP. This involved
  adjustments to Ctrm, Fv, Pv, Sln, Syd and Term. Fixes bugs
  #1077534 and #1077718.

----

v3.2 - patchlevel 12. 23rd December 1991.

* Added in help attributes for each of the items on the Asc, Constant
  and Function popups. The following new entries were added to the
  calctool.info file:

  AscButton:
  AscFrame:
  AscPanel:
  AscText:
  ConFunConButton:
  ConFunDescription:
  ConFunFunButton:
  ConFunFrame:
  ConFunNumber:
  ConFunPanel:
  ConFunValue:

  Fixes bug #1077528.

----

v3.2 - patchlevel 11. 23rd December 1991.

* Fixed up the help entries in the calctool.info file for the Con and
  Fun menus. They needed a trailing space, ie: "Con " and "Fun ".
  Added in XV_HELP_DATA attributes for all the other calctool menus:
  Acc, Base, Disp, Exch, Mode, Properties, Rcl, Sto, Trig, < and >.
  Added an entry for the properties menu (:Props) to the calctool.info
  file. Fixes bugs #1077525 and #1077526.

----

v3.2 - patchlevel 10. 23rd December 1991.

* Calctool man pages didn't mention the -? and -name options.
  Noted with the -? entry that this needs to be escaped when used
  with the csh, ie. -\?

  Adjusted the order of the entries in the usage message to match
  the manual pages.

  Moved the code in calctool that looked for "-name", before the
  call to xv_init(XV_INIT_ARGC_PTR_ARGV, argc, argv, ... which
  removes it from the program command line.  Fixes bug #1077524.

----

v3.2 - patchlevel 9. 11th December 1991.

* Ifdef'ed XmbDrawString for painting multibyte characters on canvas.
  Routine changed is draw_text() in xview.c. Fixes bugid #1076798.

  Relative positioning for the "Apply", "Set Default", and "Reset" 
  buttons on the property sheet.

----

v3.2 - patchlevel 8. 22nd November 1991.

* If you pressed the middle mouse button when holding the right
  mouse button down, when the cursor was positioned in the display
  portion of the main calctool window, then you got the following
  message:

  XView warning: Notifier error: Too many interposition functions

  Fixes bugid #1075270.

----

v3.2 - patchlevel 7. 20th November 1991.

* Calctool would not allow you to enter "big" numbers like:
  336341050452.2  The previous version of calctool represented
  numbers internally in doubles, and checked against a certain
  number of digits (depending upon the current radix). After a
  certain number, internally accuracy would be lost. With v3.2
  of calctool, internal accuracy is represented with "infinite"
  precision, and this test can be removed. Fixes bugid #1075198.

----

v3.2 - patchlevel 6. 5th November 1991.

* Changed the MP routines pow_di and pow_ri to mppow_di and mppow_ri,
  to get calctool to compile under jup_alpha5.

----

v3.2 - patchlevel 5. 1st November 1991.

* Overflow and underflow could still lock up calctool. Stricter tests
  have been added to make_number() and do_factorial. There might be
  other places where this is needed. Fixes bug #1073459.  Roll on V4!

----

v3.2 - patchlevel 4. 4th September 1991.

* To try and remain consistent with the look&feel of the V3 calctool
  (even though calctool now has "infinite" precision internal
  arithmetic), the MP result of each calculation is converted into a
  double before it is displayed. If the number is larger (or smaller)
  then what can be correctly placed in a double, than an error is
  generated. What was happening was that the "Error" string displayed
  in the calculator display was getting overwritten by the converted
  MP value. It's now been adjusted to not overwrite, if the error
  indicator is set. All this can be adjusted for V4.

----

v3.2 - patchlevel 3. 28th August 1991.

* Changed the definition of abs() in calctool.h to C_abs(), and
  adjusted the code accordingly. This should allow calctool to now
  correctly compile under SVR4 jup_alpha3.

----

v3.2 - patchlevel 2. 19th August 1991.

* Fixed up the calculation of base 10 logarithms. It no longer relies
  on an imprecise constant.

----

v3.2 - patchlevel 1. 19th August 1991.

* Added in "infinite" precision, using the Richard Brent MP routines.
  These were originally written in FORTRAN but have been converted to
  C (using f2c), and tidied up, placing the resulting routines in the
  new mp.c. Results now displayed are exact, to the given degree of
  accuracy. Fixes bug #1039759.

* When you Clr the display now, it display zero in the appropriate
  representation; fixed, scientific or engineering.

----

v3.2 - patchlevel 0. 31st July 1991.

* Incremented version number. Reset patchlevel.

* Modified the factorial function. A factorial of 0 now returns 1.
  Trying to do a factorial on a negative or non-integer number now
  results in an error. The calctool man pages have been modified to
  mention that that the factorial function is only valid for positive
  integers. Fixes bug #1065280.

* When memory was being allocated for the v data object, it was not
  being cleared, resulting in certain values being used before they
  were set.

* When entering numbers with the mouse, calctool incorrectly displayed
  and handled the left parenthesis. Fixes bug #1065388.

* The sequence ((1+1)) was resulting in 1 instead of 2. Fixes bugs
  #1065697 and #1065571.

* If calctool is being run in click-to-type mode, and input focus is
  on the mode popup, it was not possible to currently change modes
  using the menu on the Mode button in the main calctool window.
  Fixes bug #1065698.

----

v3.1 - patchlevel 50. 23rd July 1991.

* Calctool did not correctly set minimum size frame hints. This is
  the same problem as bugid 1065155 (reported against perfmeter and clock).

----

v3.1 - patchlevel 49. 19th July 1991.

* Fixed a bug where it was possible to leave a calctool button
  inverted if dragging the left mouse button from the calctool
  button area, into the display area.

* The -name option is only written to the saved command line if the
  user specified it on the command line initially.

* Added in support for a titleline for calctool, through the standard
  -Wl, -title or -label options.

* Modified the command line option parsing in get_options(). Instead of
  parsing the command line options, looking for options where the user
  might have set the calctool size, init_Xvars() now strips out the
  XView/X specific command line arguments, and calctool checks on user
  size and scale with calls to defaults_exists(). This means that
  xv_parse_one() is no longer needed; the original reason for doing all
  this.

* Handling on the calctool button labels has been adjusted to try
  to allow for longer strings which would probably be needed for
  the international versions. The hooks are all in there, but the
  I18N equivalent code needs to be rewritten, then bugid 1062858 can
  be closed. Here are some notes taken from one of the comments in
  text.c:

  Some notes for translators:

  Text in the label strings below, should be left justified. It will
  automatically be centre justified in the buttons, but various
  calculations depend on the text starting on the left.

  The original English V3 version was written with fixed (upto) four
  character button labels. I've tried to extend this to allow any sized
  labels, however the following conditions apply:

  - If the label won't fit in the button, then as much as possible will
    be shown, with the last character being '>'. If you enlarge the
    calculator, probably more of the label will show.

  - If the last character of the label is a '.', and this is not the
    first character of the label (ie, the numeric point label), then
    calctool knows that this signifies that this label should have two
    more '.' characters appended to it (ie, "Mem." becomes "Mem...").

  - If a calctool button has a menu item glyph associated with it, the
    width of this glyph is taken into consideration, and the amount of
    the label that can be displayed is adjusted accordingly.

----

v3.1 - patchlevel 48. 18th July 1991.

* Replaced the WIN_CMD_LINE call with the new ICCCM compliant
  FRAME_WM_COMMAND_ARGC_ARGV stuff, rewriting write_cmdline
  appropriately.

----

v3.1 - patchlevel 47. 11th July 1991.

* The -geometry and -Ws width and height values were not being
  correctly used. Thus it was not always possible for the user
  to set a preferred initial size.

----

v3.1 - patchlevel 46. 11th July 1991.

* The window manager does not read the NormalHints property until the
  frame comes out of it's withdrawn state. So minimal size hints are
  now set when we've had the first valid canvas repaint. Bugid 1064024
  can be closed.

----

v3.1 - patchlevel 45. 4th July 1991.

* Added ICON_TRANSPARENT, TRUE, to the calctool icon creation, to
  correctly generate a transparent icon.

----

v3.1 - patchlevel 44. 1st July 1991.

* Adjusted one of the examples in the calctool.info file:

  2 * ( 3 + 4 ) = 24

  should really be

  2 * ( 3 + 4 ) = 14

----

v3.1 - patchlevel 43. 24th June 1991.

* Adjusted the font names used by calctool from:

  lucidasanstypewriter-10   format

  to

  -b&h-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-iso8859-1  format.

* Added in the ability to select a portion of the calctool display,
  by using the left mouse button (to select), and the middle mouse
  button (to adjust). This can then be used in a Copy/Paste operation.
  Selection/adjustment via dragging is permitted, and double-clicking
  inside the display area will hilite the full display value.

  Bugid 1055425 can be closed.

----

v3.1 - patchlevel 42. 13th June 1991.

* The calctool "buttons" are now highlighted, when the equivalent
  keyboard input is pressed. Rfe 1062016 can be closed.

----

v3.1 - patchlevel 41. 12th June 1991.

* The Cut (L10) key is now synonymous with the Copy (L6) key. This
  will make the calctool display value the current primary selection.
  This problem comes from bugid 1055425.

* Using keyboard input, it was possible to cause calctool to core dump
  by typing an invalid mode letter, and when the "broken" mode window
  appeared, by selecting one of the invalid keys.

----

v3.1 - patchlevel 40. 11th June 1991.

* Added in ANSI prototypes for each calctool routine.

----

v3.1 - patchlevel 39. 7th May 1991.

* Fixed up the alignment of the panel items on the property sheet,
  removing the large blank area near the top left.

----

v3.1 - patchlevel 38. 7th May 1991.

* The "Save settings as the default" property item has been removed,
  and the row of three buttons on the bottom now look like:

    (Apply)   (Set Default)    (Reset)

  The (Defaults) button has gone. The (Set Default) button is the
  proper OPEN LOOK way of doing the same as "Save settings as the
  default".

* The main calctool frame now has minimal size hints at creation
  time, so it's impossible to shrink below it's smallest allowed size.

----

v3.1 - patchlevel 37. 2nd May 1991.

* Changes needed to get calctool to work under SVR4 (Zeus). There are
  no SVR4 specifics; the same code runs unchanged under both SunOS
  v4.1.1 and SVR4.

----

v3.1 - patchlevel 36. 30th April 1991.

* The calctool icon is now retained. This prevents flashing when
  another window is dragged over it when OpenWindows.DragWindow:
  is set to true.

----

v3.1 - patchlevel 35. 29th April 1991.

* The calctool button labels are are created using read_str() instead
  of STRCPY'ing to an array of 5 characters. This doesn't work in
  multi-byte per character environments.

----

v3.1 - patchlevel 34. 29th April 1991.

* The calctool icon now correctly uses the foreground and background
  colors. Bugid 1051860 can be closed.

----

v3.1 - patchlevel 33. 27th April 1991.

* Modified all the text string initialisations in text.c to use the
  LGET() and MGET() macro's. Wendy tells me this now works for sundae.

* Changed the definition for the calctool button strings from char *str
  to char str[5]. This is needed because the dgettext() strings are now
  read only, and the calctool buttons strings can change, so they have
  to be STRCPY'ed.

* If an entry was added or changed in either the constant or the
  function menus, the new menu wasn't being recreated.

* Calctool correctly displays on the NCD terminal.

----

v3.1 - patchlevel 32. 26th April 1991.

* Moved the call to init_text() in do_calctool() to after the call
  to init_Xvar(). The call to xv_init() needs to be done before the
  calls to dgettext(). Bugid's 1056298 and 1056806 can be closed.

* The strings generated by dgettext are now read only. They shouln't
  be modified in any way. The check for menu items greater then 45
  characters long has been removed. This XView problem is now fixed,
  and because of the read-only strings, is no longer possible.

----

v3.1 - patchlevel 31. 26th April 1991.

* Ran calctool through Saber-C and fixed up discrepancies.

* Calctool now appears to work correctly on 24bit screens.
  There were three problems:

  - calctool was crashing in xv_destroy(). What was happening was the
    frame event handler was getting a resize event before the canvas
    repaint handler has been properly called.

  - Should have been using GXclear and XCopyArea to clear the offscreen
    calctool "button" server images (pixmaps).

  - the server images for manipulationg that offscreen buttons should
    have been using a foreground of 1 and a background of 0 (not
    BlackPixel() and WhitePixel()). Thanks to Darren Austin for finding
    this one.

    Bugid 1056788 can be closed.
    Bugid 1054340 is against SunView, but has been fixed in OW v3.0(FCS).
 
* Calctool now appears to work correctly in the 4bit and 8bit color
  visuals on the 24bit screen. The problem here was that several
  graphics contexts and scratch pixmaps were been created with an xid
  of the root window instead of the calctool main window. The default
  depth of the screen is differwent from the depth of the visual.

* Resizes are now correctly handled. Not all resize events are really
  changes in size, so the current width and height are compared against
  the new width and height, and if there is no change, then no resize
  is done. Checking the frame sizes is now done with an xv_get()
  on FRAME_OPEN_RECT (which works), instead of a frame_get_rect().
  Bugid 1057636 can be closed.
  Rfe 1052050 can be closed. Calctool redraws a *lot* quicker now.

* Changed the label on the Chs button to +/-. This means the help
  key for the button now works (part of bugid 1057794).

----

v3.1 - patchlevel 30. 23rd April 1991.

* Added in the right numeric function keyboard handling from Stuart
  Marks (thanks Stuart!). This is the correct way to handle the
  numeric keyboard, and gets rid of all the sloppy stuff I originally
  had. The three resources:

  deskset.calctool.sun3Keyboard:
  deskset.calctool.sun4Keyboard:
  deskset.calctool.numericKeypad:

  have been removed. The manual pages have been adjusted accordingly.

----

v3.1 - patchlevel 29. 18th April 1991.

* The sequence of keys 10 - 30 "sin" = was not producing the correct
  effect. For some reason, v->cur_op was being set to the current
  character ("sin"). I've removed this. The worrying thing, is why
  was this there in the first place? Bugid 1056216 can be closed.

* Dragging with the left mouse button over certain calctool "keys"
  such as Con and Fun, resulted in illegal xv_get()'s. This is
  because the appropriate menu hadn't been made.

* Certain operators that have control character keyboard equivalents
  weren't being handled inside parentheses properly.

----

v3.1 - patchlevel 28. 17th April 1991.

* Calctool has been modified so that most calctool specific warning
  messages from the acc compiler have been eliminated.

----

v3.1 - patchlevel 27. 16th April 1991.

* Added in a routine to save the user supplied command line options.
  These options are also saved to the WIN_CMD_LINE whenever they are
  adjusted via the property sheet. The -Wn and +Wn options are also
  saved. These options are then correctly placed in ~/.openwin-init
  when the user does a "Save Workspace". Bugid 1056934 can be closed.

----

v3.1 - patchlevel 26. 12th April 1991.

* Various changes to improve calctool memory usage. Resources such
  as the property sheet, the menus are not created until they are
  needed.

* No longer assume the default keyboard is a Sun4. In other words if
  the ioctl doesn't say it's a sun3 or a sun4 keyboard, then calctool
  wont't attempt to setup a right-hand numeric keypad.

  Add in another X resource:

  deskset.calctool.numericKeypad:      False

  which if set to false, won't setup a numeric keypad (irrespective
  of the results from above.

* Added in yet another X resource:

  deskset.calctool.sun3Keyboard: False

* Calctool no longer assumes that the keyboard is a Sun4 keyboard by
  default. The ioctl has got to be successful to determine if it's
  a Sun3 or a Sun4 keyboard. If this doesn't happen, then no right
  numeric keypad is setup.

----

v3.1 - patchlevel 25. 20th March 1991.

* Changed all occurances of DefaultColormap to:

  xv_get(xv_get(frame, WIN_CMS), CMS_CMAP_ID) ;

----

v3.1 - patchlevel 24. 18th March 1991.

* On a color screen (4bit or 8bit), if calctool can't allocate all
  the colors, it tries to cook up a special colormap using black,
  white, the workspace color, the default window color, a shade of
  gray (for the 3D button inversion), plus the tools foreground and
  background colors. The only new color should be the shade of grey.
  If we can't get that, or if this all fails for some other reason,
  then return FALSE, forcing calctool to monochrome.
  Color palette indices will be:

  C_WHITE   = white pixel color.
  C_BLACK   = black pixel color.
  C_GREY    = grey color.
  C_BACK    = workspace color.
  C_DISPCOL = tool background color.
  C_MEMORY  = tool background color.
  C_TEXT    = tool foreground color.
  the rest will be the window color.

----

v3.1 - patchlevel 23. 13th March 1991.

* Another new X resource has been added:

  deskset.calctool.sun4Keyboard:       true

  which will allow the user to override the default keyboard type,
  which is normally determined by doing an ioctl on /dev/kbd. This
  is for situations where the calctool program is running on a
  machine which has a different keyboard type then where the tool is
  being displayed.

* The XView event handler has been adjusted to correctly handle the
  numeric 6 key on the right function pad. Pressing this key now
  generates an ACTION_GO_CHAR_FORWARD event, and this was being
  incorrectly taken as Control-F (Frac) on the down press.

* Calctool now compiles, links and successfully runs with acc, if
  you ignore the warning messages.

----

v3.1 - patchlevel 22. 8th March 1991.

* Various control-character events are no longer recognised as ascii
  events, but instead generate action events. The following have been
  noticed, and the get_next_event() routine in xview.c has been
  adjusted to correctly handle this.:

  Control-a   - ACTION_GO_LINE_BACKWARD
  Control-f   - ACTION_GO_CHAR_FORWARD
  Control-u   - ACTION_ERASE_LINE_BACKWARD

* The calctool manual pages have been adjusted to correctly detail
  the Asc keyboard accelerator.

* The default startup mode for color machines, unless specified on
  the command line or via an X resource, has been changed to 2D. This
  will repaint faster to the screen.

----

v3.1 - patchlevel 21. 28th February 1991.

* The canvas event handler for calctool has been modified to call
  notify_next_event_func. The menu_show() call now uses the canvas
  paint window as its' second argument, and not the canvas itself.
  This now correctly allows menus that have been MENU clicked up,
  to correct accept the SELECT mouse button.
  Bugid 1035658 can be closed.

----

v3.1 - patchlevel 20. 27th February 1991.

* Added in a routine that compresses repaint events. This should speed
  up calctool repaint fractionally.

* Another X resource has been added:

  deskset.calctool.beep:        true

  which, if set to false, suppresses the beep sound in the event of
  an error (such as invalid input, or if the display needs to be
  cleared).

  The beep sound has been added for such error conditions.

----

v3.1 - patchlevel 19. 15th February 1991.

* The fontnames variables were not being initialised to NULL.

----

v3.1 - patchlevel 18. 15th February 1991.

* Have added in four new X resources, to allow you to specify the
  fonts used to display text with calctool:

  deskset.calctool.buttonFont:
  deskset.calctool.modeFont:
  deskset.calctool.memoryFont:
  deskset.calctool.displayFont:

  Normally calctool will use the lucidasanstypewriter font and pick a
  font size depending upon the scale and size of the calctool window.
  This would be for the button and memory fonts, with the mode font
  2 points smaller and the display font two points bigger. If the tool
  is resized, then the font sizes are adjusted accordingly.

  If any of the above X resources are used, then this no longer happens,
  and the new font names are always in effect irrespective of scale or
  size.

  The manual pages have been updated.

----

v3.1 - patchlevel 17. 14th February 1991.

* Have rewritten parentheses handling so that the parenthesis
  expression is not calculated until the last matching bracket has
  been entered. This now allows backspace to be easily and correctly
  handled.

----

v3.1 - patchlevel 16. 27th January 1991.

* Adjusted the property sheet. Moved the "Save calculator settings" to
  the bottom, and called it:

  Save settings as the default: [no][yes]

  If this property item is set to yes, then the current calctool
  settings are written to the ~/.desksetdefaults file when the user
  selects the Apply, Reset or Defaults buttons. This makes it
  compatible with clock and perfmeter.

* All the new property sheet items have had their help information
  added to the calctool.info file.

* Added in the command line option:   -name app-name

  This option specifies the application name under which resources are
  to be obtained, rather than the default executable file name.

* Found and fixed one more case related to bugid 1049453, which was
  mainly fixed in patch #15.

* All popup windows have been adjusted so that the pushpin is not in
  by default.

----

v3.1 - patchlevel 15 - 23rd January 1991.

* Removed redundant code in xview.c that was put there to try to fix
  the Sun4 Ins key problem, which no longer appears to be a problem.

* If the user presses a calctool button which has a window
  associated with it (Asc or Mem), and that window is already displayed,
  or if the user make a selection from a menu, and that would bring up
  a window, but that window is already displayed, then the window is
  popped to the top.  This fixes bugid 1049453 which can now be closed.

----

v3.1 - patchlevel 14 - 18th January 1991.

* The Delete key was working incorrectly with a Sun3 keyboard.

* The Ins key on a Sun4 keyboard no longer works with the latest OW
  V3 builds. A workaround would be to set the Ins key appropriately
  depending upon whether the calctool program currently has the
  keyboard focus. Unfortunately I don't know the magic keycode number
  to use to define the Ins key. The code has been written. When that
  magic number is found the INSFUNKEY definition in xview.c should be
  set appropriately, and the call to set_ins_key() in xview.c
  uncommented. For now, an entry has been added to the TODO file.

* The dynamic calctool resizing hasn't been working. Calctool no
  longer seems to get WIN_RESIZE events when the main calctool frame
  is resized. To try to "fix" this up, an event interpose routine
  for the main calctool frame has been added. It then tries to set the
  canvas size accordingly, and resize all the graphics objects, such
  as the offscreen server images for the buttons and the text fonts.

  With the introduction of the interpose routine to fix the resizing,
  occasionally there are strips of foreground color to the right and
  below in the various calctool windows.

  A much better and simpler solution would be to find out why calctool
  no longer gets WIN_RESIZE events on the canvas. All this used to
  work; the code to handle resize events on the canvas has been written
  and used to work.

----

v3.1 - patchlevel 13 - 19th December 1990.
 
* Added in X color resource support for all of the colors that calctool
  uses. These can now be setup in all the standard X places or the
  ~/.desksetdefaults file. If there aren't any, then the "standard"
  colors are used. The manual pages have been updated to describe these
  new resources.

----

v3.1 - patchlevel 12 - 27th November 1990 [mjb]

* Fixed Makefile to compile with the XView Makefile.master

----

v3.1 - patchlevel 11 - 27th November 1990.

* Generated a version of calctool which should have support for other
  languages. The text generation has been separated out into another
  source file (text.c). Needs to be tested in the sundae environment

* Modified the text handling for calctool to use four new definitions,
  DGET(), EGET(), LGET() and MGET() definied in calctool.h, and set the
  text initialisation appropriately. Note that DGET() is just a dummy
  call, but makes it easier to change from one type of conversion to
  another. Certain strings (command line arguments, help strings, parts
  of the usage message, calctool resources), don't appear to have to be
  converted, and are just initialised into the correct arrays using
  DGET().

* Added in Xrm resource handling. Resources are looked for in the
  following ways:

  Classname file in the app-defaults directory. In this case, Classname
  is Deskset.

  Classname file in the directory specified by the XUSERFILESEARCHPATH
  or XAPPLRESDIR environment variable.
 
  Property set using xrdb, accessible through the XResourceManagerString
  macro or, if that is empty, the ~/.Xdefaults file.
 
  XENVIRONMENT environment variable or, if not set, .Xdefaults-hostname
  file.
 
  DESKSETDEFAULTS environment variable or, if not set, the
  ~/.desksetdefaults file
 
  *NOTE* When you write an Xrm database to a file, it overwrites the
         file. What I've done is read in the ~/.desksetdefaults file
         just before I write out the new values. This seems like a
         window for error if two or more clients are doing this at
         the same time.

  The calctool resources are (with example values shown):

  deskset.calctool.accuracy:      6
  deskset.calctool.base:          hex
  deskset.calctool.display:       scientific
  deskset.calctool.mode:          scientific
  deskset.calctool.mono:          false
  deskset.calctool.showRegisters: false
  deskset.calctool.trigType:      rad
  deskset.calctool.rightHanded:   false
  deskset.calctool.3dLook:        true
  deskset.calctool.hasTitle:      true

* Calctool now has a property sheet. There are four settings:

                       Appearance:   2D-look | 3D-llok
                          Display:   color | monochrome
         Save calculator settings:   no | yes
                            Style:   left-handed | right-handed

  The third choice determine whether five extra calculator settings
  are written out to the ~/.desksetdefaults file. These are (for
  example):

  deskset.calctool.accuracy:      6
  deskset.calctool.base:          hex
  deskset.calctool.display:       scientific
  deskset.calctool.mode:          scientific
  deskset.calctool.trigType:      rad

* Calctool now recognises the Props key being pressed, and displays
  the property sheet.

* The manual pages have been modified to include all this new
  information on resources and the property sheet.

----

v3.1 - patchlevel 10 - 22nd November 1990.

* If you backspace over a number which contained a decimal point,
  calctool would not allow you to enter a new decimal point.
  Bugid 1047077 can be closed.

----

v3.1 - patchlevel 9 - 1st November 1990.

* If the total colormap couldn't be allocated in load_colors(), then
  calctool is starting in monochrome instead of exiting.

----

v3.1 - patchlevel 8 - 18th October 1990.

* The Delete, Back Space and Ins (numeric keypad) keys were no
  longer working. In the latest OW V3 build, these have been
  remapped to ACTION_ERASE_CHAR_FORWARD, ACTION_ERASE_CHAR_BACKWARD
  and ACTION_INSERT events. Tidied up the event reading routine too.

----

v3.1 - patchlevel 7 - 2nd October 1990.

* "Fixing" the minimal shrinking problem in patch #6, broke the
  sizing of the memory and mode windows. This patch fixes that.

----

v3.1 - patchlevel 6 - 2nd October 1990.

* Shrinking calctool below it's minimum size now correctly works.

----

v3.1 - patchlevel 5 - 27th September 1990.

* After the user has done a valid parentheses calculation, the last
  input is set to the displayed value. If the user enters an '=',
  nothing changes.

* During parentheses processing, if the user uses the mouse to
  select an item from a function menu or the default menu item, then
  the correct values are entered in the display (and on the parentheses
  stack).

* The default menu item for the function menu is now "Enter Function".
  The default menu item for the constant menu is now "Enter Constant".
  The text is now correctly displayed on the calctool button when the
  left mouse button is held down. The popup correctly appears when the
  left mouse button is released.

* If you executed a user defined function that ended in a ')', then a
  '(' was left in the operand field.

* All calctool button labels are now only drawn with the "normal" font.

* If calctool is resized, the memory register window is now correctly
  resized also.

----

v3.1 - patchlevel 4 - 27th September 1990.

* Define a user defined function and dismiss the window. If you bring
  the define constant window the info from the previously defined
  function is still in the window. The user should not have to erase
  this info before entering the new info.

* Only certain "pending" operations should redisplay the numeric
  calctool buttons half way through the operation. Con, Exch, Fun,
  Sto, Rcl and Acc should redisplay the buttons 0-9. < and > should
  redisplay the buttons 0-f.

* During parentheses processing if a numerical error occured, the
  display is now set to "Error", and the operand field is set to "CLR".

* The contents of v->disp_val are now zeroised when the first left
  parenthesis is found. This is to allow for correct calculations when
  invalid numbers and operands are found inside the parentheses.

----

v3.1 - patchlevel 3 - 26th September 1990.

* When you type '*' (synonymous with multiplication 'x'), the op field
  was not being set.

* Displaying the Memory register window shouldn't clear the operand
  field.

* Use of a pending operation within a current calculation, will result
  in the erasing of the display of the type of the current operation.

* The 10 constant values were accidentally being zeroised in
  init_vars().

* The ASC, Enter Con/Fun windows and the mode window are all pinned
  when initially displayed.

* The command line option extraction routine now understands -Wx as
  being synonymous with -scale.

* Added two new command line options, -2 and -3 which start up the
  color version of calctool with a 2D and a 3D look respectively.
  The manual pages have been updated.

  NOTE: The color -2 version renders a lot faster then the default
        color option.

* If you had typed a left parenthesis, then hitting certain
  calctool keys that generate control characters (such as Tan),
  didn't get displayed properly. They are now displayed as ^c,
  where c is the character in question.

* Hitting the Delete and Back Space keys after entering a left
  parenthesis now does the appropriate action.

----

v3.1 - patchlevel 2 - 21st September 1990.

* If a left parenthesis had been entered, and a selection then
  made from the Mode window, calctool would core dump.

* The memory register and constant values were not getting initialised
  to zero.

----

v3.1 - patchlevel 1 - 17th September 1990.

* Ran calctool through xsaber, and cleaned up any errors/warning
  generated.

* Made as many functions as possible in xview.c, static.

* calctool can now automatically resize itself using the frame resize
  corners. The fonts are reinitialised depending upon the new scale,
  and the calctool button images regenerated depending upon the new
  size.

* The calctool.info file has been fixed up to mention the logical mode
  under the mode information.

* If the user holds the left mouse button down over a calctool button
  that has a menu associated with it, and the length of the default
  menu item is zero, then the menu button glyph is now placed on the
  right side of the calctool button.

----

v3.1 - patchlevel 0 - 12th September 1990.

* Started work on the OpenWindows v3.0 calctool.

* Created a minimal Makefile. Reversed the order of patch descriptions
  in the CHANGES file, so that the latest is at the beginning.

* Added standard Sun Microsystems headers to each .c and .h file.

* Added in code to determine whether there is a Sun3 or a Sun4 type
  keyboard attached, and adjusts the right function keypad accordingly.
  Bugid 1039460 can be closed.

* For the Sun4 keyboard, changed the R6 (*) definition to x from *.
  This now allows multiplication to work correctly.

* For the Sun3 keyboard, changed the R14 '1' definition to '.'.

* The key labled CHS has been changed to +/-.

* Removed the three spare entries from the colormap table. As this
  is now XView and not SunView, the colormap size doesn't have to be
  a power of 2.

* calctool now looks for KBD_USE and KBD_DONE events to determine if
  calctool has the keyboard focus, and sets the mapping of the Del/.
  function key to '.' or Del acordingly.

* Added the '*' case to the switch table in do_calc() to allow '*' to
  be synonymous for multiplication.

* All the "variable" variables are now defined in structures and
  malloced. This should make it fairly trivial to turn calctool
  into a library routine if so required.

* Made as many functions as possible void.

* Fixed up the usage() message.

* Removed references to the -i (inverse video) command line option,
  which is not supported under XView/Xlib.

* If there is a mode window displayed and it is pinned, then trying 
  to change to Basic mode will have no effect. The user has to unpin
  the frame to achieve this. 

* Now recognises the -Wn and +Wn command line options to disable or
  enable a frame titleline. The actual contents of the titleline
  still needs to be set with the -Wl option.

* The manual page has been updated to describe the -Wn and +Wn
  command line options, and the change of CHS to +/-.

* The calctool.info file has been updated to reflect the change of
  Chs to +/-.

* Calctool now understands the -scale and -Ws (-size) command line
  options, and adjusts the button sizes and the fonts it uses
  accordingly.

* A check is now made in the get_menu_def routine for a valid default
  menu item. Initialy it is possible for the Function menu to not have
  a default item. If there isn't one, then get_menu_def() now returns
  -1. This is checked for in handle_menu_selection() and prevents an:
  "XView warning: invalid object (not a pointer), xv_get" message.
  Bugid 1039912 can be closed.

* With the greying in/out of the calctool buttons, the button is only
  redrawn if it's changing color/state.

----

v3.0 - patchlevel 24 - 22nd May 1990.
 
* Columns 1 and 2 have been reversed for the -r "right-handed" option.
  This means that the Quit buton will be in the bottom left hand
  corner.

----

v3.0 - patchlevel 23 - 22st May 1990.
 
* Fixed up repaint problem on monochrome screen when no selection was
  made from the displayed popup menu.
 
* Added -r command line option to display a "right-handed" calculator.
 
* Removed unwanted -W? command line options.
 
* Updated the calctool manual page. The -r option was added and the
  -Wi, -WP and -Wp options were removed because these are generic tool
  arguments.

----

v3.0 - patchlevel 22 - 19th May 1990.
 
* Added menu_showing kludge to xview.c, to prevent multiple repaints
  on mono screens.

----

v3.0 - patchlevel 21 - 12th May 1990.
 
* Entering numbers with more then 10 numeric places were being
  converted incorrectly.

----

v3.0 - patchlevel 20 - 9th May 1990.
          
* XView calctool has been run through XSaber-C, and several changes
  made because of the error messages produced.
 
* There was an uninitialised variable exp_sign in convert_display()
         
* The variable label, used to store the calctool labels was two
  characters too small.
 
* In write_cf_value, the variable result was being written to. This
  was clobbering the global variable called result, which was the
  calculators current result. A local variable with the same name
  has been introduced.
 
* If the calculation  2+(3*(4+5)-6)  was entered, the display should
  not be adjusted until the last parenthisis is matched. This was not
  the case, and has now been fixed.

----

v3.0 - patchlevel 19 - 7th May 1990.
                 
* Calctool didn't correctly grey out buttons when run on a mono
  screen.
          
* A -m option has been introduced to allow you to run in just black
  and white on a color screen.
          
* Made sure that after a menu has been displayed, the grey area
  repaint of the canvas occurs on an even pixel boundary.

----

v3.0 - patchlevel 18 - 2nd May 1990.
          
* The XView driver has been fixed so that the additional popup
  frames don't "jiggle" about.

----

v3.0 - patchlevel 17 - 27th April 1990.
          
* The XView driver has been adjusted so that auxiliary frames are
  only created if they are used.

----

v3.0 - patchlevel 16 - 20th April 1990.
 
* Added in the changes to include ds_position_popup, to successfully
  position the popup windows.
 
* Buttons are now correctly stenciled.

----

v3.0 - patchlevel 15. - 17th April 1990.
 
* If the user presses left over a calctool button which has a menu
  associated with it, then as much as possible of the default menu
  item is now shown on the button label.
 
* References to DRAGING have been changed to DRAGGING.
 
* The mouse event code in process_event in graphics.c, has been
  divided up into separate routines.
 
* If the left mouse button was pressed initially, when it wasn't
  over a calctool button, then the OPEN LOOK mouse dragging effect
  didn't work.
 
* If the right mouse button was pressed initially when it wasn't
  over a calctool button which had a menu associated with it, then
  the correct OPEN LOOK actions were not performed.

----

v3.0 - patchlevel 14. - 15th April 1990.
 
* A few things have been done to make calctool more OPEN LOOK.
  These include only being able to SELECT with the left button.
  The middle button has no effect. The right button is only
  useful on buttons which have a menu associated with them.
  If you click on the SELECT mouse button and drag the mouse
  around, the calctool buttons invert and return to normal when
  the mouse moves over them. Exiting the calctool window when
  the mouse is being dragged, deselects the last button.
 
* If the users Clicks over a calctool button with the left mouse
  button, and this calctool button has a menu associated with it,
  then the default menu item value is selected. This has introduced
  an extra field to the cmenus menu structure, which is the initial
  default value.
 
* In scientific mode, 6 was being displayed as 6.00e+ instead of
  6.00e+0.

----

v3.0 - patchlevel 13. - 26th March 1990.
 
* The ability to store values via the popup menu was broken by a
  change in patch #11. This is now fixed.

----

v3.0 - patchlevel 12. - 22st March 1990.
 
* Clicking SELECT on the pane of the Memory Registers
  window still displayed keys from the Calculator base window.
 
* If a number was being displayed in scientific notation in
  hexidecimal, then the exponent'e' was being incorrectly converted
  to uppercase.
 
* The destroy_proc routine has been removed from both the XView and
  the SunView drivers. This means that the X/NeWS command "Save
  Workspace" now correctly works. The do_frame routine has been
  moved to functions.c
 
* The incorrect result was being produced with the parenthesis code.
  This was because the push_op and push_num routines were being
  passed a negative index.

----

v3.0 - patchlevel 11. - 20th March 1990.
 
* If one of the following operators (+, -, x or /) was used in
  between the sto operator and the register, then calctool would hang.
 
* Calctool was only allowing a certain maximum number of digits to
  be entered in each base; 40 for binary, 15 for octal and 12 for
  decimal and hexidecimal. This has been changed to allow upto
  MAX_DIGITS (40) to be entered, irrespective of what base you are
  in. Note that internal accuracy is lost above the number of digits
  (40/bin, 15/oct, 12/dec, 12/hex).
 
* The exponent portion of scientific numbers displayed in binary was
  incorrect.

----

v3.0 - patchlevel 10. - 16th March 1990.
 
* Both the XView and the SunView version now use a canvas repaint
  handler which tries to repaint the smallest amount possible for the
  main calctool canvas plus the canvas for the special mode.
 
* The titleline for the mode popup frame now has the initial letter
  of each word capitalised.

* The "4" button was displaying as 4.. at certain times when the
  main calctool frame was completely redrawn. This is now fixed.

* Redundant code has been removed, plus the comments in functions.c
  have been corrected.

----

v3.0 - patchlevel 9. - 15th March 1990.
 
* The title line now says "Calculator" and not "Calctool".
 
* All main calctool canvas and the mode popup canvas are now retained.
  This should prevent the repaint events when a menu is poped up.
  Note that calctool is still capable of correctly repainting itself,
  should that retained canvas go away.
 
* The calctool buttons have been remade. The height is now 28 pixels
  instead of 48 pixels. The XView version now uses the Lucida font
  in various sizes. The menu glyph has been made slightly smaller to
  be in proportion to the new sized buttons.
 
* The button labels can now contain upto four characters, plus
  allowing room for the menu glyph. The labels now just have the
  initially character in uppercase. Labels are now much more readable.
 
* The mode popup has changed shape. It's now two rows of eight columns
  and fits in nicely below the main calctool window. The buttons have
  been rearranged on this popup (in the various modes).
 
* The Mem and Asc keys now have the ... menu mark, to show that they
  display popup frames.
 
* The title line of the memory register window now is "Memory
  Registers" and not "Memory registers". This frame now comes up with
  the push pin in.
 
* Clicking SELECT on the register window no longer displays calctool
  buttons on this window.
 
* Clicking on the Mem key when the memory register window is shown,
  no longer removes it.
 
* The calctool.info file has been modified. All key names have been
  changed from capital letters to just the initial letter in uppercase
  with the rest in lowercase. Examples for all the financial functions
  have been added.
 
* The calctool display now shows characters typed in during parenthesis
  processing.

----

v3.0 - patchlevel 8. - 1st March 1990.
 
* Parentheses have been fully implemented.

----

v3.0 - patchlevel 7. - 27th February 1990.
 
* The < and > shift operators have been moved to the logical popup.
  The 1/x and x^2 keys have been moved to the main calctool frame.
 
* Keyboard handling has been fixed up so that all possible valid
  keys are available from either the main calctool frame or the
  current mode popup (if there is one).
 
* The calctool.info file has been updated for the new layout.
 
* The code for adding/altering constant/function popup menu values
  has been simplified to solve a problem with the new value being
  in the wrong place.
 
* The "business" mode has been renamed "financial" mode with a
  corresponding letter 'f'. The "basic" mode letter has been changed
  from 'n' to 'b'.
 
* Nine financial keys and their associated routines have been
  included. The calctool.info file has been updated with descriptions
  of these definitions.
 
* Just before the buttons table in calctool.c, a table of currently
  used keyboard equivalents has been defined. This should make it
  easier to show what ones are available for new functions.
 
* The variable array mem_vals has been renamed to mvals.
 
* More work has been done on the parentheses handling, but this is
  not complete yet.

----

v3.0 - patchlevel 6. - 23rd February 1990.
 
* The code for the "Enter Function/Constant" has been tested,
  and is hopefully now bug free.
 
* Hooks for the parentheses code has been written.
 
* The calculator has had the logical functions moved into a
  separate mode on the popup mode frame. One column has been
  removed, and the keys rearranged. The SQRT key has been put
  back on the main frame, and is now GREY0. So is the ASC key.
  There are no buttons showing where there are no functions in
  this position on the mode frames.

----

v3.0 - patchlevel 5. - 22nd February 1990.
 
* The CHANGES file has been updated for all patches.
 
* When there is no calculator mode, the "panel item" is set to
  BASIC, not NONE. The keyboard equivalent is still 'n'.
 
* The auxiliary popup frames now come up correctly with the XView version.
 
* The display no longer truncates to 30 digits when in binary
  mode. To achieve this, I've had to change the numeric display
  font to cour.r.18 from cour.r.24.
 
* The code for the "Enter Function/Constant" has been written,
  compiled and partially tested. It is not bug free yet though,
  so shouldn't yet be used.

----

v3.0 - patchlevel 4. - 21st February 1990.
 
* Fixes up the calctool.info file.
 
* Fixes up the validkeys array (keys that can be validly pressed
  after an error has occured).
 
* I've changes several calctool button keyboard equivalents, to
  make the result more consistent. Buttons with menus, now tend
  to have a capital letter equivalent, unless it's a special key
  like <, > or #.
 
  Changed values are:
 
  Button display    Keyboard equivalent.
       MO                   M
       RT                   R
       ST                   S
       FN                   F
       INT               Control-i
       FRAC              Control-f
       ABS               Control-u
       1/x                  r
       SQRT                 s
       y^x                  y
       KEYS                 k
       MEM                  m
 
* Pressing the KEYS button now successfully changes the values on
  the mode popup frame if it is displayed.
 
* Setting the calculator mode to NONE now correctly shows NONE in
  the display area.
 
* I have fixed up the .calctoolrc file for the key changes listed above.
 
* Do_help now has correct values when selecting help for items in
  the popup calculator mode window.
 
* The last remaining pixwin call has been removed from the XView
  driver and the handling of server images has been improved.
 
* The control character sequences in the function popup menu are
  now correctly displayed.
 
* Repaint handlers have been added to the SunView and XView drivers,
  and the hooks are in place to do minimal repaint.

----

v3.0 - patchlevel 3. - 20th February 1990.

* The ASC frame is now the correct size.

* The do_function routine now works correctly.

* The memory register window now displays correctly.

* The mode popup frame now correctly displays the new mode buttons
  if the mode window was already being displayed.

* The SunView driver had an incorrect XV_SHOW; should have been a WIN_SHOW.

* Greying out of the redundant numeric keys is now handled differently.

* The shift keys will now shift upto 15 places.
 
* I've removed all the pixwin calls (except one) in the XView
  driver. The colormap handling is now also done at the Xlib level.
 
* All the hooks are in place for the "New Constant" and "New
  Function" entries in the constant and function menus.

----

v3.0 - patchlevel 2. - 19th February 1990.

* The mode keys are on a separate popup frame.

* The base values (BIN, OCT, DEC, HEX) are under one key with popup menu.

* The display values (ENG, FIX, SCI) are under one key with popup menu.

* The size of the calculators main frames is now 9 columns x 6 rows.

* RAND, TMv, HYP and INV have been moved to the scientific mode
  frame which is now 4 columns x 4 rows. The TM is a button with
  popup menu for the trig type values (DEG, GRAD and RAD).

* The frames no longer have resize corners. This will prevent the
  user from resizing the calctool.

----

v3.0 - patchlevel 1. - 15th February 1990.

* Popup menus now use the default font.

* The SunView and the XView routines returned that the fonts were
  of different widths, so I've rewritten the part of set_item that
  shows the calculator display to use a get_strwidth, and then set
  the string x position based on this.

* I've implemented context sensitive help.

* I've implemented the ASC key. I have a philosophical problem with
  the current implementation. It should be possible to do every
  calctool operation solely by using the keyboard. I've implemented
  ASC this way in this new version.

* Updated calctool.info,rearranging the order to tie in with the
  new button layout, and adding in help messages for all the new
  functions.

* Removed all redundant code. This includes unwanted command line
  option parsing, variables and routines associated with the help
  file, plus others.

* Started to tidy up the XView driver.

----

v3.0 - patchlevel 0. - 14th February 1990.

* New version passed over to the desktop group for comments.

* Started 8th February 1990.

====
