Browse Source

Release 1.7.0

tags/1.7.0^0
Carsten Larsen 2 years ago
parent
commit
1757e0bcf1
100 changed files with 5574 additions and 1008 deletions
  1. 1
    0
      .gitignore
  2. 1
    1
      HISTORY
  3. 0
    6
      LICENSE
  4. 17
    19
      Makefile
  5. 0
    0
      README
  6. 173
    0
      amath.1
  7. 2
    2
      amath.doxygen
  8. 0
    17
      build/debian/control-amd64
  9. 0
    17
      build/debian/control-i386
  10. 62
    0
      build/flexcat/Makefile
  11. 0
    147
      build/flexcat/configure
  12. 180
    56
      builddeb
  13. 9
    62
      builddist
  14. 8
    5
      buildwin
  15. 6
    3
      catalog/dansk/amath-help.ct
  16. 75
    35
      catalog/dansk/amath-ident.ct
  17. 9
    0
      catalog/dansk/amath-keyword.ct
  18. 40
    0
      catalog/dansk/amath-text.ct
  19. 13
    7
      catalog/english/amath-help.ct
  20. 41
    1
      catalog/english/amath-ident.ct
  21. 43
    3
      catalog/english/amath-text.ct
  22. 299
    147
      configure
  23. 7
    6
      src/amath.h
  24. 28
    0
      src/amath.sln
  25. 146
    0
      src/amath.vcxproj
  26. 17
    0
      src/amath.vcxproj.filters
  27. 35
    22
      src/clib/Makefile
  28. 1
    1
      src/clib/alloccpy.c
  29. 519
    0
      src/clib/amathc.3
  30. 10
    0
      src/clib/amathc.pc
  31. 113
    0
      src/clib/amathc.vcxproj
  32. 40
    0
      src/clib/amathc.vcxproj.filters
  33. 1
    1
      src/clib/mem.c
  34. 8
    10
      src/clib/memcpy.c
  35. 1
    5
      src/clib/memset.c
  36. 1
    1
      src/clib/strcmp.c
  37. 34
    19
      src/cplex/Makefile
  38. 1857
    0
      src/cplex/amathi.3
  39. 10
    0
      src/cplex/amathi.pc
  40. 142
    0
      src/cplex/amathi.vcxproj
  41. 123
    0
      src/cplex/amathi.vcxproj.filters
  42. 1
    1
      src/cplex/cacosh.c
  43. 6
    3
      src/cplex/ccot.c
  44. 5
    2
      src/cplex/ccsc.c
  45. 4
    2
      src/cplex/cpow.c
  46. 5
    2
      src/cplex/csec.c
  47. 8
    3
      src/cplex/csgn.c
  48. 1
    1
      src/cplex/csinh.c
  49. 29
    15
      src/cplex/csqrt.c
  50. 5
    2
      src/cplex/ctan.c
  51. 1
    1
      src/cplex/prim.h
  52. 45
    17
      src/lib/Makefile
  53. 10
    0
      src/lib/amatha.pc
  54. 124
    0
      src/lib/amatha.vcxproj
  55. 69
    0
      src/lib/amatha.vcxproj.filters
  56. 6
    2
      src/lib/charval.h
  57. 1
    2
      src/lib/cplex.cpp
  58. 3
    3
      src/lib/cplex.h
  59. 0
    1
      src/lib/integer.cpp
  60. 3
    3
      src/lib/integer.h
  61. 3
    3
      src/lib/nnumb.h
  62. 1
    1
      src/lib/ntext.cpp
  63. 3
    3
      src/lib/numb.h
  64. 9
    25
      src/lib/real.cpp
  65. 2
    2
      src/lib/real.h
  66. 37
    35
      src/localize/help.h
  67. 14
    0
      src/localize/ialias.h
  68. 57
    37
      src/localize/ident.h
  69. 51
    50
      src/localize/kword.h
  70. 2
    1
      src/localize/lex.h
  71. 110
    70
      src/localize/text.h
  72. 77
    58
      src/main.h
  73. 3
    6
      src/main/Makefile
  74. 0
    1
      src/main/evaluator.cpp
  75. 0
    1
      src/main/fgrid.cpp
  76. 63
    3
      src/main/function/Makefile
  77. 1
    1
      src/main/function/aexcosecant.cpp
  78. 1
    1
      src/main/function/aexcosecant.h
  79. 3
    3
      src/main/function/aexsecant.cpp
  80. 1
    1
      src/main/function/aexsecant.h
  81. 46
    0
      src/main/function/arccovercosine.cpp
  82. 20
    27
      src/main/function/arccovercosine.h
  83. 46
    0
      src/main/function/arccoversine.cpp
  84. 50
    0
      src/main/function/arccoversine.h
  85. 46
    0
      src/main/function/archacovercosine.cpp
  86. 50
    0
      src/main/function/archacovercosine.h
  87. 46
    0
      src/main/function/archacoversine.cpp
  88. 50
    0
      src/main/function/archacoversine.h
  89. 46
    0
      src/main/function/archavercosine.cpp
  90. 50
    0
      src/main/function/archavercosine.h
  91. 46
    0
      src/main/function/archaversine.cpp
  92. 50
    0
      src/main/function/archaversine.h
  93. 46
    0
      src/main/function/arcvercosine.cpp
  94. 50
    0
      src/main/function/arcvercosine.h
  95. 14
    19
      src/main/function/arcversine.cpp
  96. 50
    0
      src/main/function/arcversine.h
  97. 0
    1
      src/main/function/cosecant.cpp
  98. 30
    3
      src/main/function/defs.h
  99. 2
    3
      src/main/function/excosecant.cpp
  100. 0
    0
      src/main/function/functions.vcxproj

+ 1
- 0
.gitignore View File

@@ -2,6 +2,7 @@
*.kdev4
*.vcxproj.user
*Debug/*
*x64/*
*.o
*.obj
*.a

+ 1
- 1
HISTORY View File

@@ -2,7 +2,7 @@
--- amath change history ---
-------------------------------------------------------------------------------

v1.7.0 February 28 2017
v1.7.0 March 12 2017
- Introduce scientific notation.
- Introduce Not a Number (NaN).
- Fixed bugs related to infinity (Inf).

+ 0
- 6
LICENSE View File

@@ -4,12 +4,6 @@ Copyright (c) 2007 The NetBSD Foundation, Inc.
Copyright (c) 1990, 1993 The Regents of the University of California.
All rights reserved.

This code is derived from software written by Stephen L. Moshier.
It is redistributed by the NetBSD Foundation by permission of the author.

This code is derived from software contributed to Berkeley by
Mike Hibler and Chris Torek.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:


+ 17
- 19
Makefile View File

@@ -11,8 +11,11 @@ LPATHS = -Lsrc/lib/static -Lsrc/clib/static -Lsrc/real/static -Lsrc/cplex/stat
FLXCAT = build/flexcat/flexcat
MKDIR = mkdir -p
DEL = rm -f
INSTALL = install -m 0755
INSTALLP = install -m 0755
INSTALLM = install -m 0644
PREFIX = /usr
INSTDIRP = ${DESTDIR}${PREFIX}/bin
INSTDIRM = ${DESTDIR}${PREFIX}/share/man/man1

all: shared-app
app: appmain functions statement appsystem
@@ -48,25 +51,15 @@ amathc:
amathcplex:
cd src/cplex && ${MAKE}

catalogsa:
localize:
cd build/flexcat && ${MAKE}
${FLXCAT} text/keyword.cd src/localize/kword.h=text/keyword.sd
${FLXCAT} text/help.cd src/localize/help.h=text/help.sd
${FLXCAT} text/ident.cd src/localize/ident.h=text/ident.sd
${FLXCAT} text/text.cd src/localize/text.h=text/text.sd

catalogsu:
iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-help.ct >utext/dk-help.dict
iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-ident.ct >utext/dk-ident.dict
iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-text.ct >utext/dk-text.dict
iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict

catalogsw:
iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-help.ct >utext/dk-help.dict
iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-ident.ct >utext/dk-ident.dict
iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-text.ct >utext/dk-text.dict
iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict

amigacatalogs:
catalogs:
cd build/flexcat && ${MAKE}
${MKDIR} dist/catalog/english
${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog
${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG dist/catalog/english/amath-ident.catalog
@@ -92,16 +85,18 @@ static-app: src/main.o
${CC} ${CFLAGS} -s src/main.o -o amath ${LPATHS} ${LFLAGS}

.PHONY: test
test: static-app
test: amath
LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real
./amath test

.PHONY: install
install: amath
install: shared-app
cd src/lib && ${MAKE} install
cd src/clib && ${MAKE} install
cd src/real && ${MAKE} install
cd src/cplex && ${MAKE} install
${INSTALL} amath ${DESTDIR}${PREFIX}/bin
${INSTALLP} amath ${INSTDIRP}/amath
${INSTALLM} amath.1 ${INSTDIRM}/amath.1

.PHONY: uninstall
uninstall:
@@ -109,8 +104,10 @@ uninstall:
cd src/clib && ${MAKE} uninstall
cd src/real && ${MAKE} uninstall
cd src/cplex && ${MAKE} uninstall
${DEL} ${DESTDIR}${PREFIX}/bin/amath
${DEL} ${INSTDIRP}/amath
${DEL} ${INSTDIRM}/amath.1

.PHONY: clean
clean:
cd src/lib && ${MAKE} clean
cd src/clib && ${MAKE} clean
@@ -120,5 +117,6 @@ clean:
cd src/system && ${MAKE} clean
cd src/main/function && ${MAKE} clean
cd src/main/statement && ${MAKE} clean
cd build/flexcat && ${MAKE} clean
${DEL} src/main.o amath


build/debian/README → README View File


+ 173
- 0
amath.1 View File

@@ -0,0 +1,173 @@
.TH "amath" 1 "Wed Mar 1 2017" "Version 1.7.0" "amath" \" -*- nroff -*-
.ad l
.nh
.SH NAME
amath \- Statements and functions

.SH SYNOPSIS
\fCamath [expression]\fP

.SH Description
amath(1) features a case sensitive command line interface, internal
IEEE 754 calculations with 15 significant digits, calculations with
real and complex numbers, variables and user defined functions,
logarithmic and exponential functions, trigonometric and hyperbolic
function and selected mathematical constants and rounding functions.

.SH "Statements"
.PP
.nf
clear Clear console window
def Define function
delete Delete variable or function
digits Set number of significant digits
eval Evaluate arithmetic expression
execute Execute statements in a file
functions Show list of user defined functions
input Change numeral input system
help Show basic help text
output Change numeral output system
list Show content of a directory
show Show content of a file
load Load variable and functions from file
save Save variable and functions to file
variables Show list of variables
version Show version string
memory Show internal memory usage
exit Exit program
.fi
.PP
.SH "Operators"
.PP
.nf
+ Mathematical addition.
- Mathematical subtraction.
* Mathematical multiplication.
/ Mathematical division.
^ Mathematical exponentiation.
= Assignment of variable values.
| Absolute value of number.
.SH "Variables and constant"
.PP
.nf
pi Trigonometric constant
e Euler's number
i Imaginary unit
ins Result of last calculation
.fi
.PP

.SH "Base functions"
.PP
.nf
abs Absolute value of number
sgn Mathematical signum function
round Round to nearest integer number
trunc Discard fraction part of number
floor Mathematical floor function
ceil Mathematical ceiling function
sqrt Square root function (exp 1/2)
cbrt Cube root function (exp 1/3)
lb Binary logarithm function (base 2)
ln Natural logarithm function (base e)
lg Common logarithm function (base 10)
.fi
.PP
.SH "Trigonometric functions"
.PP
.nf
sin Trigonometric sine function
cos Trigonometric cosine function
tan Trigonometric tangent function
cot Trigonometric cotangent function
sec Trigonometric secant function
csc Trigonometric cosecant function
arcsin Inverse trigonometric sine function
arccos Inverse trigonometric cosine function
arctan Inverse trigonometric tangent function
arccot Inverse trigonometric cotangent function
arcsec Inverse trigonometric secant function
arccsc Inverse trigonometric cosecant function
.fi
.PP
.SH "Hyperbolic functions"
.PP
.nf
sinh Hyperbolic sine function
cosh Hyperbolic cosine function
tanh Hyperbolic tangent function
coth Hyperbolic cotangent function
sech Hyperbolic secant function
csch Hyperbolic cosecant function
arcsinh Inverse hyperbolic sine function
arccosh Inverse hyperbolic cosine function
arctanh Inverse hyperbolic tangent function
arccoth Inverse hyperbolic cotangent function
arcsech Inverse hyperbolic secant function
arccsch Inverse hyperbolic cosecant function
.fi
.PP
.SH "Early trigonometric functions"
.PP
.nf
ver Versed sine function
vcs Versed cosine function
cvs Coversed sine function
cvc Coversed cosine function
hv Haversed sine function
hvc Haversed cosine function
hcv Hacoversed sine function
hcc Hacoversed cosine function
arcver Inverse versed sine function
arcvcs Inverse versed cosine function
arccvs Inverse coversed sine function
arccvc Inverse coversed cosine function
archv Inverse haversed sine function
archvc Inverse haversed cosine function
archcv Inverse hacoversed sine function
archcc Inverse hacoversed cosine function
.fi
.PP
.SH "Example script"
.PP
.nf
round(1.5461);round(-1.5461);
ceil(43.5461);ceil(-43.5461);
floor(39.9531);floor(-39.9531);
trunc(23.827);trunc(-23.827);
sqrt(100);sqrt(52.23);
.fi
.PP
.SH "Example script with functions"
.PP
.nf
f(x)=x*2+1;
g(y)=y^2+y*1.5+2;
a=2;b=3;c=a+b;
vars;funcs;
f(2.2);c+1.1;
.fi
.PP
.SH "Example script with complex numbers"
.PP
.nf
cos(1+2i);
sin(1+2i);
tan(1+2i);
coth(1+2i);
sech(1+2i);
csch(1+2i);
.fi
.PP
.SH "See also"
.PP
amathc(3), amathr(3), amathi(3)

+ 2
- 2
amath.doxygen View File

@@ -771,7 +771,7 @@ WARN_LOGFILE = doxygen.warn
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = app lib
INPUT = src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2376,7 +2376,7 @@ PLANTUML_INCLUDE_PATH =
# Minimum value: 0, maximum value: 10000, default value: 50.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_GRAPH_MAX_NODES = 100
DOT_GRAPH_MAX_NODES = 200

# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
# generated by dot. A depth value of 3 means that only nodes reachable from the

+ 0
- 17
build/debian/control-amd64 View File

@@ -1,17 +0,0 @@
Package: amath
Version: 1.7.0
Architecture: amd64
Maintainer: Carsten Larsen <cs@innolan.net>
Installed-Size: 259
Depends: libc6
Section: math
Essential: no
Priority: optional
Homepage: http://amath.innolan.net
Built-Using: gcc-5.4
Description: Simple command line calculator
Features a case sensitive command line interface, internal IEEE 754
calculations with 15 significant digits, calculations with real and
complex numbers, variables and user defined functions, logarithmic
and exponential functions, trigonometric and hyperbolic function
and selected mathematical constants and rounding functions.

+ 0
- 17
build/debian/control-i386 View File

@@ -1,17 +0,0 @@
Package: amath
Version: 1.7.0
Architecture: i386
Maintainer: Carsten Larsen <cs@innolan.net>
Installed-Size: 262
Depends: libc6
Section: math
Essential: no
Priority: optional
Homepage: http://amath.innolan.net
Built-Using: gcc-5.4
Description: Simple command line calculator
Features a case sensitive command line interface, internal IEEE 754
calculations with 15 significant digits, calculations with real and
complex numbers, variables and user defined functions, logarithmic
and exponential functions, trigonometric and hyperbolic function
and selected mathematical constants and rounding functions.

+ 62
- 0
build/flexcat/Makefile View File

@@ -0,0 +1,62 @@
all: flexcat

CFLAGS += -I. -Wall

asprintf.o: asprintf.c
${CC} ${CFLAGS} -c asprintf.c

createcat.o: createcat.c
${CC} ${CFLAGS} -c createcat.c

createcatsrc.o: createcatsrc.c
${CC} ${CFLAGS} -c createcatsrc.c

createct.o: createct.c
${CC} ${CFLAGS} -c createct.c

globals.o: globals.c
${CC} ${CFLAGS} -c globals.c

locale_other.o: locale_other.c
${CC} ${CFLAGS} -c locale_other.c

main.o: main.c
${CC} ${CFLAGS} -c main.c

openlibs.o: openlibs.c
${CC} ${CFLAGS} -c openlibs.c

readprefs.o: readprefs.c
${CC} ${CFLAGS} -c readprefs.c

scancd.o: scancd.c
${CC} ${CFLAGS} -c scancd.c

scanct.o: scanct.c
${CC} ${CFLAGS} -c scanct.c

scanpo.o: scanpo.c
${CC} ${CFLAGS} -c scanpo.c

showfuncs.o: showfuncs.c
${CC} ${CFLAGS} -c showfuncs.c

strptime.o: strptime.c
${CC} ${CFLAGS} -c strptime.c

swapfuncs.o: swapfuncs.c
${CC} ${CFLAGS} -c swapfuncs.c

utils.o: utils.c
${CC} ${CFLAGS} -c utils.c

vastubs.o: vastubs.c
${CC} ${CFLAGS} -c vastubs.c


flexcat: asprintf.o createcat.o createcatsrc.o createct.o globals.o locale_other.o main.o openlibs.o readprefs.o scancd.o scanct.o scanpo.o showfuncs.o strptime.o swapfuncs.o utils.o vastubs.o
${CC} ${CFLAGS} -o flexcat asprintf.o createcat.o createcatsrc.o createct.o globals.o locale_other.o main.o openlibs.o readprefs.o scancd.o scanct.o scanpo.o showfuncs.o strptime.o swapfuncs.o utils.o vastubs.o -lm

clean:
rm -f asprintf.o createcat.o createcatsrc.o createct.o globals.o locale_other.o main.o openlibs.o readprefs.o scancd.o scanct.o scanpo.o showfuncs.o strptime.o swapfuncs.o utils.o vastubs.o flexcat


+ 0
- 147
build/flexcat/configure View File

@@ -1,147 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#

set -e

HDRS='
createcat.h
createcatsrc.h
createct.h
FlexCat_cat.h
FlexCat_cat_other.h
flexcat.h
globals.h
openlibs.h
readprefs.h
scancd.h
scanct.h
scanpo.h
SDI_compiler.h
showfuncs.h
swapfuncs.h
utils.h
version.h
'

SRCS='
asprintf.c
createcat.c
createcatsrc.c
createct.c
globals.c
locale_other.c
main.c
openlibs.c
readprefs.c
scancd.c
scanct.c
scanpo.c
showfuncs.c
strptime.c
swapfuncs.c
utils.c
vastubs.c
'

if make -v 2>&1 | grep GNU > /dev/null 2>&1 ; then
echo "make(1) is GNU make."
BSD=false
elif [ -f /usr/share/mk/bsd.prog.mk ] ; then
echo "Found bsd.prog.mk, will use it."
BSD=true
else
echo "Defaulting to plain makefile"
BSD=false
fi

if $BSD ; then
(
echo '# BSD-style Makefile generated by configure'
echo 'PROG = flexcat'
for f in ${SRCS}
do
echo "SRCS += ${f}"
done

echo 'NO_MAN = not_yet'
echo 'LDADD += -lm'
echo 'WARNS ?= 6'
echo '.include <bsd.prog.mk>'
) > Makefile

msg=", remember to run 'make depend'"
else
(
echo '# Portable Makefile generated by configure'
echo ''
echo 'all: flexcat'
echo ''
echo "CFLAGS += -I. -Wall"
echo ''

for f in ${HDRS}
do
b=`basename $f .h`
i=`sed -n -e '/#include.*"/{
s/"$//
s/.*"//
p
}' $f | sort -u`
if [ "x${i}" != "x" ] ; then
echo "${b}.h: " ${i}
echo " touch ${b}.h"
echo
fi
done
l=""
for f in ${SRCS}
do
b=`basename $f .c`
i=`sed -n -e '/#include.*"/{
s/"$//
s/.*"//
p
}' $f | sort -u`
echo "${b}.o: ${b}.c" ${i}
echo
l="${l} ${b}.o"
done

echo
echo "flexcat: ${l}"
echo " \${CC} \${CFLAGS} -o flexcat ${l} -lm"
echo
echo "clean:"
echo " rm -f ${l} flexcat"
echo
echo "depend:"
echo " @echo Dependencies already done"
) > Makefile
fi

echo "Makefile generated${msg}"

+ 180
- 56
builddeb View File

@@ -1,75 +1,199 @@
#!/bin/sh

# Build a debian package for amd64
set -e

version="1.7.0"

echo "Building amath ${version} for Debian ..."
rm -Rf amath
build_package () {

# Build
sh configure
make clean
make
mv amath amath.tmp
make clean

# Create filesystem layout
rm -Rf amath

mkdir -p amath/DEBIAN
mkdir -p amath/usr/bin
mkdir -p amath/usr/share/doc/amath
mkdir -p amath/usr/local/share/amath

mv amath.tmp amath/usr/bin/amath

# Copy documentation
cp LICENSE amath/usr/share/doc/amath/
cp HISTORY amath/usr/share/doc/amath/
cp build/debian/README amath/usr/share/doc/amath/

# Copy scripts
cp script/* amath/usr/local/share/amath/

# Make the package
cp build/debian/control-amd64 amath/DEBIAN/control
dpkg-deb --build amath
mv amath.deb amath-${version}_amd64.deb

# Build a debian package for i386

rm -Rf amath

# Build
sh configure cflags="-m32"
rm -f amath-${version}_$1.deb
sh configure CFLAGS=$2
make clean

echo "Building $3 bit package of amath ${version} for Debian ..."
make
mv amath amath.tmp
make clean

# Create filesystem layout
rm -Rf amath

mkdir -p amath/DEBIAN
mkdir -p amath/usr/bin
mkdir -p amath/usr/share/doc/amath
mkdir -p amath/usr/local/share/amath

mkdir -m 755 amath
mkdir -m 755 amath/DEBIAN
mkdir -m 755 amath/usr/
mkdir -m 755 amath/usr/bin
mkdir -m 755 amath/usr/lib
mkdir -m 755 amath/usr/lib/pkgconfig
mkdir -m 755 amath/usr/include
mkdir -m 755 amath/usr/share
mkdir -m 755 amath/usr/share/amath
mkdir -m 755 amath/usr/share/man
mkdir -m 755 amath/usr/share/man/man1
mkdir -m 755 amath/usr/share/man/man3
mkdir -m 755 amath/usr/share/doc
mkdir -m 755 amath/usr/share/doc/amath

# Copy binaries
mv amath.tmp amath/usr/bin/amath
chmod 0755 amath/usr/bin/amath
mv src/lib/static/libamathapp.a amath/usr/lib/libamathapp.a
chmod 0644 amath/usr/lib/libamathapp.a
mv src/lib/libamathapp.so amath/usr/lib/libamathapp.so.${version}
chmod 0644 amath/usr/lib/libamathapp.so.${version}
mv src/clib/static/libamathc.a amath/usr/lib/libamathc.a
chmod 0644 amath/usr/lib/libamathc.a
mv src/clib/libamathc.so amath/usr/lib/libamathc.so.${version}
chmod 0644 amath/usr/lib/libamathc.so.${version}
mv src/real/static/libamath.a amath/usr/lib/libamath.a
chmod 0644 amath/usr/lib/libamath.a
mv src/real/libamath.so amath/usr/lib/libamath.so.${version}
chmod 0644 amath/usr/lib/libamath.so.${version}
mv src/cplex/static/libamathcplex.a amath/usr/lib/libamathcplex.a
chmod 0644 amath/usr/lib/libamathcplex.a
mv src/cplex/libamathcplex.so amath/usr/lib/libamathcplex.so.${version}
chmod 0644 amath/usr/lib/libamathcplex.so.${version}

# Copy pkg-config files
cp src/lib/amatha.pc amath/usr/lib/pkgconfig/amatha.pc
cp src/clib/amathc.pc amath/usr/lib/pkgconfig/amathc.pc
cp src/real/amathr.pc amath/usr/lib/pkgconfig/amathr.pc
cp src/cplex/amathi.pc amath/usr/lib/pkgconfig/amathi.pc
chmod 644 amath/usr/lib/pkgconfig/*

# Copy includes
cp src/amath.h amath/usr/include/amath.h
cp src/amathc.h amath/usr/include/amathc.h
cp src/amatht.h amath/usr/include/amatht.h
cp src/complex.h amath/usr/include/amathi.h
chmod 644 amath/usr/include/*

# Copy documentation
cp LICENSE amath/usr/share/doc/amath/
cp HISTORY amath/usr/share/doc/amath/
cp build/debian/README amath/usr/share/doc/amath/
gzip --best -n amath/usr/share/doc/amath/HISTORY
cp README amath/usr/share/doc/amath/
gzip --best -n amath/usr/share/doc/amath/README
chmod 644 amath/usr/share/doc/amath/*

# Copy man pages
cp amath.1 amath/usr/share/man/man1/amath.1
cp src/clib/amathc.3 amath/usr/share/man/man3/amathc.3
cp src/real/amathr.3 amath/usr/share/man/man3/amathr.3
cp src/cplex/amathi.3 amath/usr/share/man/man3/amathi.3

gzip --best -n amath/usr/share/man/man1/amath.1
gzip --best -n amath/usr/share/man/man3/amathc.3
gzip --best -n amath/usr/share/man/man3/amathr.3
gzip --best -n amath/usr/share/man/man3/amathi.3
chmod 644 amath/usr/share/man/man1/*
chmod 644 amath/usr/share/man/man3/*

# Copy scripts
cp script/* amath/usr/local/share/amath/

# Make the package
cp build/debian/control-i386 amath/DEBIAN/control
dpkg-deb --build amath
mv amath.deb amath-${version}_i386.deb
cp script/* amath/usr/share/amath/
chmod 644 amath/usr/share/amath/*

# Create control file
{
echo "Package: amath"
echo "Version: ${version}"
echo "Architecture: $1"
echo "Maintainer: Carsten Larsen <cs@innolan.net>"
echo "Installed-Size: $4"
echo "Depends: libc6"
echo "Section: math"
echo "Priority: optional"
echo "Homepage: http://amath.innolan.net"
echo "Built-Using: gcc-5.4"
echo "Description: Simple command line calculator"
echo " Features a case sensitive command line interface, internal IEEE 754"
echo " calculations with 15 significant digits, calculations with real and"
echo " complex numbers, variables and user defined functions, logarithmic"
echo " and exponential functions, trigonometric and hyperbolic function"
echo " and selected mathematical constants and rounding functions."
} >amath/DEBIAN/control
chmod 0755 amath/DEBIAN/control

# Create license file
{
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
echo "Upstream-Name: amath"
echo "Source: http://amath.innolan.net"
echo
echo "Files: *"
echo "Copyright: 2014-2017 Carsten Sonne Larsen <cs@innolan.net>"
echo " 2007 The NetBSD Foundation, Inc."
echo " 1990, 1993 The Regents of the University of California."
echo "License: BSD-2-Clause"
echo " Redistribution and use in source and binary forms, with or without"
echo " modification, are permitted provided that the following conditions are met:"
echo " ."
echo " Redistributions of source code must retain the above copyright notice, this"
echo " list of conditions and the following disclaimer."
echo " ."
echo " Redistributions in binary form must reproduce the above copyright notice,"
echo " this list of conditions and the following disclaimer in the documentation"
echo " and/or other materials provided with the distribution."
echo " ."
echo " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\""
echo " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE"
echo " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE"
echo " DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE"
echo " FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL"
echo " DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR"
echo " SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER"
echo " CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,"
echo " OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE"
echo " OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
} >amath/DEBIAN/copyright
gzip --best -n amath/DEBIAN/copyright
chmod 0755 amath/DEBIAN/copyright.gz

# Create change log
{
echo "amath (${version}) unstable; urgency=low"
echo
echo " * Initial Debian Release."
echo
echo " -- Carsten Larsen <cs@innolan.net> Sat, 04 Mar 2017 19:49:07 +0100"
} >amath/DEBIAN/changelog.Debian
gzip --best -n amath/DEBIAN/changelog.Debian
chmod 0755 amath/DEBIAN/changelog.Debian.gz

{
echo "libamath ${version}"
echo "libamathc ${version}"
echo "libamathcplex ${version}"
echo "libamathapp ${version}"
} >amath/DEBIAN/shlibs
chmod 0644 amath/DEBIAN/shlibs

# Create post install script
{
echo "#!/bin/sh"
echo "set -e"
echo "ln -s /usr/lib/libamathapp.so.${version} /usr/lib/libamathapp.so"
echo "ln -s /usr/lib/libamathc.so.${version} /usr/lib/libamathc.so"
echo "ln -s /usr/lib/libamath.so.${version} /usr/lib/libamath.so"
echo "ln -s /usr/lib/libamathcplex.so.${version} /usr/lib/libamathcplex.so"
echo "ldconfig"
} >amath/DEBIAN/postinst
chmod 0755 amath/DEBIAN/postinst

# Create post remove script
{
echo "#!/bin/sh"
echo "set -e"
echo "if [ "\$1" = "remove" ]; then"
echo "ldconfig"
echo "fi"
echo "rm -f /usr/lib/libamathapp.so.${version}"
echo "rm -f /usr/lib/libamathc.so.${version}"
echo "rm -f /usr/lib/libamath.so.${version}"
echo "rm -f /usr/lib/libamathcplex.so.${version}"
} >amath/DEBIAN/postrm
chmod 0755 amath/DEBIAN/postrm

fakeroot dpkg-deb --build amath
mv amath.deb amath-${version}_$1.deb
rm -Rf amath
}

# Cleanup
#rm -Rf amath
build_package 'amd64' '' 64 980
build_package 'i386' '-m32' 32 980

+ 9
- 62
builddist View File

@@ -1,109 +1,56 @@
#!/bin/sh

set -e

rm -f amath.lha
rm -Rf amath
rm -Rf dist
mkdir dist

cd build/flexcat
./configure
make clean
make
cd ../..

./configure --disable-test --cflags="-m68000 -noixemul" --cross-compile="m68k-amigaos"
./configure --disable-test --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
make clean
make static
mv amath dist/amath.000
make clean
./configure --disable-test --cflags="-m68020 -noixemul" --cross-compile="m68k-amigaos"
./configure --disable-test --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
make static
mv amath dist/amath.020
make clean
./configure --disable-test --cflags="-m68030 -noixemul" --cross-compile="m68k-amigaos"
./configure --disable-test --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath dist/amath.030
make clean
#./configure --disable-test --cflags="-m68040 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath.040
#make clean
#./configure --disable-test --cflags="-m68060 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath.060
#make clean
#./configure --disable-test --cflags="-m68020 -m68881 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath.020f
#make clean
#./configure --disable-test --cflags="-m68030 -m68881 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath.030f
#make clean

./configure --enable-test --cflags="-m68000 -noixemul" --cross-compile="m68k-amigaos"
./configure --enable-test --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
make static
mv amath dist/amath-test.000
make clean
./configure --enable-test --cflags="-m68020 -noixemul" --cross-compile="m68k-amigaos"
./configure --enable-test --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
make static
mv amath dist/amath-test.020
make clean
./configure --enable-test --cflags="-m68030 -noixemul" --cross-compile="m68k-amigaos"
./configure --enable-test --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath dist/amath-test.030
make clean
#./configure --enable-test --cflags="-m68040 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath-test.040
#make clean
#./configure --enable-test --cflags="-m68060 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath-test.060
#make clean
#./configure --enable-test --cflags="-m68020 -m68881 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath-test.020f
#make clean
#./configure --enable-test --cflags="-m68030 -m68881 -noixemul" --cross-compile="m68k-amigaos"
#make static
#mv amath dist/amath-test.030f
#make clean

cd dist
touch hashkeys
sha1sum amath.000 >>hashkeys
sha1sum amath.020 >>hashkeys
sha1sum amath.030 >>hashkeys
#sha1sum amath.040 >>hashkeys
#sha1sum amath.060 >>hashkeys
#sha1sum amath.020f >>hashkeys
#sha1sum amath.030f >>hashkeys
sha1sum amath-test.000 >>hashkeys
sha1sum amath-test.020 >>hashkeys
sha1sum amath-test.030 >>hashkeys
#sha1sum amath-test.040 >>hashkeys
#sha1sum amath-test.060 >>hashkeys
#sha1sum amath-test.020f >>hashkeys
#sha1sum amath-test.030f >>hashkeys
sha256sum amath.000 >>hashkeys
sha256sum amath.020 >>hashkeys
sha256sum amath.030 >>hashkeys
#sha256sum amath.040 >>hashkeys
#sha256sum amath.060 >>hashkeys
#sha256sum amath.020f >>hashkeys
#sha256sum amath.030f >>hashkeys
sha256sum amath-test.000 >>hashkeys
sha256sum amath-test.020 >>hashkeys
sha256sum amath-test.030 >>hashkeys
#sha256sum amath-test.040 >>hashkeys
#sha256sum amath-test.060 >>hashkeys
#sha256sum amath-test.020f >>hashkeys
#sha256sum amath-test.030f >>hashkeys
cd ..

make amigacatalogs

make catalogs
cp LICENSE dist/
cp HISTORY dist/


+ 8
- 5
buildwin View File

@@ -1,30 +1,33 @@
#!/bin/sh

set -e

version="1.7.0"

echo "Building amath ${version} for Windows ..."

touch hashkeys
rm -f amath-${version}.zip
rm -Rf amath
rm -Rf dist
mkdir dist

./configure --enable-test --cross-compile="i686-w64-mingw32" --cflags="-D_WIN32" --ldflags="-static -static-libgcc -static-libstdc++"
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-D_WIN32" LDFLAGS="-static -static-libgcc -static-libstdc++"
make clean
make static
mv amath dist/amath-${version}-x86.exe
make clean

./configure --enable-test --cross-compile="x86_64-w64-mingw32" --cflags="-D_WIN32" --ldflags="-static -static-libgcc -static-libstdc++"
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-D_WIN32" LDFLAGS="-static -static-libgcc -static-libstdc++"
make static
mv amath dist/amath-${version}-x64.exe
make clean

./configure --enable-test --cross-compile="i686-w64-mingw32" --cflags="-D_WIN32 -DANSICONSOLE" --ldflags="-static -static-libgcc -static-libstdc++"
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-D_WIN32 -DANSICONSOLE" LDFLAGS="-static -static-libgcc -static-libstdc++"
make static
mv amath dist/amath-${version}-ansi-x86.exe
make clean

./configure --enable-test --cross-compile="x86_64-w64-mingw32" --cflags="-D_WIN32 -DANSICONSOLE" --ldflags="-static -static-libgcc -static-libstdc++"
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-D_WIN32 -DANSICONSOLE" LDFLAGS="-static -static-libgcc -static-libstdc++"
make static
mv amath dist/amath-${version}-ansi-x64.exe
make clean

+ 6
- 3
catalog/dansk/amath-help.ct View File

@@ -39,9 +39,8 @@ symtrigon
-------------------------------------------------#NEWLINE#sin Trigonometrisk sinus funktion.#NEWLINE#cos Trigonometrisk cosinus funktion.#NEWLINE#tan Trigonometrisk tangent funktion.#NEWLINE#cot Trigonometrisk cotangent funktion.#NEWLINE#sec Trigonometrisk secant funktion.#NEWLINE#csc Trigonometrisk cosecant funktion.#NEWLINE#asin Invers trigonometrisk sinus funktion.#NEWLINE#acos Invers trigonometrisk cosinus funktion.#NEWLINE#atan Invers trigonometrisk tangent funktion.#NEWLINE#acot Invers trigonometrisk cotangent funktion.#NEWLINE#asec Invers trigonometrisk secant funktion.#NEWLINE#acsc Invers trigonometrisk cosecant funktion.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse funktioner kan prefixes med ar eller arc #NEWLINE#i stedet for a.#NEWLINE#
symhyper
-------------------------------------------------#NEWLINE#sinh Hyperbolsk sinus funktion.#NEWLINE#cosh Hyperbolsk cosinus funktion.#NEWLINE#tanh Hyperbolsk tangent funktion.#NEWLINE#coth Hyperbolsk cotangent funktion.#NEWLINE#sech Hyperbolsk secant funktion.#NEWLINE#csch Hyperbolsk cosecant funktion. #NEWLINE#asinh Invers hyperbolsk sinus funktion.#NEWLINE#acosh Invers hyperbolsk cosinus funktion.#NEWLINE#atanh Invers hyperbolsk tangent funktion.#NEWLINE#acoth Invers hyperbolsk cotangent funktion.#NEWLINE#asech Invers hyperbolsk secant funktion.#NEWLINE#acsch Invers hyperbolsk cosecant funktion.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse funktioner kan prefixes med ar eller arc #NEWLINE#i stedet for a.#NEWLINE#
; Table of statements
symstatement
----------------------------------------------------------------------#NEWLINE#ryd Ryd konsol vindue.#NEWLINE#definer Definer funktion.#NEWLINE#slet Slet variabler og funktioner.#NEWLINE#cifre Angiv antal betydende cifre.#NEWLINE#beregn Beregn aritmetiske udtryk.#NEWLINE#k�r Afvikel kommondoer i en fil.#NEWLINE#funktioner Vis liste med brugerdefinerede funktioner.#NEWLINE#ind Skift numerisk talsystem ved l�sning (eksperimentelt).#NEWLINE#hj�lp Vis grundl�ggende hj�lpetekst.#NEWLINE#ud Skift numerisk talsystem ved skrivning (eksperimentelt).#NEWLINE#list Vis indholdet af en mappe.#NEWLINE#vis Vis indholdet af en fil.#NEWLINE#hent Hent variabler og funktioner fra en fil.#NEWLINE#gem Gem variabler og funktioner til en fil.#NEWLINE#variabler Vis variabler i hukommelsen.#NEWLINE#version Vis infomation om denne version.#NEWLINE#hukommelse Vis internt hukommelsesforbrug.#NEWLINE#afslut Afslut program.#NEWLINE#----------------------------------------------------------------------#NEWLINE#Det er valgfrit at angive definer og beregn kommandoerne. Kommandoerne#NEWLINE#funktioner og variabler kan forkortes til funk og var.#NEWLINE#
symearly
TODO-------------------------------------------------#NEWLINE#ver Versed sine function.#NEWLINE#vcs Versed cosine function.#NEWLINE#cvs Coversed sine function.#NEWLINE#cvc Coversed cosine function.#NEWLINE#hv Haversed sine function.#NEWLINE#hvc Haversed cosine function.#NEWLINE#hcv Hacoversed sine function.#NEWLINE#hcc Hacoversed cosine function.#NEWLINE#aver Inverse versed sine function.#NEWLINE#avcs Inverse versed cosine function.#NEWLINE#acvs Inverse coversed sine function.#NEWLINE#acvc Inverse coversed cosine function.#NEWLINE#ahv Inverse haversed sine function.#NEWLINE#ahvc Inverse haversed cosine function.#NEWLINE#ahcv Inverse hacoversed sine function.#NEWLINE#ahcc Inverse hacoversed cosine function.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse functions can be prefixed with ar or arc #NEWLINE#instead of a.#NEWLINE#
symcomplex
Udtryk med komplekse tal skrives ved at angive i#NEWLINE#sammen med den imagin�re talv�rdi. Komplekse tal#NEWLINE#kan blandes med reelle tal.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: 2+3i#NEWLINE#Eksempel: 2+3.2i*cos(-1i)+5/7#NEWLINE#
symclear
@@ -82,6 +81,10 @@ symsave
Med gem kommando kan variabler og funktioner i hukommelsen gemmes til en fil.#NEWLINE#Gemte variabler og funktion kan indl�stet igen med #SYNTAXHIGHLIGHT#hent#NORMAL# kommandoen.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: gem "mitarbejde"#NEWLINE#
symversion
Viser hvilken version af amath der k�rer.#NEWLINE#
symabout
TODOShow various information about the running version of amath.#NEWLINE#
symlicense
TODOShow license details.#NEWLINE#
symmem
Viser internt hukommelsesforbrug. Programkoden er ikke medregnet.#NEWLINE#
; Help for prefs statement

+ 75
- 35
catalog/dansk/amath-ident.ct View File

@@ -10,72 +10,112 @@
; ## Parts of the content came from wikipedia.org
; #############################################################################
abs
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
sgn
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
round
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
trunc
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
floor
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
ceil
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
sqr
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
cbr
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
lb
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
ln
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
lg
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
sin
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
cos
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
tan
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
cot
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
sec
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
csc
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
asin
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
acos
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
atan
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
acot
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
asec
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
acsc
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
sinh
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
cosh
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
tanh
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
coth
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
sech
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
csch
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
asinh
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
acosh
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
atanh
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
acoth
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
asech
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
acsch
Der er ikke nogen hjælp tilgængelig om den funktion.#NEWLINE#
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
ver
The versed sine is an early appearing trigonometric function.#NEWLINE#It is equal to one minus the cosine.#NEWLINE#ver(x) = 1 - cos(x)#NEWLINE#
vcs
The versed cosine is an early appearing trigonometric function.#NEWLINE#It is equal to one plus the cosine.#NEWLINE#ver(x) = 1 + cos(x)#NEWLINE#
cvs
The coversed sine is an early appearing trigonometric function.#NEWLINE#It is equal to one minus the sine.#NEWLINE#ver(x) = 1 - sin(x)#NEWLINE#
cvc
The coversed cosine is an early appearing trigonometric function.#NEWLINE#It is equal to one plus the sine.#NEWLINE#cvc(x) = 1 + sin(x)#NEWLINE#
hv
No help is available for the haversed sine function.#NEWLINE#
hvc
No help is available for the haversed cosine function.#NEWLINE#
hcv
No help is available for the hacoversed sine function.#NEWLINE#
hcc
No help is available for the hacoversed cosine function.#NEWLINE#
aver
No help is available for this function.#NEWLINE#
avcs
No help is available for this function.#NEWLINE#
acvs
No help is available for this function.#NEWLINE#
acvc
No help is available for this function.#NEWLINE#
ahv
No help is available for this function.#NEWLINE#
ahvc
No help is available for this function.#NEWLINE#
ahcv
No help is available for this function.#NEWLINE#
ahcc
No help is available for this function.#NEWLINE#
exsec
No help is available for this function.#NEWLINE#
excsc
No help is available for this function.#NEWLINE#
aexsec
No help is available for this function.#NEWLINE#
aexcsc
No help is available for this function.#NEWLINE#

+ 9
- 0
catalog/dansk/amath-keyword.ct View File

@@ -88,6 +88,9 @@ hyper
hyper
hyperbolic
hyperbolsk
;######### Early keyword
early
tidlig
;######### HelpStatement
help
hj�lp
@@ -153,3 +156,9 @@ hex
hex
hexadecimal
hexadecimal
;######### AboutStatement and keyword
about
om
;######### LicenseStatement and keyword
license
lisens

+ 40
- 0
catalog/dansk/amath-text.ct View File

@@ -28,6 +28,46 @@
; #############################################################################
INTROMSG
#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02#Skriv hj�lp for at f� vist uddybende information.#NEWLINE#
STATEMENTLINE
---------------------------------------------------------#NEWLINE#
STATEMENTCLEAR
clear Clear console window.#NEWLINE#
STATEMENTDEF
def Define function.#NEWLINE#
STATEMENTDELETE
delete Delete variable or function.#NEWLINE#
STATEMENTDIGITS
digits Set number of significant digits.#NEWLINE#
STATEMENTEVAL
eval Evaluate arithmetic expression.#NEWLINE#
STATEMENTEXECUTE
execute Execute statements in a file.#NEWLINE#
STATEMENTFUNCS
functions Show list of user defined functions.#NEWLINE#
STATEMENTINPUT
input Change numeral input system.#NEWLINE#
STATEMENTHELP
help Show basic help text.#NEWLINE#
STATEMENTOUTPUT
output Change numeral output system.#NEWLINE#
STATEMENTLIST
list Show content of a directory.#NEWLINE#
STATEMENTSHOW
show Show content of a file.#NEWLINE#
STATEMENTLOAD
load Load variable and functions from file.#NEWLINE#
STATEMENTSAVE
save Save variable and functions to file.#NEWLINE#
STATEMENTVARS
variables Show list of variables.#NEWLINE#
STATEMENTVERSION
version Show version string.#NEWLINE#
STATEMENTMEMORY
memory Show internal memory usage.#NEWLINE#
STATEMENTEXIT
exit Exit program.#NEWLINE#
STATEMENTFOOTER
The def and eval statements are optional. Functions and#NEWLINE#variables statements can be shorten to funcs and vars.#NEWLINE#
TXTLISTDIRHEADER
Type Navn#NEWLINE#-----------------------------------------------#NEWLINE#
TXTLISTDIRTFILE

+ 13
- 7
catalog/english/amath-help.ct View File

@@ -1,4 +1,4 @@
## version $VER: amath-help.catalog 1.60 (08.04.2015) English
## version $VER: amath-help.catalog 1.70 (28.02.2017) English
## language english
## codeset 0
; #############################################################################
@@ -31,7 +31,7 @@
; #############################################################################
; Introduction table - Symbol(0)
symzero
Enter command or expression to evaluate.#NEWLINE##SYNTAXHIGHLIGHT#Example: 2+3-cos(3)#NORMALTEXT##NEWLINE# #NEWLINE#More help is available for designated topics.#NEWLINE#-------------------------------------------------#NEWLINE#functions Base functions.#NEWLINE#trigon Trigonometric functions.#NEWLINE#hyper Hyperbolic functions.#NEWLINE#complex Syntax for complex numbers.#NEWLINE#statements Available statements.#NEWLINE#operators Supported operators.#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Example: help trigon#NEWLINE#
Enter command or expression to evaluate.#NEWLINE##SYNTAXHIGHLIGHT#Example: 2+3-cos(3)#NORMALTEXT##NEWLINE# #NEWLINE#More help is available for designated topics.#NEWLINE#-------------------------------------------------#NEWLINE#functions Base functions.#NEWLINE#trigon Trigonometric functions.#NEWLINE#hyper Hyperbolic functions.#NEWLINE#early Early trigonometric functions.#NEWLINE#complex Syntax for complex numbers.#NEWLINE#statements Available statements.#NEWLINE#operators Supported operators.#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Example: help trigon#NEWLINE#
; Table of operators
symoperator
-------------------------------------------------#NEWLINE# + Mathematical addition.#NEWLINE# - Mathematical subtraction.#NEWLINE# * Mathematical multiplication.#NEWLINE# / Mathematical division.#NEWLINE# ^ Mathematical exponentiation.#NEWLINE# = Assignment of variable values.#NEWLINE# | Absolute value of number. #NEWLINE#-------------------------------------------------#NEWLINE#
@@ -40,13 +40,13 @@ symfunction
-------------------------------------------------#NEWLINE#abs Absolute value of number.#NEWLINE#sgn Mathematical signum function.#NEWLINE#round Round to nearest integer number.#NEWLINE#trunc Discard fraction part of number.#NEWLINE#floor Mathematical floor function.#NEWLINE#ceil Mathematical ceiling function.#NEWLINE#sqrt Square root function (exp 1/2).#NEWLINE#cbrt Cube root function (exp 1/3).#NEWLINE#lb Binary logarithm function (base 2).#NEWLINE#ln Natural logarithm function (base e).#NEWLINE#lg Common logarithm function (base 10).#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Example: round(1.55)#NORMALTEXT##NEWLINE#
; Table of trigonometric functions
symtrigon
-------------------------------------------------#NEWLINE#sin Trigonometric sine function.#NEWLINE#cos Trigonometric cosine function.#NEWLINE#tan Trigonometric tangent function.#NEWLINE#cot Trigonometric cotangent function.#NEWLINE#sec Trigonometric secant function.#NEWLINE#csc Trigonometric cosecant function.#NEWLINE#asin Inverse trigonometric sine function.#NEWLINE#acos Inverse trigonometric cosine function.#NEWLINE#atan Inverse trigonometric tangent function.#NEWLINE#acot Inverse trigonometric cotangent function.#NEWLINE#asec Inverse trigonometric secant function.#NEWLINE#acsc Inverse trigonometric cosecant function.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse functions can be prefixed with ar or arc #NEWLINE#instead of a.#NEWLINE#
-------------------------------------------------#NEWLINE#sin Trigonometric sine function.#NEWLINE#cos Trigonometric cosine function.#NEWLINE#tan Trigonometric tangent function.#NEWLINE#cot Trigonometric cotangent function.#NEWLINE#sec Trigonometric secant function.#NEWLINE#csc Trigonometric cosecant function.#NEWLINE#exsec Trigonometric exsecant function.#NEWLINE#excsc Trigonometric excosecant function.#NEWLINE#asin Inverse trigonometric sine function.#NEWLINE#acos Inverse trigonometric cosine function.#NEWLINE#atan Inverse trigonometric tangent function.#NEWLINE#acot Inverse trigonometric cotangent function.#NEWLINE#asec Inverse trigonometric secant function.#NEWLINE#acsc Inverse trigonometric cosecant function.#NEWLINE#exsec Inverse trigonometric exsecant function.#NEWLINE#excsc Inverse trigonometric excosecant function.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse functions can be prefixed with ar or arc #NEWLINE#instead of a.#NEWLINE#
; Table of hyperbolic functions
symhyper
-------------------------------------------------#NEWLINE#sinh Hyperbolic sine function.#NEWLINE#cosh Hyperbolic cosine function.#NEWLINE#tanh Hyperbolic tangent function.#NEWLINE#coth Hyperbolic cotangent function.#NEWLINE#sech Hyperbolic secant function.#NEWLINE#csch Hyperbolic cosecant function. #NEWLINE#asinh Inverse hyperbolic sine function.#NEWLINE#acosh Inverse hyperbolic cosine function.#NEWLINE#atanh Inverse hyperbolic tangent function.#NEWLINE#acoth Inverse hyperbolic cotangent function.#NEWLINE#asech Inverse hyperbolic secant function.#NEWLINE#acsch Inverse hyperbolic cosecant function.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse functions can be prefixed with ar or arc #NEWLINE#instead of a.#NEWLINE#
; Table of statements
symstatement
---------------------------------------------------------#NEWLINE#clear Clear console window.#NEWLINE#def Define function.#NEWLINE#delete Delete variable or function.#NEWLINE#digits Set number of significant digits.#NEWLINE#eval Evaluate arithmetic expression.#NEWLINE#execute Execute statements in a file.#NEWLINE#functions Show list of user defined functions.#NEWLINE#input Change numeral input system.#NEWLINE#help Show basic help text.#NEWLINE#output Change numeral output system.#NEWLINE#list Show content of a directory.#NEWLINE#show Show content of a file.#NEWLINE#load Load variable and functions from file.#NEWLINE#save Save variable and functions to file.#NEWLINE#variables Show list of variables.#NEWLINE#version Show version string.#NEWLINE#memory Show internal memory usage.#NEWLINE#exit Exit program.#NEWLINE#---------------------------------------------------------#NEWLINE#The def and eval statements are optional. Functions and#NEWLINE#variables statements can be shorten to funcs and vars.#NEWLINE#
; Table of early trigonometric functions
symearly
-------------------------------------------------#NEWLINE#ver Versed sine function.#NEWLINE#vcs Versed cosine function.#NEWLINE#cvs Coversed sine function.#NEWLINE#cvc Coversed cosine function.#NEWLINE#hv Haversed sine function.#NEWLINE#hvc Haversed cosine function.#NEWLINE#hcv Hacoversed sine function.#NEWLINE#hcc Hacoversed cosine function.#NEWLINE#aver Inverse versed sine function.#NEWLINE#avcs Inverse versed cosine function.#NEWLINE#acvs Inverse coversed sine function.#NEWLINE#acvc Inverse coversed cosine function.#NEWLINE#ahv Inverse haversed sine function.#NEWLINE#ahvc Inverse haversed cosine function.#NEWLINE#ahcv Inverse hacoversed sine function.#NEWLINE#ahcc Inverse hacoversed cosine function.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse functions can be prefixed with ar or arc #NEWLINE#instead of a.#NEWLINE#
; Help for complex numbers
symcomplex
Expressions with complex numbers are written using an i to denote#NEWLINE#the imaginary value. Complex numbers can seamlessly be mixed with#NEWLINE#real numbers.#NEWLINE##SYNTAXHIGHLIGHT#Syntax: 2+3i#NEWLINE#Example: 2+3.2i*cos(-1i)+5/7#NEWLINE#
@@ -92,6 +92,12 @@ The save statement saves defined variables and functions to a file in a#NEWLINE#
; Help for version statement
symversion
Show which version of amath is running.#NEWLINE#
; Help for about statement
symabout
Show various information about the running version of amath.#NEWLINE#
; Help for license statement
symlicense
Show license details.#NEWLINE#
; Help for memory statement
symmem
Show internal memory usage together with maximum usage.#NEWLINE#
@@ -127,4 +133,4 @@ symdec
No help is available for the decimal keyword#NEWLINE
; Help for hexadecimal keyword
symhex
No help is available for the hexadecimal keyword#NEWLINE
No help is available for the hexadecimal keyword#NEWLINE

+ 41
- 1
catalog/english/amath-ident.ct View File

@@ -1,4 +1,4 @@
## version $VER: amath-ident.catalog 1.60 (08.04.2015) English
## version $VER: amath-ident.catalog 1.70 (28.02.2017) English
## language english
## codeset 0
;#############################################################################
@@ -87,3 +87,43 @@ asech
No help is available for this function.#NEWLINE#
acsch
No help is available for this function.#NEWLINE#
ver
The versed sine is an early appearing trigonometric function.#NEWLINE#It is equal to one minus the cosine.#NEWLINE#ver(x) = 1 - cos(x)#NEWLINE#
vcs
The versed cosine is an early appearing trigonometric function.#NEWLINE#It is equal to one plus the cosine.#NEWLINE#ver(x) = 1 + cos(x)#NEWLINE#
cvs
The coversed sine is an early appearing trigonometric function.#NEWLINE#It is equal to one minus the sine.#NEWLINE#ver(x) = 1 - sin(x)#NEWLINE#
cvc
The coversed cosine is an early appearing trigonometric function.#NEWLINE#It is equal to one plus the sine.#NEWLINE#cvc(x) = 1 + sin(x)#NEWLINE#
hv
No help is available for the haversed sine function.#NEWLINE#
hvc
No help is available for the haversed cosine function.#NEWLINE#
hcv
No help is available for the hacoversed sine function.#NEWLINE#
hcc
No help is available for the hacoversed cosine function.#NEWLINE#
aver
No help is available for this function.#NEWLINE#
avcs
No help is available for this function.#NEWLINE#
acvs
No help is available for this function.#NEWLINE#
acvc
No help is available for this function.#NEWLINE#
ahv
No help is available for this function.#NEWLINE#
ahvc
No help is available for this function.#NEWLINE#
ahcv
No help is available for this function.#NEWLINE#
ahcc
No help is available for this function.#NEWLINE#
exsec
No help is available for this function.#NEWLINE#
excsc
No help is available for this function.#NEWLINE#
aexsec
No help is available for this function.#NEWLINE#
aexcsc
No help is available for this function.#NEWLINE#

+ 43
- 3
catalog/english/amath-text.ct View File

@@ -1,4 +1,4 @@
## version $VER: amath-text.catalog 1.60 (08.04.2015) English
## version $VER: amath-text.catalog 1.70 (28.02.2017) English
## language english
## codeset 0
; #############################################################################
@@ -31,6 +31,46 @@
; #############################################################################
INTROMSG
#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02#Type help to show info.#NEWLINE#
STATEMENTLINE
---------------------------------------------------------#NEWLINE#
STATEMENTCLEAR
clear Clear console window.#NEWLINE#
STATEMENTDEF
def Define function.#NEWLINE#
STATEMENTDELETE
delete Delete variable or function.#NEWLINE#
STATEMENTDIGITS
digits Set number of significant digits.#NEWLINE#
STATEMENTEVAL
eval Evaluate arithmetic expression.#NEWLINE#
STATEMENTEXECUTE
execute Execute statements in a file.#NEWLINE#
STATEMENTFUNCS
functions Show list of user defined functions.#NEWLINE#
STATEMENTINPUT
input Change numeral input system.#NEWLINE#
STATEMENTHELP
help Show basic help text.#NEWLINE#
STATEMENTOUTPUT
output Change numeral output system.#NEWLINE#
STATEMENTLIST
list Show content of a directory.#NEWLINE#
STATEMENTSHOW
show Show content of a file.#NEWLINE#
STATEMENTLOAD
load Load variable and functions from file.#NEWLINE#
STATEMENTSAVE
save Save variable and functions to file.#NEWLINE#
STATEMENTVARS
variables Show list of variables.#NEWLINE#
STATEMENTVERSION
version Show version string.#NEWLINE#
STATEMENTMEMORY
memory Show internal memory usage.#NEWLINE#
STATEMENTEXIT
exit Exit program.#NEWLINE#
STATEMENTFOOTER
The def and eval statements are optional. Functions and#NEWLINE#variables statements can be shorten to funcs and vars.#NEWLINE#
TXTLISTDIRHEADER
Type Name#NEWLINE#-----------------------------------------------#NEWLINE#
TXTLISTDIRTFILE
@@ -60,7 +100,7 @@ Function cannot be redefined:#SPACE#
HELPPNUMERA
Base value must be between 2 and 32:#SPACE#
HELPPDIGITS
Number of digits must be between 0 and 15:#SPACE#
Number of digist must be between 0 and 15:#SPACE#
HELPINPUSHOW
Numeral input system is#SPACE#
HELPOUTPSHOW
@@ -96,4 +136,4 @@ Preferences could not be saved.#NEWLINE#
MSGNODIR
Could not open directory:#SPACE#
MSGNOFILE
Cannot open file.#NEWLINE#
Cannot open file.#NEWLINE#

+ 299
- 147
configure View File

@@ -27,75 +27,94 @@

set -e

version="1.7.0"

clang=false
debugsym=false
regtest=true

prefix="/usr"
pkgconfigdir="lib/pkgconfig"
cflags=""
cxxflags=""
ldflags=""
gcclib="-lstdc++"

for arg in "$@"; do
case "$arg" in
--prefix=*)
prefix=`echo $arg | sed 's/--prefix=//'`
;;
case "$arg" in
--prefix=*)
prefix=`echo $arg | sed 's/--prefix=//'`
;;

--pkgconfig=*)
pkgconfigdir=`echo $arg | sed 's/--pkgconfig=//'`
;;

--cross-compile=*)
crosscompile=`echo $arg | sed 's/--cross-compile=//'`
--cross-compile=*)
crosscompile=`echo $arg | sed 's/--cross-compile=//'`
crosscompile="${crosscompile}-"
;;
;;

--cflags=*)
cflags=`echo $arg | sed 's/--cflags=//'`
CFLAGS=*)
cflags=`echo $arg | sed 's/CFLAGS=//'`
cflags="${cflags} "
;;
;;

--cxxflags=*)
cxxflags=`echo $arg | sed 's/--cxxflags=//'`
CXXFLAGS=*)
cxxflags=`echo $arg | sed 's/CXXFLAGS=//'`
cxxflags="${cxxflags} "
;;
;;

--ldflags=*)
ldflags=`echo $arg | sed 's/--ldflags=//'`
LDFLAGS=*)
ldflags=`echo $arg | sed 's/LDFLAGS=//'`
ldflags="${ldflags} "
;;
;;
--enable-clang)
clang=true;;
--disable-clang)
clang=false;;

--enable-debug)
debugsym=true;;
--disable-debug)
debugsym=false;;

--enable-test)
regtest=true;;
--disable-test)
regtest=false;;

--help)
echo 'usage: ./configure [options]'
echo 'options:'
echo ' --prefix=<path>: installation prefix'
echo ' --cflag=<flags>: additional compiler flags'
echo ' --cxxflag=<flags>: additional compiler flags'
echo ' --ldflag=<flags>: additional linker flags'
echo ' --cross-compile=<prefix>: cross compiler prefix'
echo ' --enable-debug: include debug symbols'
echo ' --disable-debug: do not include debug symbols'
echo ' --enable-test: build code with regression tests'
echo ' --disable-test: do not include regression test'
echo ' --enable-clang: build with clang compiler'
echo ' --disable-clang: do not build with clang compiler'
echo 'all invalid options are silently ignored'
exit 0
;;
esac
clang=true;;
--disable-clang)
clang=false;;

--enable-debug)
debugsym=true;;
--disable-debug)
debugsym=false;;

--enable-test)
regtest=true;;
--disable-test)
regtest=false;;

--enable-stdc++)
gcclib="-lstdc++";;
--disable-stdc++)
gcclib="";;

--help)
echo "amath configure script ${version}"
echo
echo 'usage: ./configure [options]'
echo 'options:'
echo ' --prefix=<path>: installation prefix'
echo ' --pkgconfig=<path>: pkg-config path (without prefix)'
echo ' --cross-compile=<prefix>: cross compiler prefix'
echo ' --enable-debug: include debug symbols'
echo ' --disable-debug: do not include debug symbols'
echo ' --enable-test: build code with regression tests'
echo ' --disable-test: do not include regression test'
echo ' --enable-clang: build with clang compiler'
echo ' --disable-clang: do not build with clang compiler'
echo ' --enable-stdc++: link with stdc++ library'
echo ' --disable-stdc++: do not link with stdc++ library'
echo
echo ' CFLAGS=<flags>: additional compiler flags'
echo ' CXXFLAGS=<flags>: additional compiler flags'
echo ' LDFLAGS=<flags>: additional linker flags'
echo
echo 'all invalid options are silently ignored'
exit 0
;;
esac
done

if $clang; then
@@ -127,7 +146,6 @@ cxxflags="${cflags} ${cxxflags}"
APPSRCS='
evaluator.cpp
functionlist.cpp
functions.cpp
fgrid.cpp
lexer.cpp
nodes.cpp
@@ -145,9 +163,6 @@ console_amiga.cpp
console_stdc.cpp
filesystem_amiga.cpp
filesystem_stdc.cpp
graph.cpp
graph_amiga.cpp
graph_gtk.cpp
language.cpp
language_amiga.cpp
language_posix.cpp
@@ -174,6 +189,14 @@ arctan.cpp
arccosecant.cpp
arccotangent.cpp
arcsecant.cpp
arccovercosine.cpp
arccoversine.cpp
archacovercosine.cpp
archacoversine.cpp
archavercosine.cpp
archaversine.cpp
arcvercosine.cpp
arcversine.cpp
ceil.cpp
cosecant.cpp
cosine.cpp
@@ -188,6 +211,18 @@ hacovercos.cpp
hacoversin.cpp
havercos.cpp
haversin.cpp
hyparccosecant.cpp
hyparccosine.cpp
hyparccotangent.cpp
hyparcsecant.cpp
hyparcsine.cpp
hyparctangent.cpp
hypcosecant.cpp
hypcosine.cpp
hypcotangent.cpp
hypsecant.cpp
hypsine.cpp
hyptangent.cpp
ln.cpp
log10.cpp
log2.cpp
@@ -327,6 +362,25 @@ strcmp.c
strlen.c
untag.c
'
FLXSRCS='
asprintf.c
createcat.c
createcatsrc.c
createct.c
globals.c
locale_other.c
main.c
openlibs.c
readprefs.c
scancd.c
scanct.c
scanpo.c
showfuncs.c
strptime.c
swapfuncs.c
utils.c
vastubs.c
'

amathc="amathc"
amath="amath"
@@ -469,17 +523,21 @@ echo

########################## Application Library ##########################
{
echo "CXX = ${crosscompile}${cxxcompiler}"
echo "CXXFLAGS = ${libop}${options} ${cxxflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "PREFIX = ${prefix}"
echo
echo "alib = lib${amathapp}.a"
echo "solib = lib${amathapp}.so"
echo "CXX = ${crosscompile}${cxxcompiler}"
echo "CXXFLAGS = ${libop}${options} ${cxxflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "LDCONFIG = ldconfig"
echo "PREFIX = ${prefix}"
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
echo "alib = lib${amathapp}.a"
echo "solib = lib${amathapp}.so"
echo "pkgconfig = amatha.pc"
echo
echo "all: static shared"
echo
@@ -509,20 +567,44 @@ echo " \${MKDIR} static"
echo " \${MKDIR} shared"
echo
echo "\${solib}: build ${files2}"
echo " \${CC} -shared -fPIC -Wl,-soname,\${solib} -o \${solib} ${files2}"
echo " \${CXX} \${CXXFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${files2}"
echo
echo "\${alib}: build ${files}"
echo " \${AR} rcs static/\${alib} ${files}"
echo " \${RANLIB} static/\${alib}"
echo
echo ".PHONY: install"
echo "install: \${solib}"
echo " \${MKDIR} \${DESTDIR}\${PREFIX}/lib"
echo " \${INSTALL} \${solib} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo ".PHONY: install"
echo "install: \${alib} \${solib}"
echo " \${MKDIR} \${INSTDIR}"
echo " \${MKDIR} \${INSTDIRPC}"
echo " \${MKDIR} \${INSTDIRI}"
echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
echo " \${INSTALL} aengine.h \${INSTDIRI}/aengine.h"
echo " \${INSTALL} charbuf.h \${INSTDIRI}/charbuf.h"
echo " \${INSTALL} cplex.h \${INSTDIRI}/cplex.h"
echo " \${INSTALL} integer.h \${INSTDIRI}/integer.h"
echo " \${INSTALL} nnumb.h \${INSTDIRI}/nnumb.h"
echo " \${INSTALL} ntext.h \${INSTDIRI}/ntext.h"
echo " \${INSTALL} numb.h \${INSTDIRI}/numb.h"
echo " \${INSTALL} real.h \${INSTDIRI}/real.h"
echo " \${LDCONFIG} \${INSTDIR}"
echo
echo ".PHONY: uninstall"
echo "uninstall:"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${DEL} \${INSTDIR}/\${alib}"
echo " \${DEL} \${INSTDIR}/\${solib}"
echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
echo " \${DEL} \${INSTDIRI}/aengine.h"
echo " \${DEL} \${INSTDIRI}/charbuf.h"
echo " \${DEL} \${INSTDIRI}/cplex.h"
echo " \${DEL} \${INSTDIRI}/integer.h"
echo " \${DEL} \${INSTDIRI}/nnumb.h"
echo " \${DEL} \${INSTDIRI}/ntext.h"
echo " \${DEL} \${INSTDIRI}/numb.h"
echo " \${DEL} \${INSTDIRI}/real.h"
echo " \${LDCONFIG}"
echo
echo "clean:"
echo " \${DEL} static/\${alib} \${solib} ${files} ${files2}"
@@ -532,17 +614,23 @@ echo

############################### C Library ###############################
{
echo "CC = ${crosscompile}${ccompiler}"
echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "PREFIX = ${prefix}"
echo
echo "alib = lib${amathc}.a"
echo "solib = lib${amathc}.so"
echo "CC = ${crosscompile}${ccompiler}"
echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "LDCONFIG = ldconfig"
echo "PREFIX = ${prefix}"
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man3"
echo "alib = lib${amathc}.a"
echo "solib = lib${amathc}.so"
echo "pkgconfig = amathc.pc"
echo "manpage = amathc.3"
echo
echo "all: static shared"
echo
@@ -572,7 +660,7 @@ echo " \${MKDIR} static"
echo " \${MKDIR} shared"
echo
echo "\${solib}: build ${libcs}"
echo " \${CC} -shared -fPIC -Wl,-soname,\${solib} -o \${solib} ${libcs} -lc"
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${libcs} -lc"
echo
echo "\${alib}: build ${libc}"
echo " \${AR} rcs static/\${alib} ${libc}"
@@ -580,19 +668,26 @@ echo " \${RANLIB} static/\${alib}"
echo
echo ".PHONY: install"
echo "install: \${alib} \${solib}"
echo " \${MKDIR} \${DESTDIR}\${PREFIX}/lib"
echo " \${MKDIR} \${DESTDIR}\${PREFIX}/include"
echo " \${INSTALL} static/\${alib} \${DESTDIR}\${PREFIX}/lib/\${alib}"
echo " \${INSTALL} \${solib} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${INSTALL} ../amath.h \${DESTDIR}\${PREFIX}/include"
echo " \${INSTALL} ../amathc.h \${DESTDIR}\${PREFIX}/include"
echo " \${MKDIR} \${INSTDIR}"
echo " \${MKDIR} \${INSTDIRPC}"
echo " \${MKDIR} \${INSTDIRI}"
echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
echo " \${INSTALL} ../amath.h \${INSTDIRI}"
echo " \${INSTALL} ../amathc.h \${INSTDIRI}"
echo " \${LDCONFIG} \${INSTDIR}"
echo
echo ".PHONY: uninstall"
echo "uninstall:"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${alib}"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${DEL} \${DESTDIR}\${PREFIX}/include/amath.h"
echo " \${DEL} \${DESTDIR}\${PREFIX}/include/amathc.h"
echo " \${DEL} \${INSTDIR}/\${alib}"
echo " \${DEL} \${INSTDIR}/\${solib}"
echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
echo " \${DEL} \${INSTDIRM}/\${manpage}"
echo " \${DEL} \${INSTDIRI}/amath.h"
echo " \${DEL} \${INSTDIRI}/amathc.h"
echo " \${LDCONFIG}"
echo
echo "clean:"
echo " \${DEL} static/\${alib} \${solib} ${libc} ${libcs}"
@@ -603,17 +698,23 @@ echo

############################# Real Numbers ##############################
{
echo "CC = ${crosscompile}${ccompiler}"
echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "PREFIX = ${prefix}"
echo
echo "alib = lib${amath}.a"
echo "solib = lib${amath}.so"
echo "CC = ${crosscompile}${ccompiler}"
echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "LDCONFIG = ldconfig"
echo "PREFIX = ${prefix}"
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man3"
echo "alib = lib${amath}.a"
echo "solib = lib${amath}.so"
echo "pkgconfig = amathr.pc"
echo "manpage = amathr.3"
echo
echo "all: static shared"
echo
@@ -643,7 +744,7 @@ echo " \${MKDIR} static"
echo " \${MKDIR} shared"
echo
echo "\${solib}: build ${libamaths}"
echo " \${CC} -shared -fPIC -Wl,-soname,\${solib} -o \${solib} ${libamaths}"
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${libamaths}"
echo
echo "\${alib}: build ${libamath}"
echo " \${AR} rcs static/\${alib} ${libamath}"
@@ -651,14 +752,24 @@ echo " \${RANLIB} static/\${alib}"
echo
echo ".PHONY: install"
echo "install: \${alib} \${solib}"
echo " \${MKDIR} \${DESTDIR}\${PREFIX}/lib"
echo " \${INSTALL} static/\${alib} \${DESTDIR}\${PREFIX}/lib/\${alib}"
echo " \${INSTALL} \${solib} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${MKDIR} \${INSTDIR}"
echo " \${MKDIR} \${INSTDIRPC}"
echo " \${MKDIR} \${INSTDIRI}"
echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
echo " \${INSTALL} ../math.h \${INSTDIRI}/amathr.h"
echo " \${LDCONFIG} \${INSTDIR}"
echo
echo ".PHONY: uninstall"
echo "uninstall:"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${alib}"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${DEL} \${INSTDIR}/\${alib}"
echo " \${DEL} \${INSTDIR}/\${solib}"
echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
echo " \${DEL} \${INSTDIRM}/\${manpage}"
echo " \${DEL} \${INSTDIRI}/amathr.h"
echo " \${LDCONFIG}"
echo
echo "clean:"
echo " \${DEL} static/\${alib} \${solib} ${libamath} ${libamaths}"
@@ -668,17 +779,23 @@ echo

############################ Complex Numbers ############################
{
echo "CC = ${crosscompile}${ccompiler}"
echo "CFLAGS = -std=c9x ${libop}${options} ${cxxflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "PREFIX = ${prefix}"
echo
echo "alib = lib${amathcplex}.a"
echo "solib = lib${amathcplex}.so"
echo "CC = ${crosscompile}${ccompiler}"
echo "CFLAGS = -std=c9x ${libop}${options} ${cxxflags}-I. -I.. -Wall"
echo "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0644"
echo "LDCONFIG = ldconfig"
echo "PREFIX = ${prefix}"
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man3"
echo "alib = lib${amathcplex}.a"
echo "solib = lib${amathcplex}.so"
echo "pkgconfig = amathi.pc"
echo "manpage = amathi.3"
echo
echo "all: static shared"
echo
@@ -708,7 +825,7 @@ echo " \${MKDIR} static"
echo " \${MKDIR} shared"
echo
echo "\${solib}: build ${libcomplexs}"
echo " \${CC} -shared -fPIC -Wl,-soname,\${solib} -o \${solib} ${libcomplexs}"
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${libcomplexs}"
echo
echo "\${alib}: build ${libcomplex}"
echo " \${AR} rcs static/\${alib} ${libcomplex}"
@@ -716,16 +833,25 @@ echo " \${RANLIB} static/\${alib}"
echo
echo ".PHONY: install"
echo "install: \${alib} \${solib}"
echo " \${MKDIR} \${DESTDIR}\${PREFIX}/lib"
echo " \${INSTALL} static/\${alib} \${DESTDIR}\${PREFIX}/lib/\${alib}"
echo " \${INSTALL} \${solib} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${INSTALL} ../complex.h \${DESTDIR}\${PREFIX}/include"
echo " \${MKDIR} \${INSTDIR}"
echo " \${MKDIR} \${INSTDIRPC}"
echo " \${MKDIR} \${INSTDIRI}"
echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
echo " \${INSTALL} ../complex.h \${INSTDIRI}/amathi.h"
echo " \${LDCONFIG} \${INSTDIR}"
echo
echo ".PHONY: uninstall"
echo "uninstall:"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${alib}"
echo " \${DEL} \${DESTDIR}\${PREFIX}/lib/\${solib}"
echo " \${DEL} \${DESTDIR}\${PREFIX}/include/complex.h"
echo " \${DEL} \${INSTDIR}/\${alib}"
echo " \${DEL} \${INSTDIR}/\${solib}"
echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
echo " \${DEL} \${INSTDIRM}/\${manpage}"
echo " \${DEL} \${INSTDIRPC}/amathi.pc"
echo " \${DEL} \${INSTDIRI}/amathi.h"
echo " \${LDCONFIG}"
echo
echo "clean:"
echo " \${DEL} static/\${alib} \${solib} ${libcomplex} ${libcomplexs}"
@@ -748,8 +874,11 @@ echo "LPATHS = -Lsrc/lib/static -Lsrc/clib/static -Lsrc/real/static -Lsrc/cple
echo "FLXCAT = build/flexcat/flexcat"
echo "MKDIR = mkdir -p"
echo "DEL = rm -f"
echo "INSTALL = install -m 0755"
echo "INSTALLP = install -m 0755"
echo "INSTALLM = install -m 0644"
echo "PREFIX = ${prefix}"
echo "INSTDIRP = \${DESTDIR}\${PREFIX}/bin"
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man1"
echo
echo "all: shared-app"
echo "app: ${appmain} ${appfunction} ${appstatement} ${appsystem}"
@@ -785,25 +914,15 @@ echo
echo "${amathcplex}:"
echo " cd src/cplex && \${MAKE}"
echo
echo "catalogsa:" # Application catalogs
echo "localize:"
echo " cd build/flexcat && \${MAKE}"
echo " \${FLXCAT} text/keyword.cd src/localize/kword.h=text/keyword.sd"
echo " \${FLXCAT} text/help.cd src/localize/help.h=text/help.sd"
echo " \${FLXCAT} text/ident.cd src/localize/ident.h=text/ident.sd"
echo " \${FLXCAT} text/text.cd src/localize/text.h=text/text.sd"
echo
echo "catalogsu:" # Unix catalogs
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-help.ct >utext/dk-help.dict"
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-ident.ct >utext/dk-ident.dict"
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-text.ct >utext/dk-text.dict"
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict"
echo
echo "catalogsw:" # Windows catalogs
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-help.ct >utext/dk-help.dict"
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-ident.ct >utext/dk-ident.dict"
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-text.ct >utext/dk-text.dict"
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict"
echo
echo "amigacatalogs:"
echo "catalogs:"
echo " cd build/flexcat && \${MAKE}"
echo " \${MKDIR} dist/catalog/english"
echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog"
echo " \${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG dist/catalog/english/amath-ident.catalog"
@@ -829,16 +948,18 @@ echo " cd src/main/statement && \${MAKE} static"
echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATHS} \${LFLAGS}"
echo
echo ".PHONY: test"
echo "test: static-app"
echo "test: amath"
echo " LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real"
echo " ./amath test"
echo
echo ".PHONY: install"
echo "install: amath"
echo "install: shared-app"
echo " cd src/lib && \${MAKE} install"
echo " cd src/clib && \${MAKE} install"
echo " cd src/real && \${MAKE} install"
echo " cd src/cplex && \${MAKE} install"
echo " \${INSTALL} amath \${DESTDIR}\${PREFIX}/bin"
echo " \${INSTALLP} amath \${INSTDIRP}/amath"
echo " \${INSTALLM} amath.1 \${INSTDIRM}/amath.1"