[Nickle] nickle: Branch 'master' - 7 commits

Keith Packard keithp at keithp.com
Mon Apr 30 17:15:32 PDT 2012


 .cvsignore                 |   33 ---------------------
 Makefile.am                |    2 -
 array.c                    |   67 +++++++++++++++++++++++--------------------
 bench/.cvsignore           |    2 -
 configure.ac               |    2 -
 debian/.cvsignore          |    5 ---
 debian/changelog           |    8 +++++
 debian/control             |    2 -
 debian/nickle.install      |    1 
 debian/rules               |   70 ++++++---------------------------------------
 examples/.cvsignore        |    2 -
 examples/smlng/.cvsignore  |    2 -
 examples/turtle/.cvsignore |    8 -----
 nickle.spec.in             |    2 -
 struct.c                   |   11 ++++---
 test/.cvsignore            |    2 -
 16 files changed, 65 insertions(+), 154 deletions(-)

New commits:
commit 77553983f0edd58201675da8cc020993513703bd
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 30 08:42:16 2012 -0700

    Version 2.75
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 0a8999b..fced9ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ dnl for licensing information.
 
 AC_PREREQ([2.64])
 
-AC_INIT([nickle],[2.74],[http://nickle.org],[nickle])
+AC_INIT([nickle],[2.75],[http://nickle.org],[nickle])
 
 AC_CONFIG_SRCDIR([nickle.h])
 AC_CONFIG_HEADERS([config.h])
diff --git a/debian/changelog b/debian/changelog
index 781740c..95431b4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+nickle (2.75-1) unstable; urgency=low
+
+  * Fix ref types in array pointer operations (&foo->bar)
+  * Shorten value printing in stack traces
+  * Switch to 'dh' for building package. Closes: #666356
+
+ -- Keith Packard <keithp at keithp.com>  Fri, 30 Mar 2012 08:42:02 -0700
+
 nickle (2.74-1) unstable; urgency=low
 
   * Fix Semaphore::wait to not deadlock
commit 364505a116c631a0dd4f4d8a01a0f9b65ddf78c4
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 30 08:56:09 2012 -0700

    Delete ancient .cvsignore files
    
    Not exactly useful anymore
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 1085d0e..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,33 +0,0 @@
-.deps
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-config.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-date-sh
-gram.c
-gram.h
-install-sh
-lex.c
-ltmain.sh
-missing
-mkinstalldirs
-nickle
-nickle.1
-nickle.spec
-nickle_*
-stamp-h
-stamp-h1
-stamp-h.in
-version-sh
-build-stamp
-configure-stamp
-*.tar.gz
-depcomp
diff --git a/bench/.cvsignore b/bench/.cvsignore
deleted file mode 100644
index 282522d..0000000
--- a/bench/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/debian/.cvsignore b/debian/.cvsignore
deleted file mode 100644
index 76ffb74..0000000
--- a/debian/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-nickle
-tmp
-files
-substvars
-nickle.substvars
diff --git a/examples/.cvsignore b/examples/.cvsignore
deleted file mode 100644
index 282522d..0000000
--- a/examples/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/examples/smlng/.cvsignore b/examples/smlng/.cvsignore
deleted file mode 100644
index 282522d..0000000
--- a/examples/smlng/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/examples/turtle/.cvsignore b/examples/turtle/.cvsignore
deleted file mode 100644
index eef0c16..0000000
--- a/examples/turtle/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-? .log
-? Makefile
-? Makefile.am
-? Makefile.in
-? snowflake.aux
-? snowflake.dvi
-? snowflake.eepic
-? snowflake.log
diff --git a/test/.cvsignore b/test/.cvsignore
deleted file mode 100644
index 282522d..0000000
--- a/test/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
commit 1a499d9f0fe3f9203edd1286369c85939ce97f55
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 30 08:55:54 2012 -0700

    Examples shouldn't be executable
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/examples/turtle/snowflake.5c b/examples/turtle/snowflake.5c
old mode 100755
new mode 100644
commit d1876db5e305ad157a9fbbe7c75fed0b8d4f342a
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 30 08:37:43 2012 -0700

    Fix Source URL in nickle.spec file
    
    Point at nickle.org, as appropriate.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/nickle.spec.in b/nickle.spec.in
index 936759a..5eeb228 100644
--- a/nickle.spec.in
+++ b/nickle.spec.in
@@ -6,7 +6,7 @@ Group: Development/Languages
 License: MIT
 URL: http://nickle.org
 
-Source: http://nickle.keithp.com/nickle-%{version}.tar.gz
+Source: http://nickle.org/release/nickle-%{version}.tar.gz
 Buildroot: %{_tmppath}/%{name}-%{version}-root
 
 %description
commit fd7488e29c9c5dd6705368baf28dff248419d5c6
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 30 08:36:42 2012 -0700

    Make 'G' format limit array and struct recursion
    
    This makes stack traces tractable.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/array.c b/array.c
index 2ae4959..2c762f0 100644
--- a/array.c
+++ b/array.c
@@ -87,7 +87,8 @@ ArrayPrint (Value f, Value av, char format, int base, int width, int prec, int f
     int	    ndone;
     int	    limit = ArrayLimit (av);
     Bool    ret = True;
-    Bool    pretty = format == 'v' || format == 'g';
+    Bool    pretty = format == 'v' || format == 'g' || format == 'G';
+    char    down_format = format == 'g' ? 'G' : format;
 
     if (pretty)
     {
@@ -113,44 +114,48 @@ ArrayPrint (Value f, Value av, char format, int base, int width, int prec, int f
 	    FilePutSubscriptType (f, ArrayType (a), False);
 	}
 	FilePuts (f, ") ");
-	for (i = 0; i < a->ndim; i++)
-	    FileOutput (f, '{');
-    }
-    i = 0;
-    while (i < limit)
-    {
-	if (!Print (f, ArrayValueGet (a, i), format, base, width, prec, fill))
-	{
-	    ret = False;
-	    break;
+	if (format != 'G') {
+	    for (i = 0; i < a->ndim; i++)
+		FileOutput (f, '{');
 	}
-	i = ArrayNextI (a, i);
-	if (i < limit)
+    }
+    if (format != 'G') {
+	i = 0;
+	while (i < limit)
 	{
-	    ndone = 0;
-	    if (pretty)
+	    if (!Print (f, ArrayValueGet (a, i), format, base, width, prec, fill))
 	    {
-		j = i;
-		k = 0;
-		while (k < a->ndim - 1 && j % dims[k] == 0)
+		ret = False;
+		break;
+	    }
+	    i = ArrayNextI (a, i);
+	    if (i < limit)
+	    {
+		ndone = 0;
+		if (pretty)
 		{
-		    ndone++;
-		    j = j / dims[k];
-		    k++;
+		    j = i;
+		    k = 0;
+		    while (k < a->ndim - 1 && j % dims[k] == 0)
+		    {
+			ndone++;
+			j = j / dims[k];
+			k++;
+		    }
+		    for (k = 0; k < ndone; k++)
+			FileOutput (f, '}');
+		    FileOutput (f, ',');
 		}
-		for (k = 0; k < ndone; k++)
-		    FileOutput (f, '}');
-		FileOutput (f, ',');
+		FileOutput (f, ' ');
+		if (pretty)
+		    for (k = 0; k < ndone; k++)
+			FileOutput (f, '{');
 	    }
-	    FileOutput (f, ' ');
-	    if (pretty)
-		for (k = 0; k < ndone; k++)
-		    FileOutput (f, '{');
 	}
+	if (pretty)
+	    for (i = 0; i < a->ndim; i++)
+		FileOutput (f, '}');
     }
-    if (pretty)
-	for (i = 0; i < a->ndim; i++)
-	    FileOutput (f, '}');
     EXIT ();
     return ret;
 }
diff --git a/struct.c b/struct.c
index b08d8dd..ed9c83e 100644
--- a/struct.c
+++ b/struct.c
@@ -53,7 +53,7 @@ StructPrint (Value f, Value av, char format, int base, int width, int prec, int
     Struct	    *s = &av->structs;
     StructType	    *st = s->type;
     int		    i;
-    Bool	    pretty = format == 'v' || format == 'g';
+    Bool	    pretty = format == 'v' || format == 'g' || format == 'G';
     char	    down_format = format == 'g' ? 'G' : format;
 
     if (pretty)
commit beab4e662ab095e914f9ad2ab3d1834633219145
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Mar 30 08:35:16 2012 -0700

    Switch to dh for debian builds
    
    Vastly simplifies debian/rules...
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/Makefile.am b/Makefile.am
index e0956be..f73522c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@ NICKLEFILES = builtin.5c math.5c scanf.5c mutex.5c \
 	file.5c parse-args.5c svg.5c process.5c \
 	prime_sieve.5c factorial.5c gamma.5c sort.5c list.5c skiplist.5c
 
-DEBIAN = debian/nickle.install debian/changelog debian/compat \
+DEBIAN = debian/changelog debian/compat \
 	 debian/control debian/copyright debian/rules debian/lintian.override
 	 
 EXTRA_DIST = README.name README.release autogen.sh ChangeLog \
diff --git a/debian/control b/debian/control
index 35fdb71..e68c664 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: nickle
 Section: interpreters
 Priority: optional
 Maintainer: Keith Packard <keithp at keithp.com>
-Build-Depends: debhelper (>= 7), libreadline-dev 
+Build-Depends: debhelper (>= 7.0.50), libreadline-dev, autotools-dev
 Standards-Version: 3.9.2
 
 Package: nickle
diff --git a/debian/nickle.install b/debian/nickle.install
deleted file mode 100644
index e52c32e..0000000
--- a/debian/nickle.install
+++ /dev/null
@@ -1 +0,0 @@
-debian/tmp/usr .
diff --git a/debian/rules b/debian/rules
index c98201c..b8478dc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,68 +1,18 @@
 #!/usr/bin/make -f
+# -*- makefile -*-
 # Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
 
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
 
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	./configure --prefix=/usr --mandir='$${prefix}/share/man'
-	touch configure-stamp
+configure_flags = --mandir='$${prefix}/share/man'
 
-build: configure-stamp build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:
-	dh_testdir
-	$(MAKE)
-	$(MAKE) nickle.1
-	touch build-stamp
+%:
+	dh $@  --with autotools-dev
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-	if test -f Makefile; then $(MAKE) distclean; else true; fi
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-	pwd
-	mkdir -p $(CURDIR)/debian/tmp/usr/share/lintian/overrides
-	install -o 0 -g 0 -p -m644 debian/lintian.override $(CURDIR)/debian/tmp/usr/share/lintian/overrides/nickle
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs -XCVS -X.cvsignore
-	dh_installexamples
-	dh_installmenu
-	dh_installcron
-	dh_installman
-	dh_installinfo
-	dh_installchangelogs
-	dh_install
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+override_dh_auto_configure:
+	dh_auto_configure -- $(configure_flags)
commit 197cb418aa20436d35124cb56dfff48d51cffedb
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Mar 13 23:16:34 2012 -0700

    Stop printing recursive structs with 'g' format.
    
    This gets annoying really quickly, so just terminate the recursive
    struct printing right away.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/struct.c b/struct.c
index cff311c..b08d8dd 100644
--- a/struct.c
+++ b/struct.c
@@ -54,15 +54,18 @@ StructPrint (Value f, Value av, char format, int base, int width, int prec, int
     StructType	    *st = s->type;
     int		    i;
     Bool	    pretty = format == 'v' || format == 'g';
+    char	    down_format = format == 'g' ? 'G' : format;
 
     if (pretty)
 	FileOutput (f, '{');
     for (i = 0; i < st->nelements; i++)
     {
 	FilePuts (f, AtomName (StructTypeAtoms(st)[i]));
-	FilePuts (f, " = ");
-	if (!Print (f, BoxValueGet (s->values, i), format, base, width, prec, fill))
-	    return False;
+	if (format != 'G') {
+	    FilePuts (f, " = ");
+	    if (!Print (f, BoxValueGet (s->values, i), down_format, base, width, prec, fill))
+		return False;
+	}
 	if (i < st->nelements - 1)
 	{
 	    if (pretty)


More information about the Nickle mailing list