diff options
author | drochner <drochner> | 2007-02-22 20:35:38 +0000 |
---|---|---|
committer | drochner <drochner> | 2007-02-22 20:35:38 +0000 |
commit | fe42d408a35f48b674e949da44df3bf8541f6497 (patch) | |
tree | 0c0aac7c1fba10c74dd3e454284380e09e421bed /math/nickle | |
parent | d01a939648967ca149db6727f7517696236205d9 (diff) | |
download | pkgsrc-fe42d408a35f48b674e949da44df3bf8541f6497.tar.gz |
import nickle-2.56, another command line calculator, with scripting
language, can do arbitrary size integer and rational arithmetics
Diffstat (limited to 'math/nickle')
-rw-r--r-- | math/nickle/DESCR | 6 | ||||
-rw-r--r-- | math/nickle/Makefile | 15 | ||||
-rw-r--r-- | math/nickle/PLIST | 69 | ||||
-rw-r--r-- | math/nickle/distinfo | 6 | ||||
-rw-r--r-- | math/nickle/patches/patch-aa | 28 |
5 files changed, 124 insertions, 0 deletions
diff --git a/math/nickle/DESCR b/math/nickle/DESCR new file mode 100644 index 00000000000..db635e571e0 --- /dev/null +++ b/math/nickle/DESCR @@ -0,0 +1,6 @@ +Nickle is a desk calculator language with powerful programming and +scripting capabilities. Nickle supports a variety of datatypes, espe- +cially arbitrary precision integers, rationals, and imprecise reals. +The input language vaguely resembles C. Some things in C which do not +translate easily are different, some design choices have been made dif- +ferently, and a very few features are simply missing. diff --git a/math/nickle/Makefile b/math/nickle/Makefile new file mode 100644 index 00000000000..42c76899cca --- /dev/null +++ b/math/nickle/Makefile @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/02/22 20:35:38 drochner Exp $ +# + +DISTNAME= nickle-2.56 +CATEGORIES= math lang +MASTER_SITES= http://nickle.org/release/ + +MAINTAINER= pkgsrc_users@NetBSD.org +HOMEPAGE= http://nickle.org/ +COMMENT= Desk calculator language + +GNU_CONFIGURE= yes + +.include "../../devel/readline/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/math/nickle/PLIST b/math/nickle/PLIST new file mode 100644 index 00000000000..33da28b364b --- /dev/null +++ b/math/nickle/PLIST @@ -0,0 +1,69 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/02/22 20:35:38 drochner Exp $ +bin/nickle +include/nickle/builtin-namespaces.h +include/nickle/builtin.h +include/nickle/config.h +include/nickle/gram.h +include/nickle/mem.h +include/nickle/memp.h +include/nickle/nickle.h +include/nickle/opcode.h +include/nickle/ref.h +include/nickle/stack.h +include/nickle/value.h +man/man1/nickle.1 +share/nickle/COPYING +share/nickle/abort.5c +share/nickle/arc4.5c +share/nickle/builtin.5c +share/nickle/command.5c +share/nickle/ctype.5c +share/nickle/examples/COPYING +share/nickle/examples/comb.5c +share/nickle/examples/cribbage.5c +share/nickle/examples/erat.5c +share/nickle/examples/fourfours.5c +share/nickle/examples/initializer.5c +share/nickle/examples/is-prime.5c +share/nickle/examples/kaiser.5c +share/nickle/examples/menace2.5c +share/nickle/examples/miller-rabin.5c +share/nickle/examples/mutextest.5c +share/nickle/examples/numbers.5c +share/nickle/examples/polynomial.5c +share/nickle/examples/prime.5c +share/nickle/examples/qbrating.5c +share/nickle/examples/randtest.5c +share/nickle/examples/restart.5c +share/nickle/examples/roman.5c +share/nickle/examples/rsa-demo.5c +share/nickle/examples/rsa.5c +share/nickle/examples/skiplist.5c +share/nickle/examples/skiplisttest.5c +share/nickle/examples/smlng/COPYING +share/nickle/examples/smlng/context.5c +share/nickle/examples/smlng/generate.5c +share/nickle/examples/smlng/parse.5c +share/nickle/examples/smlng/test.5c +share/nickle/examples/sort.5c +share/nickle/examples/turtle/COPYING +share/nickle/examples/turtle/snowflake.5c +share/nickle/examples/turtle/snowflake.tex +share/nickle/examples/turtle/turtle.5c +share/nickle/file.5c +share/nickle/history.5c +share/nickle/math.5c +share/nickle/mutex.5c +share/nickle/parse-args.5c +share/nickle/printf.5c +share/nickle/prng.5c +share/nickle/process.5c +share/nickle/scanf.5c +share/nickle/socket.5c +share/nickle/string.5c +share/nickle/svg.5c +@dirrm share/nickle/examples/turtle +@dirrm share/nickle/examples/smlng +@dirrm share/nickle/examples +@dirrm share/nickle +@dirrm include/nickle diff --git a/math/nickle/distinfo b/math/nickle/distinfo new file mode 100644 index 00000000000..07c924ac55b --- /dev/null +++ b/math/nickle/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/02/22 20:35:38 drochner Exp $ + +SHA1 (nickle-2.56.tar.gz) = f8672a60c41d21da2fe40eb12beafb485bf14211 +RMD160 (nickle-2.56.tar.gz) = 29cb2473764d6d5f80466c1638729e30539da124 +Size (nickle-2.56.tar.gz) = 399957 bytes +SHA1 (patch-aa) = 93a35914f28cff0fb4cbdc1e0fb19efce99c95aa diff --git a/math/nickle/patches/patch-aa b/math/nickle/patches/patch-aa new file mode 100644 index 00000000000..1ffeb7e63ef --- /dev/null +++ b/math/nickle/patches/patch-aa @@ -0,0 +1,28 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/02/22 20:35:38 drochner Exp $ + +--- value.h.orig 2007-02-22 20:27:04.000000000 +0100 ++++ value.h +@@ -311,12 +311,12 @@ extern ValueRep ForeignRep; + * Use all but one bit to hold immediate integer values + */ + #define NICKLE_INT_BITS ((sizeof (int) * 8) - 1) +-#define NICKLE_INT_SIGN (1 << (NICKLE_INT_BITS - 1)) ++#define NICKLE_INT_SIGN (1U << (NICKLE_INT_BITS - 1)) + /* + * this bit holds any overflow; when different from SIGN, + * an addition/subtraction has overflowed + */ +-#define NICKLE_INT_CARRY (1 << NICKLE_INT_BITS) ++#define NICKLE_INT_CARRY (1U << NICKLE_INT_BITS) + /* + * An int fits in a 'nickle int' if the top two bits + * are the same. There are four initial values: +@@ -328,7 +328,7 @@ extern ValueRep ForeignRep; + * + * So, the two 'naughty' ones end up with the high bit set + */ +-#define NICKLE_INT_CARRIED(r) (((r) + NICKLE_INT_SIGN) & NICKLE_INT_CARRY) ++#define NICKLE_INT_CARRIED(r) (((unsigned)(r) + NICKLE_INT_SIGN) & NICKLE_INT_CARRY) + + #define MAX_NICKLE_INT ((int) ((unsigned) NICKLE_INT_SIGN - 1)) + #define MIN_NICKLE_INT (-MAX_NICKLE_INT - 1) |