On Jun 4, 2016 7:57 AM, "Ray Lai" <r...@raylai.com> wrote: > > Updates: > - moo now labels bit positions (from jsg@, see below) > - pledged. > - regress cleaned up > > Port nits: > - moved to GitHub > - fix COMMENT > > Labeled bit positions from jsg@: > > This diff changes moo to print numbers seperated by newlines > rather than tabs so that the main part of the diff works properly. > > That is printing out labels for bit positions, while the moo code > currently won't take a number with >= 100 binary digits the label > code should be able to deal with quite large numbers. > > For example take the following FreeBSD code: > > pci_write_config(dev, 0x40, 0x80c0a131, 4); > pci_write_config(dev, 0x80, 0x01200000, 4); > > To figure out what the hell this is doing when looking at a datasheet > we can do: > > $ ./moo -lb 2 0x80c0a131 > 33222222222211111111110000000000 > 10987654321098765432109876543210 > 0b10000000110000001010000100110001 > > $ ./moo -l 0x01200000 > 0x1200000 > 18874368 > 0110000000 > 2222211111111110000000000 > 4321098765432109876543210 > 0b1001000000000000000000000 > > $ ./moo 0x01200000 > 0x1200000 > 18874368 > 0110000000 > 0b1001000000000000000000000 > > $ ./moo -lb2 "0b1011 << 4" > 76543210 > 0b10110000
Added # uses pledge() Index: Makefile =================================================================== RCS file: /home/cvs/ports/math/moo/Makefile,v retrieving revision 1.11 diff -u -p -r1.11 Makefile --- Makefile 11 Mar 2013 11:23:55 -0000 1.11 +++ Makefile 4 Jun 2016 13:34:48 -0000 @@ -1,20 +1,19 @@ # $OpenBSD: Makefile,v 1.11 2013/03/11 11:23:55 espie Exp $ -COMMENT= Marco's Object Oriented calculator#' +COMMENT= Marco's Object Oriented calculator -DISTNAME= moo-1.3 -REVISION= 1 -CATEGORIES= math +GH_ACCOUNT= raylai +GH_PROJECT= moo +GH_TAGNAME= 1.5 -MAINTAINER= Raymond Lai <r...@cyth.net> +CATEGORIES= math -HOMEPAGE= http://cyth.net/moo/ -MASTER_SITES= ${HOMEPAGE} -EXTRACT_SUFX= .tgz +MAINTAINER= Ray Lai <r...@raylai.com> # Public domain PERMIT_PACKAGE_CDROM= Yes +# uses pledge() WANTLIB += c MAKE_FLAGS= CC=${CC} Index: distinfo =================================================================== RCS file: /home/cvs/ports/math/moo/distinfo,v retrieving revision 1.6 diff -u -p -r1.6 distinfo --- distinfo 18 Jan 2015 03:14:28 -0000 1.6 +++ distinfo 4 Jun 2016 10:36:43 -0000 @@ -1,2 +1,2 @@ -SHA256 (moo-1.3.tgz) = MtVn3HSsASMDQAnVcNOAnzXRKhOXj7QJFTUgRItA1F8= -SIZE (moo-1.3.tgz) = 7380 +SHA256 (moo-1.5.tar.gz) = 2Z/C2FjA77/XMHN7WvR+Co0NXo9IiQsEn4aodoIarrM= +SIZE (moo-1.5.tar.gz) = 8661