1 /* $Header: /cvs/gnome/gcalctool/ChangeLog-1990,v 1.4 2006/01/09 16:30:20 richb Exp $
3 * Copyright (c) 1987-2008 Sun Microsystems, Inc.
7 gcalctool change history - 1990.
8 ================================
10 v3.1 - patchlevel 13 - 19th December 1990.
12 * Added in X color resource support for all of the colors that calctool
13 uses. These can now be setup in all the standard X places or the
14 ~/.desksetdefaults file. If there aren't any, then the "standard"
15 colors are used. The manual pages have been updated to describe these
20 v3.1 - patchlevel 12 - 27th November 1990 [mjb]
22 * Fixed Makefile to compile with the XView Makefile.master
26 v3.1 - patchlevel 11 - 27th November 1990.
28 * Generated a version of calctool which should have support for other
29 languages. The text generation has been separated out into another
30 source file (text.c). Needs to be tested in the sundae environment
32 * Modified the text handling for calctool to use four new definitions,
33 DGET(), EGET(), LGET() and MGET() definied in calctool.h, and set the
34 text initialisation appropriately. Note that DGET() is just a dummy
35 call, but makes it easier to change from one type of conversion to
36 another. Certain strings (command line arguments, help strings, parts
37 of the usage message, calctool resources), don't appear to have to be
38 converted, and are just initialised into the correct arrays using
41 * Added in Xrm resource handling. Resources are looked for in the
44 Classname file in the app-defaults directory. In this case, Classname
47 Classname file in the directory specified by the XUSERFILESEARCHPATH
48 or XAPPLRESDIR environment variable.
50 Property set using xrdb, accessible through the XResourceManagerString
51 macro or, if that is empty, the ~/.Xdefaults file.
53 XENVIRONMENT environment variable or, if not set, .Xdefaults-hostname
56 DESKSETDEFAULTS environment variable or, if not set, the
57 ~/.desksetdefaults file
59 *NOTE* When you write an Xrm database to a file, it overwrites the
60 file. What I've done is read in the ~/.desksetdefaults file
61 just before I write out the new values. This seems like a
62 window for error if two or more clients are doing this at
65 The calctool resources are (with example values shown):
67 deskset.calctool.accuracy: 6
68 deskset.calctool.base: hex
69 deskset.calctool.display: scientific
70 deskset.calctool.mode: scientific
71 deskset.calctool.mono: false
72 deskset.calctool.showRegisters: false
73 deskset.calctool.trigType: rad
74 deskset.calctool.rightHanded: false
75 deskset.calctool.3dLook: true
76 deskset.calctool.hasTitle: true
78 * Calctool now has a property sheet. There are four settings:
80 Appearance: 2D-look | 3D-llok
81 Display: color | monochrome
82 Save calculator settings: no | yes
83 Style: left-handed | right-handed
85 The third choice determine whether five extra calculator settings
86 are written out to the ~/.desksetdefaults file. These are (for
89 deskset.calctool.accuracy: 6
90 deskset.calctool.base: hex
91 deskset.calctool.display: scientific
92 deskset.calctool.mode: scientific
93 deskset.calctool.trigType: rad
95 * Calctool now recognises the Props key being pressed, and displays
98 * The manual pages have been modified to include all this new
99 information on resources and the property sheet.
103 v3.1 - patchlevel 10 - 22nd November 1990.
105 * If you backspace over a number which contained a decimal point,
106 calctool would not allow you to enter a new decimal point.
107 Bugid 1047077 can be closed.
111 v3.1 - patchlevel 9 - 1st November 1990.
113 * If the total colormap couldn't be allocated in load_colors(), then
114 calctool is starting in monochrome instead of exiting.
118 v3.1 - patchlevel 8 - 18th October 1990.
120 * The Delete, Back Space and Ins (numeric keypad) keys were no
121 longer working. In the latest OW V3 build, these have been
122 remapped to ACTION_ERASE_CHAR_FORWARD, ACTION_ERASE_CHAR_BACKWARD
123 and ACTION_INSERT events. Tidied up the event reading routine too.
127 v3.1 - patchlevel 7 - 2nd October 1990.
129 * "Fixing" the minimal shrinking problem in patch #6, broke the
130 sizing of the memory and mode windows. This patch fixes that.
134 v3.1 - patchlevel 6 - 2nd October 1990.
136 * Shrinking calctool below it's minimum size now correctly works.
140 v3.1 - patchlevel 5 - 27th September 1990.
142 * After the user has done a valid parentheses calculation, the last
143 input is set to the displayed value. If the user enters an '=',
146 * During parentheses processing, if the user uses the mouse to
147 select an item from a function menu or the default menu item, then
148 the correct values are entered in the display (and on the parentheses
151 * The default menu item for the function menu is now "Enter Function".
152 The default menu item for the constant menu is now "Enter Constant".
153 The text is now correctly displayed on the calctool button when the
154 left mouse button is held down. The popup correctly appears when the
155 left mouse button is released.
157 * If you executed a user defined function that ended in a ')', then a
158 '(' was left in the operand field.
160 * All calctool button labels are now only drawn with the "normal" font.
162 * If calctool is resized, the memory register window is now correctly
167 v3.1 - patchlevel 4 - 27th September 1990.
169 * Define a user defined function and dismiss the window. If you bring
170 the define constant window the info from the previously defined
171 function is still in the window. The user should not have to erase
172 this info before entering the new info.
174 * Only certain "pending" operations should redisplay the numeric
175 calctool buttons half way through the operation. Con, Exch, Fun,
176 Sto, Rcl and Acc should redisplay the buttons 0-9. < and > should
177 redisplay the buttons 0-f.
179 * During parentheses processing if a numerical error occured, the
180 display is now set to "Error", and the operand field is set to "CLR".
182 * The contents of v->disp_val are now zeroised when the first left
183 parenthesis is found. This is to allow for correct calculations when
184 invalid numbers and operands are found inside the parentheses.
188 v3.1 - patchlevel 3 - 26th September 1990.
190 * When you type '*' (synonymous with multiplication 'x'), the op field
193 * Displaying the Memory register window shouldn't clear the operand
196 * Use of a pending operation within a current calculation, will result
197 in the erasing of the display of the type of the current operation.
199 * The 10 constant values were accidentally being zeroised in
202 * The ASC, Enter Con/Fun windows and the mode window are all pinned
203 when initially displayed.
205 * The command line option extraction routine now understands -Wx as
206 being synonymous with -scale.
208 * Added two new command line options, -2 and -3 which start up the
209 color version of calctool with a 2D and a 3D look respectively.
210 The manual pages have been updated.
212 NOTE: The color -2 version renders a lot faster then the default
215 * If you had typed a left parenthesis, then hitting certain
216 calctool keys that generate control characters (such as Tan),
217 didn't get displayed properly. They are now displayed as ^c,
218 where c is the character in question.
220 * Hitting the Delete and Back Space keys after entering a left
221 parenthesis now does the appropriate action.
225 v3.1 - patchlevel 2 - 21st September 1990.
227 * If a left parenthesis had been entered, and a selection then
228 made from the Mode window, calctool would core dump.
230 * The memory register and constant values were not getting initialised
235 v3.1 - patchlevel 1 - 17th September 1990.
237 * Ran calctool through xsaber, and cleaned up any errors/warning
240 * Made as many functions as possible in xview.c, static.
242 * calctool can now automatically resize itself using the frame resize
243 corners. The fonts are reinitialised depending upon the new scale,
244 and the calctool button images regenerated depending upon the new
247 * The calctool.info file has been fixed up to mention the logical mode
248 under the mode information.
250 * If the user holds the left mouse button down over a calctool button
251 that has a menu associated with it, and the length of the default
252 menu item is zero, then the menu button glyph is now placed on the
253 right side of the calctool button.
257 v3.1 - patchlevel 0 - 12th September 1990.
259 * Started work on the OpenWindows v3.0 calctool.
261 * Created a minimal Makefile. Reversed the order of patch descriptions
262 in the CHANGES file, so that the latest is at the beginning.
264 * Added standard Sun Microsystems headers to each .c and .h file.
266 * Added in code to determine whether there is a Sun3 or a Sun4 type
267 keyboard attached, and adjusts the right function keypad accordingly.
268 Bugid 1039460 can be closed.
270 * For the Sun4 keyboard, changed the R6 (*) definition to x from *.
271 This now allows multiplication to work correctly.
273 * For the Sun3 keyboard, changed the R14 '1' definition to '.'.
275 * The key labled CHS has been changed to +/-.
277 * Removed the three spare entries from the colormap table. As this
278 is now XView and not SunView, the colormap size doesn't have to be
281 * calctool now looks for KBD_USE and KBD_DONE events to determine if
282 calctool has the keyboard focus, and sets the mapping of the Del/.
283 function key to '.' or Del acordingly.
285 * Added the '*' case to the switch table in do_calc() to allow '*' to
286 be synonymous for multiplication.
288 * All the "variable" variables are now defined in structures and
289 malloced. This should make it fairly trivial to turn calctool
290 into a library routine if so required.
292 * Made as many functions as possible void.
294 * Fixed up the usage() message.
296 * Removed references to the -i (inverse video) command line option,
297 which is not supported under XView/Xlib.
299 * If there is a mode window displayed and it is pinned, then trying
300 to change to Basic mode will have no effect. The user has to unpin
301 the frame to achieve this.
303 * Now recognises the -Wn and +Wn command line options to disable or
304 enable a frame titleline. The actual contents of the titleline
305 still needs to be set with the -Wl option.
307 * The manual page has been updated to describe the -Wn and +Wn
308 command line options, and the change of CHS to +/-.
310 * The calctool.info file has been updated to reflect the change of
313 * Calctool now understands the -scale and -Ws (-size) command line
314 options, and adjusts the button sizes and the fonts it uses
317 * A check is now made in the get_menu_def routine for a valid default
318 menu item. Initialy it is possible for the Function menu to not have
319 a default item. If there isn't one, then get_menu_def() now returns
320 -1. This is checked for in handle_menu_selection() and prevents an:
321 "XView warning: invalid object (not a pointer), xv_get" message.
322 Bugid 1039912 can be closed.
324 * With the greying in/out of the calctool buttons, the button is only
325 redrawn if it's changing color/state.
329 v3.0 - patchlevel 24 - 22nd May 1990.
331 * Columns 1 and 2 have been reversed for the -r "right-handed" option.
332 This means that the Quit buton will be in the bottom left hand
337 v3.0 - patchlevel 23 - 22st May 1990.
339 * Fixed up repaint problem on monochrome screen when no selection was
340 made from the displayed popup menu.
342 * Added -r command line option to display a "right-handed" calculator.
344 * Removed unwanted -W? command line options.
346 * Updated the calctool manual page. The -r option was added and the
347 -Wi, -WP and -Wp options were removed because these are generic tool
352 v3.0 - patchlevel 22 - 19th May 1990.
354 * Added menu_showing kludge to xview.c, to prevent multiple repaints
359 v3.0 - patchlevel 21 - 12th May 1990.
361 * Entering numbers with more then 10 numeric places were being
362 converted incorrectly.
366 v3.0 - patchlevel 20 - 9th May 1990.
368 * XView calctool has been run through XSaber-C, and several changes
369 made because of the error messages produced.
371 * There was an uninitialised variable exp_sign in convert_display()
373 * The variable label, used to store the calctool labels was two
374 characters too small.
376 * In write_cf_value, the variable result was being written to. This
377 was clobbering the global variable called result, which was the
378 calculators current result. A local variable with the same name
381 * If the calculation 2+(3*(4+5)-6) was entered, the display should
382 not be adjusted until the last parenthisis is matched. This was not
383 the case, and has now been fixed.
387 v3.0 - patchlevel 19 - 7th May 1990.
389 * Calctool didn't correctly grey out buttons when run on a mono
392 * A -m option has been introduced to allow you to run in just black
393 and white on a color screen.
395 * Made sure that after a menu has been displayed, the grey area
396 repaint of the canvas occurs on an even pixel boundary.
400 v3.0 - patchlevel 18 - 2nd May 1990.
402 * The XView driver has been fixed so that the additional popup
403 frames don't "jiggle" about.
407 v3.0 - patchlevel 17 - 27th April 1990.
409 * The XView driver has been adjusted so that auxiliary frames are
410 only created if they are used.
414 v3.0 - patchlevel 16 - 20th April 1990.
416 * Added in the changes to include ds_position_popup, to successfully
417 position the popup windows.
419 * Buttons are now correctly stenciled.
423 v3.0 - patchlevel 15. - 17th April 1990.
425 * If the user presses left over a calctool button which has a menu
426 associated with it, then as much as possible of the default menu
427 item is now shown on the button label.
429 * References to DRAGING have been changed to DRAGGING.
431 * The mouse event code in process_event in graphics.c, has been
432 divided up into separate routines.
434 * If the left mouse button was pressed initially, when it wasn't
435 over a calctool button, then the OPEN LOOK mouse dragging effect
438 * If the right mouse button was pressed initially when it wasn't
439 over a calctool button which had a menu associated with it, then
440 the correct OPEN LOOK actions were not performed.
444 v3.0 - patchlevel 14. - 15th April 1990.
446 * A few things have been done to make calctool more OPEN LOOK.
447 These include only being able to SELECT with the left button.
448 The middle button has no effect. The right button is only
449 useful on buttons which have a menu associated with them.
450 If you click on the SELECT mouse button and drag the mouse
451 around, the calctool buttons invert and return to normal when
452 the mouse moves over them. Exiting the calctool window when
453 the mouse is being dragged, deselects the last button.
455 * If the users Clicks over a calctool button with the left mouse
456 button, and this calctool button has a menu associated with it,
457 then the default menu item value is selected. This has introduced
458 an extra field to the cmenus menu structure, which is the initial
461 * In scientific mode, 6 was being displayed as 6.00e+ instead of
466 v3.0 - patchlevel 13. - 26th March 1990.
468 * The ability to store values via the popup menu was broken by a
469 change in patch #11. This is now fixed.
473 v3.0 - patchlevel 12. - 22st March 1990.
475 * Clicking SELECT on the pane of the Memory Registers
476 window still displayed keys from the Calculator base window.
478 * If a number was being displayed in scientific notation in
479 hexidecimal, then the exponent'e' was being incorrectly converted
482 * The destroy_proc routine has been removed from both the XView and
483 the SunView drivers. This means that the X/NeWS command "Save
484 Workspace" now correctly works. The do_frame routine has been
487 * The incorrect result was being produced with the parenthesis code.
488 This was because the push_op and push_num routines were being
489 passed a negative index.
493 v3.0 - patchlevel 11. - 20th March 1990.
495 * If one of the following operators (+, -, x or /) was used in
496 between the sto operator and the register, then calctool would hang.
498 * Calctool was only allowing a certain maximum number of digits to
499 be entered in each base; 40 for binary, 15 for octal and 12 for
500 decimal and hexidecimal. This has been changed to allow upto
501 MAX_DIGITS (40) to be entered, irrespective of what base you are
502 in. Note that internal accuracy is lost above the number of digits
503 (40/bin, 15/oct, 12/dec, 12/hex).
505 * The exponent portion of scientific numbers displayed in binary was
510 v3.0 - patchlevel 10. - 16th March 1990.
512 * Both the XView and the SunView version now use a canvas repaint
513 handler which tries to repaint the smallest amount possible for the
514 main calctool canvas plus the canvas for the special mode.
516 * The titleline for the mode popup frame now has the initial letter
517 of each word capitalised.
519 * The "4" button was displaying as 4.. at certain times when the
520 main calctool frame was completely redrawn. This is now fixed.
522 * Redundant code has been removed, plus the comments in functions.c
527 v3.0 - patchlevel 9. - 15th March 1990.
529 * The title line now says "Calculator" and not "Calctool".
531 * All main calctool canvas and the mode popup canvas are now retained.
532 This should prevent the repaint events when a menu is poped up.
533 Note that calctool is still capable of correctly repainting itself,
534 should that retained canvas go away.
536 * The calctool buttons have been remade. The height is now 28 pixels
537 instead of 48 pixels. The XView version now uses the Lucida font
538 in various sizes. The menu glyph has been made slightly smaller to
539 be in proportion to the new sized buttons.
541 * The button labels can now contain upto four characters, plus
542 allowing room for the menu glyph. The labels now just have the
543 initially character in uppercase. Labels are now much more readable.
545 * The mode popup has changed shape. It's now two rows of eight columns
546 and fits in nicely below the main calctool window. The buttons have
547 been rearranged on this popup (in the various modes).
549 * The Mem and Asc keys now have the ... menu mark, to show that they
550 display popup frames.
552 * The title line of the memory register window now is "Memory
553 Registers" and not "Memory registers". This frame now comes up with
556 * Clicking SELECT on the register window no longer displays calctool
557 buttons on this window.
559 * Clicking on the Mem key when the memory register window is shown,
560 no longer removes it.
562 * The calctool.info file has been modified. All key names have been
563 changed from capital letters to just the initial letter in uppercase
564 with the rest in lowercase. Examples for all the financial functions
567 * The calctool display now shows characters typed in during parenthesis
572 v3.0 - patchlevel 8. - 1st March 1990.
574 * Parentheses have been fully implemented.
578 v3.0 - patchlevel 7. - 27th February 1990.
580 * The < and > shift operators have been moved to the logical popup.
581 The 1/x and x^2 keys have been moved to the main calctool frame.
583 * Keyboard handling has been fixed up so that all possible valid
584 keys are available from either the main calctool frame or the
585 current mode popup (if there is one).
587 * The calctool.info file has been updated for the new layout.
589 * The code for adding/altering constant/function popup menu values
590 has been simplified to solve a problem with the new value being
593 * The "business" mode has been renamed "financial" mode with a
594 corresponding letter 'f'. The "basic" mode letter has been changed
597 * Nine financial keys and their associated routines have been
598 included. The calctool.info file has been updated with descriptions
599 of these definitions.
601 * Just before the buttons table in calctool.c, a table of currently
602 used keyboard equivalents has been defined. This should make it
603 easier to show what ones are available for new functions.
605 * The variable array mem_vals has been renamed to mvals.
607 * More work has been done on the parentheses handling, but this is
612 v3.0 - patchlevel 6. - 23rd February 1990.
614 * The code for the "Enter Function/Constant" has been tested,
615 and is hopefully now bug free.
617 * Hooks for the parentheses code has been written.
619 * The calculator has had the logical functions moved into a
620 separate mode on the popup mode frame. One column has been
621 removed, and the keys rearranged. The SQRT key has been put
622 back on the main frame, and is now GREY0. So is the ASC key.
623 There are no buttons showing where there are no functions in
624 this position on the mode frames.
628 v3.0 - patchlevel 5. - 22nd February 1990.
630 * The CHANGES file has been updated for all patches.
632 * When there is no calculator mode, the "panel item" is set to
633 BASIC, not NONE. The keyboard equivalent is still 'n'.
635 * The auxiliary popup frames now come up correctly with the XView version.
637 * The display no longer truncates to 30 digits when in binary
638 mode. To achieve this, I've had to change the numeric display
639 font to cour.r.18 from cour.r.24.
641 * The code for the "Enter Function/Constant" has been written,
642 compiled and partially tested. It is not bug free yet though,
643 so shouldn't yet be used.
647 v3.0 - patchlevel 4. - 21st February 1990.
649 * Fixes up the calctool.info file.
651 * Fixes up the validkeys array (keys that can be validly pressed
652 after an error has occured).
654 * I've changes several calctool button keyboard equivalents, to
655 make the result more consistent. Buttons with menus, now tend
656 to have a capital letter equivalent, unless it's a special key
661 Button display Keyboard equivalent.
675 * Pressing the KEYS button now successfully changes the values on
676 the mode popup frame if it is displayed.
678 * Setting the calculator mode to NONE now correctly shows NONE in
681 * I have fixed up the .calctoolrc file for the key changes listed above.
683 * Do_help now has correct values when selecting help for items in
684 the popup calculator mode window.
686 * The last remaining pixwin call has been removed from the XView
687 driver and the handling of server images has been improved.
689 * The control character sequences in the function popup menu are
690 now correctly displayed.
692 * Repaint handlers have been added to the SunView and XView drivers,
693 and the hooks are in place to do minimal repaint.
697 v3.0 - patchlevel 3. - 20th February 1990.
699 * The ASC frame is now the correct size.
701 * The do_function routine now works correctly.
703 * The memory register window now displays correctly.
705 * The mode popup frame now correctly displays the new mode buttons
706 if the mode window was already being displayed.
708 * The SunView driver had an incorrect XV_SHOW; should have been a WIN_SHOW.
710 * Greying out of the redundant numeric keys is now handled differently.
712 * The shift keys will now shift upto 15 places.
714 * I've removed all the pixwin calls (except one) in the XView
715 driver. The colormap handling is now also done at the Xlib level.
717 * All the hooks are in place for the "New Constant" and "New
718 Function" entries in the constant and function menus.
722 v3.0 - patchlevel 2. - 19th February 1990.
724 * The mode keys are on a separate popup frame.
726 * The base values (BIN, OCT, DEC, HEX) are under one key with popup menu.
728 * The display values (ENG, FIX, SCI) are under one key with popup menu.
730 * The size of the calculators main frames is now 9 columns x 6 rows.
732 * RAND, TMv, HYP and INV have been moved to the scientific mode
733 frame which is now 4 columns x 4 rows. The TM is a button with
734 popup menu for the trig type values (DEG, GRAD and RAD).
736 * The frames no longer have resize corners. This will prevent the
737 user from resizing the calctool.
741 v3.0 - patchlevel 1. - 15th February 1990.
743 * Popup menus now use the default font.
745 * The SunView and the XView routines returned that the fonts were
746 of different widths, so I've rewritten the part of set_item that
747 shows the calculator display to use a get_strwidth, and then set
748 the string x position based on this.
750 * I've implemented context sensitive help.
752 * I've implemented the ASC key. I have a philosophical problem with
753 the current implementation. It should be possible to do every
754 calctool operation solely by using the keyboard. I've implemented
755 ASC this way in this new version.
757 * Updated calctool.info,rearranging the order to tie in with the
758 new button layout, and adding in help messages for all the new
761 * Removed all redundant code. This includes unwanted command line
762 option parsing, variables and routines associated with the help
765 * Started to tidy up the XView driver.
769 v3.0 - patchlevel 0. - 14th February 1990.
771 * New version passed over to the desktop group for comments.
773 * Started 8th February 1990.