Hello community, here is the log from the commit of package xcalc for openSUSE:Factory checked in at 2013-02-05 15:47:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xcalc (Old) and /work/SRC/openSUSE:Factory/.xcalc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xcalc", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/xcalc/xcalc.changes 2012-05-08 12:01:20.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.xcalc.new/xcalc.changes 2013-02-05 15:47:59.000000000 +0100 @@ -1,0 +2,16 @@ +Sat Jan 19 10:38:25 UTC 2013 - [email protected] + +- Update to version 1.0.5: + + Use table markup rather than tab stops. Aids DocBook + translation. + + Strip trailing whitespace. + + Add const to parse_double() args to fix gcc -Wwrite-strings + warnings. + + config: + - Move man pages into their own directory. + - Replace deprecated AC_HELP_STRING with AS_HELP_STRING. + + man: + - Replace hard coded man page section with substitution strings + - Remove trailing spaces and tabs. + +------------------------------------------------------------------- Old: ---- xcalc-1.0.4.1.tar.bz2 New: ---- xcalc-1.0.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xcalc.spec ++++++ --- /var/tmp/diff_new_pack.fxu5ln/_old 2013-02-05 15:48:00.000000000 +0100 +++ /var/tmp/diff_new_pack.fxu5ln/_new 2013-02-05 15:48:00.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package xcalc # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,13 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: xcalc -Version: 1.0.4.1 +Version: 1.0.5 Release: 0 -License: MIT Summary: Scientific calculator for X -Url: http://xorg.freedesktop.org/ +License: MIT Group: System/X11/Utilities +Url: http://xorg.freedesktop.org/ Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2 Source1: xcalc.desktop Source2: xcalc.png ++++++ xcalc-1.0.4.1.tar.bz2 -> xcalc-1.0.5.tar.bz2 ++++++ ++++ 11127 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/ChangeLog new/xcalc-1.0.5/ChangeLog --- old/xcalc-1.0.4.1/ChangeLog 2010-11-26 22:56:02.000000000 +0100 +++ new/xcalc-1.0.5/ChangeLog 2013-01-15 08:09:27.000000000 +0100 @@ -1,3 +1,75 @@ +commit 7e67bcb9563302f4e89be7a2afb1ae30c185689e +Author: Alan Coopersmith <[email protected]> +Date: Mon Jan 14 23:08:54 2013 -0800 + + xcalc 1.0.5 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit fa70ea30be4c1a13d553785da8f6e920471655d4 +Author: Eric S. Raymond <[email protected]> +Date: Thu Aug 23 06:12:20 2012 -0400 + + Use table markup rather than tab stops. Aids DocBook translation. + +commit 1e885381028c2e94a7f83a6489f11ed00f18b530 +Author: Alan Coopersmith <[email protected]> +Date: Wed Sep 28 20:28:31 2011 -0700 + + Strip trailing whitespace + + Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' + git diff -w & git diff -b show no diffs from this change + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit cad47868c99d4eac0ae2ad305399143a9aed3b2d +Author: Alan Coopersmith <[email protected]> +Date: Wed Sep 28 20:27:03 2011 -0700 + + Add const to parse_double() args to fix gcc -Wwrite-strings warnings + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit c8ef1bb20266365a46ea82dfff79c78b6c61337d +Author: Gaetan Nadon <[email protected]> +Date: Wed Jan 19 10:06:55 2011 -0500 + + config: move man pages into their own directory + + Use services provided by XORG_MANPAGE_SECTIONS. + Use standard Makefile for man pages. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit c9c8030e71d2a3d6663f177963d8dcf148a46067 +Author: Gaetan Nadon <[email protected]> +Date: Thu Jan 13 17:15:36 2011 -0500 + + man: replace hard coded man page section with substitution strings + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 8cc897e03ff972d2f2addf54ed54d014845cc9bb +Author: Gaetan Nadon <[email protected]> +Date: Thu Jan 13 11:15:47 2011 -0500 + + man: remove trailing spaces and tabs + + Using s/[ \t]*$// + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit d1dac5141b2398d5490453e0ff150b3db836a15f +Author: Gaetan Nadon <[email protected]> +Date: Wed Jan 12 15:29:49 2011 -0500 + + config: replace deprecated AC_HELP_STRING with AS_HELP_STRING + + This silences an Automake warning. + + Signed-off-by: Gaetan Nadon <[email protected]> + commit 2755eae3be5fc239da792c46a10426281ee77b85 Author: Alan Coopersmith <[email protected]> Date: Fri Nov 26 13:53:42 2010 -0800 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/Makefile.am new/xcalc-1.0.5/Makefile.am --- old/xcalc-1.0.4.1/Makefile.am 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/Makefile.am 2013-01-15 08:09:03.000000000 +0100 @@ -1,6 +1,6 @@ -# +# # Copyright 2005 Red Hat, Inc. -# +# # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ # specific, written prior permission. Red Hat makes no # representations about the suitability of this software for any purpose. It # is provided "as is" without express or implied warranty. -# +# # RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR @@ -19,6 +19,7 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. +SUBDIRS = man bin_PROGRAMS = xcalc AM_CFLAGS = $(XCALC_CFLAGS) $(CWARNFLAGS) @@ -30,9 +31,6 @@ xcalc.c \ xcalc.h -appman_PRE = \ - xcalc.man - # App default files (*.ad) DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults @@ -43,7 +41,7 @@ app-defaults/XCalc \ app-defaults/XCalc-color - +MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL @@ -55,16 +53,3 @@ dist-hook: ChangeLog INSTALL -appmandir = $(APP_MAN_DIR) - -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) - -EXTRA_DIST = $(appman_PRE) autogen.sh -MAINTAINERCLEANFILES = ChangeLog INSTALL -CLEANFILES = $(appman_DATA) - -SUFFIXES = .$(APP_MAN_SUFFIX) .man - -# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure -.man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/actions.c new/xcalc-1.0.5/actions.c --- old/xcalc-1.0.4.1/actions.c 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/actions.c 2013-01-15 08:09:03.000000000 +0100 @@ -167,7 +167,7 @@ clearf(); post_op(); } - + /*ARGSUSED*/ static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -258,7 +258,7 @@ oneop(kEXC); post_op(); } - + /*ARGSUSED*/ static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -274,7 +274,7 @@ invf(); post_op(); } - + /*ARGSUSED*/ static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -282,7 +282,7 @@ lparf(); post_op(); } - + /*ARGSUSED*/ static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -298,7 +298,7 @@ rpn ? twof(kMUL) : twoop(kMUL); post_op(); } - + /*ARGSUSED*/ static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -306,7 +306,7 @@ oneop(kLN); post_op(); } - + /*ARGSUSED*/ static void negate(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -328,7 +328,7 @@ offf(); post_op(); } - + /*ARGSUSED*/ static void pi(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -336,7 +336,7 @@ oneop(kPI); post_op(); } - + /*ARGSUSED*/ static void power(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -361,7 +361,7 @@ rpn ? memf(kRCL) : oneop(kRCL); post_op(); } - + /*ARGSUSED*/ static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -369,7 +369,7 @@ oneop(kRECIP); post_op(); } - + /*ARGSUSED*/ static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -377,7 +377,7 @@ rparf(); post_op(); } - + /*ARGSUSED*/ static void roll(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -423,7 +423,7 @@ oneop(kSQRT); post_op(); } - + /*ARGSUSED*/ static void store(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -439,7 +439,7 @@ rpn ? twof(kSUB) : twoop(kSUB); post_op(); } - + /*ARGSUSED*/ static void sum(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -447,7 +447,7 @@ rpn ? memf(kSUM) : oneop(kSUM); post_op(); } - + /*ARGSUSED*/ static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -455,7 +455,7 @@ oneop(kTAN); post_op(); } - + /*ARGSUSED*/ static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -463,7 +463,7 @@ oneop(k10X); post_op(); } - + /*ARGSUSED*/ static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/app-defaults/XCalc new/xcalc-1.0.5/app-defaults/XCalc --- old/xcalc-1.0.4.1/app-defaults/XCalc 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/app-defaults/XCalc 2013-01-15 08:09:03.000000000 +0100 @@ -197,7 +197,7 @@ XCalc*ti.button40.label: = XCalc*ti.button40.translations: #override<Btn1Down>,<Btn1Up>:equal()unset() -XCalc*ti.button1.horizDistance: 4 +XCalc*ti.button1.horizDistance: 4 XCalc*ti.button1.vertDistance: 12 XCalc*ti.button1.fromVert: bevel XCalc*ti.button2.fromHoriz: button1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/autogen.sh new/xcalc-1.0.5/autogen.sh --- old/xcalc-1.0.4.1/autogen.sh 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/autogen.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -#! /bin/sh - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd $srcdir - -autoreconf -v --install || exit 1 -cd $ORIGDIR || exit $? - -$srcdir/configure --enable-maintainer-mode "$@" - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/configure.ac new/xcalc-1.0.5/configure.ac --- old/xcalc-1.0.4.1/configure.ac 2010-11-26 22:53:30.000000000 +0100 +++ new/xcalc-1.0.5/configure.ac 2013-01-15 08:09:03.000000000 +0100 @@ -1,6 +1,6 @@ dnl Copyright 2005 Red Hat, Inc. -dnl +dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ dnl specific, written prior permission. Red Hat makes no dnl representations about the suitability of this software for any purpose. It dnl is provided "as is" without express or implied warranty. -dnl +dnl dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xcalc], [1.0.4.1], +AC_INIT([xcalc], [1.0.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xcalc]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -44,10 +44,13 @@ PKG_CHECK_MODULES(APPDEFS, xt) xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` AC_ARG_WITH(appdefaultdir, - AC_HELP_STRING([--with-appdefaultdir=<pathname>], + AS_HELP_STRING([--with-appdefaultdir=<pathname>], [specify directory for app-defaults files (default is autodetected)]), [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) AC_SUBST(appdefaultdir) -AC_OUTPUT([Makefile]) +AC_CONFIG_FILES([ + Makefile + man/Makefile]) +AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/man/Makefile.am new/xcalc-1.0.5/man/Makefile.am --- old/xcalc-1.0.4.1/man/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/xcalc-1.0.5/man/Makefile.am 2013-01-15 08:09:03.000000000 +0100 @@ -0,0 +1,12 @@ + +appmandir = $(APP_MAN_DIR) +appman_PRE = xcalc.man +appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) + +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +.man.$(APP_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/man/xcalc.man new/xcalc-1.0.5/man/xcalc.man --- old/xcalc-1.0.4.1/man/xcalc.man 1970-01-01 01:00:00.000000000 +0100 +++ new/xcalc-1.0.5/man/xcalc.man 2013-01-15 08:09:03.000000000 +0100 @@ -0,0 +1,445 @@ +.\" t +.\" Copyright (c) 1994 X Consortium +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation the rights to use, copy, modify, merge, publish, +.\" distribute, sublicense, and/or sell copies of the Software, and to +.\" permit persons to whom the Software is furnished to do so, subject to +.\" the following conditions: +.\" +.\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.\" Except as contained in this notice, the name of the X Consortium shall +.\" not be used in advertising or otherwise to promote the sale, use or +.\" other dealings in this Software without prior written authorization +.\" from the X Consortium. +.\" +.\" +.de EX \"Begin example +.ne 5 +.if n .sp 1 +.if t .sp .5 +.nf +.in +.5i +.. +.de EE +.fi +.in -.5i +.if n .sp 1 +.if t .sp .5 +.. +.TH XCALC 1 __xorgversion__ +.SH NAME +xcalc \- scientific calculator for X +.SH SYNOPSIS +.B xcalc +[-stipple] [-rpn] [-\fItoolkitoption...\fP] +.SH DESCRIPTION +.I xcalc +is a scientific calculator desktop accessory that can emulate a TI-30 +or an HP-10C. +.SH OPTIONS +.PP +\fIxcalc\fP accepts all of the standard toolkit command line options along +with two additional options: +.PP +.TP 8 +.B \-stipple +This option indicates that the background of the calculator should be +drawn using a stipple of the foreground and background colors. On monochrome +displays improves the appearance. +.PP +.TP 8 +.B \-rpn +This option indicates that Reverse Polish Notation should be used. In this +mode the calculator will look and behave like an HP-10C. Without this flag, +it will emulate a TI-30. +.SH OPERATION +.PP +.I Pointer Usage: +Operations may be performed with pointer button 1, or in some cases, +with the keyboard. +Many common calculator operations have keyboard accelerators. +To quit, press pointer button 3 on the AC key of the TI calculator, +or the ON key of the HP calculator. +.PP +.I Calculator Key Usage (TI mode): +The numbered keys, the +/- key, and the +, -, *, /, and = keys all do exactly +what you would expect them to. It should be noted that the operators obey +the standard rules of precedence. Thus, entering "3+4*5=" results in "23", +not "35". The parentheses can be used to override this. For example, +"(1+2+3)*(4+5+6)=" results in "6*15=90". +.PP +The entire number in the calculator display can be selected, in order to +paste the result of a calculation into text. +.PP +The action procedures associated with each function are given below. These +are useful if you are interested in defining a custom calculator. +The action used for all digit keys is \fBdigit(\fIn\fP)\fR, where \fIn\fR +is the corresponding digit, 0..9. +.TP 10 +.B 1/x +Replaces the number in the display with its reciprocal. +The corresponding action procedure is \fBreciprocal()\fR. +.TP 10 +.B x^2 +Squares the number in the display. +The corresponding action procedure is \fBsquare()\fR. +.TP 10 +.B SQRT +Takes the square root of the number in the display. +The corresponding action procedure is \fBsquareRoot()\fR. +.TP 10 +.B CE/C +When pressed once, clears the number in the display without clearing the state +of the machine. Allows you to re-enter a number if you make a mistake. +Pressing it twice clears the state, also. +The corresponding action procedure for TI mode is \fBclear()\fR. +.TP 10 +.B AC +Clears the display, the state, and the memory. Pressing it with the third +pointer button turns off the calculator, in that it exits the program. +The action procedure to clear the state is \fBoff()\fR; to quit, \fBquit()\fR. +.TP 10 +.B INV +Invert function. See the individual function keys for details. +The corresponding action procedure is \fBinverse()\fR. +.TP 10 +.B sin +Computes the sine of the number in the display, as interpreted by the current +DRG mode (see DRG, below). If inverted, it computes the arcsine. +The corresponding action procedure is \fBsine()\fR. +.TP 10 +.B cos +Computes the cosine, or arccosine when inverted. +The corresponding action procedure is \fBcosine()\fP. +.TP 10 +.B tan +Computes the tangent, or arctangent when inverted. +The corresponding action procedure is \fBtangent()\fP. +.TP 10 +.B DRG +Changes the DRG mode, as indicated by 'DEG', 'RAD', or 'GRAD' at the bottom of +of the calculator ``liquid crystal'' display. +When in 'DEG' mode, numbers in the display are taken as being +degrees. In 'RAD' mode, numbers are in radians, and in 'GRAD' mode, numbers +are in grads. When inverted, the DRG key has a feature of +converting degrees to radians to grads and vice-versa. Example: put the +calculator into 'DEG' mode, and enter "45 INV DRG". The display should now +show something along the lines of ".785398", which is 45 degrees converted to +radians. +The corresponding action procedure is \fBdegree()\fP. +.TP 10 +.B e +The constant 'e'. (2.7182818...). +The corresponding action procedure is \fBe()\fR. +.TP 10 +.B EE +Used for entering exponential numbers. For example, to get "-2.3E-4" you'd +enter "2 . 3 +/- EE 4 +/-". +The corresponding action procedure is \fBscientific()\fR. +.TP 10 +.B log +Calculates the log (base 10) of the number in the display. When inverted, +it raises "10.0" to the number in the display. +For example, entering "3 INV log" should result in "1000". +The corresponding action procedure is \fBlogarithm()\fP. +.TP 10 +.B ln +Calculates the log (base e) of the number in the display. When inverted, +it raises "e" to the number in the display. For example, entering "e ln" +should result in "1". +The corresponding action procedure is \fBnaturalLog()\fR. +.TP 10 +.B y^x +Raises the number on the left to the power of the number on the right. For +example "2 y^x 3 =" results in "8", which is 2^3. For a further example, +"(1+2+3) y^x (1+2) =" equals "6 y^x 3" which equals "216". +The corresponding action procedure is \fBpower()\fR. +.TP 10 +.B PI +The constant 'pi'. (3.1415927....) +The corresponding action procedure is \fBpi()\fR. +.TP 10 +.B x! +Computes the factorial of the number in the display. The number in the display +must be an integer in the range 0-500, though, depending on your math library, +it might overflow long before that. +The corresponding action procedure is \fBfactorial()\fR. +.TP 10 +.B ( +Left parenthesis. The corresponding action procedure for TI calculators +is \fBleftParen()\fR. +.TP 10 +.B ) +Right parenthesis. The corresponding action procedure for TI calculators +is \fBrightParen()\fR. +.TP 10 +.B / +Division. The corresponding action procedure is \fBdivide()\fR. +.TP 10 +.B * +Multiplication. The corresponding action procedure is \fBmultiply()\fR. +.TP 10 +.B - +Subtraction. The corresponding action procedure is \fBsubtract()\fR. +.TP 10 +.B + +Addition. The corresponding action procedure is \fBadd()\fR. +.TP 10 +.B = +Perform calculation. The TI-specific action procedure is \fBequal()\fR. +.TP 10 +.B STO +Copies the number in the display to the memory location. +The corresponding action procedure is \fBstore()\fR. +.TP 10 +.B RCL +Copies the number from the memory location to the display. +The corresponding action procedure is \fBrecall()\fR. +.TP 10 +.B SUM +Adds the number in the display to the number in the memory location. +The corresponding action procedure is \fBsum()\fR. +.TP 10 +.B EXC +Swaps the number in the display with the number in the memory location. +The corresponding action procedure for the TI calculator is \fBexchange()\fR. +.TP 10 +.B +/- +Negate; change sign. The corresponding action procedure is \fBnegate()\fR. +.TP 10 +.B . +Decimal point. The action procedure is \fBdecimal()\fP. +.sp +.PP +.I Calculator Key Usage (RPN mode): +The number keys, CHS (change sign), +, -, *, /, and ENTR keys all do exactly +what you would expect them to do. Many of the remaining keys are the same as +in TI mode. The differences are detailed below. The action procedure +for the ENTR key is \fBenter()\fR. +.sp +.TP 10 +.B <- +This is a backspace key that can be used if you make a mistake while entering +a number. It will erase digits from the display. (See BUGS). +Inverse backspace will clear the X register. +The corresponding action procedure is \fBback()\fR. +.TP 10 +.B ON +Clears the display, the state, and the memory. Pressing it with the third +pointer button turns off the calculator, in that it exits the program. +To clear state, the action procedure is \fBoff\fR; to quit, \fBquit()\fR. +.TP 10 +.B INV +Inverts the meaning of the function keys. This would be the \fIf\fR key +on an HP calculator, but \fIxcalc\fR does not display +multiple legends on each key. See the individual function keys for details. +.TP 10 +.B 10^x +Raises "10.0" to the number in the top of the stack. +When inverted, it calculates the log (base 10) of the number in the display. +The corresponding action procedure is \fBtenpower()\fR. +.TP 10 +.B e^x +Raises "e" to the number in the top of the stack. +When inverted, it calculates the log (base e) of the number in the display. +The action procedure is \fBepower()\fR. +.TP 10 +.B STO +Copies the number in the top of the stack to a memory location. There are 10 +memory locations. The desired memory is specified by following this +key with a digit key. +.TP 10 +.B RCL +Pushes the number from the specified memory location onto the stack. +.TP 10 +.B SUM +Adds the number on top of the stack to the number in the specified +memory location. +.TP 10 +.B x:y +Exchanges the numbers in the top two stack positions, the X and Y registers. +The corresponding action procedure is \fBXexchangeY()\fR. +.TP 10 +.B R v +Rolls the stack downward. When inverted, it rolls the stack upward. +The corresponding action procedure is \fBroll()\fR. +.TP 10 +.I blank +These keys were used for programming functions on the HP-10C. Their +functionality has not been duplicated in \fIxcalc\fR. +.PP +Finally, there are two additional action procedures: +\fBbell()\fR, which rings the bell; +and \fBselection()\fR, which performs a cut on the +entire number in the calculator's ``liquid crystal'' display. +.SH ACCELERATORS +.PP +Accelerators are shortcuts for entering commands. \fIxcalc\fP provides +some sample keyboard accelerators; also users can customize accelerators. +The numeric keypad accelerators provided by \fIxcalc\fP +should be intuitively correct. +The accelerators defined by \fIxcalc\fP on the main keyboard are given below: +.PP +.TS +l l l l l. +TI Key HP Key Keyboard Accelerator TI Function HP Function +_ +SQRT SQRT r squareRoot() squareRoot() +AC ON space clear() clear() +AC <- Delete clear() back() +AC <- Backspace clear() back() +AC <- Control-H clear() back() +AC Clear clear() +AC ON q quit() quit() +AC ON Control-C quit() quit() + +INV i i inverse() inverse() +sin s s sine() sine() +cos c c cosine() cosine() +tan t t tangent() tangent() +DRG DRG d degree() degree() + +e e e() +ln ln l naturalLog() naturalLog() +y^x y^x ^ power() power() + +PI PI p pi() pi() +x! x! ! factorial() factorial() +( ( leftParen() +) ) rightParen() + +/ / / divide() divide() +* * * multiply() multiply() +- - - subtract() subtract() ++ + + add() add() +\&= \&= equal() + +0..9 0..9 0..9 digit() digit() +. . . decimal() decimal() ++/- CHS n negate() negate() + + x:y x XexchangeY() + ENTR Return enter() + ENTR Linefeed enter() +.TE +.PP +.SH CUSTOMIZATION +The application class name is XCalc. +.PP +\fIxcalc\fP has an enormous application defaults file which specifies +the position, label, and function of each key on the calculator. +It also gives translations to serve as keyboard accelerators. +Because these resources are not specified in the source code, you can create +a customized calculator by writing a private application defaults file, +using the Athena Command and Form widget resources to specify the size and +position of buttons, the label for each button, and the function of +each button. +.PP +The foreground and background colors of each calculator key can be +individually specified. +For the TI calculator, a classical color resource specification might be: +.sp +.br +XCalc.ti.Command.background: gray50 +.br +XCalc.ti.Command.foreground: white +.sp +For each of buttons 20, 25, 30, 35, and 40, specify: +.br +XCalc.ti.button20.background: black +.br +XCalc.ti.button20.foreground: white +.sp +For each of buttons 22, 23, 24, 27, 28, 29, 32, 33, 34, 37, 38, and 39: +.br +XCalc.ti.button22.background: white +.br +XCalc.ti.button22.foreground: black +.SH WIDGET HIERARCHY +In order to specify resources, it is useful to know the hierarchy of +the widgets which compose \fIxcalc\fR. In the notation below, +indentation indicates hierarchical structure. The widget class name +is given first, followed by the widget instance name. +.nf +.ft CW +XCalc xcalc + Form ti \fIor\fR hp \fI(the name depends on the mode)\fR + Form bevel + Form screen + Label M + Toggle LCD + Label INV + Label DEG + Label RAD + Label GRAD + Label P + Command button1 + Command button2 + Command button3 +\fIand so on, ...\fR + Command button38 + Command button39 + Command button40 +.ft +.fi +.SH APPLICATION RESOURCES +.PP +.TP 8 +\fBrpn\fR (Class \fBRpn\fR) +Specifies that the rpn mode should be used. The default is TI mode. +.TP 8 +\fBstipple\fR (Class \fBStipple\fR) +Indicates that the background should be stippled. The default is ``on'' +for monochrome displays, and ``off'' for color displays. +.TP 8 +\fBcursor\fR (Class \fBCursor\fR) +The name of the symbol used to represent the pointer. +The default is ``hand2''. +.fi +.SH COLORS +If you would like xcalc to use its ti colors, include the following +in the #ifdef COLOR section of the file you read with xrdb: +.sp 1 +*customization: -color +.sp 1 +.br +This will cause xcalc to pick up the colors in the app-defaults color +customization file: +.IR __apploaddir__/XCalc-color . +.fi +.SH "SEE ALSO" +X(__miscmansuffix__), xrdb(__appmansuffix__), the Athena Widget Set +.SH BUGS +.PP +HP mode is not completely debugged. In particular, the stack is +not handled properly after errors. +.SH COPYRIGHT +Copyright 1994 X Consortium +.br +See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions. +.SH AUTHORS +John Bradley, University of Pennsylvania +.br +Mark Rosenstein, MIT Project Athena +.br +Donna Converse, MIT X Consortium +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +.\" Local Variables: +.\" mode: nroff +.\" tab-width: 15 +.\" End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/math.c new/xcalc-1.0.5/math.c --- old/xcalc-1.0.4.1/math.c 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/math.c 2013-01-15 08:09:03.000000000 +0100 @@ -8,9 +8,9 @@ * RPN mode added and port to X11 by Mark Rosenstein, MIT Project Athena * * Modified to be a client of the Xt toolkit and the Athena widget set by - * Donna Converse, MIT X Consortium. This is all that remains of the + * Donna Converse, MIT X Consortium. This is all that remains of the * original calculator, and it still needs to be rewritten. The HP - * functionality should be separated from the TI functionality. + * functionality should be separated from the TI functionality. * Beware the HP functions: there are still errors here. * * Geoffrey Coram fixed most of the HP mode bugs. @@ -62,7 +62,7 @@ jmp_buf env; #endif - + /* This section is all of the state machine that implements the calculator * functions. Much of it is shared between the infix and rpn modes. */ @@ -73,7 +73,7 @@ static double rad2drg=180.0/PI; static int entered=1; /* true if display contains a valid number. if==2, then use 'dnum', rather than the string - stored in the display. (for accuracy) + stored in the display. (for accuracy) if==3, then error occurred, only CLR & AC work */ /* entered seems to be overloaded - dmc */ static int lift_enabled = 0; /* for rpn mode only */ @@ -104,12 +104,12 @@ /* * The following is to deal with the unfortunate assumption that if errno - * is non-zero then an error has occurred. On some systems (e.g. Ultrix), + * is non-zero then an error has occurred. On some systems (e.g. Ultrix), * sscanf will call lower level routines that will set errno. */ static void -parse_double (char *src, char *fmt, double *dp) +parse_double (const char *src, const char *fmt, double *dp) { int olderrno = errno; @@ -123,7 +123,7 @@ int pre_op(int keynum) { if (keynum==-1) return(0); - + errno = 0; /* for non-IEEE machines */ if ( (entered==3) && !(keynum==kCLR || keynum==kOFF)) { @@ -203,7 +203,7 @@ char *estr = index(dispstr,'e'); /* search for exponent part */ if (!estr) dispstr[12]='\0'; /* no exp, just trunc. */ else { - if ((int) strlen(estr) <= 4) + if ((int) strlen(estr) <= 4) sprintf(tmp,"%.8s",dispstr); /* leftmost 8 chars */ else sprintf(tmp,"%.7s",dispstr); /* leftmost 7 chars */ @@ -280,7 +280,7 @@ } if ((int) strlen(dispstr) >= MAXDISP) return; - + switch (keynum){ case kONE: st[0] = '1'; break; case kTWO: st[0] = '2'; break; @@ -328,7 +328,7 @@ #else if (dispstr[strlen(dispstr)-1] == '.') Dpoint=0; -#endif +#endif dispstr[strlen(dispstr)-1] = 0; } if (strlen(dispstr) == 0) { @@ -444,7 +444,7 @@ PushOp(keynum); /* with the new one */ return; } - + if (entered==1) parse_double(dispstr,"%lf",&dnum); @@ -463,9 +463,9 @@ /* now, if the current op (keynum) is of higher priority than the lastop, the current - op and number are just pushed on top + op and number are just pushed on top Priorities: (Y^X) > *,/ > +,- */ - + if (priority(keynum) > priority(lastop)) { PushNum(dnum); PushOp(lastop); @@ -490,8 +490,8 @@ else { /* op stack is empty, push op and num */ PushOp(keynum); PushNum(dnum); - } -} + } +} /* Two operand functions for rpn calc */ void @@ -583,7 +583,7 @@ sprintf(dispstr,"%.8g",dnum); DrawDisplay(); } - + void lparf(void) { @@ -618,7 +618,7 @@ if (!flagPAREN) return; - + clrdisp++; Dpoint=exponent=0; @@ -669,7 +669,7 @@ flagINV=0; sprintf(dispstr,"%.8g",dnum); } - + flagINV=0; drgmode = (drgmode + 1) % 3; switch (drgmode) { @@ -751,11 +751,11 @@ break; } dtmp = floor(dnum); i = dtmp; - for (j=1,dnum=1.0; j<=i; j++) + for (j=1,dnum=1.0; j<=i; j++) dnum*=(float) j; break; } - + if (entered==3) { /* error */ DrawDisplay(); return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/xcalc.c new/xcalc-1.0.5/xcalc.c --- old/xcalc-1.0.4.1/xcalc.c 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/xcalc.c 2013-01-15 08:09:03.000000000 +0100 @@ -68,7 +68,7 @@ Atom wm_delete_window; /* see ICCCM section 5.2.2 */ /* - * local data + * local data */ static Display *dpy = NULL; /* connection to the X server */ static Widget toplevel=NULL; /* top level shell widget */ @@ -120,7 +120,7 @@ toplevel = XtAppInitialize(&xtcontext, "XCalc", Options, XtNumber(Options), &argc, argv, NULL, NULL, 0); if (argc != 1) Syntax(argc, argv); - + XtSetArg(args[0], XtNinput, True); XtSetValues(toplevel, args, ONE); @@ -131,7 +131,7 @@ XtAppAddActions(xtcontext, Actions, ActionsCount); - XtOverrideTranslations(toplevel, + XtOverrideTranslations(toplevel, XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()\n")); XtRealizeWidget(toplevel); @@ -203,7 +203,7 @@ XtNumber(args)); /* INV - the inverse function indicator */ - ind[XCalc_INVERSE] = XtCreateManagedWidget("INV", labelWidgetClass, + ind[XCalc_INVERSE] = XtCreateManagedWidget("INV", labelWidgetClass, screen, args, XtNumber(args)); /* DEG - the degrees switch indicator */ @@ -225,8 +225,8 @@ /* * Do all the buttons. The application defaults file will give the - * default button placement, default button labels, and default - * actions connected to the buttons. The user can change any of + * default button placement, default button labels, and default + * actions connected to the buttons. The user can change any of * these defaults in an environment-specific resource file. */ @@ -292,7 +292,7 @@ exit(0); } -/* +/* * recite and die. */ static void Syntax(int argc, char **argv) @@ -311,7 +311,7 @@ exit(1); } -/* +/* * I use actions on the toggle widget to support selections. This * means that the user may not do a partial selection of the number * displayed in the `liquid crystal display.' Copying numbers into diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xcalc-1.0.4.1/xcalc.man new/xcalc-1.0.5/xcalc.man --- old/xcalc-1.0.4.1/xcalc.man 2010-11-26 22:38:46.000000000 +0100 +++ new/xcalc-1.0.5/xcalc.man 1970-01-01 01:00:00.000000000 +0100 @@ -1,437 +0,0 @@ -.\" Copyright (c) 1994 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining -.\" a copy of this software and associated documentation files (the -.\" "Software"), to deal in the Software without restriction, including -.\" without limitation the rights to use, copy, modify, merge, publish, -.\" distribute, sublicense, and/or sell copies of the Software, and to -.\" permit persons to whom the Software is furnished to do so, subject to -.\" the following conditions: -.\" -.\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealings in this Software without prior written authorization -.\" from the X Consortium. -.\" -.\" -.de EX \"Begin example -.ne 5 -.if n .sp 1 -.if t .sp .5 -.nf -.in +.5i -.. -.de EE -.fi -.in -.5i -.if n .sp 1 -.if t .sp .5 -.. -.TH XCALC 1 __xorgversion__ -.SH NAME -xcalc \- scientific calculator for X -.SH SYNOPSIS -.B xcalc -[-stipple] [-rpn] [-\fItoolkitoption...\fP] -.SH DESCRIPTION -.I xcalc -is a scientific calculator desktop accessory that can emulate a TI-30 -or an HP-10C. -.SH OPTIONS -.PP -\fIxcalc\fP accepts all of the standard toolkit command line options along -with two additional options: -.PP -.TP 8 -.B \-stipple -This option indicates that the background of the calculator should be -drawn using a stipple of the foreground and background colors. On monochrome -displays improves the appearance. -.PP -.TP 8 -.B \-rpn -This option indicates that Reverse Polish Notation should be used. In this -mode the calculator will look and behave like an HP-10C. Without this flag, -it will emulate a TI-30. -.SH OPERATION -.PP -.I Pointer Usage: -Operations may be performed with pointer button 1, or in some cases, -with the keyboard. -Many common calculator operations have keyboard accelerators. -To quit, press pointer button 3 on the AC key of the TI calculator, -or the ON key of the HP calculator. -.PP -.I Calculator Key Usage (TI mode): -The numbered keys, the +/- key, and the +, -, *, /, and = keys all do exactly -what you would expect them to. It should be noted that the operators obey -the standard rules of precedence. Thus, entering "3+4*5=" results in "23", -not "35". The parentheses can be used to override this. For example, -"(1+2+3)*(4+5+6)=" results in "6*15=90". -.PP -The entire number in the calculator display can be selected, in order to -paste the result of a calculation into text. -.PP -The action procedures associated with each function are given below. These -are useful if you are interested in defining a custom calculator. -The action used for all digit keys is \fBdigit(\fIn\fP)\fR, where \fIn\fR -is the corresponding digit, 0..9. -.TP 10 -.B 1/x -Replaces the number in the display with its reciprocal. -The corresponding action procedure is \fBreciprocal()\fR. -.TP 10 -.B x^2 -Squares the number in the display. -The corresponding action procedure is \fBsquare()\fR. -.TP 10 -.B SQRT -Takes the square root of the number in the display. -The corresponding action procedure is \fBsquareRoot()\fR. -.TP 10 -.B CE/C -When pressed once, clears the number in the display without clearing the state -of the machine. Allows you to re-enter a number if you make a mistake. -Pressing it twice clears the state, also. -The corresponding action procedure for TI mode is \fBclear()\fR. -.TP 10 -.B AC -Clears the display, the state, and the memory. Pressing it with the third -pointer button turns off the calculator, in that it exits the program. -The action procedure to clear the state is \fBoff()\fR; to quit, \fBquit()\fR. -.TP 10 -.B INV -Invert function. See the individual function keys for details. -The corresponding action procedure is \fBinverse()\fR. -.TP 10 -.B sin -Computes the sine of the number in the display, as interpreted by the current -DRG mode (see DRG, below). If inverted, it computes the arcsine. -The corresponding action procedure is \fBsine()\fR. -.TP 10 -.B cos -Computes the cosine, or arccosine when inverted. -The corresponding action procedure is \fBcosine()\fP. -.TP 10 -.B tan -Computes the tangent, or arctangent when inverted. -The corresponding action procedure is \fBtangent()\fP. -.TP 10 -.B DRG -Changes the DRG mode, as indicated by 'DEG', 'RAD', or 'GRAD' at the bottom of -of the calculator ``liquid crystal'' display. -When in 'DEG' mode, numbers in the display are taken as being -degrees. In 'RAD' mode, numbers are in radians, and in 'GRAD' mode, numbers -are in grads. When inverted, the DRG key has a feature of -converting degrees to radians to grads and vice-versa. Example: put the -calculator into 'DEG' mode, and enter "45 INV DRG". The display should now -show something along the lines of ".785398", which is 45 degrees converted to -radians. -The corresponding action procedure is \fBdegree()\fP. -.TP 10 -.B e -The constant 'e'. (2.7182818...). -The corresponding action procedure is \fBe()\fR. -.TP 10 -.B EE -Used for entering exponential numbers. For example, to get "-2.3E-4" you'd -enter "2 . 3 +/- EE 4 +/-". -The corresponding action procedure is \fBscientific()\fR. -.TP 10 -.B log -Calculates the log (base 10) of the number in the display. When inverted, -it raises "10.0" to the number in the display. -For example, entering "3 INV log" should result in "1000". -The corresponding action procedure is \fBlogarithm()\fP. -.TP 10 -.B ln -Calculates the log (base e) of the number in the display. When inverted, -it raises "e" to the number in the display. For example, entering "e ln" -should result in "1". -The corresponding action procedure is \fBnaturalLog()\fR. -.TP 10 -.B y^x -Raises the number on the left to the power of the number on the right. For -example "2 y^x 3 =" results in "8", which is 2^3. For a further example, -"(1+2+3) y^x (1+2) =" equals "6 y^x 3" which equals "216". -The corresponding action procedure is \fBpower()\fR. -.TP 10 -.B PI -The constant 'pi'. (3.1415927....) -The corresponding action procedure is \fBpi()\fR. -.TP 10 -.B x! -Computes the factorial of the number in the display. The number in the display -must be an integer in the range 0-500, though, depending on your math library, -it might overflow long before that. -The corresponding action procedure is \fBfactorial()\fR. -.TP 10 -.B ( -Left parenthesis. The corresponding action procedure for TI calculators -is \fBleftParen()\fR. -.TP 10 -.B ) -Right parenthesis. The corresponding action procedure for TI calculators -is \fBrightParen()\fR. -.TP 10 -.B / -Division. The corresponding action procedure is \fBdivide()\fR. -.TP 10 -.B * -Multiplication. The corresponding action procedure is \fBmultiply()\fR. -.TP 10 -.B - -Subtraction. The corresponding action procedure is \fBsubtract()\fR. -.TP 10 -.B + -Addition. The corresponding action procedure is \fBadd()\fR. -.TP 10 -.B = -Perform calculation. The TI-specific action procedure is \fBequal()\fR. -.TP 10 -.B STO -Copies the number in the display to the memory location. -The corresponding action procedure is \fBstore()\fR. -.TP 10 -.B RCL -Copies the number from the memory location to the display. -The corresponding action procedure is \fBrecall()\fR. -.TP 10 -.B SUM -Adds the number in the display to the number in the memory location. -The corresponding action procedure is \fBsum()\fR. -.TP 10 -.B EXC -Swaps the number in the display with the number in the memory location. -The corresponding action procedure for the TI calculator is \fBexchange()\fR. -.TP 10 -.B +/- -Negate; change sign. The corresponding action procedure is \fBnegate()\fR. -.TP 10 -.B . -Decimal point. The action procedure is \fBdecimal()\fP. -.sp -.PP -.I Calculator Key Usage (RPN mode): -The number keys, CHS (change sign), +, -, *, /, and ENTR keys all do exactly -what you would expect them to do. Many of the remaining keys are the same as -in TI mode. The differences are detailed below. The action procedure -for the ENTR key is \fBenter()\fR. -.sp -.TP 10 -.B <- -This is a backspace key that can be used if you make a mistake while entering -a number. It will erase digits from the display. (See BUGS). -Inverse backspace will clear the X register. -The corresponding action procedure is \fBback()\fR. -.TP 10 -.B ON -Clears the display, the state, and the memory. Pressing it with the third -pointer button turns off the calculator, in that it exits the program. -To clear state, the action procedure is \fBoff\fR; to quit, \fBquit()\fR. -.TP 10 -.B INV -Inverts the meaning of the function keys. This would be the \fIf\fR key -on an HP calculator, but \fIxcalc\fR does not display -multiple legends on each key. See the individual function keys for details. -.TP 10 -.B 10^x -Raises "10.0" to the number in the top of the stack. -When inverted, it calculates the log (base 10) of the number in the display. -The corresponding action procedure is \fBtenpower()\fR. -.TP 10 -.B e^x -Raises "e" to the number in the top of the stack. -When inverted, it calculates the log (base e) of the number in the display. -The action procedure is \fBepower()\fR. -.TP 10 -.B STO -Copies the number in the top of the stack to a memory location. There are 10 -memory locations. The desired memory is specified by following this -key with a digit key. -.TP 10 -.B RCL -Pushes the number from the specified memory location onto the stack. -.TP 10 -.B SUM -Adds the number on top of the stack to the number in the specified -memory location. -.TP 10 -.B x:y -Exchanges the numbers in the top two stack positions, the X and Y registers. -The corresponding action procedure is \fBXexchangeY()\fR. -.TP 10 -.B R v -Rolls the stack downward. When inverted, it rolls the stack upward. -The corresponding action procedure is \fBroll()\fR. -.TP 10 -.I blank -These keys were used for programming functions on the HP-10C. Their -functionality has not been duplicated in \fIxcalc\fR. -.PP -Finally, there are two additional action procedures: -\fBbell()\fR, which rings the bell; -and \fBselection()\fR, which performs a cut on the -entire number in the calculator's ``liquid crystal'' display. -.SH ACCELERATORS -.PP -Accelerators are shortcuts for entering commands. \fIxcalc\fP provides -some sample keyboard accelerators; also users can customize accelerators. -The numeric keypad accelerators provided by \fIxcalc\fP -should be intuitively correct. -The accelerators defined by \fIxcalc\fP on the main keyboard are given below: -.PP -.nf -.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i - TI Key HP Key Keyboard Accelerator TI Function HP Function - - SQRT SQRT r squareRoot() squareRoot() - AC ON space clear() clear() - AC <- Delete clear() back() - AC <- Backspace clear() back() - AC <- Control-H clear() back() - AC Clear clear() - AC ON q quit() quit() - AC ON Control-C quit() quit() - - INV i i inverse() inverse() - sin s s sine() sine() - cos c c cosine() cosine() - tan t t tangent() tangent() - DRG DRG d degree() degree() - - e e e() - ln ln l naturalLog() naturalLog() - y^x y^x ^ power() power() - - PI PI p pi() pi() - x! x! ! factorial() factorial() - ( ( leftParen() - ) ) rightParen() - - / / / divide() divide() - * * * multiply() multiply() - - - - subtract() subtract() - + + + add() add() - = = equal() - - 0..9 0..9 0..9 digit() digit() - . . . decimal() decimal() - +/- CHS n negate() negate() - - x:y x XexchangeY() - ENTR Return enter() - ENTR Linefeed enter() -.fi -.PP -.SH CUSTOMIZATION -The application class name is XCalc. -.PP -\fIxcalc\fP has an enormous application defaults file which specifies -the position, label, and function of each key on the calculator. -It also gives translations to serve as keyboard accelerators. -Because these resources are not specified in the source code, you can create -a customized calculator by writing a private application defaults file, -using the Athena Command and Form widget resources to specify the size and -position of buttons, the label for each button, and the function of -each button. -.PP -The foreground and background colors of each calculator key can be -individually specified. -For the TI calculator, a classical color resource specification might be: -.sp -.br -XCalc.ti.Command.background: gray50 -.br -XCalc.ti.Command.foreground: white -.sp -For each of buttons 20, 25, 30, 35, and 40, specify: -.br -XCalc.ti.button20.background: black -.br -XCalc.ti.button20.foreground: white -.sp -For each of buttons 22, 23, 24, 27, 28, 29, 32, 33, 34, 37, 38, and 39: -.br -XCalc.ti.button22.background: white -.br -XCalc.ti.button22.foreground: black -.SH WIDGET HIERARCHY -In order to specify resources, it is useful to know the hierarchy of -the widgets which compose \fIxcalc\fR. In the notation below, -indentation indicates hierarchical structure. The widget class name -is given first, followed by the widget instance name. -.nf -.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i -.sp -XCalc xcalc - Form ti \fIor\fR hp \fI(the name depends on the mode)\fR - Form bevel - Form screen - Label M - Toggle LCD - Label INV - Label DEG - Label RAD - Label GRAD - Label P - Command button1 - Command button2 - Command button3 -\fIand so on, ...\fR - Command button38 - Command button39 - Command button40 -.fi -.SH APPLICATION RESOURCES -.PP -.TP 8 -\fBrpn\fR (Class \fBRpn\fR) -Specifies that the rpn mode should be used. The default is TI mode. -.TP 8 -\fBstipple\fR (Class \fBStipple\fR) -Indicates that the background should be stippled. The default is ``on'' -for monochrome displays, and ``off'' for color displays. -.TP 8 -\fBcursor\fR (Class \fBCursor\fR) -The name of the symbol used to represent the pointer. -The default is ``hand2''. -.fi -.SH COLORS -If you would like xcalc to use its ti colors, include the following -in the #ifdef COLOR section of the file you read with xrdb: -.sp 1 -*customization: -color -.sp 1 -.br -This will cause xcalc to pick up the colors in the app-defaults color -customization file: -.IR __apploaddir__/XCalc-color . -.fi -.SH "SEE ALSO" -X(__miscmansuffix__), xrdb(1), the Athena Widget Set -.SH BUGS -.PP -HP mode is not completely debugged. In particular, the stack is -not handled properly after errors. -.SH COPYRIGHT -Copyright 1994 X Consortium -.br -See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions. -.SH AUTHORS -John Bradley, University of Pennsylvania -.br -Mark Rosenstein, MIT Project Athena -.br -Donna Converse, MIT X Consortium -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
