Browse Source

Release 1.7.1

tags/1.7.1^0
Carsten Larsen 3 years ago
parent
commit
331a9141be
93 changed files with 1598 additions and 5177 deletions
  1. +6
    -1
      HISTORY
  2. +0
    -122
      Makefile
  3. +20
    -29
      amath.1
  4. +1
    -1
      amath.doxygen
  5. +0
    -62
      build/flexcat/Makefile
  6. +5
    -5
      builddebdev
  7. +3
    -17
      buildwin
  8. +0
    -114
      catalog/dansk/amath-help.ct
  9. +0
    -121
      catalog/dansk/amath-ident.ct
  10. +0
    -164
      catalog/dansk/amath-keyword.ct
  11. +0
    -136
      catalog/dansk/amath-text.ct
  12. +13
    -18
      configure
  13. +25
    -70
      src/amath.h
  14. +0
    -28
      src/amath.sln
  15. +0
    -146
      src/amath.vcxproj
  16. +0
    -17
      src/amath.vcxproj.filters
  17. +1
    -0
      src/amathc.h
  18. +0
    -104
      src/clib/Makefile
  19. +14
    -21
      src/clib/amathc.3
  20. +1
    -1
      src/clib/amathc.pc
  21. +0
    -113
      src/clib/amathc.vcxproj
  22. +0
    -40
      src/clib/amathc.vcxproj.filters
  23. +37
    -19
      src/clib/mem.c
  24. +0
    -259
      src/cplex/Makefile
  25. +1
    -1
      src/cplex/amathi.3
  26. +1
    -1
      src/cplex/amathi.pc
  27. +0
    -142
      src/cplex/amathi.vcxproj
  28. +0
    -123
      src/cplex/amathi.vcxproj.filters
  29. +0
    -112
      src/lib/Makefile
  30. +10
    -19
      src/lib/aengine.cpp
  31. +1
    -1
      src/lib/aengine.h
  32. +1
    -1
      src/lib/amatha.pc
  33. +0
    -124
      src/lib/amatha.vcxproj
  34. +0
    -69
      src/lib/amatha.vcxproj.filters
  35. +0
    -51
      src/localize/tags.h
  36. +8
    -5
      src/main.cpp
  37. +8
    -15
      src/main.h
  38. +0
    -52
      src/main/Makefile
  39. +0
    -187
      src/main/function/Makefile
  40. +0
    -224
      src/main/function/functions.vcxproj
  41. +0
    -366
      src/main/function/functions.vcxproj.filters
  42. +0
    -134
      src/main/main.vcxproj
  43. +0
    -96
      src/main/main.vcxproj.filters
  44. +1
    -1
      src/main/parser.cpp
  45. +0
    -94
      src/main/statement/Makefile
  46. +3
    -8
      src/main/statement/about.cpp
  47. +1
    -1
      src/main/statement/help.cpp
  48. +3
    -37
      src/main/statement/license.cpp
  49. +0
    -161
      src/main/statement/statements.vcxproj
  50. +0
    -177
      src/main/statement/statements.vcxproj.filters
  51. +3
    -2
      src/main/statement/version.cpp
  52. +0
    -306
      src/real/Makefile
  53. +1
    -1
      src/real/amathr.3
  54. +1
    -1
      src/real/amathr.pc
  55. +0
    -76
      src/system/Makefile
  56. +141
    -5
      src/system/console.cpp
  57. +17
    -6
      src/system/console.h
  58. +3
    -9
      src/system/console_amiga.cpp
  59. +7
    -4
      src/system/console_amiga.h
  60. +135
    -0
      src/system/console_posix.cpp
  61. +30
    -29
      src/system/console_posix.h
  62. +20
    -51
      src/system/console_stdc.cpp
  63. +15
    -19
      src/system/console_stdc.h
  64. +248
    -0
      src/system/console_windows.cpp
  65. +31
    -35
      src/system/console_windows.h
  66. +4
    -4
      src/system/filesystem_stdc.cpp
  67. +44
    -3
      src/system/language.cpp
  68. +2
    -0
      src/system/language.h
  69. +8
    -9
      src/system/language_amiga.cpp
  70. +1
    -2
      src/system/language_posix.cpp
  71. +0
    -1
      src/system/language_stdc.cpp
  72. +2
    -2
      src/system/preferences_amiga.cpp
  73. +6
    -3
      src/system/preferences_stdc.cpp
  74. +0
    -103
      src/system/proc_amiga.cpp
  75. +34
    -4
      src/system/program.cpp
  76. +7
    -2
      src/system/program.h
  77. +33
    -28
      src/system/program_amiga.cpp
  78. +6
    -2
      src/system/program_amiga.h
  79. +152
    -0
      src/system/program_haiku.cpp
  80. +15
    -22
      src/system/program_haiku.h
  81. +50
    -29
      src/system/program_stdc.cpp
  82. +2
    -4
      src/system/program_stdc.h
  83. +5
    -5
      src/system/program_test.cpp
  84. +1
    -1
      src/system/program_test.h
  85. +0
    -158
      src/system/system.vcxproj
  86. +0
    -168
      src/system/system.vcxproj.filters
  87. +0
    -91
      src/system/task_amiga.cpp
  88. +0
    -64
      src/system/task_stdc.cpp
  89. +0
    -59
      src/system/thread.h
  90. +27
    -31
      src/system/window_amiga.cpp
  91. +3
    -5
      src/system/window_amiga.h
  92. +322
    -0
      src/system/window_haiku.cpp
  93. +58
    -23
      src/system/window_haiku.h

+ 6
- 1
HISTORY View File

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

v1.7.0 March 12 2017
v1.7.1 March 26 2017
- Haiku support.
- Unified ANSI console.
- Code cleanup.

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


+ 0
- 122
Makefile View File

@@ -1,122 +0,0 @@

CC = gcc
CXX = g++
CFLAGS = -O2 -DWITHTEST -Wall -Isrc -Isrc/main
CXXFLAGS = -O2 -DWITHTEST -Wall -Isrc -Isrc/main
AR = ar
RANLIB = ranlib
LFLAGS = -lappsystem -lfunctions -lstatement -lappmain -lfunctions -lstatement -lappmain -lamathapp -lamathcplex -lamath -lamathc -lstdc++
LPATH = -Lsrc/lib -Lsrc/clib -Lsrc/real -Lsrc/cplex -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system
LPATHS = -Lsrc/lib/static -Lsrc/clib/static -Lsrc/real/static -Lsrc/cplex/static -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system
FLXCAT = build/flexcat/flexcat
MKDIR = mkdir -p
DEL = rm -f
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
libs: amathapp amath amathc amathcplex

amath: static-app
static: static-app

src/main.o: src/main.cpp
${CXX} ${CXXFLAGS} -c src/main.cpp -o src/main.o

appmain:
cd src/main && ${MAKE}

appsystem:
cd src/system && ${MAKE}

functions:
cd src/main/function && ${MAKE}

statement:
cd src/main/statement && ${MAKE}

amathapp:
cd src/lib && ${MAKE}

amath:
cd src/real && ${MAKE}

amathc:
cd src/clib && ${MAKE}

amathcplex:
cd src/cplex && ${MAKE}

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

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
${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG dist/catalog/english/amath-text.catalog
${MKDIR} dist/catalog/dansk
${FLXCAT} text/help.cd catalog/dansk/amath-help.ct CATALOG dist/catalog/dansk/amath-help.catalog
${FLXCAT} text/ident.cd catalog/dansk/amath-ident.ct CATALOG dist/catalog/dansk/amath-ident.catalog
${FLXCAT} text/text.cd catalog/dansk/amath-text.ct CATALOG dist/catalog/dansk/amath-text.catalog
${FLXCAT} text/keyword.cd catalog/dansk/amath-keyword.ct CATALOG dist/catalog/dansk/amath-keyword.catalog

shared-app: app libs src/main.o
${CC} ${CFLAGS} -s src/main.o -o amath ${LPATH} ${LFLAGS}

static-app: src/main.o
cd src/lib && ${MAKE} static
cd src/clib && ${MAKE} static
cd src/real && ${MAKE} static
cd src/cplex && ${MAKE} static
cd src/main && ${MAKE} static
cd src/system && ${MAKE} static
cd src/main/function && ${MAKE} static
cd src/main/statement && ${MAKE} static
${CC} ${CFLAGS} -s src/main.o -o amath ${LPATHS} ${LFLAGS}

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

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

.PHONY: uninstall
uninstall:
cd src/lib && ${MAKE} uninstall
cd src/clib && ${MAKE} uninstall
cd src/real && ${MAKE} uninstall
cd src/cplex && ${MAKE} uninstall
${DEL} ${INSTDIRP}/amath
${DEL} ${INSTDIRM}/amath.1

.PHONY: clean
clean:
cd src/lib && ${MAKE} clean
cd src/clib && ${MAKE} clean
cd src/real && ${MAKE} clean
cd src/cplex && ${MAKE} clean
cd src/main && ${MAKE} 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


+ 20
- 29
amath.1 View File

@@ -1,11 +1,11 @@
.TH "amath" 1 "Wed Mar 1 2017" "Version 1.7.0" "amath" \" -*- nroff -*-
.TH "amath" 1 "Wed Mar 15 2017" "Version 1.7.1" "amath" \" -*- nroff -*-
.ad l
.nh
.SH NAME
amath \- Statements and functions
amath \- Simple command line calculator

.SH SYNOPSIS
\fCamath [expression]\fP
\fCamath [ --shell | --noansi | expression ]\fP

.SH Description
amath(1) features a case sensitive command line interface, internal
@@ -36,19 +36,18 @@ 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.
+ Mathematical addition
- Mathematical subtraction
* Mathematical multiplication
/ Mathematical division
^ Mathematical exponentiation
= Assignment of variable values
| Absolute value of number
.SH "Variables and constant"
.PP
.nf
@@ -57,7 +56,6 @@ e Euler's number
i Imaginary unit
ins Result of last calculation
.fi
.PP

.SH "Base functions"
.PP
@@ -74,8 +72,7 @@ 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
@@ -92,8 +89,7 @@ arccot Inverse trigonometric cotangent function
arcsec Inverse trigonometric secant function
arccsc Inverse trigonometric cosecant function
.fi
.PP

.SH "Hyperbolic functions"
.PP
.nf
@@ -110,8 +106,7 @@ arccoth Inverse hyperbolic cotangent function
arcsech Inverse hyperbolic secant function
arccsch Inverse hyperbolic cosecant function
.fi
.PP

.SH "Early trigonometric functions"
.PP
.nf
@@ -132,8 +127,7 @@ archvc Inverse haversed cosine function
archcv Inverse hacoversed sine function
archcc Inverse hacoversed cosine function
.fi
.PP

.SH "Example script"
.PP
.nf
@@ -143,8 +137,7 @@ 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
@@ -154,8 +147,7 @@ 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
@@ -166,8 +158,7 @@ coth(1+2i);
sech(1+2i);
csch(1+2i);
.fi
.PP

.SH "See also"
.PP
.PP
amathc(3), amathr(3), amathi(3)

+ 1
- 1
amath.doxygen View File

@@ -38,7 +38,7 @@ PROJECT_NAME = "amath"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "1.7.0"
PROJECT_NUMBER = "1.7.1"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a


+ 0
- 62
build/flexcat/Makefile View File

@@ -1,62 +0,0 @@
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


builddeb → builddebdev View File

@@ -2,7 +2,7 @@

set -e

version="1.7.0"
version="1.7.1"

build_package () {

@@ -11,7 +11,7 @@ rm -f amath-${version}_$1.deb
sh configure CFLAGS=$2
make clean

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

@@ -91,7 +91,7 @@ chmod 644 amath/usr/share/amath/*

# Create control file
{
echo "Package: amath"
echo "Package: amath-dev"
echo "Version: ${version}"
echo "Architecture: $1"
echo "Maintainer: Carsten Larsen <cs@innolan.net>"
@@ -113,7 +113,7 @@ 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 "Upstream-Name: amath-dev"
echo "Source: http://amath.innolan.net"
echo
echo "Files: *"
@@ -191,7 +191,7 @@ echo "rm -f /usr/lib/libamathcplex.so.${version}"
chmod 0755 amath/DEBIAN/postrm

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


+ 3
- 17
buildwin View File

@@ -2,7 +2,7 @@

set -e

version="1.7.0"
version="1.7.1"

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

@@ -11,37 +11,23 @@ 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="-DWINDOWS" 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="-DWINDOWS" 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++"
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++"
make static
mv amath dist/amath-${version}-ansi-x64.exe
make clean

cd dist
touch hashkeys
sha1sum amath-${version}-x86.exe >>hashkeys
sha1sum amath-${version}-x86.exe >>hashkeys
sha1sum amath-${version}-ansi-x86.exe >>hashkeys
sha1sum amath-${version}-ansi-x64.exe >>hashkeys
sha256sum amath-${version}-x86.exe >>hashkeys
sha256sum amath-${version}-x86.exe >>hashkeys
sha256sum amath-${version}-ansi-x86.exe >>hashkeys
sha256sum amath-${version}-ansi-x64.exe >>hashkeys
cd ..

cp LICENSE dist/


+ 0
- 114
catalog/dansk/amath-help.ct View File

@@ -1,114 +0,0 @@
## version $VER: amath-help.catalog 1.60 (09.04.2015) Danish
## language dansk
## codeset 0
; #############################################################################
; 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:
;
; * Redistributions of source code must retain the above copyright notice, this
; list of conditions and the following disclaimer.
;
; * 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 COPYRIGHT HOLDERS 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 THE COPYRIGHT HOLDER 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.
; #############################################################################
; ### flexcat catalog/help.cd NEWCTFILE catalog/danish/amath-help.ct
; flexcat catalog/help.cd catalog/danish/amath-help.ct CATALOG catalog/danish/amath-help.catalog
; #############################################################################
symzero
Indtast kommando eller udtryk.#NEWLINE##SYNTAXHIGHLIGHT#Eksempel: 2+3-cos(3)#NORMALTEXT##NEWLINE# #NEWLINE#Mere hj�lp er tilg�ngelig i udvalgte omr�der#NEWLINE#-------------------------------------------------#NEWLINE#funktioner Grundl�ggende funktioner.#NEWLINE#trigo Trigonometriske funktioner.#NEWLINE#hyper Hyperbolske funktioner.#NEWLINE#kompleks Komplekse tal.#NEWLINE#kommandoer Underst�ttede kommondoer.#NEWLINE#operatorer Underst�ttede operatorer.#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: hj�lp trigo#NEWLINE#
symoperator
-------------------------------------------------#NEWLINE# + Matematik addition.#NEWLINE# - Matematik subtraktion.#NEWLINE# * Matematik multiplikation.#NEWLINE# / Matematik division.#NEWLINE# ^ Matematik potensopl�ftning.#NEWLINE# = Tildeling af variabel v�rdi.#NEWLINE# | Absolutte eller numerisk v�rdi.#NEWLINE#-------------------------------------------------#NEWLINE#
symfunction
-------------------------------------------------#NEWLINE#abs Absolutte eller numerisk v�rdi.#NEWLINE#sgn Matematik signum funktion.#NEWLINE#round Afrund til n�rmeste heltal.#NEWLINE#trunc Fjern decimaler.#NEWLINE#floor Afrund i positiv retning.#NEWLINE#ceil Afrund i negativ retning.#NEWLINE#sqrt Kvadratrodsfunktion (exponent 1/2).#NEWLINE#cbrt Kubikrods (exponent 1/3).#NEWLINE#lb Bin�r logaritme funktion (grundtal 2).#NEWLINE#ln Naturlig logaritme funktion (grundtal e).#NEWLINE#lg 10-talslogaritme funktion (grundtal 10).#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Eksempel: round(1.55)#NORMALTEXT##NEWLINE#
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#
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
Ryd kommandoen sletter alt tekst i konsol vinduet.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: ryd#NEWLINE#
symdef
Definer kommandoen bruges til at definere funktioner med. Det er ikke#NEWLINE#strengt n�dvendigt at angive kommandoen, n�r en funktion skal defineres.#NEWLINE#Allerede definerede funktioner kan vises med kommandoen #SYNTAXHIGHLIGHT#funtioner#NORMAL#.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: definer f(x)=2*x+3#NEWLINE#Alternativ syntaks: f(x)=2*x+3#NEWLINE#
; Help for delete statement
symdelete
The delete statement can delete variable and funktions. To delete a#NEWLINE#single variable or funktions use the name of the funktion or variable.#NEWLINE#To delete all funktions or variables specify either the variable or#NEWLINE#funktion keyword.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: delete f(x)#NEWLINE#Syntaks: delete variables#NEWLINE#
; Help for digits statement
symdigits
The digits statement defines the displayed number of significant digits.#NEWLINE#To show current configuration use the digits statement without specifying#NEWLINE#the number.#NEWLINE# #SYNTAXHIGHLIGHT#Syntaks: digits 7#NEWLINE#
; Help for eval statement
symeval
The eval statement evaluates an expression. When evaluating an expression#NEWLINE#it is possible to omit the eval keyword.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: eval 2.4*x+3.2#NEWLINE#Optional syntax: 2.4*x+3.2#NEWLINE#
; Help for execute statement
symexecute
The execute statement reads the content of a file and execute all statements.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: execute "savedfile"#NEWLINE#
; Help for input statement
syminput
The input statement either changes or shows the how numeral input is interpreted.#NEWLINE#Possible input systems are: binary, octal, decimal and hexadecimal. Default is#NEWLINE#decimal. To use positional systems with other bases specify the base number.#NEWLINE#Numeral output system can be modified using the output statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: input hexadecimal#NEWLINE#Syntaks: input 4#NEWLINE#
; Help for help statement
symhelp
The help statement can be used to display help about topics and statements.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: help variables#NEWLINE#
; Help for output statement
symoutput
The output statement either changes or shows the how numeral output is shown.#NEWLINE#Possible output systems are: binary, octal, decimal and hexadecimal. Default#NEWLINE#is decimal. To use positional systems with other bases specify the base number.#NEWLINE#Numeral input system can be modified using the input statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: output octal#NEWLINE#
; Help for list statement
symlist
No description is available for the list statement.#NEWLINE#
symshow
Vis kommandoen kan bruges til at vise indholdet af en fil, der �nskes k�rt.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: vis "mitscript"#NEWLINE#
; Help for load statement
symload
The load statement retrieves a set of defined variables and funktions from#NEWLINE#a file. Variables and funktions can be saved using the save statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: load "savedwork"#NEWLINE#
; Help for save statement
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
symprefs
There is no help for prefs statement now.#NEWLINE#
symvariable
Variabler kommandoen viser en list af definerede variabler i hukommelsen.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: variabler#NEWLINE#Alternativ syntaks: var#NEWLINE#
symexit
Afslut kommandoen lukker amath programmet.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: afslut#NEWLINE#
; Help for constant epsilon
syme
Euler's number is base of the exponential funktion which equals its own#NEWLINE#derivative. It is approximately equal to 2.71828.#NEWLINE##SYNTAXHIGHLIGHT#Example: ln(e)#NEWLINE#
; Help for constant pi
sympi
Pi is the ratio of the circumference of a circle to its diameter. Being an#NEWLINE#irrational number, pi cannot be expressed exactly as a common fraction.#NEWLINE#The value of pi is commonly approximated as #SYNTAXHIGHLIGHT#3.14159#NORMALTEXT#.#NEWLINE#
symi
Den imagin�re enhen refereres og angives almindelig vis som i.#NEWLINE#Den imagin�re enhen et tal, som n�r det ganges med sig selv,#NEWLINE#giver resultatet -1.#NEWLINE#
symins
Den sidst udregnede v�rdi kan benyttes i n�ste udtryk ved hj�lp af #SYNTAXHIGHLIGHT#ins#NORMAL# variablen.#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: ins*0,25#NEWLINE#
symbin
Der er ikke nogen hj�lp tilg�ngelig om bin�r n�gleordet.#NEWLINE
symoct
Der er ikke nogen hj�lp tilg�ngelig om oktal n�gleordet.#NEWLINE
symdec
Der er ikke nogen hj�lp tilg�ngelig om decimal n�gleordet.#NEWLINE
symhex
Der er ikke nogen hj�lp tilg�ngelig om hexadecimal n�gleordet.#NEWLINE

+ 0
- 121
catalog/dansk/amath-ident.ct View File

@@ -1,121 +0,0 @@
## version $VER: amath-ident.catalog 1.60 (08.04.2015) Danish
## language dansk
## codeset 0
; #############################################################################
; ## Help texts for built-in functions in amath
; ## ------------------------------------------
; ##
; ## This file is published under Creative Common License. See:
; ## http://creativecommons.org/licenses/by-sa/3.0/
; ## Parts of the content came from wikipedia.org
; #############################################################################
abs
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#
round
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#
floor
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#
sqr
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#
lb
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#
lg
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#
cos
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#
cot
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#
csc
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#
acos
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#
acot
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#
acsc
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#
cosh
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#
coth
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#
csch
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#
acosh
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#
acoth
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#
acsch
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#

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

@@ -1,164 +0,0 @@
## version $VER: amath-keyword.catalog 1.60 (08.04.2015) Danish
## language dansk
## codeset 0
;#############################################################################
; 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:
;
; * Redistributions of source code must retain the above copyright notice, this
; list of conditions and the following disclaimer.
;
; * 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 COPYRIGHT HOLDERS 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 THE COPYRIGHT HOLDER 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.
;#############################################################################
;######### ClearStatement
clear
ryd
;######### FunctionDefinition statement
def
definer
;######### DeleteStatement and keyword
delete
slet
;######### Eulers Number keyword
e
e
;######### Complex i keyword
i
i
;######### pi keyword
pi
pi
;######### ins variable keyword
ins
ins
;######### EvalStatement
eval
beregn
;######### DrawStatement
draw
tegn
;######### PlotStatement
plot
plot
;######### ExecuteStatement
execute
k�r
;######### ExitStatement
exit
afslut
quit
slut
;######### Statements keyword
statements
kommandoer
;######### Operators keyword
operators
operatorer
;######### Complex keyword
complex
kompleks
;######### Function keyword
funcs
funk
functions
funktioner
;######### Trigonometric keyword
trigon
trigo
trigonometric
trigonometri
;######### Hyperbolic keyword
hyper
hyper
hyperbolic
hyperbolsk
;######### Early keyword
early
tidlig
;######### HelpStatement
help
hj�lp
;######### PromptStatement
prompt
prompt
;######### VersionStatement
version
version
;######### MemoryStatement
mem
hukommelse
memory
hukommelse
;######### PrefsStatement
prefs
pr�f
preferences
pr�ferencer
;######### ListStatement and keyword
list
list
;######### LoadStatement and keyword
load
hent
;######### SaveStatement and keyword
save
gem
;######### ShowStatement and keyword
show
vis
;######### ListVariablesStatement and keyword
vars
var
variables
variabler
;######### DigitsStatement
digits
cifre
;######### InputStatement
input
ind
;######### OutputStatement
output
ud
;######### Binary keyword
bin
bin
binary
bin�r
;######### Octal keyword
oct
okt
octal
oktal
;######### Decimal keyword
dec
dec
decimal
decimal
;######### Hexadecimal keyword
hex
hex
hexadecimal
hexadecimal
;######### AboutStatement and keyword
about
om
;######### LicenseStatement and keyword
license
lisens

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

@@ -1,136 +0,0 @@
## version $VER: amath-text.catalog 1.60 (08.04.2015) Danish
## language dansk
## codeset 0
; #############################################################################
; 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:
;
; * Redistributions of source code must retain the above copyright notice, this
; list of conditions and the following disclaimer.
;
; * 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 COPYRIGHT HOLDERS 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 THE COPYRIGHT HOLDER 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.
; #############################################################################
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
[fil]
TXTLISTDIRTDIR
[mappe]
TXTLISTDIRTUNKNOWN
[ukendt]
TXTMEMBLOCKS
Allokerede blokke: #SPACE#
TXTMEMSIZE
Hukommelsesforbrug:#SPACE#
TXTMEMMAXSIZE
H�jeste forbrug: #SPACE#
HELPNOHELP
Der er ingen hj�lp tilg�ngelig om det emne.#NEWLINE#
HELPSYNTAX
Syntaktiske fejl:#SPACE#
HELPUERROR
Uventet fejl:#SPACE#
HELPVARNDEF
Variablen er ikke defineret:#SPACE#
HELPFUNNDEF
Funktionen er ikke defineret:#SPACE#
HELPFUNRDEF
Funktionen er allerede defineret:#SPACE#
HELPPNUMERA
Grundtallet skal v�re mellem 2 og 32:#SPACE#
HELPPDIGITS
Antal betydende cifre skal v�re mellem 0 og 15:#SPACE#
HELPINPUSHOW
Talsystemet n�r computeren l�ser ind er#SPACE#
HELPOUTPSHOW
Talsystemet n�r computeren skriver ud er#SPACE#
HELPINPUSETT
Talsystemet ved indl�sning �ndret til#SPACE#
HELPOUTPSETT
Talsystemet ved udskrivning �ndret til#SPACE#
HELPDIGISETT
Antal betydende cifre �ndret til#SPACE#
HELPDIGISHOW
Antal betydende cifre der vises er#SPACE#
HELPVARSNDEF
Der er ikke defineret nogle variabler.#NEWLINE#
HELPFUNCNDEF
Der er ikke defineret nogle funktioner.#NEWLINE#
HELPLOADSUCC
Variabler og funktioner indl�st fra fil.#NEWLINE#
HELPSAVESUCC
Variabler og funktioner gemt til fil.#NEWLINE#
HELPSAVEFAIL
Kan ikke gemme fil.#NEWLINE#
HELPSAVENOTH
Der er ikke noget og gemme.#NEWLINE#
HELPPREFLOAD
Pr�ferencer blev indl�st.#NEWLINE#
HELPPREFNOLO
Kunne ikke indl�ses pr�ferencer.#NEWLINE#
HELPPREFSAVE
Pr�ferencer blev gemt.#NEWLINE#
HELPPREFNOSA
Kunne ikke gemme pr�ferencer.#NEWLINE#
MSGNODIR
Mappen kan ikke �bnes:#SPACE#
MSGNOFILE
Filen kan ikke �bnes.#NEWLINE#

+ 13
- 18
configure View File

@@ -27,7 +27,7 @@

set -e

version="1.7.0"
version="1.7.1"

clang=false
debugsym=false
@@ -85,9 +85,9 @@ for arg in "$@"; do
--disable-test)
regtest=false;;

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

--help)
@@ -104,14 +104,14 @@ for arg in "$@"; do
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 ' --with-stdc++: link with stdc++ library'
echo ' --without-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'
echo 'No warnings are shown for Invalid options.'
exit 0
;;
esac
@@ -161,6 +161,8 @@ SYSSRCS='
console.cpp
console_amiga.cpp
console_stdc.cpp
console_posix.cpp
console_windows.cpp
filesystem_amiga.cpp
filesystem_stdc.cpp
language.cpp
@@ -170,14 +172,13 @@ language_stdc.cpp
preferences.cpp
preferences_amiga.cpp
preferences_stdc.cpp
proc_amiga.cpp
program.cpp
program_amiga.cpp
program_haiku.cpp
program_stdc.cpp
program_test.cpp
task_amiga.cpp
task_stdc.cpp
window_amiga.cpp
window_haiku.cpp
'
FUNCTIONSRC='
absolute.cpp
@@ -693,7 +694,6 @@ echo "clean:"
echo " \${DEL} static/\${alib} \${solib} ${libc} ${libcs}"
echo
} > src/clib/Makefile

#########################################################################

############################# Real Numbers ##############################
@@ -907,13 +907,13 @@ echo " cd src/lib && \${MAKE}"
echo
echo "${amath}:"
echo " cd src/real && \${MAKE}"
echo
echo
echo "${amathc}:"
echo " cd src/clib && \${MAKE}"
echo
echo
echo "${amathcplex}:"
echo " cd src/cplex && \${MAKE}"
echo
echo
echo "localize:"
echo " cd build/flexcat && \${MAKE}"
echo " \${FLXCAT} text/keyword.cd src/localize/kword.h=text/keyword.sd"
@@ -927,11 +927,6 @@ 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"
echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG dist/catalog/english/amath-text.catalog"
echo " \${MKDIR} dist/catalog/dansk"
echo " \${FLXCAT} text/help.cd catalog/dansk/amath-help.ct CATALOG dist/catalog/dansk/amath-help.catalog"
echo " \${FLXCAT} text/ident.cd catalog/dansk/amath-ident.ct CATALOG dist/catalog/dansk/amath-ident.catalog"
echo " \${FLXCAT} text/text.cd catalog/dansk/amath-text.ct CATALOG dist/catalog/dansk/amath-text.catalog"
echo " \${FLXCAT} text/keyword.cd catalog/dansk/amath-keyword.ct CATALOG dist/catalog/dansk/amath-keyword.catalog"
echo
echo "shared-app: app libs ${program}.o"
echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATH} \${LFLAGS}"


+ 25
- 70
src/amath.h View File

@@ -60,6 +60,12 @@
# endif
#endif
/******************************************************************************/
#ifdef _WIN32
# ifndef WINDOWS
# define WINDOWS
# endif
#endif
/******************************************************************************/
#if defined(AOS3) || defined(AOS4) || defined(AROS) || defined (MORPHOS)
# ifndef AMIGA
# define AMIGA
@@ -72,30 +78,29 @@
# endif
#endif
/******************************************************************************/
#if defined(AMIGA) || defined(HAIKU) || defined(UNIX)
# ifndef ANSICONSOLE
# define ANSICONSOLE
#if defined(HAIKU) || defined(UNIX)
# ifndef POSIX
# define POSIX
# endif
#endif
/******************************************************************************/
#ifdef HAIKU
# include <stdint.h>
# include <unistd.h>
# include <dirent.h>
#if !defined(AMIGA) && !defined(POSIX) && !defined(WINDOWS)
# ifndef STDC_CONSOLE
# define STDC_CONSOLE
# endif
#endif
/******************************************************************************/
#ifdef UNIX
#if defined(POSIX)
# include <stdint.h>
# include <unistd.h>
# include <dirent.h>
# include <termios.h>
#endif
/******************************************************************************/
#ifdef _WIN32
#if defined(WINDOWS)
# include <stdint.h>
#endif
/******************************************************************************/
#ifdef AOS3
#if defined(AOS3)
# include <sys/types.h>
# define IPTR LONG*
# define uintptr_t uint32_t
@@ -110,10 +115,9 @@ typedef u_int64_t uint64_t;
# include <sys/types.h>
#endif
/******************************************************************************/
#if (__cplusplus <= 199711L && !defined(_WIN32)) || !defined(__cplusplus)
#if (__cplusplus <= 199711L && !defined(WINDOWS)) || !defined(__cplusplus)
#define nullptr 0
#endif
#if defined(__GNUC__) || defined(__GNUG__)
#elif (__cplusplus <= 199711L) && (defined(__GNUC__) || defined(__GNUG__))
#define nullptr 0
#endif
/******************************************************************************/
@@ -208,7 +212,7 @@ typedef u_int64_t uint64_t;
#define SPACE " "
#define DOT "."
/******************************************************************************/
#ifdef _WIN32
#ifdef WINDOWS
#define NEWLINE "\r\n"
#else
#define NEWLINE "\n"
@@ -272,30 +276,22 @@ typedef int bool;
# define TXTFPU EMPTYSTRING
#endif
/******************************************************************************/
#if defined(WITHTEST) && !defined(ANSICONSOLE)
# define TXTOPTS "TEST"
#endif
#if !defined(WITHTEST) && defined(ANSICONSOLE)
# define TXTOPTS "ANSI"
#endif
#if defined(WITHTEST) && defined(ANSICONSOLE)
# define TXTOPTS "ANSI, TEST"
#endif
#ifdef TXTOPTS
# define TXTOPTMSG SPACE "(OPT: " TXTOPTS ")"
#if defined(WITHTEST)
# define TXTOPTMSG SPACE "(test)"
#else
# define TXTOPTMSG EMPTYSTRING
#endif
/******************************************************************************/
#define TXTARCH TXTCPU TXTFPU
#define RELDATESTAMP "(12-03-2017)"
#define TXTDOSVERSION "\0$VER: amath 1.70" SPACE RELDATESTAMP SPACE TXTARCH
#define TXTTITLE "amath version 1.7.0"
#define RELDATESTAMP "(10-04-2017)"
#define TXTDOSVERSION "\0$VER: amath 1.71" SPACE RELDATESTAMP SPACE TXTARCH
#define TXTTITLE "amath version 1.7.1"
#define TXTCOPYRIGHT "(c) 2017 Carsten Sonne Larsen"
#define TXTSTARTMSG TXTTITLE SPACE TXTCOPYRIGHT
/******************************************************************************/
#define TXTVERSMSG TXTTITLE SPACE RELDATESTAMP SPACE TXTARCH
#define TXTCOMPMSG "Compiled with " COMP_NAME SPACE COMP_VERS TXTOPTMSG
#define TXTCOMPSHTMSG "Compiled with " COMP_NAME SPACE COMP_VERS
/******************************************************************************/
#define CPROCNAME "amath_console"
/******************************************************************************/
@@ -318,45 +314,4 @@ typedef int bool;
#define CATALOG_DEF OC_BuiltInLanguage, "english"
#endif
/******************************************************************************/
#if defined(ANSICONSOLE)
#define HEADLINE "\x1B[1m"
#ifdef UNIX
#define SYNTAXHIGHLIGHT "\x1B[3m\x1B[32m"
#else
#define SYNTAXHIGHLIGHT "\x1B[32m"
#endif
#define NORMALTEXT "\x1B[0m"
#define BOLD "\x1B[1m"
#define ITALICS "\x1B[3m"
#define UNDERLINE "\x1B[4m"
#define COLOR01 "\x1B[31m"
#define COLOR02 "\x1B[32m"
#define COLOR03 "\x1B[33m"
#define CURSORFORWARD "\x1B[1C"
#define CURSORBACKWARD "\x1B[1D"
#define ERASEINLINE "\x1B[K"
#define INSERT1CHAR "\x1B[1@"
#define DELETE1CHAR "\x1B[1P"
#define DELETELINE "\x0D\x1B[K"
#define CLEARWINDOW "\x1B[1;1H\x1B[J"
/******************************************************************************/
#else
#define HEADLINE EMPTYSTRING
#define SYNTAXHIGHLIGHT EMPTYSTRING
#define NORMALTEXT EMPTYSTRING
#define BOLD EMPTYSTRING
#define ITALICS EMPTYSTRING
#define UNDERLINE EMPTYSTRING
#define COLOR01 EMPTYSTRING
#define COLOR02 EMPTYSTRING
#define COLOR03 EMPTYSTRING
#define CURSORFORWARD EMPTYSTRING
#define CURSORBACKWARD EMPTYSTRING
#define ERASEINLINE EMPTYSTRING
#define INSERT1CHAR EMPTYSTRING
#define DELETE1CHAR EMPTYSTRING
#define DELETELINE EMPTYSTRING
#define CLEARWINDOW EMPTYSTRING
#endif
/******************************************************************************/
#endif

+ 0
- 28
src/amath.sln View File

@@ -1,28 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amath", "amath.vcxproj", "{834DBB3E-042B-41E5-9400-EEC16CF003C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x64.ActiveCfg = Debug|x64
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x64.Build.0 = Debug|x64
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x86.ActiveCfg = Debug|Win32
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x86.Build.0 = Debug|Win32
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x64.ActiveCfg = Release|x64
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x64.Build.0 = Release|x64
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x86.ActiveCfg = Release|Win32
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

+ 0
- 146
src/amath.vcxproj View File

@@ -1,146 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{834DBB3E-042B-41E5-9400-EEC16CF003C7}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>amath</RootNamespace>
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

+ 0
- 17
src/amath.vcxproj.filters View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
</Project>

+ 1
- 0
src/amathc.h View File

@@ -51,6 +51,7 @@ typedef struct

void* AllocMemSafe(size_t);
void FreeMemSafe(void*);
void DetachMemSafe(void*);
void FreeAllSafe();
void MemUsage(long*, long*, long*);



+ 0
- 104
src/clib/Makefile View File

@@ -1,104 +0,0 @@
CC = gcc
CFLAGS = -std=c9x -O3 -DWITHTEST -I. -I.. -Wall
AR = ar
RANLIB = ranlib
MKDIR = mkdir -p
DEL = rm -f
INSTALL = install -m 0644
LDCONFIG = ldconfig
PREFIX = /usr
INSTDIR = ${DESTDIR}${PREFIX}/lib/amath
INSTDIRI = ${DESTDIR}${PREFIX}/include/amath
INSTDIRPC = ${DESTDIR}${PREFIX}/lib/pkgconfig
INSTDIRM = ${DESTDIR}${PREFIX}/share/man/man3
alib = libamathc.a
solib = libamathc.so
pkgconfig = amathc.pc
manpage = amathc.3

all: static shared

static: ${alib}

shared: ${solib}

static/alloccpy.o: alloccpy.c
${CC} ${CFLAGS} -fno-builtin -c alloccpy.c -o static/alloccpy.o

shared/alloccpy.o: alloccpy.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c alloccpy.c -o shared/alloccpy.o

static/mem.o: mem.c
${CC} ${CFLAGS} -fno-builtin -c mem.c -o static/mem.o

shared/mem.o: mem.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c mem.c -o shared/mem.o

static/memcpy.o: memcpy.c
${CC} ${CFLAGS} -fno-builtin -c memcpy.c -o static/memcpy.o

shared/memcpy.o: memcpy.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c memcpy.c -o shared/memcpy.o

static/memset.o: memset.c
${CC} ${CFLAGS} -fno-builtin -c memset.c -o static/memset.o

shared/memset.o: memset.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c memset.c -o shared/memset.o

static/strcmp.o: strcmp.c
${CC} ${CFLAGS} -fno-builtin -c strcmp.c -o static/strcmp.o

shared/strcmp.o: strcmp.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c strcmp.c -o shared/strcmp.o

static/strlen.o: strlen.c
${CC} ${CFLAGS} -fno-builtin -c strlen.c -o static/strlen.o

shared/strlen.o: strlen.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c strlen.c -o shared/strlen.o

static/untag.o: untag.c
${CC} ${CFLAGS} -fno-builtin -c untag.c -o static/untag.o

shared/untag.o: untag.c
${CC} ${CFLAGS} -fPIC -fno-builtin -c untag.c -o shared/untag.o

.PHONY: build
build:
${MKDIR} static
${MKDIR} shared

${solib}: build shared/alloccpy.o shared/mem.o shared/memcpy.o shared/memset.o shared/strcmp.o shared/strlen.o shared/untag.o
${CC} ${CFLAGS} -shared -s -fPIC -Wl,-soname,${solib}.1.7.0 -o ${solib} shared/alloccpy.o shared/mem.o shared/memcpy.o shared/memset.o shared/strcmp.o shared/strlen.o shared/untag.o -lc

${alib}: build static/alloccpy.o static/mem.o static/memcpy.o static/memset.o static/strcmp.o static/strlen.o static/untag.o
${AR} rcs static/${alib} static/alloccpy.o static/mem.o static/memcpy.o static/memset.o static/strcmp.o static/strlen.o static/untag.o
${RANLIB} static/${alib}

.PHONY: install
install: ${alib} ${solib}
${MKDIR} ${INSTDIR}
${MKDIR} ${INSTDIRPC}
${MKDIR} ${INSTDIRI}
${INSTALL} static/${alib} ${INSTDIR}/${alib}
${INSTALL} ${solib} ${INSTDIR}/${solib}
${INSTALL} ${pkgconfig} ${INSTDIRPC}/${pkgconfig}
${INSTALL} ${manpage} ${INSTDIRM}/${manpage}
${INSTALL} ../amath.h ${INSTDIRI}
${INSTALL} ../amathc.h ${INSTDIRI}
${LDCONFIG} ${INSTDIR}

.PHONY: uninstall
uninstall:
${DEL} ${INSTDIR}/${alib}
${DEL} ${INSTDIR}/${solib}
${DEL} ${INSTDIRPC}/${pkgconfig}
${DEL} ${INSTDIRM}/${manpage}
${DEL} ${INSTDIRI}/amath.h
${DEL} ${INSTDIRI}/amathc.h
${LDCONFIG}

clean:
${DEL} static/${alib} ${solib} static/alloccpy.o static/mem.o static/memcpy.o static/memset.o static/strcmp.o static/strlen.o static/untag.o shared/alloccpy.o shared/mem.o shared/memcpy.o shared/memset.o shared/strcmp.o shared/strlen.o shared/untag.o


+ 14
- 21
src/clib/amathc.3 View File

@@ -1,4 +1,4 @@
.TH "amath/amathc.h" 3 "Wed Mar 1 2017" "Version 1.7.0" "amath" \" -*- nroff -*-
.TH "amath/amathc.h" 3 "Wed Mar 1 2017" "Version 1.7.1" "amath" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -100,12 +100,8 @@ Definition at line 40 of file alloccpy\&.c\&.
58 *destination = AllocMemSafe(size);
59 d = *destination;
60
61 #ifdef AMIGA // Take advantage of exec
62 CopyMem(s, d, n);
63 #else
64 while (n--)
65 *d++ = *s++;
66 #endif
67
68 return size;
69 }
@@ -122,7 +118,7 @@ Definition at line 86 of file mem\&.c\&.
88 struct MemoryBlock* newblock;
89 size_t allocsize;
90
91 if (list == NULL)
91 if (list == nullptr)
92 {
93 list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList));
94 if (!list)
@@ -131,7 +127,7 @@ Definition at line 86 of file mem\&.c\&.
97 return 0;
98 }
99
100 list->first = NULL;
100 list->first = nullptr;
101 list->peak = 0;
102 list->size = 0;
103 list->count = 0;
@@ -186,13 +182,13 @@ Definition at line 199 of file mem\&.c\&.
200 {
201 struct MemoryBlock *current, *next;
202
203 if (list == NULL)
203 if (list == nullptr)
204 {
205 return;
206 }
207
208 current = list->first;
209 while (current != NULL)
209 while (current != nullptr)
210 {
211 next = current->next;
212 FREE_MEM(current->address);
@@ -201,7 +197,7 @@ Definition at line 199 of file mem\&.c\&.
215 }
216
217 FREE_MEM(list);
218 list = NULL;
218 list = nullptr;
219 }
.fi
.SS "void FreeMemSafe (void *)"
@@ -215,33 +211,33 @@ Definition at line 147 of file mem\&.c\&.
148 {
149 struct MemoryBlock *current, *previous;
150
151 if (list == NULL || block == NULL)
151 if (list == nullptr || block == nullptr)
152 {
153 dealloc_error("list", 0);
154 return;
155 }
156
157 if (block == NULL)
157 if (block == nullptr)
158 {
159 dealloc_error("memory", 0);
160 return;
161 }
162
163 previous = NULL;
163 previous = nullptr;
164 current = list->first;
165 while (current != NULL && current->address != block)
165 while (current != nullptr && current->address != block)
166 {
167 previous = current;
168 current = current->next;
169 }
170
171 if (current == NULL)
171 if (current == nullptr)
172 {
173 dealloc_error("address not found", block);
174 return;
175 }
176
177 if (previous == NULL)
177 if (previous == nullptr)
178 {
179 list->first = current->next;
180 }
@@ -254,8 +250,8 @@ Definition at line 147 of file mem\&.c\&.
187 list->count--;
188
189 FREE_MEM(current->address);
190 current->address = NULL;
191 current->next = NULL;
190 current->address = nullptr;
191 current->next = nullptr;
192 current->size = 0;
193 FREE_MEM(current);
194 }
@@ -279,9 +275,6 @@ Definition at line 77 of file memcpy\&.c\&.
86 if ((mem_ptr)dst < (mem_ptr)src)
87 {
88 // Copy forward
89 #ifdef AMIGA // Take advantage of exec
90 CopyMem((void*)source, destination, length);
91 #else
92 t = (mem_ptr)src; // only need low bits
93 if ((t | (mem_ptr)dst) & wmask)
94 {


+ 1
- 1
src/clib/amathc.pc View File

@@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib

Name: amath C library
Description: C functions for manipulating strings and memory
Version: 1.7.0
Version: 1.7.1
Cflags: -I${includedir}
Libs: -L${libdir} -lamathc

+ 0
- 113
src/clib/amathc.vcxproj View File

@@ -1,113 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{01757088-637B-45D8-B042-14B76DF11115}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="alloccpy.c" />
<ClCompile Include="mem.c" />
<ClCompile Include="memcpy.c" />
<ClCompile Include="memset.c" />
<ClCompile Include="strcmp.c" />
<ClCompile Include="strlen.c" />
<ClCompile Include="untag.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

+ 0
- 40
src/clib/amathc.vcxproj.filters View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="untag.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="strlen.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mem.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="alloccpy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="memcpy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="memset.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="strcmp.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

+ 37
- 19
src/clib/mem.c View File

@@ -75,7 +75,7 @@ struct MemoryList
/**
* @brief Global list of allocated memory.
*/
struct MemoryList* list = NULL;
struct MemoryList* list = nullptr;

void alloc_error(char*, size_t);
void dealloc_error(char*, void*);
@@ -88,7 +88,7 @@ void* AllocMemSafe(size_t size)
struct MemoryBlock* newblock;
size_t allocsize;

if (list == NULL)
if (list == nullptr)
{
list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList));
if (!list)
@@ -97,7 +97,7 @@ void* AllocMemSafe(size_t size)
return 0;
}

list->first = NULL;
list->first = nullptr;
list->peak = 0;
list->size = 0;
list->count = 0;
@@ -141,40 +141,37 @@ void* AllocMemSafe(size_t size)
return newblock->address;
}

/**
* @brief Deallocate memory from the global memory list.
*/
void FreeMemSafe(void* block)
void RemoveMemSafe(void* block, bool deallocate)
{
struct MemoryBlock *current, *previous;

if (list == NULL || block == NULL)
if (list == nullptr || block == nullptr)
{
dealloc_error("list", 0);
return;
}

if (block == NULL)
if (block == nullptr)
{
dealloc_error("memory", 0);
return;
}

previous = NULL;
previous = nullptr;
current = list->first;
while (current != NULL && current->address != block)
while (current != nullptr && current->address != block)
{
previous = current;
current = current->next;
}

if (current == NULL)
if (current == nullptr)
{
dealloc_error("address not found", block);
return;
}

if (previous == NULL)
if (previous == nullptr)
{
list->first = current->next;
}
@@ -186,13 +183,34 @@ void FreeMemSafe(void* block)
list->size -= current->size;
list->count--;

FREE_MEM(current->address);
current->address = NULL;
current->next = NULL;
if (deallocate)
{
FREE_MEM(current->address);
}

current->address = nullptr;
current->next = nullptr;