summaryrefslogtreecommitdiff
path: root/math/grpn
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2002-04-02 02:01:23 +0000
committerdmcmahill <dmcmahill>2002-04-02 02:01:23 +0000
commitb0068ad57a4078eb0ea032d9fe94dbcde5d122aa (patch)
tree17d826dd21546661cfc75c65efe10cb0c397d889 /math/grpn
parent396e07a7e8bc832056ee158bb7925fff026541e2 (diff)
downloadpkgsrc-b0068ad57a4078eb0ea032d9fe94dbcde5d122aa.tar.gz
Add db10 and db20 functions to compute decibels. While here
add a bunch of missing headers (string.h, stdlib.h) for alpha. Bump rev to 1.1.0nb1
Diffstat (limited to 'math/grpn')
-rw-r--r--math/grpn/Makefile3
-rw-r--r--math/grpn/distinfo12
-rw-r--r--math/grpn/patches/patch-ab24
-rw-r--r--math/grpn/patches/patch-ac50
-rw-r--r--math/grpn/patches/patch-ad13
-rw-r--r--math/grpn/patches/patch-ae81
-rw-r--r--math/grpn/patches/patch-af12
-rw-r--r--math/grpn/patches/patch-ag12
-rw-r--r--math/grpn/patches/patch-ah12
-rw-r--r--math/grpn/patches/patch-ai13
-rw-r--r--math/grpn/patches/patch-aj12
-rw-r--r--math/grpn/patches/patch-ak12
12 files changed, 254 insertions, 2 deletions
diff --git a/math/grpn/Makefile b/math/grpn/Makefile
index dd25119577b..273d340919e 100644
--- a/math/grpn/Makefile
+++ b/math/grpn/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2001/02/17 18:22:24 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2002/04/02 02:01:23 dmcmahill Exp $
#
DISTNAME= grpn-1.1.0
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://wilkins.ne.mediaone.net/pub/
diff --git a/math/grpn/distinfo b/math/grpn/distinfo
index dc3487b251b..939cb6efa03 100644
--- a/math/grpn/distinfo
+++ b/math/grpn/distinfo
@@ -1,5 +1,15 @@
-$NetBSD: distinfo,v 1.2 2001/04/19 08:45:40 agc Exp $
+$NetBSD: distinfo,v 1.3 2002/04/02 02:01:23 dmcmahill Exp $
SHA1 (grpn-1.1.0.tar.gz) = c4f49494114946f7690c6a14f097f0a64e2e84e2
Size (grpn-1.1.0.tar.gz) = 44336 bytes
SHA1 (patch-aa) = 40cd39e5f77cbe38cc59f4f44ec5ee9efcefcbbf
+SHA1 (patch-ab) = b8c0aef12f797e5fbb39a902e211e9b1a1f7dc81
+SHA1 (patch-ac) = 34894e81d32575d31fdbaeadee1673675df641e9
+SHA1 (patch-ad) = 88603c905c38ae14d66cdf1a347626412e895ae6
+SHA1 (patch-ae) = 5287f6c5a7b661a3333e1768b64333b79422e0c9
+SHA1 (patch-af) = c77b8522a12759327abe69856bcfcbfe9b3ba396
+SHA1 (patch-ag) = c7e24d2786203b9eff6d1921bd82885ad412db09
+SHA1 (patch-ah) = eaa503abd7ae9ee08efe63462eb9aae6591aad3a
+SHA1 (patch-ai) = 01ae0b6476d5280f2420aec9f0bc878bfdb87c12
+SHA1 (patch-aj) = cfc11e0ec11e188351fbaa64783bedca02b927e9
+SHA1 (patch-ak) = e77349f7f81253064dfd60cdb2f0f148b765e70b
diff --git a/math/grpn/patches/patch-ab b/math/grpn/patches/patch-ab
new file mode 100644
index 00000000000..4ef200194cb
--- /dev/null
+++ b/math/grpn/patches/patch-ab
@@ -0,0 +1,24 @@
+$NetBSD: patch-ab,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- button_def.c.orig Wed May 26 17:27:42 1999
++++ button_def.c
+@@ -42,6 +42,10 @@
+ baseCmdCB, (void *)OCTAL },
+ { "Bin", "bin", "Binary display mode.",
+ baseCmdCB, (void *)BINARY },
++ { "Db10", "db10", "Convert to dB (Power).",
++ genericButtonCB, (void *)Db10Stack },
++ { "Db20", "db20", "Convert to dB (Voltage).",
++ genericButtonCB, (void *)Db20Stack },
+ { "Rip", "rip", "Resistors in parallel.",
+ genericButtonCB, (void *)RipStack },
+ { "Cplx", "cplx", "Create a complex number.",
+@@ -133,7 +137,7 @@
+ { 8, 8, num456 },
+ { 8, 8, num123 },
+ { 8, 8, num0 },
+- { 12, 0, invisible1 }
++ { 14, 0, invisible1 }
+ };
+
+
diff --git a/math/grpn/patches/patch-ac b/math/grpn/patches/patch-ac
new file mode 100644
index 00000000000..3f7d5f4b317
--- /dev/null
+++ b/math/grpn/patches/patch-ac
@@ -0,0 +1,50 @@
+$NetBSD: patch-ac,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- funcs.c.orig Mon May 31 19:44:50 1999
++++ funcs.c
+@@ -313,6 +313,45 @@
+ }
+ }
+
++void Db10Stack(){
++ Number *n1, *n2;
++
++ finishEditor();
++
++ if(checkArgs("db10", 1)) return;
++ SaveStackState(1);
++
++ n1 = Pop();
++
++ n2 = dbNumber(n1,10.0);
++ if(n2){
++ Push(n2); freeNumber(n1);
++ UndoStackState(1);
++ } else {
++ Push(n1);
++ CancelStackState();
++ }
++}
++
++void Db20Stack(){
++ Number *n1, *n2;
++
++ finishEditor();
++
++ if(checkArgs("db20", 1)) return;
++ SaveStackState(1);
++
++ n1 = Pop();
++
++ n2 = dbNumber(n1,20.0);
++ if(n2){
++ Push(n2); freeNumber(n1);
++ UndoStackState(1);
++ } else {
++ Push(n1);
++ CancelStackState();
++ }
++}
+
+ void RipStack(){
+ Number *n1, *n2, *n3;
diff --git a/math/grpn/patches/patch-ad b/math/grpn/patches/patch-ad
new file mode 100644
index 00000000000..52782c6b115
--- /dev/null
+++ b/math/grpn/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- funcs.h.orig Wed May 26 12:08:11 1999
++++ funcs.h
+@@ -56,6 +56,8 @@
+ void NrootStack();
+
+ void RipStack();
++void Db10Stack();
++void Db20Stack();
+
+ void SqrStack();
+ void SqrtStack();
diff --git a/math/grpn/patches/patch-ae b/math/grpn/patches/patch-ae
new file mode 100644
index 00000000000..73ca9d9f325
--- /dev/null
+++ b/math/grpn/patches/patch-ae
@@ -0,0 +1,81 @@
+$NetBSD: patch-ae,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- number.c.orig Mon May 31 19:44:23 1999
++++ number.c
+@@ -278,6 +278,76 @@
+ return c;
+ }
+
++Number * dbNumber(Number *a,double sf){
++ Real *r1,*rtmp1,*rtmp2;
++ Cmplx *c1;
++ Number *mul = newNumber();
++ Number *c = newNumber();
++
++ if(a == NULL){ fprintf(stderr, "dbNumber(NULL)\n"); exit(0); }
++
++
++ switch(a->type){
++ case REAL:
++ if(-1 == cmpReal(a->data, realZero)){
++ /* log(<0) is complex ! */
++ c1 = setCmplxReal(newCmplx(), a->data, realZero);
++ c->type = COMPLEX;
++ c->data = logCmplx(c1);
++ rtmp1=newReal();
++ rtmp2=newReal();
++ setRealDouble(rtmp1, sf);
++ setRealDouble(rtmp2, 0.0);
++ mul->type = COMPLEX;
++ mul->data = newCmplx();
++ setCmplxReal(mul->data,rtmp1,rtmp2);
++ freeReal(rtmp1);
++ freeReal(rtmp2);
++ freeCmplx(c1);
++ } else {
++ c->type = REAL;
++ mul->type = REAL;
++ mul->data = newReal();
++ setRealDouble(mul->data, sf);
++ c->data = logReal(a->data);
++ }
++ break;
++ case COMPLEX:
++ c->type = COMPLEX;
++ c->data = logCmplx(a->data);
++ rtmp1=newReal();
++ rtmp2=newReal();
++ setRealDouble(rtmp1, sf);
++ setRealDouble(rtmp2, 0.0);
++ mul->type = COMPLEX;
++ mul->data = newCmplx();
++ setCmplxReal(mul->data,rtmp1,rtmp2);
++ freeReal(rtmp1);
++ freeReal(rtmp2);
++ break;
++ case MATRIX:
++ c->type = MATRIX;
++ invalidTyprError("db");
++ c->data = NULL;
++ break;
++ default:
++ fprintf(stderr, "Error: Unknown number type\n");
++ exit(0);
++ }
++
++
++ if(c->data == NULL){
++ free(c);
++ c = NULL;
++ }
++ else {
++ c = mulNumber(c,mul);
++ }
++
++ free(mul);
++ return c;
++}
++
+ Number * expNumber(Number *a){
+ Number *c = newNumber();
+
diff --git a/math/grpn/patches/patch-af b/math/grpn/patches/patch-af
new file mode 100644
index 00000000000..caac514d8c0
--- /dev/null
+++ b/math/grpn/patches/patch-af
@@ -0,0 +1,12 @@
+$NetBSD: patch-af,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- number.h.orig Wed May 26 12:08:57 1999
++++ number.h
+@@ -65,6 +65,7 @@
+
+ Number * powNumber(Number *, Number *);
+
++Number * dbNumber(Number *, double);
+ Number * ripNumber(Number *, Number *);
+
+ Number * sinNumber(Number *);
diff --git a/math/grpn/patches/patch-ag b/math/grpn/patches/patch-ag
new file mode 100644
index 00000000000..ac693e62a9c
--- /dev/null
+++ b/math/grpn/patches/patch-ag
@@ -0,0 +1,12 @@
+$NetBSD: patch-ag,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- complex.c.orig Mon May 31 19:41:31 1999
++++ complex.c
+@@ -21,6 +21,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <math.h>
+
+ #include "complex.h"
diff --git a/math/grpn/patches/patch-ah b/math/grpn/patches/patch-ah
new file mode 100644
index 00000000000..e3a58c42bdb
--- /dev/null
+++ b/math/grpn/patches/patch-ah
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- run_cmd.c.orig Wed May 26 11:50:33 1999
++++ run_cmd.c
+@@ -20,6 +20,7 @@
+ /* run_cmd.c by Paul Wilkins */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <gtk/gtk.h>
+
+ #include "buttons.h"
diff --git a/math/grpn/patches/patch-ai b/math/grpn/patches/patch-ai
new file mode 100644
index 00000000000..6ad219d720a
--- /dev/null
+++ b/math/grpn/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+
+--- lcd.c.orig Mon May 31 19:43:37 1999
++++ lcd.c
+@@ -20,6 +20,8 @@
+ /* lcd.c by Paul Wilkins 3/22/97 */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <gtk/gtk.h>
+ #include <gdk/gdkkeysyms.h>
+
diff --git a/math/grpn/patches/patch-aj b/math/grpn/patches/patch-aj
new file mode 100644
index 00000000000..76c088a022e
--- /dev/null
+++ b/math/grpn/patches/patch-aj
@@ -0,0 +1,12 @@
+$NetBSD: patch-aj,v 1.1 2002/04/02 02:01:25 dmcmahill Exp $
+
+--- help.c.orig Mon May 31 21:44:01 1999
++++ help.c
+@@ -19,6 +19,7 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <gtk/gtk.h>
+
+ #include "help.h"
diff --git a/math/grpn/patches/patch-ak b/math/grpn/patches/patch-ak
new file mode 100644
index 00000000000..47a20aef7f2
--- /dev/null
+++ b/math/grpn/patches/patch-ak
@@ -0,0 +1,12 @@
+$NetBSD: patch-ak,v 1.1 2002/04/02 02:01:25 dmcmahill Exp $
+
+--- mode.c.orig Wed May 26 11:50:33 1999
++++ mode.c
+@@ -20,6 +20,7 @@
+ /* setup mode.c by Paul Wilkins 2/8/98 */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <gtk/gtk.h>
+
+ #include "mode.h"