Localization on Standard C platforms

This commit is contained in:
llsth 2015-04-13 23:48:08 +02:00
parent 63382f6a2a
commit 248dd34d20
12 changed files with 726 additions and 573 deletions

432
Makefile
View File

@ -1,432 +0,0 @@
# Portable Makefile generated by configure
all: libs app
CC = gcc
AR = ar
RANLIB = ranlib
CFLAGS = -DWITHTEST -I. -Wall -Werror
LFLAGS = -lstdc++ -lamathapp -lcamath -lcomplex -lamath
FLXCAT = flexcat
MKDIR = mkdir
COPY = cp
DEL = rm -f
DELREC = rm -Rf
evaluator.o: app/main/evaluator.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/evaluator.cpp
functions.o: app/main/functions.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/functions.cpp
graphlist.o: app/main/graphlist.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/graphlist.cpp
lexer.o: app/main/lexer.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/lexer.cpp
nodes.o: app/main/nodes.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/nodes.cpp
operators.o: app/main/operators.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/operators.cpp
optimizer.o: app/main/optimizer.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/optimizer.cpp
parser.o: app/main/parser.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/parser.cpp
statements.o: app/main/statements.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/statements.cpp
token.o: app/main/token.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/token.cpp
values.o: app/main/values.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/values.cpp
viewer.o: app/main/viewer.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/viewer.cpp
console.o: app/system/console.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/console.cpp
console_amiga.o: app/system/console_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/console_amiga.cpp
console_stdc.o: app/system/console_stdc.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/console_stdc.cpp
filesystem_amiga.o: app/system/filesystem_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/filesystem_amiga.cpp
filesystem_stdc.o: app/system/filesystem_stdc.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/filesystem_stdc.cpp
graph.o: app/system/graph.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/graph.cpp
graph_amiga.o: app/system/graph_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/graph_amiga.cpp
graph_gtk.o: app/system/graph_gtk.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/graph_gtk.cpp
language.o: app/system/language.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/language.cpp
language_amiga.o: app/system/language_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/language_amiga.cpp
language_stdc.o: app/system/language_stdc.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/language_stdc.cpp
preferences.o: app/system/preferences.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/preferences.cpp
preferences_amiga.o: app/system/preferences_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/preferences_amiga.cpp
preferences_stdc.o: app/system/preferences_stdc.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/preferences_stdc.cpp
proc_amiga.o: app/system/proc_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/proc_amiga.cpp
program.o: app/system/program.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/program.cpp
program_amiga.o: app/system/program_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/program_amiga.cpp
program_stdc.o: app/system/program_stdc.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/program_stdc.cpp
program_test.o: app/system/program_test.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/program_test.cpp
task_amiga.o: app/system/task_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/task_amiga.cpp
task_stdc.o: app/system/task_stdc.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/task_stdc.cpp
window_amiga.o: app/system/window_amiga.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/window_amiga.cpp
io.o: app/system/base/io.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/system/base/io.cpp
main.o: app/main.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main.cpp
aengine.o: app/lib/aengine.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/aengine.cpp
charbuf.o: app/lib/charbuf.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/charbuf.cpp
cplex.o: app/lib/cplex.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/cplex.cpp
fgrid.o: app/lib/fgrid.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/fgrid.cpp
ntext.o: app/lib/ntext.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/ntext.cpp
real.o: app/lib/real.cpp
${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/real.cpp
acos.o: lib/real/acos.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/acos.c
acosh.o: lib/real/acosh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/acosh.c
asin.o: lib/real/asin.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/asin.c
asinh.o: lib/real/asinh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/asinh.c
atan.o: lib/real/atan.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/atan.c
atan2.o: lib/real/atan2.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/atan2.c
atanh.o: lib/real/atanh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/atanh.c
cbrt.o: lib/real/cbrt.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/cbrt.c
ceil.o: lib/real/ceil.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/ceil.c
copysign.o: lib/real/copysign.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/copysign.c
cos.o: lib/real/cos.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/cos.c
cosh.o: lib/real/cosh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/cosh.c
exp.o: lib/real/exp.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/exp.c
expm1.o: lib/real/expm1.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/expm1.c
fabs.o: lib/real/fabs.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/fabs.c
finite.o: lib/real/finite.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/finite.c
floor.o: lib/real/floor.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/floor.c
fmod.o: lib/real/fmod.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/fmod.c
hypot.o: lib/real/hypot.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/hypot.c
isnan.o: lib/real/isnan.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/isnan.c
kcos.o: lib/real/kcos.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/kcos.c
kremp2.o: lib/real/kremp2.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/kremp2.c
ksin.o: lib/real/ksin.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/ksin.c
ktan.o: lib/real/ktan.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/ktan.c
log.o: lib/real/log.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/log.c
log10.o: lib/real/log10.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/log10.c
log1p.o: lib/real/log1p.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/log1p.c
pow.o: lib/real/pow.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/pow.c
remp2.o: lib/real/remp2.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/remp2.c
round.o: lib/real/round.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/round.c
scalbn.o: lib/real/scalbn.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/scalbn.c
sin.o: lib/real/sin.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/sin.c
sinh.o: lib/real/sinh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/sinh.c
sqrt.o: lib/real/sqrt.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/sqrt.c
tan.o: lib/real/tan.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/tan.c
tanh.o: lib/real/tanh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/tanh.c
trunc.o: lib/real/trunc.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/real -c lib/real/trunc.c
cacos.o: lib/cplex/cacos.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cacos.c
cacosh.o: lib/cplex/cacosh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cacosh.c
cacot.o: lib/cplex/cacot.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cacot.c
cacoth.o: lib/cplex/cacoth.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cacoth.c
cacsc.o: lib/cplex/cacsc.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cacsc.c
cacsch.o: lib/cplex/cacsch.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cacsch.c
casec.o: lib/cplex/casec.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/casec.c
casech.o: lib/cplex/casech.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/casech.c
casin.o: lib/cplex/casin.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/casin.c
casinh.o: lib/cplex/casinh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/casinh.c
catan.o: lib/cplex/catan.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/catan.c
catanh.o: lib/cplex/catanh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/catanh.c
ccbrt.o: lib/cplex/ccbrt.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccbrt.c
ccos.o: lib/cplex/ccos.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccos.c
ccosh.o: lib/cplex/ccosh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccosh.c
ccot.o: lib/cplex/ccot.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccot.c
ccoth.o: lib/cplex/ccoth.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccoth.c
ccsc.o: lib/cplex/ccsc.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccsc.c
ccsch.o: lib/cplex/ccsch.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ccsch.c
cexp.o: lib/cplex/cexp.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cexp.c
clog.o: lib/cplex/clog.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/clog.c
clog10.o: lib/cplex/clog10.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/clog10.c
clogb.o: lib/cplex/clogb.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/clogb.c
cpow.o: lib/cplex/cpow.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/cpow.c
csec.o: lib/cplex/csec.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/csec.c
csech.o: lib/cplex/csech.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/csech.c
csgn.o: lib/cplex/csgn.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/csgn.c
csin.o: lib/cplex/csin.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/csin.c
csinh.o: lib/cplex/csinh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/csinh.c
csqrt.o: lib/cplex/csqrt.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/csqrt.c
ctan.o: lib/cplex/ctan.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ctan.c
ctanh.o: lib/cplex/ctanh.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/ctanh.c
prim.o: lib/cplex/prim.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c lib/cplex/prim.c
alloccpy.o: lib/clib/alloccpy.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/alloccpy.c
mem.o: lib/clib/mem.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/mem.c
memcpy.o: lib/clib/memcpy.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/memcpy.c
memset.o: lib/clib/memset.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/memset.c
strcmp.o: lib/clib/strcmp.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/strcmp.c
strlen.o: lib/clib/strlen.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/strlen.c
untag.o: lib/clib/untag.c
${CC} -O3 -std=c9x -fno-builtin -Wall -Werror -Ilib -c lib/clib/untag.c
dragon4.o: lib/dconv/dragon4.cpp
${CC} -O3 -fno-builtin -Wall -Werror -Ilib -Ilib/dconv -c lib/dconv/dragon4.cpp
dmath.o: lib/dconv/dmath.cpp
${CC} -O3 -fno-builtin -Wall -Werror -Ilib -Ilib/dconv -c lib/dconv/dmath.cpp
dprint.o: lib/dconv/dprint.cpp
${CC} -O3 -fno-builtin -Wall -Werror -Ilib -Ilib/dconv -c lib/dconv/dprint.cpp
libs: libamath libcomplex libcamath libamathapp
catalogs:
${FLXCAT} text/keyword.cd app/localize/kword.h=text/keyword.sd
${FLXCAT} text/help.cd app/localize/help.h=text/help.sd
${FLXCAT} text/ident-clean.cd app/localize/ident.h=text/ident.sd
${FLXCAT} text/text.cd app/localize/text.h=text/text.sd
libamathapp: aengine.o charbuf.o cplex.o fgrid.o ntext.o real.o
${AR} rcs libamathapp.a aengine.o charbuf.o cplex.o fgrid.o ntext.o real.o
${RANLIB} libamathapp.a
libamath: acos.o acosh.o asin.o asinh.o atan.o atan2.o atanh.o cbrt.o ceil.o copysign.o cos.o cosh.o exp.o expm1.o fabs.o finite.o floor.o fmod.o hypot.o isnan.o kcos.o kremp2.o ksin.o ktan.o log.o log10.o log1p.o pow.o remp2.o round.o scalbn.o sin.o sinh.o sqrt.o tan.o tanh.o trunc.o
${AR} rcs libamath.a acos.o acosh.o asin.o asinh.o atan.o atan2.o atanh.o cbrt.o ceil.o copysign.o cos.o cosh.o exp.o expm1.o fabs.o finite.o floor.o fmod.o hypot.o isnan.o kcos.o kremp2.o ksin.o ktan.o log.o log10.o log1p.o pow.o remp2.o round.o scalbn.o sin.o sinh.o sqrt.o tan.o tanh.o trunc.o
${RANLIB} libamath.a
libcomplex: cacos.o cacosh.o cacot.o cacoth.o cacsc.o cacsch.o casec.o casech.o casin.o casinh.o catan.o catanh.o ccbrt.o ccos.o ccosh.o ccot.o ccoth.o ccsc.o ccsch.o cexp.o clog.o clog10.o clogb.o cpow.o csec.o csech.o csgn.o csin.o csinh.o csqrt.o ctan.o ctanh.o prim.o
${AR} rcs libcomplex.a cacos.o cacosh.o cacot.o cacoth.o cacsc.o cacsch.o casec.o casech.o casin.o casinh.o catan.o catanh.o ccbrt.o ccos.o ccosh.o ccot.o ccoth.o ccsc.o ccsch.o cexp.o clog.o clog10.o clogb.o cpow.o csec.o csech.o csgn.o csin.o csinh.o csqrt.o ctan.o ctanh.o prim.o
${RANLIB} libcomplex.a
libcamath: alloccpy.o mem.o memcpy.o memset.o strcmp.o strlen.o untag.o dragon4.o dmath.o dprint.o
${AR} rcs libcamath.a alloccpy.o mem.o memcpy.o memset.o strcmp.o strlen.o untag.o dragon4.o dmath.o dprint.o
${RANLIB} libcamath.a
app: libs evaluator.o functions.o graphlist.o lexer.o nodes.o operators.o optimizer.o parser.o statements.o token.o values.o viewer.o console.o console_amiga.o console_stdc.o filesystem_amiga.o filesystem_stdc.o graph.o graph_amiga.o graph_gtk.o language.o language_amiga.o language_stdc.o preferences.o preferences_amiga.o preferences_stdc.o proc_amiga.o program.o program_amiga.o program_stdc.o program_test.o task_amiga.o task_stdc.o window_amiga.o io.o main.o
${CC} ${CFLAGS} -s -L. -o amath evaluator.o functions.o graphlist.o lexer.o nodes.o operators.o optimizer.o parser.o statements.o token.o values.o viewer.o console.o console_amiga.o console_stdc.o filesystem_amiga.o filesystem_stdc.o graph.o graph_amiga.o graph_gtk.o language.o language_amiga.o language_stdc.o preferences.o preferences_amiga.o preferences_stdc.o proc_amiga.o program.o program_amiga.o program_stdc.o program_test.o task_amiga.o task_stdc.o window_amiga.o io.o main.o ${LFLAGS}
dist: app
${MKDIR} dist
${MKDIR} dist/catalog
${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
${COPY} amath dist/
${COPY} LICENSE dist/
${COPY} COPYRIGHT dist/
${COPY} catalog/LICENSE dist/catalog/
clean:
${DEL} aengine.o charbuf.o cplex.o fgrid.o ntext.o real.o acos.o acosh.o asin.o asinh.o atan.o atan2.o atanh.o cbrt.o ceil.o copysign.o cos.o cosh.o exp.o expm1.o fabs.o finite.o floor.o fmod.o hypot.o isnan.o kcos.o kremp2.o ksin.o ktan.o log.o log10.o log1p.o pow.o remp2.o round.o scalbn.o sin.o sinh.o sqrt.o tan.o tanh.o trunc.o cacos.o cacosh.o cacot.o cacoth.o cacsc.o cacsch.o casec.o casech.o casin.o casinh.o catan.o catanh.o ccbrt.o ccos.o ccosh.o ccot.o ccoth.o ccsc.o ccsch.o cexp.o clog.o clog10.o clogb.o cpow.o csec.o csech.o csgn.o csin.o csinh.o csqrt.o ctan.o ctanh.o prim.o alloccpy.o mem.o memcpy.o memset.o strcmp.o strlen.o untag.o dragon4.o dmath.o dprint.o evaluator.o functions.o graphlist.o lexer.o nodes.o operators.o optimizer.o parser.o statements.o token.o values.o viewer.o console.o console_amiga.o console_stdc.o filesystem_amiga.o filesystem_stdc.o graph.o graph_amiga.o graph_gtk.o language.o language_amiga.o language_stdc.o preferences.o preferences_amiga.o preferences_stdc.o proc_amiga.o program.o program_amiga.o program_stdc.o program_test.o task_amiga.o task_stdc.o window_amiga.o io.o main.o libamath.a libcamath.a libcomplex.a libamathapp.a amath
${DELREC} dist
depend:
@echo Dependencies already done

View File

@ -25,13 +25,25 @@
*/
#include "clib.h"
#include "localize/lex.h"
#include "localize/help.h"
#include "localize/kword.h"
#include "localize/ident.h"
#include "localize/text.h"
#include "localize/tags.h"
#include "localize/ialias.h"
#include "system/language.h"
#include "system/program.h"
Language::Language()
{
lastText = NOMEM;
keywordsloc = NOMEM;
keywordcount = sizeof(keywords) / sizeof(keyworddef);
textcount = sizeof(textdefs) / sizeof(textdef);
identcount = sizeof(identtexts) / sizeof(identhelpdef);
helpcount = sizeof(helptexts) / sizeof(helptextdef);
aliascount = sizeof(identaliases) / sizeof(identalias);
}
Language::~Language()
@ -39,20 +51,93 @@ Language::~Language()
if (lastText != NOMEM) {
delete lastText;
}
if (keywordsloc != NOMEM) {
delete [] keywordsloc;
}
}
char* Language::FindAlias(const char* ident)
{
static const unsigned int count = sizeof(identaliases) / sizeof(identalias);
for (unsigned int i = 0; i < count; i++) {
for (unsigned int i = 0; i < aliascount; i++) {
if (StrIsEqual(identaliases[i].ident, ident)) {
return (char*)identaliases[i].alias;
}
}
return (char*)ident;
}
Symbol Language::FindKeyword(const char* ident)
{
for (unsigned int i = 0; i < keywordcount; i++) {
if (
Program->Language->StrIsEqualLoc(keywords[i].name, ident) ||
(keywordsloc != NULL &&
Program->Language->StrIsEqualLoc(keywordsloc[i].name, ident))) {
return keywords[i].symbol;
}
}
return (Symbol)0;
}
char* Language::GetText(int id)
{
textdef *def = NOMEM;
for (unsigned int i = 0; i < textcount; i++) {
if (textdefs[i].id == id) {
def = (textdef*)&textdefs[i];
break;
}
}
if (def == NOMEM) {
return (char*)(HELPNOHELP);
}
char *text = Translate(def);
char *untagged = UntagText(text);
return untagged;
}
char* Language::GetHelpText(char* ident)
{
char *s = FindAlias(ident);
identhelpdef *def = NOMEM;
for (unsigned int i = 0; i < identcount; i++) {
if (StrIsEqual(identtexts[i].ident, s)) {
def = (identhelpdef*)&identtexts[i];
break;
}
}
if (def == NOMEM) {
return (char*)(HELPNOHELP);
}
char *text = Translate(def);
char *untagged = UntagText(text);
return untagged;
}
char* Language::GetHelpText(Symbol symbol)
{
helptextdef *def = NOMEM;
for (unsigned int i = 0; i < helpcount; i++) {
if (helptexts[i].symbol == symbol) {
def = (helptextdef*)&helptexts[i];
break;
}
}
if (def == NOMEM) {
return (char*)(HELPNOHELP);
}
char *text = Translate(def);
char *untagged = UntagText(text);
return untagged;
}
char* Language::UntagText(const char* text)
{
if (lastText != NOMEM) {

View File

@ -30,14 +30,17 @@
#include "localize/lex.h"
#include "localize/help.h"
#include "localize/text.h"
#include "localize/ident.h"
#include "localize/kword.h"
class Language {
public:
Language();
virtual ~Language();
virtual char* GetText(int id) = 0;
virtual char* GetHelpText(char *ident) = 0;
virtual char* GetHelpText(Symbol symbol) = 0;
char* GetText(int id);
char* GetHelpText(char *ident);
char* GetHelpText(Symbol symbol);
Symbol FindKeyword(const char *ident);
virtual char GetFractionPoint() = 0;
virtual bool CharIsAlNum(unsigned long character) = 0;
virtual bool CharIsAlpha(unsigned long character) = 0;
@ -46,9 +49,20 @@ public:
virtual bool CharIsSpace(unsigned long character) = 0;
virtual bool CharIsCntrl(unsigned long character) = 0;
virtual bool StrIsEqualLoc(const char *s1, const char *s2) = 0;
virtual Symbol FindKeyword(const char *ident) = 0;
protected:
virtual char* Translate(textdef *def) = 0;
virtual char* Translate(helptextdef *def) = 0;
virtual char* Translate(identhelpdef *def) = 0;
keyworddef *keywordsloc;
unsigned int keywordcount;
unsigned int textcount;
unsigned int identcount;
unsigned int helpcount;
unsigned int aliascount;
private:
char* FindAlias(const char *ident);
char* UntagText(const char *text);
char* lastText;

View File

@ -38,18 +38,9 @@
#ifdef AMIGA
#include <clib/locale_protos.h>
static unsigned int keywordcount;
static unsigned int textcount;
static unsigned int identcount;
static unsigned int helpcount;
AmigaLanguage::AmigaLanguage()
AmigaLanguage::AmigaLanguage() :
Language::Language()
{
keywordcount = sizeof(keywords) / sizeof(keyworddef);
textcount = sizeof(textdefs) / sizeof(textdef);
identcount = sizeof(identtexts) / sizeof(identhelpdef);
helpcount = sizeof(helptexts) / sizeof(helptextdef);
locale = OpenLocale(NULL);
helpcatalog = OpenCatalog(locale, CATALOG_HELP, CATALOG_DEF, TAG_DONE);
identcatalog = OpenCatalog(locale, CATALOG_IDEN, CATALOG_DEF, TAG_DONE);
@ -63,9 +54,6 @@ AmigaLanguage::AmigaLanguage()
keywordsloc[j].name = GetCatalogStr(keywordcatalog, j, NULL);
keywordsloc[j].symbol = keywords[j].symbol;
}
} else {
keywordcatalog = NULL;
}
}
@ -90,81 +78,21 @@ AmigaLanguage::~AmigaLanguage()
if (locale != NULL) {
CloseLocale(locale);
}
if (keywordsloc != NULL) {
delete [] keywordsloc;
}
}
Symbol AmigaLanguage::FindKeyword(const char* ident)
char* AmigaLanguage::Translate(textdef def)
{
for (unsigned int i = 0; i < keywordcount; i++) {
if (
Program->Language->StrIsEqualLoc(keywords[i].name, ident) || (keywordsloc != NULL &&
Program->Language->StrIsEqualLoc(keywordsloc[i].name, ident))) {
return keywords[i].symbol;
}
}
return (Symbol)0;
return (char*)GetCatalogStr(textcatalog, def->id, (char*)def->text);
}
char* AmigaLanguage::GetText(int id)
char* AmigaLanguage::Translate(helptextdef def)
{
textdef *def = NOMEM;
for (unsigned int i = 0; i < textcount; i++) {
if (textdefs[i].id == id) {
def = (textdef*)&textdefs[i];
break;
}
}
if (def == NOMEM) {
return (char*)(HELPNOHELP);
}
const char *text = GetCatalogStr(textcatalog, def->id, (char*)def->text);
char *untagged = UntagText(text);
return untagged;
return (char*)GetCatalogStr(helpcatalog, def->id, (char*)def->text);
}
char* AmigaLanguage::GetHelpText(char* ident)
char* AmigaLanguage::Translate(identhelpdef def)
{
char *s = FindAlias(ident);
identhelpdef *def = NOMEM;
for (unsigned int i = 0; i < identcount; i++) {
if (StrIsEqual(identtexts[i].ident, s)) {
def = (identhelpdef*)&identtexts[i];
break;
}
}
if (def == NOMEM) {
return (char*)(HELPNOHELP);
}
const char *text = GetCatalogStr(identcatalog, def->id, (char*)def->text);
char *untagged = UntagText(text);
return untagged;
}
char* AmigaLanguage::GetHelpText(Symbol symbol)
{
helptextdef *def = NOMEM;
for (unsigned int i = 0; i < helpcount; i++) {
if (helptexts[i].symbol == symbol) {
def = (helptextdef*)&helptexts[i];
break;
}
}
if (def == NOMEM) {
return (char*)(HELPNOHELP);
}
const char *text = GetCatalogStr(helpcatalog, def->id, (char*)def->text);
char *untagged = UntagText(text);
return untagged;
return (char*)GetCatalogStr(identcatalog, def->id, (char*)def->text);
}
char AmigaLanguage::GetFractionPoint()

View File

@ -37,9 +37,6 @@ class AmigaLanguage : public Language {
public:
AmigaLanguage();
~AmigaLanguage();
char* GetText(int id);
char* GetHelpText(char *ident);
char* GetHelpText(Symbol symbol);
char GetFractionPoint();
bool CharIsAlNum(unsigned long character);
bool CharIsAlpha(unsigned long character);
@ -48,7 +45,11 @@ public:
bool CharIsSpace(unsigned long character);
bool CharIsCntrl(unsigned long character);
bool StrIsEqualLoc(const char *s1, const char *s2);
Symbol FindKeyword(const char *ident);
protected:
char* Translate(textdef *def);
char* Translate(helptextdef *def);
char* Translate(identhelpdef *def);
private:
struct Locale* locale;
@ -56,7 +57,6 @@ private:
struct Catalog *identcatalog;
struct Catalog *textcatalog;
struct Catalog *keywordcatalog;
keyworddef *keywordsloc;
};
#endif

View File

@ -31,67 +31,55 @@
#include "localize/text.h"
#include "localize/ident.h"
#include "localize/kword.h"
#include "system/base/io.h"
#include "system/program.h"
#include "system/language_stdc.h"
StandardLanguage::StandardLanguage()
{ }
StandardLanguage::StandardLanguage() :
Language::Language()
{
LoadCatalogs();
}
StandardLanguage::~StandardLanguage()
{ }
Symbol StandardLanguage::FindKeyword(const char* ident)
{
static const unsigned int count = sizeof(keywords) / sizeof(keyworddef);
for (unsigned int i = 0; i < count; i++) {
if (Program->Language->StrIsEqualLoc(keywords[i].name, ident)) {
return keywords[i].symbol;
}
if (textbase != NOMEM) {
delete textbase;
}
if (helpbase != NOMEM) {
delete helpbase;
}
if (identbase != NOMEM) {
delete identbase;
}
if (kwordbase != NOMEM) {
delete kwordbase;
}
return (Symbol)0;
}
char* StandardLanguage::GetText(int id)
char* StandardLanguage::Translate(textdef* def)
{
const char *text = NOMEM;
static const unsigned int count = sizeof(textdefs) / sizeof(textdef);
for (unsigned int i = 0; i < count; i++) {
if (textdefs[i].id == id) {
text = textdefs[i].text;
break;
}
}
char *untagged = UntagText(text);
return (char*)(untagged != NOMEM ? untagged : HELPNOHELP);
return textcatalog == NOMEM ?
(char*)def->text :
(char*)textcatalog[def->id].text;
}
char* StandardLanguage::GetHelpText(char* ident)
char* StandardLanguage::Translate(helptextdef* def)
{
const char *text = NOMEM;
static const unsigned int count = sizeof(identtexts) / sizeof(identhelpdef);
for (unsigned int i = 0; i < count; i++) {
if (StrIsEqual(identtexts[i].ident, ident)) {
text = identtexts[i].text;
break;
}
}
char *untagged = UntagText(text);
return (char*)(untagged != NOMEM ? untagged : HELPNOHELP);
return helpcatalog == NOMEM ?
(char*)def->text :
(char*)helpcatalog[def->id].text;
}
char* StandardLanguage::GetHelpText(Symbol symbol)
char* StandardLanguage::Translate(identhelpdef* def)
{
const char *text = NOMEM;
static const unsigned int count = sizeof(helptexts) / sizeof(helptextdef);
for (unsigned int i = 0; i < count; i++) {
if (helptexts[i].symbol == symbol) {
text = helptexts[i].text;
break;
}
}
char *untagged = UntagText(text);
return (char*)(untagged != NOMEM ? untagged : HELPNOHELP);
return identcatalog == NOMEM ?
(char*)def->text :
(char*)identcatalog[def->id].text;
}
char StandardLanguage::GetFractionPoint()
@ -136,3 +124,106 @@ bool StandardLanguage::StrIsEqualLoc(const char* s1, const char* s2)
{
return StrIsEqual(s1, s2);
}
void StandardLanguage::LoadCatalogs()
{
const char* key;
const char* value;
LoadCatalog(&textbase, "utext/dk-text.dict");
if (textbase != NOMEM) {
textcatalog = new textdef[textcount];
for (unsigned int j = 0; j < textcount; j++) {
GetNextPair(&key, &value);
textcatalog[j].id = j;
textcatalog[j].text = value;
}
}
LoadCatalog(&helpbase, "utext/dk-help.dict");
if (helpbase != NOMEM) {
helpcatalog = new helptextdef[helpcount];
for (unsigned int j = 0; j < helpcount; j++) {
GetNextPair(&key, &value);
helpcatalog[j].id = j;
helpcatalog[j].symbol = helptexts[j].symbol;
helpcatalog[j].text = value;
}
}
LoadCatalog(&identbase, "utext/dk-ident.dict");
if (identbase != NOMEM) {
identcatalog = new identhelpdef[identcount];
for (unsigned int j = 0; j < identcount; j++) {
GetNextPair(&key, &value);
identcatalog[j].id = j;
identcatalog[j].ident = key;
identcatalog[j].text = value;
}
}
LoadCatalog(&kwordbase, "utext/dk-keyword.dict");
if (kwordbase != NOMEM) {
keywordsloc = new keyworddef[keywordcount];
for (unsigned int j = 0; j < keywordcount; j++) {
GetNextPair(&key, &value);
keywordsloc[j].id = j;
keywordsloc[j].name = value;
keywordsloc[j].symbol = keywords[j].symbol;
}
}
}
void StandardLanguage::LoadCatalog(char **dest, const char *file)
{
FilesystemBase *filesystem = CreateFilesystem();
CharBuffer *cbuf = filesystem->LoadTextFile(file);
if (cbuf != NOMEM) {
AllocAndCopy(dest, cbuf->GetString());
ptr = *dest;
delete cbuf;
} else {
*dest = NOMEM;
}
delete filesystem;
}
void StandardLanguage::GetNextPair(const char **key, const char **value)
{
SkipComments();
*key = ptr;
GetNextLine();
SkipComments();
*value = ptr;
GetNextLine();
}
void StandardLanguage::GetNextLine()
{
while ((*ptr) != '\0' && (*ptr) != '\n') {
ptr++;
}
if ((*ptr) == '\n') {
*ptr++ = '\0';
}
}
void StandardLanguage::SkipComments()
{
bool skipping;
do {
if ((*ptr) == ';') {
GetNextLine();
skipping = true;
} else if ((*ptr) == '#' && *(ptr + sizeof(char)) == '#') {
GetNextLine();
skipping = true;
} else {
skipping = false;
}
} while (skipping);
}

View File

@ -36,9 +36,6 @@ class StandardLanguage : public Language {
public:
StandardLanguage();
~StandardLanguage();
char* GetText(int id);
char* GetHelpText(char *ident);
char* GetHelpText(Symbol symbol);
char GetFractionPoint();
bool CharIsAlNum(unsigned long character);
bool CharIsAlpha(unsigned long character);
@ -47,7 +44,28 @@ public:
bool CharIsSpace(unsigned long character);
bool CharIsCntrl(unsigned long character);
bool StrIsEqualLoc(const char *s1, const char *s2);
Symbol FindKeyword(const char *ident);
protected:
char* Translate(textdef *def);
char* Translate(helptextdef *def);
char* Translate(identhelpdef *def);
private:
void LoadCatalogs();
void LoadCatalog(char **dest, const char *file);
void GetNextPair(const char **key, const char **value);
void GetNextLine();
void SkipComments();
char *textbase;
char *helpbase;
char *identbase;
char *kwordbase;
char *ptr;
textdef *textcatalog;
helptextdef *helpcatalog;
identhelpdef *identcatalog;
};
#endif

8
configure vendored
View File

@ -317,12 +317,18 @@ if $VALID ; then
echo "libs: libamath libcomplex libcamath libamathapp"
echo
echo "catalogs: "
echo "catalogsa: "
echo " \${FLXCAT} text/keyword.cd app/localize/kword.h=text/keyword.sd"
echo " \${FLXCAT} text/help.cd app/localize/help.h=text/help.sd"
echo " \${FLXCAT} text/ident-clean.cd app/localize/ident.h=text/ident.sd"
echo " \${FLXCAT} text/text.cd app/localize/text.h=text/text.sd"
echo
echo "catalogsu: "
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 "libamathapp: ${libapp}"
echo " \${AR} rcs libamathapp${outext}.a ${libapp}"
echo " \${RANLIB} libamathapp${outext}.a"

111
utext/dk-help.dict Normal file
View File

@ -0,0 +1,111 @@
## version $VER: amath-help.catalog 1.60 (09.04.2015) Danish
## language dansk
## codeset 0
; #############################################################################
; Copyright (c) 2015, Carsten Larsen
; 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#
; 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#
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#
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

81
utext/dk-ident.dict Normal file
View File

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

155
utext/dk-keyword.dict Normal file
View File

@ -0,0 +1,155 @@
## version $VER: amath-keyword.catalog 1.60 (08.04.2015) Danish
## language dansk
## codeset 0
;#############################################################################
;Copyright (c) 2015, Carsten Larsen
;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
;######### 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

96
utext/dk-text.dict Normal file
View File

@ -0,0 +1,96 @@
## version $VER: amath-text.catalog 1.60 (08.04.2015) Danish
## language dansk
## codeset 0
; #############################################################################
; Copyright (c) 2015, Carsten Larsen
; 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#
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#