Update to xcalc 1.0.3
This commit is contained in:
parent
3d711efd9f
commit
7391a84e9f
@ -1,3 +1,126 @@
|
||||
commit 6c21e467c805d62593d34da9e83a2fa2f01798a6
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Dec 17 19:51:44 2009 -0800
|
||||
|
||||
xcalc 1.0.3
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 146b1da64e575d330c2599161938140a4233cb6a
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Dec 17 19:21:22 2009 -0800
|
||||
|
||||
Apply automake silencer to man page generation rule
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit abb1bf5b74642f8d40ca5fbf87490c5186f41590
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Thu Nov 26 09:19:52 2009 -0500
|
||||
|
||||
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
|
||||
|
||||
Now that the INSTALL file is generated.
|
||||
Allows running make maintainer-clean.
|
||||
|
||||
commit 109d08574cf3d951d73668a5a23c97dad94d6e75
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Wed Oct 28 14:09:08 2009 -0400
|
||||
|
||||
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
|
||||
|
||||
Add missing INSTALL file. Use standard GNU file on building tarball
|
||||
README may have been updated
|
||||
Remove AUTHORS file as it is empty and no content available yet.
|
||||
Remove NEWS file as it is empty and no content available yet.
|
||||
|
||||
commit dc35d949925e76e74403b4aea02c2ff198bf0ec6
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Tue Oct 27 15:07:24 2009 -0400
|
||||
|
||||
Deploy the new XORG_DEFAULT_OPTIONS #24242
|
||||
|
||||
This macro aggregate a number of existing macros that sets commmon
|
||||
X.Org components configuration options. It shields the configuration file from
|
||||
future changes.
|
||||
|
||||
commit 31a1d8fc1486e6dd0cb9c5ba569c820b3b79d890
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Mon Oct 26 22:08:38 2009 -0400
|
||||
|
||||
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
|
||||
|
||||
ChangeLog filename is known to Automake and requires no further
|
||||
coding in the makefile.
|
||||
|
||||
commit befb756a62a11a857f20f903b8b892768a58e229
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Thu Oct 22 12:34:15 2009 -0400
|
||||
|
||||
.gitignore: use common defaults with custom section # 24239
|
||||
|
||||
Using common defaults will reduce errors and maintenance.
|
||||
Only the very small or inexistent custom section need periodic maintenance
|
||||
when the structure of the component changes. Do not edit defaults.
|
||||
|
||||
commit eab3461ac8e9e809094f45ca2084ddf7b4485035
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Sun Sep 27 15:37:25 2009 -0400
|
||||
|
||||
Makefile.am: do not include autogen.sh in distribution #24183
|
||||
|
||||
This is a private build script that should not be distributed
|
||||
|
||||
commit b685a52aa117e9c7841fdb9b9e6b44fe898cd929
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Oct 1 14:54:20 2009 -0700
|
||||
|
||||
Add README with pointers to mailing lists, bugzilla, & git
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit dd6ca812a9e540ade4afd5db9dd13ea7ed3ea3ab
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Mon Jan 12 20:09:07 2009 -0200
|
||||
|
||||
Ansification and compile warning fixes.
|
||||
|
||||
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
|
||||
make distcheck and all gcc 4.3 and sparse warnings.
|
||||
|
||||
commit fd75efe1d9b57c483f7cedd9e2dce34b97eef75e
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Wed Aug 20 10:32:49 2008 -0400
|
||||
|
||||
xaw8 is gone, use xaw7
|
||||
|
||||
commit e8360958ef3dba1e7ab8282c5055b0ccf5650f1c
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Fri May 16 14:20:03 2008 +0200
|
||||
|
||||
$(builddir) is the current directory
|
||||
|
||||
Apparently automake doesn't always export the builddir variable.
|
||||
This fixes my previous commit.
|
||||
|
||||
commit d3849e5474e65d2cf4212118896883330752c763
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Sun Apr 20 19:42:48 2008 +0200
|
||||
|
||||
Fix build with builddir != srcdir
|
||||
|
||||
commit 18db0ddc3a18317585172374d0157dbdc76146aa
|
||||
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
|
||||
Date: Thu Mar 27 20:07:34 2008 -0700
|
||||
|
||||
Build fix for file systems that are not case sensitive
|
||||
|
||||
commit 9f76a0d8684da6dfad67282be213139b6f87a05a
|
||||
Author: Matthieu Herrb <matthieu@bluenote.herrb.net>
|
||||
Date: Sat Mar 8 22:09:59 2008 +0100
|
||||
|
||||
Makefile.am: nuke RCS Id
|
||||
|
||||
commit 19fad31ddef4c1063ee2315dfee94e4ebb5f0ff0
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Aug 21 11:23:52 2007 -0700
|
||||
|
@ -1,6 +1,297 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *Note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
|
@ -26,7 +26,6 @@ xcalc_LDADD = $(XCALC_LIBS) -lm
|
||||
|
||||
xcalc_SOURCES = \
|
||||
actions.c \
|
||||
actions.h \
|
||||
math.c \
|
||||
xcalc.c \
|
||||
xcalc.h
|
||||
@ -36,39 +35,33 @@ appman_PRE = \
|
||||
|
||||
# App default files (*.ad)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
|
||||
|
||||
appdefaultdir = @appdefaultdir@
|
||||
|
||||
dist_appdefault_DATA = \
|
||||
app-defaults/XCalc \
|
||||
app-defaults/XCalc-color
|
||||
|
||||
APPDEFAULTFILES = \
|
||||
XCalc \
|
||||
XCalc-color
|
||||
|
||||
SUFFIXES = .ad
|
||||
|
||||
.ad:
|
||||
cp $< $@
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
||||
appdefault_DATA = $(APPDEFAULTFILES)
|
||||
|
||||
EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) ChangeLog autogen.sh
|
||||
|
||||
CLEANFILES = $(APPDEFAULTFILES)
|
||||
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
|
||||
.PHONY: ChangeLog
|
||||
INSTALL:
|
||||
$(INSTALL_CMD)
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
dist-hook: ChangeLog INSTALL
|
||||
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST += $(appman_PRE)
|
||||
CLEANFILES += $(appman_DATA)
|
||||
EXTRA_DIST = $(appman_PRE) autogen.sh
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
CLEANFILES = $(appman_DATA)
|
||||
|
||||
SED = sed
|
||||
|
||||
@ -89,7 +82,7 @@ MAN_SUBSTS = \
|
||||
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
|
||||
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
|
||||
|
||||
SUFFIXES += .$(APP_MAN_SUFFIX) .man
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
|
@ -59,10 +59,11 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = xcalc$(EXEEXT)
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
config.guess config.sub depcomp install-sh missing
|
||||
DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
|
||||
install-sh missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
@ -73,8 +74,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
|
||||
"$(DESTDIR)$(appmandir)"
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
|
||||
"$(DESTDIR)$(appdefaultdir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_xcalc_OBJECTS = actions.$(OBJEXT) math.$(OBJEXT) xcalc.$(OBJEXT)
|
||||
@ -96,9 +97,9 @@ am__vpath_adj = case $$p in \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
appdefaultDATA_INSTALL = $(INSTALL_DATA)
|
||||
appmanDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(appdefault_DATA) $(appman_DATA)
|
||||
dist_appdefaultDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(appman_DATA) $(dist_appdefault_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
@ -111,7 +112,6 @@ am__remove_distdir = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
||||
@ -129,7 +129,10 @@ AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
@ -138,9 +141,11 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
@ -169,16 +174,10 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@
|
||||
TMP_XAW_LIBS = @TMP_XAW_LIBS@
|
||||
VERSION = @VERSION@
|
||||
XAW_USE_XPRINT_FALSE = @XAW_USE_XPRINT_FALSE@
|
||||
XAW_USE_XPRINT_TRUE = @XAW_USE_XPRINT_TRUE@
|
||||
XCALC_CFLAGS = @XCALC_CFLAGS@
|
||||
XCALC_LIBS = @XCALC_LIBS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
@ -186,8 +185,6 @@ am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
|
||||
# App default files (*.ad)
|
||||
appdefaultdir = @appdefaultdir@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
@ -196,23 +193,31 @@ build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
@ -221,7 +226,6 @@ AM_CFLAGS = $(XCALC_CFLAGS)
|
||||
xcalc_LDADD = $(XCALC_LIBS) -lm
|
||||
xcalc_SOURCES = \
|
||||
actions.c \
|
||||
actions.h \
|
||||
math.c \
|
||||
xcalc.c \
|
||||
xcalc.h
|
||||
@ -229,18 +233,18 @@ xcalc_SOURCES = \
|
||||
appman_PRE = \
|
||||
xcalc.man
|
||||
|
||||
APPDEFAULTFILES = \
|
||||
XCalc \
|
||||
XCalc-color
|
||||
|
||||
SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
|
||||
appdefault_DATA = $(APPDEFAULTFILES)
|
||||
EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) ChangeLog autogen.sh \
|
||||
$(appman_PRE)
|
||||
CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
# App default files (*.ad)
|
||||
DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
|
||||
dist_appdefault_DATA = \
|
||||
app-defaults/XCalc \
|
||||
app-defaults/XCalc-color
|
||||
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
EXTRA_DIST = $(appman_PRE) autogen.sh
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
CLEANFILES = $(appman_DATA)
|
||||
SED = sed
|
||||
|
||||
# Strings to replace in man pages
|
||||
@ -259,26 +263,27 @@ MAN_SUBSTS = \
|
||||
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
|
||||
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
|
||||
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
|
||||
.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@ -365,23 +370,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
install-appdefaultDATA: $(appdefault_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
|
||||
@list='$(appdefault_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
|
||||
$(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-appdefaultDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(appdefault_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
|
||||
done
|
||||
install-appmanDATA: $(appman_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
|
||||
@ -399,6 +387,23 @@ uninstall-appmanDATA:
|
||||
echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(appmandir)/$$f"; \
|
||||
done
|
||||
install-dist_appdefaultDATA: $(dist_appdefault_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
|
||||
@list='$(dist_appdefault_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(dist_appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
|
||||
$(dist_appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-dist_appdefaultDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_appdefault_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
@ -451,6 +456,7 @@ distclean-tags:
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/app-defaults
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
@ -581,7 +587,7 @@ check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA) config.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
@ -631,7 +637,7 @@ info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-appdefaultDATA install-appmanDATA
|
||||
install-data-am: install-appmanDATA install-dist_appdefaultDATA
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
@ -660,8 +666,8 @@ ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
|
||||
uninstall-binPROGRAMS uninstall-info-am
|
||||
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
uninstall-dist_appdefaultDATA uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
@ -669,28 +675,29 @@ uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
|
||||
distclean distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \
|
||||
uninstall-binPROGRAMS uninstall-info-am
|
||||
install-appmanDATA install-binPROGRAMS install-data \
|
||||
install-data-am install-dist_appdefaultDATA install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-appmanDATA \
|
||||
uninstall-binPROGRAMS uninstall-dist_appdefaultDATA \
|
||||
uninstall-info-am
|
||||
|
||||
|
||||
.ad:
|
||||
cp $< $@
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
||||
.PHONY: ChangeLog
|
||||
INSTALL:
|
||||
$(INSTALL_CMD)
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
dist-hook: ChangeLog INSTALL
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
sed $(MAN_SUBSTS) < $< > $@
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
@ -0,0 +1,26 @@
|
||||
xcalc is a scientific calculator X11 client that can emulate a TI-30
|
||||
or an HP-10C.
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
||||
|
||||
Please submit bug reports to the Xorg bugzilla:
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
|
||||
The master development code repository can be found at:
|
||||
|
||||
git://anongit.freedesktop.org/git/xorg/app/xcalc
|
||||
|
||||
http://cgit.freedesktop.org/xorg/app/xcalc
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
||||
For more information on the git code manager, see:
|
||||
|
||||
http://wiki.x.org/wiki/GitPage
|
||||
|
265
app/xcalc/aclocal.m4
vendored
265
app/xcalc/aclocal.m4
vendored
@ -995,72 +995,7 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
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
|
||||
dnl copyright notice and this permission notice appear in supporting
|
||||
dnl documentation.
|
||||
dnl
|
||||
dnl The above copyright notice and this permission notice shall be included
|
||||
dnl in all copies or substantial portions of the Software.
|
||||
dnl
|
||||
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
dnl OTHER DEALINGS IN THE SOFTWARE.
|
||||
dnl
|
||||
dnl Except as contained in this notice, the name of the copyright holders shall
|
||||
dnl not be used in advertising or otherwise to promote the sale, use or
|
||||
dnl other dealings in this Software without prior written authorization
|
||||
dnl from the copyright holders.
|
||||
dnl
|
||||
|
||||
# XAW_CHECK_XPRINT_SUPPORT()
|
||||
# --------------------------
|
||||
# Adds --enable/disable-xprint and selects the appropriate version of the Xaw
|
||||
# library. If neither --enable-xprint nor --disable-xprint are given,
|
||||
# the presence of an Xaw with Xprint support will be auto detected
|
||||
|
||||
AC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
|
||||
AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
|
||||
[use_xprint=$enableval],[use_xprint=auto])
|
||||
if test "x$use_xprint" = "xyes"; then
|
||||
TMP_CHECK1=xaw8
|
||||
TMP_CHECK2=
|
||||
xaw_use_xprint=yes
|
||||
elif test "x$use_xprint" = "xno"; then
|
||||
TMP_CHECK1=xaw7
|
||||
TMP_CHECK2=
|
||||
xaw_use_xprint=no
|
||||
else
|
||||
TMP_CHECK1=xaw8
|
||||
TMP_CHECK2=xaw7
|
||||
xaw_use_xprint=yes
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
|
||||
if [[ ! -z $TMP_CHECK2 ]] ; then
|
||||
if test $success = no ; then
|
||||
PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
|
||||
xaw_use_xprint=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$success" = "xyes"; then
|
||||
$1_CFLAGS=$TMP_XAW_CFLAGS
|
||||
$1_LIBS=$TMP_XAW_LIBS
|
||||
|
||||
AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
|
||||
else
|
||||
AC_MSG_ERROR([No suitable version of Xaw found])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl
|
||||
@ -1097,27 +1032,24 @@ dnl of the copyright holder.
|
||||
# your configure.ac with the minimum required version, such as:
|
||||
# XORG_MACROS_VERSION(1.1)
|
||||
#
|
||||
# To force at least a version with this macro defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
# To ensure that this macro is defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION],
|
||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
#
|
||||
#
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
AC_DEFUN([XORG_MACROS_VERSION],[
|
||||
[XORG_MACROS_needed_version=$1
|
||||
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
|
||||
[XORG_MACROS_version=1.1.5
|
||||
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
|
||||
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
|
||||
fi
|
||||
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
|
||||
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
|
||||
fi
|
||||
AC_MSG_RESULT([yes, $XORG_MACROS_version])
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.3.0])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
|
||||
m4_if(m4_version_compare(vers_have, [$1]), -1,
|
||||
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
|
||||
m4_undefine([vers_have])
|
||||
m4_undefine([maj_have])
|
||||
m4_undefine([maj_needed])
|
||||
]) # XORG_MACROS_VERSION
|
||||
|
||||
# XORG_PROG_RAWCPP()
|
||||
@ -1142,6 +1074,10 @@ else
|
||||
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS=-undef
|
||||
AC_MSG_RESULT([yes])
|
||||
# under Cygwin unix is still defined even with -undef
|
||||
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS="-undef -ansi"
|
||||
AC_MSG_RESULT([yes, with -ansi])
|
||||
else
|
||||
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
|
||||
fi
|
||||
@ -1254,10 +1190,16 @@ AC_SUBST([ADMIN_MAN_DIR])
|
||||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
HAVE_DEFS_ENT=no
|
||||
else
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(LINUXDOC, linuxdoc)
|
||||
AC_PATH_PROG(PS2PDF, ps2pdf)
|
||||
@ -1306,7 +1248,9 @@ AC_SUBST(MAKE_HTML)
|
||||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
@ -1363,6 +1307,57 @@ AC_SUBST(MAKE_PDF)
|
||||
AC_SUBST(MAKE_HTML)
|
||||
]) # XORG_CHECK_DOCBOOK
|
||||
|
||||
# XORG_WITH_XMLTO
|
||||
# ----------------
|
||||
# Minimum version: 1.5.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-xmlto option, it allows maximum flexibilty in making decisions
|
||||
# as whether or not to use the xmlto package.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
|
||||
# XMLTO: returns the path of the xmlto program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-xmlto: 'yes' user instructs the module to use xmlto
|
||||
# 'no' user instructs the module not to use xmlto
|
||||
#
|
||||
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_XMLTO],[
|
||||
AC_ARG_VAR([XMLTO], [Path to xmlto command])
|
||||
AC_ARG_WITH(xmlto,
|
||||
AS_HELP_STRING([--with-xmlto],
|
||||
[Use xmlto to regenerate documentation (default: yes, if installed)]),
|
||||
[use_xmlto=$withval], [use_xmlto=auto])
|
||||
|
||||
if test "x$use_xmlto" = x"auto"; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
if test "x$XMLTO" = "x"; then
|
||||
AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
|
||||
have_xmlto=no
|
||||
else
|
||||
have_xmlto=yes
|
||||
fi
|
||||
elif test "x$use_xmlto" = x"yes" ; then
|
||||
AC_PATH_PROG([XMLTO], [xmlto])
|
||||
if test "x$XMLTO" = "x"; then
|
||||
AC_MSG_WARN([--with-xmlto=yes specified but xmlto not found in PATH])
|
||||
fi
|
||||
have_xmlto=yes
|
||||
elif test "x$use_xmlto" = x"no" ; then
|
||||
if test "x$XMLTO" != "x"; then
|
||||
AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
|
||||
fi
|
||||
have_xmlto=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
]) # XORG_CHECK_XMLTO
|
||||
|
||||
# XORG_CHECK_MALLOC_ZERO
|
||||
# ----------------------
|
||||
# Minimum version: 1.0.0
|
||||
@ -1372,7 +1367,7 @@ AC_SUBST(MAKE_HTML)
|
||||
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
|
||||
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
|
||||
AC_ARG_ENABLE(malloc0returnsnull,
|
||||
AC_HELP_STRING([--enable-malloc0returnsnull],
|
||||
AS_HELP_STRING([--enable-malloc0returnsnull],
|
||||
[malloc(0) returns NULL (default: auto)]),
|
||||
[MALLOC_ZERO_RETURNS_NULL=$enableval],
|
||||
[MALLOC_ZERO_RETURNS_NULL=auto])
|
||||
@ -1424,7 +1419,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
|
||||
AC_DEFUN([XORG_WITH_LINT],[
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
|
||||
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
|
||||
[Use a lint-style source code checker (default: disabled)])],
|
||||
[use_lint=$withval], [use_lint=no])
|
||||
if test "x$use_lint" = "xyes" ; then
|
||||
@ -1465,7 +1460,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
AC_DEFUN([XORG_LINT_LIBRARY],[
|
||||
AC_REQUIRE([XORG_WITH_LINT])
|
||||
# Build lint "library" for more indepth checks of programs calling this library
|
||||
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
|
||||
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
|
||||
[Create lint library (default: disabled)])],
|
||||
[make_lint_lib=$enableval], [make_lint_lib=no])
|
||||
if test "x$make_lint_lib" != "xno" ; then
|
||||
@ -1483,6 +1478,75 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
|
||||
]) # XORG_LINT_LIBRARY
|
||||
|
||||
# XORG_CWARNFLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
CWARNFLAGS="-v"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
]) # XORG_CWARNFLAGS
|
||||
|
||||
# XORG_STRICT_OPTION
|
||||
# -----------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([XORG_CWARNFLAGS])
|
||||
|
||||
AC_ARG_ENABLE(strict-compilation,
|
||||
AS_HELP_STRING([--enable-strict-compilation],
|
||||
[Enable all warnings from compiler and make them errors (default: disabled)]),
|
||||
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
|
||||
if test "x$STRICT_COMPILE" = "xyes"; then
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
|
||||
if test "x$GCC" = xyes ; then
|
||||
STRICT_CFLAGS="-pedantic -Werror"
|
||||
elif test "x$SUNCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-errwarn"
|
||||
elif test "x$INTELCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-Werror"
|
||||
fi
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
AC_SUBST([CWARNFLAGS])
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
# --------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Defines default options for X.Org modules.
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
XORG_MANPAGE_SECTIONS
|
||||
]) # XORG_DEFAULT_OPTIONS
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
@ -1517,7 +1581,7 @@ dnl
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_ARG_WITH(release-version,
|
||||
AC_HELP_STRING([--with-release-version=STRING],
|
||||
AS_HELP_STRING([--with-release-version=STRING],
|
||||
[Use release version string in package name]),
|
||||
[RELEASE_VERSION="$withval"],
|
||||
[RELEASE_VERSION=""])
|
||||
@ -1529,14 +1593,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||
[Major version of this package])
|
||||
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
|
||||
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
|
||||
if test "x$PVM" = "x"; then
|
||||
PVM="0"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
|
||||
[$PVM],
|
||||
[Minor version of this package])
|
||||
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
|
||||
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
|
||||
if test "x$PVP" = "x"; then
|
||||
PVP="0"
|
||||
fi
|
||||
@ -1545,3 +1609,20 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
[Patch version of this package])
|
||||
])
|
||||
|
||||
# XORG_CHANGELOG()
|
||||
# ----------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines the variable CHANGELOG_CMD as the command to generate
|
||||
# ChangeLog from git.
|
||||
#
|
||||
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
AC_SUBST([CHANGELOG_CMD])
|
||||
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
|
@ -38,26 +38,109 @@ from the X Consortium.
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <setjmp.h>
|
||||
#include "xcalc.h"
|
||||
extern int rpn;
|
||||
extern Atom wm_delete_window;
|
||||
extern int pre_op();
|
||||
extern void post_op(), Quit(), ringbell(), do_select();
|
||||
|
||||
#ifndef IEEE
|
||||
extern jmp_buf env;
|
||||
extern void fail_op();
|
||||
#define XCALC_PRE_OP(keynum) { if (pre_op(keynum)) return; \
|
||||
if (setjmp (env)) {fail_op(); return;}}
|
||||
#else
|
||||
#define XCALC_PRE_OP(keynum) if (pre_op(keynum)) return;
|
||||
#endif
|
||||
|
||||
static void add(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void back(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void bell(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void degree(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void digit(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void divide(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void e(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void enter(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void epower(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void equal(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void negate(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void nop(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void off(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void pi(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void power(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void quit(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void recall(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void roll(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void selection(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void sine(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void square(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void store(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void sum(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count);
|
||||
|
||||
/*
|
||||
* calculator action table
|
||||
*/
|
||||
|
||||
XtActionsRec Actions[] = {
|
||||
{"add", add}, /* addition */
|
||||
{"back", back}, /* HP-specific backspace */
|
||||
{"bell", bell}, /* ring bell */
|
||||
{"clear", clearit}, /* TI-specific clear calculator state */
|
||||
{"cosine", cosine}, /* trigonometric function cosine */
|
||||
{"decimal", decimal}, /* decimal point */
|
||||
{"degree", degree}, /* degree, radian, grad switch */
|
||||
{"digit", digit}, /* numeric key */
|
||||
{"divide", divide}, /* division */
|
||||
{"e", e}, /* the natural number e */
|
||||
{"enter", enter}, /* HP-specific enter */
|
||||
{"epower", epower}, /* e raised to a power */
|
||||
{"equal", equal}, /* TI-specific = */
|
||||
{"exchange", exchange}, /* TI-specific exchange memory and display */
|
||||
{"factorial", factorial}, /* factorial function */
|
||||
{"inverse", inverse}, /* inverse */
|
||||
{"leftParen", leftParen}, /* TI-specific left parenthesis */
|
||||
{"logarithm", logarithm}, /* logarithm base 10 */
|
||||
{"multiply", multiply}, /* multiplication */
|
||||
{"naturalLog", naturalLog}, /* natural logarithm base e */
|
||||
{"negate", negate}, /* change sign */
|
||||
{"nop", nop}, /* no operation, rings bell */
|
||||
{"off", off}, /* clear state */
|
||||
{"pi", pi}, /* the number pi */
|
||||
{"power", power}, /* raise to an arbitrary power */
|
||||
{"quit", quit}, /* quit */
|
||||
{"recall", recall}, /* memory recall */
|
||||
{"reciprocal", reciprocal}, /* reciprocal function */
|
||||
{"rightParen", rightParen}, /* TI-specific left parenthesis */
|
||||
{"roll", roll}, /* HP-specific roll stack */
|
||||
{"scientific", scientific}, /* scientfic notation (EE) */
|
||||
{"selection", selection}, /* copy selection */
|
||||
{"sine", sine}, /* trigonometric function sine */
|
||||
{"square", square}, /* square */
|
||||
{"squareRoot", squareRoot}, /* square root */
|
||||
{"store", store}, /* memory store */
|
||||
{"subtract", subtract}, /* subtraction */
|
||||
{"sum", sum}, /* memory summation */
|
||||
{"tangent", tangent}, /* trigonometric function tangent */
|
||||
{"tenpower", tenpower}, /* 10 raised to to an arbitrary power */
|
||||
{"XexchangeY", XexchangeY} /* HP-specific exchange X and Y registers */
|
||||
};
|
||||
|
||||
int ActionsCount = XtNumber(Actions);
|
||||
|
||||
/*ARGSUSED*/
|
||||
void add(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void add(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kADD);
|
||||
rpn ? twof(kADD) : twoop(kADD);
|
||||
@ -65,11 +148,7 @@ void add(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void back(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void back(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kBKSP);
|
||||
bkspf();
|
||||
@ -77,21 +156,13 @@ void back(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void bell(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void bell(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
ringbell();
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void clearit(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kCLR);
|
||||
clearf();
|
||||
@ -99,11 +170,7 @@ void clearit(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void cosine(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kCOS);
|
||||
oneop(kCOS);
|
||||
@ -111,11 +178,7 @@ void cosine(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void decimal(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kDEC);
|
||||
decf();
|
||||
@ -123,11 +186,7 @@ void decimal(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void degree(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void degree(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kDRG);
|
||||
drgf();
|
||||
@ -135,11 +194,7 @@ void degree(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void digit(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void digit(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
switch (vector[0][0])
|
||||
{
|
||||
@ -158,11 +213,7 @@ void digit(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void divide(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void divide(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kDIV);
|
||||
rpn ? twof(kDIV) : twoop(kDIV);
|
||||
@ -170,11 +221,7 @@ void divide(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void e(w, ev, vector, count)
|
||||
Widget w;
|
||||
XEvent *ev;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void e(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kE);
|
||||
oneop(kE);
|
||||
@ -182,11 +229,7 @@ void e(w, ev, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void enter(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void enter(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kENTR);
|
||||
entrf();
|
||||
@ -194,11 +237,7 @@ void enter(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void epower(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void epower(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kEXP);
|
||||
oneop(kEXP);
|
||||
@ -206,11 +245,7 @@ void epower(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void equal(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void equal(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kEQU);
|
||||
equf();
|
||||
@ -218,11 +253,7 @@ void equal(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void exchange(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kEXC);
|
||||
oneop(kEXC);
|
||||
@ -230,11 +261,7 @@ void exchange(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void factorial(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kFACT);
|
||||
oneop(kFACT);
|
||||
@ -242,11 +269,7 @@ void factorial(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void inverse(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kINV);
|
||||
invf();
|
||||
@ -254,11 +277,7 @@ void inverse(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void leftParen(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kLPAR);
|
||||
lparf();
|
||||
@ -266,11 +285,7 @@ void leftParen(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void logarithm(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kLOG);
|
||||
oneop(kLOG);
|
||||
@ -278,11 +293,7 @@ void logarithm(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void multiply(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kMUL);
|
||||
rpn ? twof(kMUL) : twoop(kMUL);
|
||||
@ -290,11 +301,7 @@ void multiply(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void naturalLog(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kLN);
|
||||
oneop(kLN);
|
||||
@ -302,11 +309,7 @@ void naturalLog(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void negate(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void negate(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kNEG);
|
||||
negf();
|
||||
@ -314,21 +317,13 @@ void negate(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void nop(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void nop(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
ringbell();
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void off(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void off(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kOFF);
|
||||
offf();
|
||||
@ -336,11 +331,7 @@ void off(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void pi(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void pi(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kPI);
|
||||
oneop(kPI);
|
||||
@ -348,11 +339,7 @@ void pi(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void power(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void power(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kPOW);
|
||||
rpn ? twof(kPOW) : twoop(kPOW);
|
||||
@ -360,11 +347,7 @@ void power(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void quit(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void quit(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
if (e->type == ClientMessage && e->xclient.data.l[0] != wm_delete_window)
|
||||
ringbell();
|
||||
@ -373,11 +356,7 @@ void quit(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void recall(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void recall(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kRCL);
|
||||
rpn ? memf(kRCL) : oneop(kRCL);
|
||||
@ -385,11 +364,7 @@ void recall(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void reciprocal(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kRECIP);
|
||||
oneop(kRECIP);
|
||||
@ -397,11 +372,7 @@ void reciprocal(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void rightParen(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kRPAR);
|
||||
rparf();
|
||||
@ -409,11 +380,7 @@ void rightParen(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void roll(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void roll(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kROLL);
|
||||
rollf();
|
||||
@ -421,11 +388,7 @@ void roll(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void scientific(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kEE);
|
||||
eef();
|
||||
@ -433,21 +396,13 @@ void scientific(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void selection(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void selection(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
do_select(((XButtonReleasedEvent *)e)->time);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void sine(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void sine(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kSIN);
|
||||
oneop(kSIN);
|
||||
@ -455,11 +410,7 @@ void sine(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void square(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void square(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kSQR);
|
||||
oneop(kSQR);
|
||||
@ -467,11 +418,7 @@ void square(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void squareRoot(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kSQRT);
|
||||
oneop(kSQRT);
|
||||
@ -479,11 +426,7 @@ void squareRoot(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void store(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void store(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kSTO);
|
||||
rpn ? memf(kSTO) : oneop(kSTO);
|
||||
@ -491,11 +434,7 @@ void store(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void subtract(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kSUB);
|
||||
rpn ? twof(kSUB) : twoop(kSUB);
|
||||
@ -503,11 +442,7 @@ void subtract(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void sum(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void sum(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kSUM);
|
||||
rpn ? memf(kSUM) : oneop(kSUM);
|
||||
@ -515,11 +450,7 @@ void sum(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void tangent(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kTAN);
|
||||
oneop(kTAN);
|
||||
@ -527,11 +458,7 @@ void tangent(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void tenpower(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(k10X);
|
||||
oneop(k10X);
|
||||
@ -539,11 +466,7 @@ void tenpower(w, e, vector, count)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void XexchangeY(w, e, vector, count)
|
||||
Widget w;
|
||||
XEvent *e;
|
||||
String *vector;
|
||||
Cardinal *count;
|
||||
static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count)
|
||||
{
|
||||
XCALC_PRE_OP(kXXY);
|
||||
twof(kXXY);
|
||||
|
@ -1,5 +1,32 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
@ -27,5 +54,8 @@
|
||||
/* Patch version of this package */
|
||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
7651
app/xcalc/configure
vendored
7651
app/xcalc/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -22,25 +22,35 @@ dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.57])
|
||||
AC_INIT(xcalc,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xcalc)
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AC_INIT(xcalc, [1.0.3],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xcalc)
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Require xorg-macros: XORG_DEFAULT_OPTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.3)
|
||||
XORG_DEFAULT_OPTIONS
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
XAW_CHECK_XPRINT_SUPPORT(XCALC)
|
||||
|
||||
PKG_CHECK_MODULES(XCALC, xaw7)
|
||||
XCALC_CFLAGS="$CWARNFLAGS $XCALC_CFLAGS"
|
||||
AC_SUBST(XCALC_CFLAGS)
|
||||
AC_SUBST(XCALC_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(APPDEFS, xt)
|
||||
appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
|
||||
xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
|
||||
AC_ARG_WITH(appdefaultdir,
|
||||
AC_HELP_STRING([--with-appdefaultdir=<pathname>],
|
||||
[specify directory for app-defaults files (default is autodetected)]),
|
||||
[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
|
||||
AC_SUBST(appdefaultdir)
|
||||
|
||||
XORG_MANPAGE_SECTIONS
|
||||
XORG_RELEASE_VERSION
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
119
app/xcalc/math.c
119
app/xcalc/math.c
@ -20,17 +20,7 @@
|
||||
* Geoffrey Coram fixed most of the HP mode bugs.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <math.h>
|
||||
#include <signal.h>
|
||||
#if !defined(IEEE) && defined(SVR4)
|
||||
#include <siginfo.h>
|
||||
#endif
|
||||
#include <setjmp.h>
|
||||
#include "xcalc.h"
|
||||
#include <errno.h>
|
||||
#include <X11/Xlocale.h>
|
||||
|
||||
#ifdef _CRAY /* kludge around Cray STDC compiler */
|
||||
double (*log_p)() = log;
|
||||
@ -72,15 +62,8 @@ double (*pow_p)() = pow;
|
||||
#define True 1
|
||||
#define False 0
|
||||
|
||||
extern int rpn;
|
||||
extern char dispstr[];
|
||||
extern void draw();
|
||||
extern void ringbell();
|
||||
extern void setflag();
|
||||
extern void Quit();
|
||||
|
||||
#ifndef IEEE
|
||||
jmp_buf env;
|
||||
jmp_buf env;
|
||||
#endif
|
||||
|
||||
|
||||
@ -88,7 +71,7 @@ extern void Quit();
|
||||
* functions. Much of it is shared between the infix and rpn modes.
|
||||
*/
|
||||
|
||||
int flagINV, flagPAREN, flagM, drgmode; /* display flags */
|
||||
static int flagINV, flagPAREN, flagM, drgmode; /* display flags */
|
||||
|
||||
static double drg2rad=PI/180.0; /* Conversion factors for trig funcs */
|
||||
static double rad2drg=180.0/PI;
|
||||
@ -130,10 +113,7 @@ static int priority(int op);
|
||||
*/
|
||||
|
||||
static void
|
||||
parse_double (src, fmt, dp)
|
||||
char *src;
|
||||
char *fmt;
|
||||
double *dp;
|
||||
parse_double (char *src, char *fmt, double *dp)
|
||||
{
|
||||
int olderrno = errno;
|
||||
|
||||
@ -144,8 +124,7 @@ parse_double (src, fmt, dp)
|
||||
|
||||
|
||||
/*********************************/
|
||||
int pre_op(keynum)
|
||||
int keynum;
|
||||
int pre_op(int keynum)
|
||||
{
|
||||
if (keynum==-1) return(0);
|
||||
|
||||
@ -168,99 +147,44 @@ int pre_op(keynum)
|
||||
|
||||
/* cannot assign result of setjmp under ANSI C, use global instead */
|
||||
static volatile int SignalKind;
|
||||
static volatile int SignalCode;
|
||||
|
||||
void fail_op()
|
||||
void fail_op(void)
|
||||
{
|
||||
if (SignalKind == SIGFPE)
|
||||
switch (SignalCode) {
|
||||
#ifdef SVR4
|
||||
case FPE_INTDIV: /* integer divide by zero */
|
||||
case FPE_FLTDIV: /* floating point divide by zero */
|
||||
strcpy(dispstr, "divide by 0");
|
||||
break;
|
||||
case FPE_INTOVF: /* integer overflow */
|
||||
case FPE_FLTOVF: /* floating point overflow */
|
||||
strcpy(dispstr, "overflow");
|
||||
break;
|
||||
case FPE_FLTUND: /* floating point underflow */
|
||||
strcpy(dispstr, "underflow");
|
||||
break;
|
||||
case FPE_FLTRES: /* floating point inexact result */
|
||||
strcpy(dispstr, "inexact result");
|
||||
break;
|
||||
case FPE_FLTINV: /* invalid floating point operation */
|
||||
strcpy(dispstr, "invalid op");
|
||||
break;
|
||||
case FPE_FLTSUB: /* subscript out of range */
|
||||
strcpy(dispstr, "out of range");
|
||||
break;
|
||||
|
||||
#endif /*SVR4*/
|
||||
|
||||
#ifdef FPE_FLTDIV_TRAP
|
||||
case FPE_FLTDIV_TRAP: strcpy(dispstr,"div by zero"); break;
|
||||
#endif
|
||||
#ifdef FPE_FLTDIV_FAULT
|
||||
case FPE_FLTDIV_FAULT: strcpy(dispstr,"div by zero"); break;
|
||||
#endif
|
||||
#ifdef FPE_FLTOVF_TRAP
|
||||
case FPE_FLTOVF_TRAP: strcpy(dispstr,"overflow"); break;
|
||||
#endif
|
||||
#ifdef FPE_FLTOVF_FAULT
|
||||
case FPE_FLTOVF_FAULT: strcpy(dispstr,"overflow"); break;
|
||||
#endif
|
||||
#ifdef FPE_FLTUND_TRAP
|
||||
case FPE_FLTUND_TRAP: strcpy(dispstr,"underflow"); break;
|
||||
#endif
|
||||
#ifdef FPE_FLTUND_FAULT
|
||||
case FPE_FLTUND_FAULT: strcpy(dispstr,"underflow"); break;
|
||||
#endif
|
||||
default: strcpy(dispstr,"error");
|
||||
}
|
||||
else
|
||||
if (SignalKind == SIGILL)
|
||||
strcpy(dispstr, "illegal operand");
|
||||
strcpy(dispstr, "math error");
|
||||
else if (SignalKind == SIGILL)
|
||||
strcpy(dispstr, "illegal operand");
|
||||
|
||||
entered=3;
|
||||
DrawDisplay();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* keep SVR4 compiler from complaining about scope of arg declaration below */
|
||||
typedef struct sigcontext * sigcontextstructp;
|
||||
/*ARGSUSED*/
|
||||
signal_t fperr(sig,code,scp)
|
||||
int sig,code;
|
||||
sigcontextstructp scp;
|
||||
signal_t fperr(int sig)
|
||||
{
|
||||
#if defined(SYSV) || defined(SVR4) || defined(linux)
|
||||
signal(SIGFPE,(signal_t (*)())fperr);
|
||||
signal(SIGFPE, fperr);
|
||||
#endif
|
||||
SignalKind = sig;
|
||||
SignalCode = code;
|
||||
longjmp(env,1);
|
||||
}
|
||||
|
||||
/* for VAX BSD4.3 */
|
||||
/*ARGSUSED*/
|
||||
signal_t illerr(sig,code,scp)
|
||||
int sig,code;
|
||||
sigcontextstructp scp;
|
||||
signal_t illerr(int sig)
|
||||
{
|
||||
/* not reset when caught? */
|
||||
signal(SIGILL,(signal_t (*)())illerr);
|
||||
signal(SIGILL, illerr);
|
||||
|
||||
SignalKind = sig;
|
||||
SignalCode = code;
|
||||
longjmp(env,1);
|
||||
}
|
||||
|
||||
#endif /* not IEEE */
|
||||
|
||||
|
||||
void post_op()
|
||||
void post_op(void)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
showstack("\0");
|
||||
@ -302,8 +226,7 @@ DrawDisplay(void)
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
void
|
||||
numeric(keynum)
|
||||
int keynum;
|
||||
numeric(int keynum)
|
||||
{
|
||||
char st[2];
|
||||
int cell = 0;
|
||||
@ -831,7 +754,7 @@ oneop(int keynum)
|
||||
entered=3;
|
||||
break;
|
||||
}
|
||||
i=(int) (floor(dnum));
|
||||
dtmp = floor(dnum); i = dtmp;
|
||||
for (j=1,dnum=1.0; j<=i; j++)
|
||||
dnum*=(float) j;
|
||||
break;
|
||||
@ -877,8 +800,7 @@ static int numsp;
|
||||
|
||||
/*******/
|
||||
static void
|
||||
PushOp(op)
|
||||
int op;
|
||||
PushOp(int op)
|
||||
/*******/
|
||||
{
|
||||
if (opsp==STACKMAX) {strcpy(dispstr,"stack error"); entered=3;}
|
||||
@ -908,8 +830,7 @@ isopempty(void)
|
||||
|
||||
#ifdef DEBUG
|
||||
static void
|
||||
showstack(string)
|
||||
char *string;
|
||||
showstack(char *string)
|
||||
{
|
||||
fprintf(stderr, "%s: %lf %lf %lf\n", string, numstack[0], numstack[1],
|
||||
numstack[2]);
|
||||
@ -918,8 +839,7 @@ showstack(string)
|
||||
|
||||
/*******/
|
||||
static void
|
||||
PushNum(num)
|
||||
double num;
|
||||
PushNum(double num)
|
||||
/*******/
|
||||
{
|
||||
if (rpn) {
|
||||
@ -990,8 +910,7 @@ ClearStacks(void)
|
||||
|
||||
/*******/
|
||||
static int
|
||||
priority(op)
|
||||
int op;
|
||||
priority(int op)
|
||||
/*******/
|
||||
{
|
||||
switch (op) {
|
||||
|
@ -40,10 +40,9 @@ from the X Consortium.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <signal.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Shell.h>
|
||||
#include <X11/Xaw/Cardinals.h>
|
||||
@ -53,18 +52,20 @@ from the X Consortium.
|
||||
#include <X11/Xaw/Toggle.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include "xcalc.h"
|
||||
#include "actions.h"
|
||||
|
||||
#ifndef IEEE
|
||||
extern signal_t fperr();
|
||||
extern signal_t illerr();
|
||||
#endif
|
||||
static Boolean convert(Widget w, Atom *selection, Atom *target, Atom *type,
|
||||
XtPointer *value, unsigned long *length, int *format);
|
||||
static void create_keypad(Widget parent);
|
||||
static void create_display(Widget parent);
|
||||
static void create_calculator(Widget shell);
|
||||
static void done(Widget w, Atom *selection, Atom *target);
|
||||
static void lose(Widget w, Atom *selection);
|
||||
static void Syntax(int argc, char **argv);
|
||||
|
||||
/*
|
||||
* global data
|
||||
*/
|
||||
int rpn = 0; /* Reverse Polish Notation (HP mode) flag */
|
||||
#define LCD_STR_LEN 32
|
||||
char dispstr[LCD_STR_LEN]; /* string to show up in the LCD */
|
||||
Atom wm_delete_window; /* see ICCCM section 5.2.2 */
|
||||
|
||||
@ -112,16 +113,10 @@ static XtResource Resources[] = {
|
||||
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Arg args[3];
|
||||
|
||||
void create_calculator();
|
||||
void Quit(), Syntax();
|
||||
|
||||
|
||||
XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
|
||||
|
||||
toplevel = XtAppInitialize(&xtcontext, "XCalc", Options, XtNumber(Options),
|
||||
@ -136,7 +131,7 @@ main(argc, argv)
|
||||
|
||||
create_calculator(toplevel);
|
||||
|
||||
XtAppAddActions(xtcontext, Actions, XtNumber(Actions));
|
||||
XtAppAddActions(xtcontext, Actions, ActionsCount);
|
||||
|
||||
XtOverrideTranslations(toplevel,
|
||||
XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()\n"));
|
||||
@ -172,12 +167,8 @@ main(argc, argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void create_calculator(shell)
|
||||
Widget shell;
|
||||
static void create_calculator(Widget shell)
|
||||
{
|
||||
void create_display();
|
||||
void create_keypad();
|
||||
|
||||
rpn = appResources.rpn;
|
||||
calculator = XtCreateManagedWidget(rpn ? "hp" : "ti", formWidgetClass,
|
||||
shell, (ArgList) NULL, ZERO);
|
||||
@ -189,8 +180,7 @@ void create_calculator(shell)
|
||||
/*
|
||||
* Do the calculator data display widgets.
|
||||
*/
|
||||
void create_display(parent)
|
||||
Widget parent;
|
||||
static void create_display(Widget parent)
|
||||
{
|
||||
Widget bevel, screen;
|
||||
static Arg args[] = {
|
||||
@ -242,8 +232,7 @@ void create_display(parent)
|
||||
* these defaults in an environment-specific resource file.
|
||||
*/
|
||||
|
||||
void create_keypad(parent)
|
||||
Widget parent;
|
||||
static void create_keypad(Widget parent)
|
||||
{
|
||||
static char *Keyboard[] = {
|
||||
"button1", "button2", "button3", "button4", "button5",
|
||||
@ -272,8 +261,7 @@ void create_keypad(parent)
|
||||
/*
|
||||
* called by math routines to write to the liquid crystal display.
|
||||
*/
|
||||
void draw(string)
|
||||
char *string;
|
||||
void draw(char *string)
|
||||
{
|
||||
Arg args[1];
|
||||
|
||||
@ -283,9 +271,7 @@ void draw(string)
|
||||
/*
|
||||
* called by math routines to turn on and off the display indicators.
|
||||
*/
|
||||
void setflag(indicator, on)
|
||||
int indicator;
|
||||
Boolean on;
|
||||
void setflag(int indicator, Boolean on)
|
||||
{
|
||||
if (on) XtMapWidget(ind[indicator]);
|
||||
else XtUnmapWidget(ind[indicator]);
|
||||
@ -294,7 +280,7 @@ void setflag(indicator, on)
|
||||
/*
|
||||
* ring the bell.
|
||||
*/
|
||||
void ringbell()
|
||||
void ringbell(void)
|
||||
{
|
||||
XBell(dpy, 0);
|
||||
}
|
||||
@ -302,9 +288,8 @@ void ringbell()
|
||||
/*
|
||||
* die.
|
||||
*/
|
||||
void Quit()
|
||||
void Quit(void)
|
||||
{
|
||||
extern void exit();
|
||||
XtDestroyApplicationContext(xtcontext);
|
||||
exit(0);
|
||||
}
|
||||
@ -312,12 +297,10 @@ void Quit()
|
||||
/*
|
||||
* recite and die.
|
||||
*/
|
||||
void Syntax(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
static void Syntax(int argc, char **argv)
|
||||
{
|
||||
register int i;
|
||||
extern void exit();
|
||||
|
||||
(void) fprintf(stderr, "%s: unknown options:", argv[0]);
|
||||
for (i=1; i <argc; i++)
|
||||
(void) fprintf(stderr, " %s", argv[i]);
|
||||
@ -339,14 +322,8 @@ void Syntax(argc, argv)
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
Boolean convert(w, selection, target, type, value, length, format)
|
||||
Widget w;
|
||||
Atom *selection;
|
||||
Atom *target;
|
||||
Atom *type;
|
||||
XtPointer *value;
|
||||
unsigned long *length;
|
||||
int *format;
|
||||
static Boolean convert(Widget w, Atom *selection, Atom *target, Atom *type,
|
||||
XtPointer *value, unsigned long *length, int *format)
|
||||
{
|
||||
if (*target == XA_STRING)
|
||||
{
|
||||
@ -364,9 +341,7 @@ Boolean convert(w, selection, target, type, value, length, format)
|
||||
* called when xcalc loses ownership of the selection.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void lose(w, selection)
|
||||
Widget w;
|
||||
Atom *selection;
|
||||
static void lose(Widget w, Atom *selection)
|
||||
{
|
||||
XawToggleUnsetCurrent(LCD);
|
||||
}
|
||||
@ -375,10 +350,7 @@ void lose(w, selection)
|
||||
* called when some other client got the selection.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void done(w, selection, target)
|
||||
Widget w;
|
||||
Atom *selection;
|
||||
Atom *target;
|
||||
static void done(Widget w, Atom *selection, Atom *target)
|
||||
{
|
||||
selstr[0] = '\0';
|
||||
}
|
||||
@ -386,8 +358,7 @@ void done(w, selection, target)
|
||||
/*
|
||||
* called by the selection() action routine, in response to user action.
|
||||
*/
|
||||
void do_select(time)
|
||||
Time time;
|
||||
void do_select(Time time)
|
||||
{
|
||||
Boolean state;
|
||||
Arg args[1];
|
||||
|
@ -39,6 +39,21 @@ from the X Consortium.
|
||||
#ifndef _XCALC_H_
|
||||
#define _XCALC_H_
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <math.h>
|
||||
#include <signal.h>
|
||||
#if !defined(IEEE) && defined(SVR4)
|
||||
#include <siginfo.h>
|
||||
#endif
|
||||
#include <setjmp.h>
|
||||
#include <errno.h>
|
||||
#include <X11/Xlocale.h>
|
||||
|
||||
|
||||
#ifdef SIGNALRETURNSINT
|
||||
#define signal_t int
|
||||
#else
|
||||
@ -100,6 +115,17 @@ from the X Consortium.
|
||||
#define XCalc_GRADAM 4 /* grad indicator */
|
||||
#define XCalc_PAREN 5 /* parenthesis indicator */
|
||||
|
||||
/* actions.c */
|
||||
extern XtActionsRec Actions[];
|
||||
extern int ActionsCount;
|
||||
|
||||
/* math.c */
|
||||
extern signal_t fperr(int sig);
|
||||
extern signal_t illerr(int sig);
|
||||
extern void fail_op(void);
|
||||
extern int pre_op(int keynum);
|
||||
extern void post_op(void);
|
||||
|
||||
extern void numeric(int keynum);
|
||||
extern void bkspf(void);
|
||||
extern void decf(void);
|
||||
@ -120,4 +146,20 @@ extern void oneop(int keynum);
|
||||
extern void offf(void);
|
||||
extern void ResetCalc(void);
|
||||
|
||||
#ifndef IEEE
|
||||
extern jmp_buf env;
|
||||
#endif
|
||||
|
||||
/* xcalc.c */
|
||||
extern void do_select(Time time);
|
||||
extern void draw(char *string);
|
||||
extern void Quit(void);
|
||||
extern void ringbell(void);
|
||||
extern void setflag(int indicator, Boolean on);
|
||||
|
||||
extern int rpn;
|
||||
#define LCD_STR_LEN 32
|
||||
extern char dispstr[LCD_STR_LEN];
|
||||
extern Atom wm_delete_window;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user