diff --git a/Makefile b/Makefile index 6f8160fc..2333ae87 100644 --- a/Makefile +++ b/Makefile @@ -15,370 +15,370 @@ DEL = rm -f DELREC = rm -Rf evaluator.o: app/main/evaluator.cpp - ${CC} -O2 ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/main/evaluator.cpp + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${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 + ${CC} -O0 -g ${CFLAGS} -Ilib -Iapp -Wall -Werror -c app/lib/real.cpp acos.o: lib/real/acos.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/acos.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/acos.c acosh.o: lib/real/acosh.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/acosh.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/acosh.c asin.o: lib/real/asin.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/asin.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/asin.c asinh.o: lib/real/asinh.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/asinh.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/asinh.c atan.o: lib/real/atan.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/atan.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/atan.c atan2.o: lib/real/atan2.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/atan2.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/atan2.c atanh.o: lib/real/atanh.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/atanh.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/atanh.c cbrt.o: lib/real/cbrt.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/cbrt.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/cbrt.c ceil.o: lib/real/ceil.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/ceil.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/ceil.c copysign.o: lib/real/copysign.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/copysign.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/copysign.c cos.o: lib/real/cos.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/cos.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/cos.c cosh.o: lib/real/cosh.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/cosh.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/cosh.c exp.o: lib/real/exp.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/exp.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/exp.c expm1.o: lib/real/expm1.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/expm1.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/expm1.c fabs.o: lib/real/fabs.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/fabs.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/fabs.c finite.o: lib/real/finite.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/finite.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/finite.c floor.o: lib/real/floor.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/floor.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/floor.c fmod.o: lib/real/fmod.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/fmod.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/fmod.c hypot.o: lib/real/hypot.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/hypot.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/hypot.c isnan.o: lib/real/isnan.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/isnan.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/isnan.c kcos.o: lib/real/kcos.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/kcos.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/kcos.c kremp2.o: lib/real/kremp2.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/kremp2.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/kremp2.c ksin.o: lib/real/ksin.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/ksin.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/ksin.c ktan.o: lib/real/ktan.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/ktan.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/ktan.c log.o: lib/real/log.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/log.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/log.c log10.o: lib/real/log10.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/log10.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/log10.c log1p.o: lib/real/log1p.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/log1p.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/log1p.c pow.o: lib/real/pow.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/pow.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/pow.c remp2.o: lib/real/remp2.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/remp2.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/remp2.c round.o: lib/real/round.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/round.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/round.c scalbn.o: lib/real/scalbn.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/scalbn.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/scalbn.c sin.o: lib/real/sin.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/sin.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/sin.c sinh.o: lib/real/sinh.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/sinh.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/sinh.c sqrt.o: lib/real/sqrt.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/sqrt.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/sqrt.c tan.o: lib/real/tan.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/tan.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/tan.c tanh.o: lib/real/tanh.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/tanh.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/tanh.c trunc.o: lib/real/trunc.c - ${CC} -O3 -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -Wall -Werror -Ilib -Ilib/real -c lib/real/trunc.c + ${CC} -O0 -g -std=c9x -fno-builtin -fno-strict-aliasing -ffloat-store -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -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 + ${CC} -O0 -g -fno-builtin -Wall -Werror -Ilib -Ilib/dconv -c lib/dconv/dprint.cpp libs: libamath libcomplex libcamath libamathapp @@ -405,7 +405,7 @@ libcamath: alloccpy.o mem.o memcpy.o memset.o strcmp.o strlen.o untag.o dragon4 ${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} + ${CC} ${CFLAGS} -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 @@ -418,6 +418,7 @@ dist: app ${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/ diff --git a/Makefile.m68k b/Makefile.m68k index cdfda291..5fbf0451 100644 --- a/Makefile.m68k +++ b/Makefile.m68k @@ -418,6 +418,7 @@ dist: app ${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/ diff --git a/app/localize/help.h b/app/localize/help.h index ec17491f..c531a0cd 100644 --- a/app/localize/help.h +++ b/app/localize/help.h @@ -33,7 +33,7 @@ /** * @file help.h * @brief Help texts for statement. - * + * */ #include "clib.h" diff --git a/app/localize/ident.h b/app/localize/ident.h index c85afed0..9ce1101a 100644 --- a/app/localize/ident.h +++ b/app/localize/ident.h @@ -33,7 +33,7 @@ /** * @file ident.h * @brief Help texts for built-in functions. - * + * */ #include "clib.h" diff --git a/app/localize/kword.h b/app/localize/kword.h index 34bddc90..a4799977 100644 --- a/app/localize/kword.h +++ b/app/localize/kword.h @@ -27,8 +27,8 @@ * */ -#ifndef AMATH_TEXT_KEYWORD_H -#define AMATH_TEXT_KEYWORD_H +#ifndef AMATH_LOCALIZE_KEYWORD_H +#define AMATH_LOCALIZE_KEYWORD_H /** * @file kword.h @@ -44,58 +44,59 @@ * */ struct keyworddef { - const char *name; + int id; Symbol symbol; + const char *name; }; static const keyworddef keywords[] = { - { "clear", symclear }, - { "def", symdef }, - { "delete", symdelete }, - { "e", syme }, - { "i", symi }, - { "pi", sympi }, - { "ins", symins }, - { "eval", symeval }, - { "draw", symdraw }, - { "plot", symplot }, - { "execute", symexecute }, - { "exit", symexit }, - { "quit", symexit }, - { "statements", symstatement }, - { "operators", symoperator }, - { "complex", symcomplex }, - { "funcs", symfunction }, - { "functions", symfunction }, - { "trigon", symtrigon }, - { "trigonometric", symtrigon }, - { "hyper", symhyper }, - { "hyperbolic", symhyper }, - { "help", symhelp }, - { "prompt", symprompt }, - { "version", symversion }, - { "mem", symmem }, - { "memory", symmem }, - { "prefs", symprefs }, - { "preferences", symprefs }, - { "list", symlist }, - { "load", symload }, - { "save", symsave }, - { "show", symshow }, - { "vars", symvariable }, - { "variables", symvariable }, - { "digits", symdigits }, - { "input", syminput }, - { "output", symoutput }, - { "bin", symbin }, - { "binary", symbin }, - { "oct", symoct }, - { "octal", symoct }, - { "dec", symdec }, - { "decimal", symdec }, - { "hex", symhex }, - { "hexadecimal", symhex }, - { EMPTYSTRING, Symbol(0) } + { 0, symclear, "clear" }, + { 1, symdef, "def" }, + { 2, symdelete, "delete" }, + { 3, syme, "e" }, + { 4, symi, "i" }, + { 5, sympi, "pi" }, + { 6, symins, "ins" }, + { 7, symeval, "eval" }, + { 8, symdraw, "draw" }, + { 9, symplot, "plot" }, + { 10, symexecute, "execute" }, + { 11, symexit, "exit" }, + { 12, symexit, "quit" }, + { 13, symstatement, "statements" }, + { 14, symoperator, "operators" }, + { 15, symcomplex, "complex" }, + { 16, symfunction, "funcs" }, + { 17, symfunction, "functions" }, + { 18, symtrigon, "trigon" }, + { 19, symtrigon, "trigonometric" }, + { 20, symhyper, "hyper" }, + { 21, symhyper, "hyperbolic" }, + { 22, symhelp, "help" }, + { 23, symprompt, "prompt" }, + { 24, symversion, "version" }, + { 25, symmem, "mem" }, + { 26, symmem, "memory" }, + { 27, symprefs, "prefs" }, + { 28, symprefs, "preferences" }, + { 29, symlist, "list" }, + { 30, symload, "load" }, + { 31, symsave, "save" }, + { 32, symshow, "show" }, + { 33, symvariable, "vars" }, + { 34, symvariable, "variables" }, + { 35, symdigits, "digits" }, + { 36, syminput, "input" }, + { 37, symoutput, "output" }, + { 38, symbin, "bin" }, + { 39, symbin, "binary" }, + { 40, symoct, "oct" }, + { 41, symoct, "octal" }, + { 42, symdec, "dec" }, + { 43, symdec, "decimal" }, + { 44, symhex, "hex" }, + { 45, symhex, "hexadecimal" }, + { -1, Symbol(0), EMPTYSTRING } }; #endif diff --git a/app/localize/text.h b/app/localize/text.h index f205d58e..e1920de1 100644 --- a/app/localize/text.h +++ b/app/localize/text.h @@ -33,7 +33,7 @@ /** * @file text.h * @brief Static texts in amath. - * + * */ #include "clib.h" diff --git a/app/main/lexer.cpp b/app/main/lexer.cpp index 0bdfe369..7536ca70 100644 --- a/app/main/lexer.cpp +++ b/app/main/lexer.cpp @@ -215,14 +215,7 @@ bool Lexer::GetDigitValue() Symbol Lexer::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; - } - } - - return (Symbol)0; + return Program->Language->FindKeyword(ident); } char* Lexer::FindKeyword(Symbol symbol) diff --git a/app/system/base/io.cpp b/app/system/base/io.cpp index 54b864aa..cc20a631 100644 --- a/app/system/base/io.cpp +++ b/app/system/base/io.cpp @@ -49,41 +49,6 @@ class Program *Program; const char *vers = TXTDOSVERSION; -#ifndef AMIGA -#include -void* operator new (size_t size) throw(std::bad_alloc) { - return AllocMemSafe(size); -} - -void* operator new[] (size_t size) throw(std::bad_alloc) { - return AllocMemSafe(size); -} - -void operator delete (void* ptr) throw() { - FreeMemSafe(ptr); -} - -void operator delete[] (void* ptr) throw() { - FreeMemSafe(ptr); -} -#else -inline void* operator new (size_t size) { - return AllocMemSafe(size); -} - -inline void* operator new[] (size_t size) { - return AllocMemSafe(size); -} - -inline void operator delete (void* ptr) { - FreeMemSafe(ptr); -} - -inline void operator delete[] (void* ptr) { - FreeMemSafe(ptr); -} -#endif - class Program* CreateProgram(int argc, char **argv) { class Program* out; #ifdef WITHTEST diff --git a/app/system/language.h b/app/system/language.h index 92be18bf..bc1b0cb4 100644 --- a/app/system/language.h +++ b/app/system/language.h @@ -46,6 +46,7 @@ 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: char* FindAlias(const char *ident); diff --git a/app/system/language_amiga.cpp b/app/system/language_amiga.cpp index 86938349..8d5fe15f 100644 --- a/app/system/language_amiga.cpp +++ b/app/system/language_amiga.cpp @@ -29,6 +29,7 @@ #include "localize/help.h" #include "localize/text.h" #include "localize/ident.h" +#include "localize/kword.h" #include "localize/tags.h" #include "system/program.h" #include "system/language_amiga.h" @@ -36,23 +37,43 @@ #ifdef AMIGA #include +static unsigned int keywordcount; +static unsigned int textcount; +static unsigned int identcount; +static unsigned int helpcount; + AmigaLanguage::AmigaLanguage() { + keywordcount = sizeof(keywords) / sizeof(keyworddef); + textcount = sizeof(textdefs) / sizeof(textdef); + identcount = sizeof(identtexts) / sizeof(identhelpdef); + helpcount = sizeof(helptexts) / sizeof(helptextdef); + // OpenCatalog searches for files in the following locations: // PROGDIR:Catalogs/languageName/name // LOCALE:Catalogs/languageName/name base = (struct LocaleBase*)OpenLibrary("locale.library", 38L); locale = OpenLocale(NULL); - helpcatalog = OpenCatalog(locale, "amath-help.catalog", - OC_BuiltInLanguage,"english", - TAG_DONE); - identcatalog = OpenCatalog(locale, "amath-ident.catalog", - OC_BuiltInLanguage,"english", - TAG_DONE); - textcatalog = OpenCatalog(locale, "amath-text.catalog", - OC_BuiltInLanguage,"english", - TAG_DONE); + helpcatalog = OpenCatalog(locale, "amath-help.catalog", + OC_BuiltInLanguage,"english", + TAG_DONE); + identcatalog = OpenCatalog(locale, "amath-ident.catalog", + OC_BuiltInLanguage,"english", + TAG_DONE); + textcatalog = OpenCatalog(locale, "amath-text.catalog", + OC_BuiltInLanguage,"english", + TAG_DONE); + keywordcatalog = OpenCatalog(locale, "amath-keyword.catalog", + OC_BuiltInLanguage,"english", + TAG_DONE); + + keywordsloc = new keyworddef[keywordcount]; + for (unsigned int j = 0; j < keywordcount; j++) { + keywordsloc[j].id = j; + keywordsloc[j].name = GetCatalogStr(keywordcatalog, j, NULL); + keywordsloc[j].symbol = keywords[j].symbol; + } } AmigaLanguage::~AmigaLanguage() @@ -60,15 +81,29 @@ AmigaLanguage::~AmigaLanguage() CloseCatalog(helpcatalog); CloseCatalog(identcatalog); CloseCatalog(textcatalog); + CloseCatalog(keywordcatalog); CloseLocale(locale); CloseLibrary((struct Library*)base); + delete [] keywordsloc; +} + +Symbol AmigaLanguage::FindKeyword(const char* ident) +{ + for (unsigned int i = 0; i < keywordcount; i++) { + if ( + Program->Language->StrIsEqualLoc(keywords[i].name, ident) || + Program->Language->StrIsEqualLoc(keywordsloc[i].name, ident)) { + return keywords[i].symbol; + } + } + + return (Symbol)0; } char* AmigaLanguage::GetText(int id) { textdef *def = NOMEM; - static const unsigned int count = sizeof(textdefs) / sizeof(textdef); - for (unsigned int i = 0; i < count; i++) { + for (unsigned int i = 0; i < textcount; i++) { if (textdefs[i].id == id) { def = (textdef*)&textdefs[i]; break; @@ -87,10 +122,8 @@ char* AmigaLanguage::GetText(int id) char* AmigaLanguage::GetHelpText(char* ident) { char *s = FindAlias(ident); - identhelpdef *def = NOMEM; - static const unsigned int count = sizeof(identtexts) / sizeof(identhelpdef); - for (unsigned int i = 0; i < count; i++) { + for (unsigned int i = 0; i < identcount; i++) { if (StrIsEqual(identtexts[i].ident, s)) { def = (identhelpdef*)&identtexts[i]; break; @@ -109,8 +142,7 @@ char* AmigaLanguage::GetHelpText(char* ident) char* AmigaLanguage::GetHelpText(Symbol symbol) { helptextdef *def = NOMEM; - static const unsigned int count = sizeof(helptexts) / sizeof(helptextdef); - for (unsigned int i = 0; i < count; i++) { + for (unsigned int i = 0; i < helpcount; i++) { if (helptexts[i].symbol == symbol) { def = (helptextdef*)&helptexts[i]; break; diff --git a/app/system/language_amiga.h b/app/system/language_amiga.h index 62eac1b8..4a7144e1 100644 --- a/app/system/language_amiga.h +++ b/app/system/language_amiga.h @@ -30,6 +30,7 @@ #include "localize/lex.h" #include "localize/help.h" #include "localize/text.h" +#include "localize/kword.h" #include "system/language.h" class AmigaLanguage : public Language { @@ -47,6 +48,7 @@ public: bool CharIsSpace(unsigned long character); bool CharIsCntrl(unsigned long character); bool StrIsEqualLoc(const char *s1, const char *s2); + Symbol FindKeyword(const char *ident); private: struct LocaleBase* base; @@ -54,6 +56,8 @@ private: struct Catalog *helpcatalog; struct Catalog *identcatalog; struct Catalog *textcatalog; + struct Catalog *keywordcatalog; + keyworddef *keywordsloc; }; #endif diff --git a/app/system/language_stdc.cpp b/app/system/language_stdc.cpp index 68534909..7e5b86d8 100644 --- a/app/system/language_stdc.cpp +++ b/app/system/language_stdc.cpp @@ -26,10 +26,11 @@ #include "clib.h" #include "localize/lex.h" +#include "localize/tags.h" #include "localize/help.h" #include "localize/text.h" #include "localize/ident.h" -#include "localize/tags.h" +#include "localize/kword.h" #include "system/program.h" #include "system/language_stdc.h" @@ -41,6 +42,18 @@ StandardLanguage::StandardLanguage() 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; + } + } + + return (Symbol)0; +} + char* StandardLanguage::GetText(int id) { const char *text = NOMEM; diff --git a/app/system/language_stdc.h b/app/system/language_stdc.h index d1e15762..3e1d523a 100644 --- a/app/system/language_stdc.h +++ b/app/system/language_stdc.h @@ -47,6 +47,7 @@ public: bool CharIsSpace(unsigned long character); bool CharIsCntrl(unsigned long character); bool StrIsEqualLoc(const char *s1, const char *s2); + Symbol FindKeyword(const char *ident); }; #endif diff --git a/app/system/preferences.cpp b/app/system/preferences.cpp index bb105730..8c48cc6d 100644 --- a/app/system/preferences.cpp +++ b/app/system/preferences.cpp @@ -118,3 +118,4 @@ void PreferencesBase::SetDigits(int digits) { this->digits = digits; } + diff --git a/catalog/dansk/amath-help.ct b/catalog/dansk/amath-help.ct index 8efd1961..52d05ca3 100644 --- a/catalog/dansk/amath-help.ct +++ b/catalog/dansk/amath-help.ct @@ -30,24 +30,24 @@ ; 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#funktions Grundlæggende funktioner.#NEWLINE#trigon Trigonometriske funktioner.#NEWLINE#hyper Hyperbolske funktioner.#NEWLINE#complex Komplekse tal.#NEWLINE#statements Understøttede kommondoer.#NEWLINE#operators Understøttede operatorer.#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: help trigon#NEWLINE# +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#compleks Komplekse tal.#NEWLINE#kommander 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# +-------------------------------------------------#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# +-------------------------------------------------#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#clear Ryd konsol vindue.#NEWLINE#def Definer funktion.#NEWLINE#delete Slet variabler og funktioner.#NEWLINE#digits Angiv antal betydende cifre.#NEWLINE#eval Beregn aritmetiske udtryk.#NEWLINE#execute Afvikel kommondoer i en fil.#NEWLINE#funktions Vis liste med brugerdefinerede funktioner.#NEWLINE#input Skift numerisk talsystem ved læsning (eksperimentelt).#NEWLINE#help Vis grundlæggende hjælpetekst.#NEWLINE#output kift numerisk talsystem ved skrivning (eksperimentelt).#NEWLINE#list Vis indholdet af en mappe.#NEWLINE#show Vis indholdet af en fil.#NEWLINE#load Hent variabler og funktioner fra en fil.#NEWLINE#save Gem variabler og funktioner til en fil.#NEWLINE#variables Vis variabler i hukommelsen.#NEWLINE#version Vis infomation om denne version.#NEWLINE#memory Vis internt hukommelsesforbrug.#NEWLINE#exit Afslut program.#NEWLINE#---------------------------------------------------------#NEWLINE#Det er valgfrit at angive def og eval kommandoerne. Kommandoerne Functions og#NEWLINE#variables kan forkortes til funcs og vars.#NEWLINE# +---------------------------------------------------------#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 kift 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.#NEWLINE# Kommandoerne funktioner og variabler kan forkortes til funk og var.#NEWLINE# symcomplex -Udtryk med komplekse tal skrives ved at angive 'i' sammen med den#NEWLINE#imaginære talværdi. Komplekse tal kan blandes med reelle tal.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: 2+3i#NEWLINE#Eksempel: 2+3.2i*cos(-1i)+5/7#NEWLINE# +Udtryk med komplekse tal skrives ved at angive 'i' sammen med den#NEWLINE#imaginære talværdi. Komplekse tal kan blandes med reelle tal.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: 2+3i#NEWLINE#Eksempel: 2+3.2i*cos(-1i)+5/7#NEWLINE# symclear -Clear kommandoen sletter alt tekst i konsol vinduet.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: clear#NEWLINE# +Ryd kommandoen sletter alt tekst i konsol vinduet.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: ryd#NEWLINE# symdef -The def statement is used to define funktions. When defining a funktion#NEWLINE#it is possible to omit the def keyword. Defined funktions can be shown#NEWLINE#using the funktions statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: def f(x)=2*x+3#NEWLINE#Optional syntax: f(x)=2*x+3#NEWLINE# +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 'funtioner'.#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# @@ -72,9 +72,8 @@ The output statement either changes or shows the how numeral output is shown.#NE ; Help for list statement symlist No description is available for the list statement.#NEWLINE# -; Help for show statement symshow -The show statement displays the content of a file.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: show "filetosee"#NEWLINE# +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# @@ -82,34 +81,31 @@ The load statement retrieves a set of defined variables and funktions from#NEWLI symsave The save statement saves defined variables and funktions to a file in a#NEWLINE#plain text format. Saved variables and funktions can be retrieved using#NEWLINE#the load statement.#NEWLINE# #SYNTAXHIGHLIGHT#Syntaks: save "worktokeep"#NEWLINE# symversion -Viser hvilken version af amath der kører.#NEWLINE# +Viser hvilken version af amath der kører.#NEWLINE# symmem Viser internt hukommelsesforbrug.#NEWLINE# ; Help for prefs statement symprefs There is no help for prefs statement now.#NEWLINE# -; Help for variable statement symvariable -The variable statement shows a list of variables in memory.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: variables#NEWLINE##NORMALTEXT#optional syntax: vars#NEWLINE# -; Help for exit statement +Variabler kommandoen viser en list af definerede variabler i hukommelsen.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: variabler#NEWLINE##NORMALTEXT#Alternativ syntaks: var#NEWLINE# symexit -The exit statement shuts down amath.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: exit#NEWLINE# +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# -; Help for imaginary unit symi -The imaginary unit is denoted and commonly referred to as i.#NEWLINE#The imaginary unit is a number, which when multiplied#NEWLINE#by itself gives -1.#NEWLINE# +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 ins variablen.#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: ins*0,25#NEWLINE# +Den sidst udregnede værdi kan benyttes i næste udtryk ved hjælp af ins variablen.#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: ins*0,25#NEWLINE# symbin -Der er ikke nogen hjælp tilgængelig om binary nøgleordet.#NEWLINE +Der er ikke nogen hjælp tilgængelig om binær nøgleordet.#NEWLINE symoct -Der er ikke nogen hjælp tilgængelig om octal nøgleordet.#NEWLINE +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 +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 +Der er ikke nogen hjælp tilgængelig om hexadecimal nøgleordet.#NEWLINE diff --git a/catalog/dansk/amath-keyword.ct b/catalog/dansk/amath-keyword.ct new file mode 100644 index 00000000..d833aa70 --- /dev/null +++ b/catalog/dansk/amath-keyword.ct @@ -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 diff --git a/catalog/dansk/amath-text.ct b/catalog/dansk/amath-text.ct index 3705eaf7..1a137180 100644 --- a/catalog/dansk/amath-text.ct +++ b/catalog/dansk/amath-text.ct @@ -27,9 +27,9 @@ ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; ############################################################################# INTROMSG -#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02##ITALICS#Skriv help for at få vist mere information.#NEWLINE# +#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02##ITALICS#Skriv hjælp for at få vist uddybende information.#NEWLINE# TXTLISTDIRHEADER -Type Navn#NEWLINE#-----------------------------------------------#NEWLINE# + Type Navn#NEWLINE#-----------------------------------------------#NEWLINE# TXTLISTDIRTFILE [fil] TXTLISTDIRTDIR @@ -53,23 +53,23 @@ Variablen er ikke defineret:#SPACE# HELPFUNNDEF Funktionen er ikke defineret:#SPACE# HELPFUNRDEF -Funktionen kan ikke omdefineres:#SPACE# +Funktionen er allerede defineret:#SPACE# HELPPNUMERA -Basen skal være mellem 2 og 32:#SPACE# +Grundtallet skal være mellem 2 og 32:#SPACE# HELPPDIGITS -Antal decimaler skal være mellem 0 og 15:#SPACE# +Antal betydende cifre skal være mellem 0 og 15:#SPACE# HELPINPUSHOW -Talsystemet når computeren læser er#SPACE# +Talsystemet når computeren læser ind er#SPACE# HELPOUTPSHOW -Talsystemet når computeren skriver er#SPACE# +Talsystemet når computeren skriver ud er#SPACE# HELPINPUSETT -Talsystemet ved læsning ændret til#SPACE# +Talsystemet ved indlæsning ændret til#SPACE# HELPOUTPSETT -Talsystemet ved skrivning ændret til#SPACE# +Talsystemet ved udskrivning ændret til#SPACE# HELPDIGISETT -Antal decimaler ændret til#SPACE# +Antal betydende cifre ændret til#SPACE# HELPDIGISHOW -Antal decimaler der vises er#SPACE# +Antal betydende cifre der vises er#SPACE# HELPVARSNDEF Der er ikke defineret nogle variabler.#NEWLINE# HELPFUNCNDEF @@ -79,17 +79,17 @@ Variabler og funktioner indl HELPSAVESUCC Variabler og funktioner gemt til fil.#NEWLINE# HELPSAVEFAIL -Kan ikke gemme til fil.#NEWLINE# +Kan ikke gemme fil.#NEWLINE# HELPSAVENOTH Der er ikke noget og gemme.#NEWLINE# HELPPREFLOAD -Præferencer indlæst.#NEWLINE# +Præferencer blev indlæst.#NEWLINE# HELPPREFNOLO -Præferencer kunne ikke indlæses.#NEWLINE# +Kunne ikke indlæses præferencer.#NEWLINE# HELPPREFSAVE Præferencer blev gemt.#NEWLINE# HELPPREFNOSA -Præferencer kunne ikke gemmes.#NEWLINE# +Kunne ikke gemme præferencer.#NEWLINE# MSGNODIR Mappen kan ikke åbnes:#SPACE# MSGNOFILE diff --git a/configure b/configure index c3ebc001..5fa3fb26 100755 --- a/configure +++ b/configure @@ -352,6 +352,7 @@ if $VALID ; then 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 " \${COPY} amath dist/" echo " \${COPY} LICENSE dist/" echo " \${COPY} COPYRIGHT dist/" diff --git a/text/keyword.cd b/text/keyword.cd index eb3cca46..5cd027ec 100644 --- a/text/keyword.cd +++ b/text/keyword.cd @@ -28,10 +28,10 @@ ;## Keywords and statement in amath ;################################################################################### ;######### ClearStatement -clear (/8/8) +clear (//) symclear ;######### FunctionDefinition statement -def (/6/6) +def (//) symdef ;######### DeleteStatement and keyword delete (//) diff --git a/text/keyword.sd b/text/keyword.sd index e0cdb06c..2d875161 100644 --- a/text/keyword.sd +++ b/text/keyword.sd @@ -45,13 +45,14 @@ * */ struct keyworddef { - const char *name; + int id; Symbol symbol; + const char *name; }; static const keyworddef keywords[] = { - { "%i", %s }, - { EMPTYSTRING, Symbol(0) } + { %d, %s, "%i" }, + { -1, Symbol(0), EMPTYSTRING } }; #endif