--- dds-1.1.9+ddd105.orig/debian/pycompat +++ dds-1.1.9+ddd105/debian/pycompat @@ -0,0 +1 @@ +2 --- dds-1.1.9+ddd105.orig/debian/compat +++ dds-1.1.9+ddd105/debian/compat @@ -0,0 +1 @@ +4 --- dds-1.1.9+ddd105.orig/debian/dds.examples +++ dds-1.1.9+ddd105/debian/dds.examples @@ -0,0 +1 @@ +ddd/*.gib --- dds-1.1.9+ddd105.orig/debian/README.Debian +++ dds-1.1.9+ddd105/debian/README.Debian @@ -0,0 +1,15 @@ +dds for Debian +-------------- + +This package is a composition of three zip files, the dds double dummy solver +library, the ddd double dummy driver (frontend), and the pydds python +extension. As there is already a ddd package in Debian (the gdb frontend) both +the ddd binary and the package were renamed to dds. + +There is no shared library yet as the API/ABI is likely to change again. + +pydds was patched to also accept target, solutions, and mode as parameters in +addition to trump and first. Users might want to read the API documentation in +the libdds-dev package. + + -- Christoph Berg Thu, 25 Jan 2007 13:09:48 +0100 --- dds-1.1.9+ddd105.orig/debian/dds.6 +++ dds-1.1.9+ddd105/debian/dds.6 @@ -0,0 +1,158 @@ +.TH DDS 6 +.SH NAME +dds \- double dummy solver frontend +.SH SYNOPSIS +.B dds +.I file +[ +.I options +] +.SH DESCRIPTION +This program is a command line interface for +Bo Haglund's Double Dummy Solver (DDS). +.PP +It has four useful stand-alone options: +.IP 1. +Option \fB\-playdd\fP, to play any deal double dummy. +.IP 2. +Option \fB\-giblib\fP. For any deal, to get maximum trick values +for all possible contracts and leaders +(these are the 20 trick values as for giblib). +.IP 3. +Option \fB\-tricks\fP. For specified deal, to get maximum trick values +for all possible contracts and leaders +(these are the 20 trick values as for giblib). +.IP 4. +Option \fB\-gen\fP. This is to generate deals, +without or with up to 20 possible trick values. +.SH OPTIONS +.BR \fIfile\fP +path for 'giblib' input file +.TP +Optional arguments [\fIoptions\fP] are one or more of: +.TP +.BR \-v +verbose where applicable +.TP +.BR \-target=\fId\fP +\-1-13 (default \-1). +Number of tricks to be won by the side to play, \-1 means that the program +shall find the maximum number. For equivalent cards only the highest is returned. +.TP +.BR \-sol=\fId\fP +solution 1/2/3 (default 3). +How many card solutions SolveBoard returns: + +target=1-13, solutions=1: Returns only one of the cards. Its returned score is +the same as target when target or higher tricks can be won. Otherwise, score +\-1 is returned if target cannot be reached, or score 0 if no tricks can be +won. + +target=\-1, solutions=1: Returns only one of the optimum cards and its score. + +target=0, solutions=1: Returns only one of the cards legal to play with score +set to 0. + +target=1-13, solutions=2: Return all cards meeting target. Their returned +scores are the same as target when target or higher tricks can be won. +Otherwise, only one card is returned with score \-1 if target cannot be +reached, or score 0 for all cards legal to play if no tricks can be won. + +target=\-1, solutions=2: Return all optimum cards with their scores. + +target=0, solutions=2: Return all cards legal to play with scores set to 0. + +target irrelevant, solutions=3: Return all cards that can be legally played +with their scores in descending order. +.TP +.BR \-mode=\fId\fP +0/1 (default 1). +DLL mode of operation. This mode does not affect the DLL if there are multiple +choices for cards to play. If there is just one card to play, or multiple cards +that are all equivalent, this mode determines whether or not the DLL will +search to find the score. + +mode=0: Do not search to find the score if the hand to play has only one card, +including its equivalents, to play. Score is set to \-2 for this card, +indicating that there are no alternative cards. This mode is very fast. + +mode=1: Always search to find the score. Even when the hand to play has only +one card, with possible equivalents, to play. +.\" +.\"mode=2: As for mode=1, but the transposition table contents is reused from the +.\"preceding SolveBoard call. Requires that target is the same as for the +.\"preceding call and is not target=\-1. The parameter solutions must be set to 1, +.\"deal must be the same, except that deal.first for the second call is partner to +.\"deal.first in the first call. +.\"Example: +.\"1st call: SolveBoard(deal, 10, 1, 1, &fut1), deal.first=1, i.e. East leads. +.\"2nd call: SolveBoard(deal, 10, 1, 2, &fut2), deal.first=3, i.e. West leads. +.TP +.BR \-trumps=\fIt\fP +s/h/d/c/n, this overrides the file (default=n) +.TP +.BR \-leader=\fIl\fP +w/n/e/s, this overrides the file (default=w) +but used only when no cards have been played +.TP +.BR \-deal=\fId\fP +1/2/... deal number in giblib file. +Only one of \fB\-deal\fP or \fB\-name\fP should be specified. +.TP +.BR \-name=\fIstr\fP +deal with 'name=str' in giblib file. +Only one of \fB\-deal\fP or \fB\-name\fP should be specified. +.TP +.BR \-playdd +play deal choosing between DDS alternatives +.TP +.BR \-timeall +time all deals in file for sol=1/2/3, print stats +.TP +.BR \-timeg=\fIxcn\fP + \fIx\fP - hex digit, total tricks by n-s + \fIc\fP - contract s/h/d/c/n + \fIn\fP - number of deals + +time the first n deals in the giblib file, +having total tricks x at contract c, +for target=\-1 sol=1 mode=1 +and for the specified/default leader, +each deal is validated. +.TP +.BR \-giblib=\fId1\fP\-\fId2\fP[\-all] +validate all deals from d1 to d2 in giblib file +for target=\-1 sol=1 mode=1. +1. if \fB\-all\fP is given, this is done for all of +the 20 trick values even if some of them are '\-'. +2. if \fB\-all\fP is not given, this is done only for +those trick values which are not '\-'. +.TP +.BR \-tricks +like \fB\-giblib\fP, but for single deal specified +by \fB\-name\fP=str \fB\-deal\fP=d or option +.TP +Generate deals: +.TP +.BR \-gen=\fIn\fP +(required) n=number of deals to generate. +output is written to a file (see below) +.TP +.BR \-genseed=\fIs\fP +(default 0) seed for random generator +.TP +.BR \-gencards=\fIc\fP +(default=52) number of cards generated per deal, +must be multiple of 4 +.TP +.BR \-gentricks=\fIt\fP +0,1,...,20 (default 1), number of tricks values to set randomly +.TP +Generate output is written to a file: +gen\-\fIgenseed\fP\-\fIndeal\fP\-\fIgencards\fP\-\fIgentricks\fP.txt +.SH NOTES +The program was named ddd by its author. As there is already some other +ddd package in Debian (the gdb frontend) it was renamed to dds, the name +of the library used. +.SH "SEE ALSO" +dealer(6), deal(6). --- dds-1.1.9+ddd105.orig/debian/rules +++ dds-1.1.9+ddd105/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +build build-indep build-arch: build-stamp +build-stamp: $(QUILT_STAMPFN) + # libdds + $(MAKE) + # dds + $(MAKE) -C ddd + sed -ne '/^\/\* =/,/^\*\//p' ddd/giblib.h > ddd/giblib.txt + # pydds + -ln -s ../dll.h ../dds.cpp python + cd python && python setup.py build + touch $@ + +install: build-stamp + dh_testroot + dh_clean -k + # libdds + $(MAKE) install PREFIX=/usr DESTDIR=$(CURDIR)/debian/libdds-dev + # dds + $(MAKE) -C ddd install PREFIX=/usr DESTDIR=$(CURDIR)/debian/dds + # pydds + cd python && python setup.py install --root $(CURDIR)/debian/python-pydds + +test: build-stamp + @echo Running tests ... + ddd/ddd -giblib=1-100 ddd/test.gib + +binary-indep: + +binary-arch: install test + dh_installchangelogs -a release_notes.txt + dh_installdocs -a -A debian/README.Debian + dh_installman -a + dh_installexamples -a + dh_strip -a + dh_compress -a + dh_pycentral -p'python-pydds' + dh_fixperms -a + dh_shlibdeps -a + dh_installdeb -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch + +clean: unpatch + dh_testdir + $(MAKE) clean + $(MAKE) -C ddd clean + rm -rf python/build + dh_clean build-stamp ddd/giblib.txt python/dll.h python/dds.cpp + +.PHONY: build build-indep build-arch clean binary binary-indep binary-arch install configure patch unpatch test --- dds-1.1.9+ddd105.orig/debian/python-pydds.examples +++ dds-1.1.9+ddd105/debian/python-pydds.examples @@ -0,0 +1,2 @@ +python/trydds.py +python/t1 --- dds-1.1.9+ddd105.orig/debian/watch +++ dds-1.1.9+ddd105/debian/watch @@ -0,0 +1,4 @@ +version=3 +http://web.telia.com/~u07502278/dds(.)(.)(.)-src.zip +opts=dversionmangle=s/.*ddd// \ + http://web.telia.com/~u07502278/ddd(.*).zip --- dds-1.1.9+ddd105.orig/debian/changelog +++ dds-1.1.9+ddd105/debian/changelog @@ -0,0 +1,77 @@ +dds (1.1.9+ddd105-1) unstable; urgency=low + + * New dds upstream version. + * Remove obsolete patches dll.h-buildpath and dll.h-longlong. + * control: bump standards version, some minor changes suggested by lintian. + * rules: run ddd for testing. + + -- Christoph Berg Sun, 14 Sep 2008 23:35:10 +0200 + +dds (1.1.8+ddd105-1) unstable; urgency=low + + * New dds upstream version. + * Update upstream URL and correctly mangle version numbers in watch file. + + -- Christoph Berg Fri, 21 Mar 2008 21:24:14 +0100 + +dds (1.1.7+ddd105-1) unstable; urgency=low + + * New dds upstream version. + + -- Christoph Berg Wed, 10 Oct 2007 22:42:43 +0200 + +dds (1.1.5+ddd105-2) unstable; urgency=low + + * Include patch by upstream that removes debugging code. + * The C compatibility patch went upstream, thanks Bo. + + -- Christoph Berg Tue, 19 Jun 2007 14:05:01 +0100 + +dds (1.1.5+ddd105-1) unstable; urgency=low + + * New dds upstream version. + + -- Christoph Berg Mon, 18 Jun 2007 14:39:23 +0200 + +dds (1.1.4+ddd105-2) unstable; urgency=low + + * Fetch revision h API docs. + * Use C compiler so libdds.a doesn't need C++ linkage. + + -- Christoph Berg Sat, 16 Jun 2007 16:45:22 +0200 + +dds (1.1.4+ddd105-1) unstable; urgency=low + + * New dds upstream version. + + mode=2 can now be used with any target/solutions/lead. + + -- Christoph Berg Sat, 12 May 2007 12:30:20 +0200 + +dds (1.1.3+ddd105-1) unstable; urgency=low + + * New dds upstream version. + + -- Christoph Berg Mon, 12 Mar 2007 16:49:36 +0100 + +dds (1.1.2+ddd105-1) unstable; urgency=low + + * New ddd upstream version. + * Move python module to subdir. + * Note python module license (dual GPL v2+/CC Attribution 2.5, we apply + GPL). + + -- Christoph Berg Fri, 23 Feb 2007 17:13:32 +0100 + +dds (1.1.2-1) unstable; urgency=low + + * New upstream version. + * Fix ddd.cpp for updated API. + * Add missing Sections in control. + + -- Christoph Berg Mon, 19 Feb 2007 15:34:36 +0100 + +dds (1.1-1) unstable; urgency=low + + * Initial release (Closes: #407721). + + -- Christoph Berg Thu, 25 Jan 2007 15:20:48 +0100 --- dds-1.1.9+ddd105.orig/debian/libdds-dev.docs +++ dds-1.1.9+ddd105/debian/libdds-dev.docs @@ -0,0 +1,4 @@ +DDS* +DLL* +mode2.txt +readme.txt --- dds-1.1.9+ddd105.orig/debian/dds.manpages +++ dds-1.1.9+ddd105/debian/dds.manpages @@ -0,0 +1 @@ +debian/dds.6 --- dds-1.1.9+ddd105.orig/debian/dds.docs +++ dds-1.1.9+ddd105/debian/dds.docs @@ -0,0 +1,2 @@ +ddd/readme.txt +ddd/giblib.txt --- dds-1.1.9+ddd105.orig/debian/control +++ dds-1.1.9+ddd105/debian/control @@ -0,0 +1,44 @@ +Source: dds +Section: games +Priority: extra +Maintainer: Christoph Berg +Build-Depends: debhelper (>> 4), quilt, + python-dev (>= 2.3), python, python-central (>= 0.5) +Standards-Version: 3.8.0 +XS-Python-Version: current +Homepage: http://web.telia.com/~u07502278/ +Vcs-Browser: http://svn.df7cb.de/bridge/dds/ + +Package: dds +Architecture: any +Depends: ${shlibs:Depends} +Description: bridge double dummy solver - frontend + dds is a double dummy solver. This package contains the driver frontend + (originally named ddd). + . + A double dummy solver computes the optimal line of play for a bridge deal, + with all hands open (both sides dummy). + +Package: libdds-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends} +Description: bridge double dummy solver - library + dds is a double dummy solver. This package contains the static library and the + documentation. + . + A double dummy solver computes the optimal line of play for a bridge deal, + with all hands open (both sides dummy). + +Package: python-pydds +Section: python +Architecture: any +Depends: ${shlibs:Depends}, ${python:Depends} +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Description: bridge double dummy solver - Python extension + dds is a double dummy solver. This package contains pydds, the Python + extension. + . + A double dummy solver computes the optimal line of play for a bridge deal, + with all hands open (both sides dummy). --- dds-1.1.9+ddd105.orig/debian/copyright +++ dds-1.1.9+ddd105/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Christoph Berg on +Thu, 25 Jan 2007 12:50:45 +0100. + +The orig.tar.gz tarball is composed of the zip files for the dds library and +the ddd frontend, both downloaded from http://web.telia.com/~u07502278/. The +python module was fetched from http://www.aleax.it/Bridge/. + +Authors: +dds: Bo Haglund , Bob Richardson +pydds: Alex Martelli +ddd: P.M.Cronje + +Copyright: +dds: + Copyright (C) 2006-2007 by Bo Haglund + Cleanups and porting to Linux and MacOSX (C) 2006 by Alex Martelli + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +ddd: + Copyright 2003-2006 P.M.Cronje + + This file is part of the Double Dummer Driver (DDD). + + DDD is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DDD is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +python-pydds: + Copyright 2006 by Alex Martelli (aleaxit@gmail.com) + + This work is licensed under the Creative Commons Attribution 2.5 + License (see http://creativecommons.org/licenses/by/2.5/). + + The code, being a derivative work of Bo Haglund's DDS 1.0 which is + licensed under GPL, is of necessity also licensed under the GPL. + +On Debian systems, the complete text of the GNU General Public License can be +found in the file /usr/share/common-licenses/GPL. --- dds-1.1.9+ddd105.orig/debian/patches/ddd-gibware-url +++ dds-1.1.9+ddd105/debian/patches/ddd-gibware-url @@ -0,0 +1,20 @@ +--- a/ddd/readme.txt ++++ b/ddd/readme.txt +@@ -14,7 +14,7 @@ Description + + DDD is a driver for Bo Haglund's Double Dummy Solver (DDS), + released separately under the GPL, +-at http://web.telia.com/~u88910365/. ++at http://web.telia.com/~u07502278/. + + This program is a command line interface for testing and + using the DDS. +@@ -39,6 +39,8 @@ Two sample files are provided --- test.g + You can get the huge giblib file from the gibware site, + Note that it must be the text version, not the binary version. + ++http://www.cirl.uoregon.edu/ginsberg/gibresearch.html ++ + Compile and Link + ---------------- + --- dds-1.1.9+ddd105.orig/debian/patches/pydds-initstart +++ dds-1.1.9+ddd105/debian/patches/pydds-initstart @@ -0,0 +1,12 @@ +Index: trunk/python/pydds.c +=================================================================== +--- trunk.orig/python/pydds.c 2007-01-19 00:19:50.261028840 +0100 ++++ trunk/python/pydds.c 2007-01-19 00:45:21.132301032 +0100 +@@ -332,5 +332,7 @@ initpydds(void) + PyType_Ready(&deal_type); + + PyObject_SetAttrString(m, "deal", (PyObject*)&deal_type); ++ ++ InitStart(); + } + --- dds-1.1.9+ddd105.orig/debian/patches/sanitize-trydds.py +++ dds-1.1.9+ddd105/debian/patches/sanitize-trydds.py @@ -0,0 +1,48 @@ +Index: trunk/python/trydds.py +=================================================================== +--- trunk.orig/python/trydds.py 2007-01-19 01:02:23.212921160 +0100 ++++ trunk/python/trydds.py 2007-01-19 01:05:49.711528600 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/usr/bin/python + + import sys + import pydds +@@ -10,10 +10,10 @@ timer = time.time + def dod(ds): + t = timer() + d = timer() +- # deal = [h.split(' ') for h in ds.split('|')] +- deal = [h.split('.') for h in ds.split()[1::2]] ++ deal = [h.split(' ') for h in ds.split('|')] ++ #deal = [h.split('.') for h in ds.split()[1::2]] + d = timer() - d +- print 'D', 8*'.','|'.join(' '.join(s) for s in deal) ++ #print 'D', 8*'.','|'.join(' '.join(s) for s in deal) + # sys.stdout.flush() + a = timer() + dd = pydds.deal(deal) +@@ -26,17 +26,17 @@ def dod(ds): + b = timer() - b + t = timer() - t + print 'T%d' % s[-1][0], +- print '%.2f %.2f %.2f %.2f' % (d, a, b, t) ++ #print '%.2f %.2f %.2f %.2f' % (d, a, b, t) + # print '|'.join(' '.join(s) for s in deal), + print s + return t + + +-# ds = 'AQ9 AQ9 8643 KQ8|T82 T6542 AKT A7|K653 K83 Q92 543|J74 J7 J75 JT962' +-ds='n AQ3.T653.KQ4.AJ5 e KJT4.AKQ8.JT86.8 s 862.974.A73.KQ72 w 975.J2.952.T9643' +-print ds +-dod(ds) +-sys.exit() ++#ds = 'AQ9 AQ9 8643 KQ8|T82 T6542 AKT A7|K653 K83 Q92 543|J74 J7 J75 JT962' ++##ds='n AQ3.T653.KQ4.AJ5 e KJT4.AKQ8.JT86.8 s 862.974.A73.KQ72 w 975.J2.952.T9643' ++#print ds ++#dod(ds) ++#sys.exit() + + def main(): + handsfile = open('t1') --- dds-1.1.9+ddd105.orig/debian/patches/series +++ dds-1.1.9+ddd105/debian/patches/series @@ -0,0 +1,12 @@ +# dds patches +dll.h-extern_c + +# pydds patches +pydds-initstart +python-keywords +sanitize-trydds.py + +# ddd patches +ddd-gibware-url +ddd-exitcode +ddd-fix-testsuite --- dds-1.1.9+ddd105.orig/debian/patches/python-keywords +++ dds-1.1.9+ddd105/debian/patches/python-keywords @@ -0,0 +1,29 @@ +Index: trunk/python/pydds.c +=================================================================== +--- trunk.orig/python/pydds.c 2007-01-19 00:56:59.997057440 +0100 ++++ trunk/python/pydds.c 2007-01-19 00:57:09.336637608 +0100 +@@ -207,11 +207,12 @@ deal_str(PyObject *self) + static PyObject* + deal_solve(PyObject *self, PyObject *args, PyObject *kwds) + { +- static char* nams[] = {"trump", "first", NULL}; +- int trump=4, first=1; ++ static char* nams[] = {"trump", "first", "target", "solutions", "mode", NULL}; ++ int trump=4, first=1, target=-1, solutions=1, mode=0; + int i, j; + +- if(!PyArg_ParseTupleAndKeywords(args, kwds, "|ii", nams, &trump, &first)) ++ if(!PyArg_ParseTupleAndKeywords(args, kwds, "|iiiii", nams, ++ &trump, &first, &target, &solutions, &mode)) + return 0; + deal_cell* me = (deal_cell*)self; + struct deal d; +@@ -225,7 +226,7 @@ deal_solve(PyObject *self, PyObject *arg + showdist(d.remainCards); + // printf(" 4"); fflush(0); + struct futureTricks futp; +- int status = SolveBoard(d, -1, 1, 0, &futp); ++ int status = SolveBoard(d, target, solutions, mode, &futp); + // printf(" 5 %d", status); fflush(0); + if (status!=1) { + char buf[80]; --- dds-1.1.9+ddd105.orig/debian/patches/ddd-fix-testsuite +++ dds-1.1.9+ddd105/debian/patches/ddd-fix-testsuite @@ -0,0 +1,13 @@ +# '8' is just wrong here; the tricks line as a '7' in that position + +--- a/ddd/test.gib ++++ b/ddd/test.gib +@@ -21,7 +21,7 @@ k97..2.9 jt5...q6 q...a854 a86..3.7 + {name=gib10 trumps=s + tricks: 7575 8777 8888 5555 8888 (max=10) + } +-q98.2.qjt98.8 kj5.akq3..j65 t76.jt98.3.kt a42.7654.5.a2:-------8------------ ++q98.2.qjt98.8 kj5.akq3..j65 t76.jt98.3.kt a42.7654.5.a2:75758777888855558888 + + {name=gin trumps=n + tricks: 9998 9898 9999 6666 7777 (max=13) --- dds-1.1.9+ddd105.orig/debian/patches/ddd-exitcode +++ dds-1.1.9+ddd105/debian/patches/ddd-exitcode @@ -0,0 +1,76 @@ +# make ddd exit with code 1 if something goes wrong, especially the test suite + +--- a/ddd/ddd.cpp ++++ b/ddd/ddd.cpp +@@ -151,6 +151,7 @@ int main(int argc, char *argv[]) + unsigned int genseed=0; + FILE *fp; + cTimer timer; ++ int success = true; + + struct deal dl; + struct futureTricks fut; +@@ -282,19 +283,19 @@ int main(int argc, char *argv[]) + } + + if(gen > 0) +- { generate(gen,genseed,gencards,gentricks); ++ { success = generate(gen,genseed,gencards,gentricks); + goto cleanup; + } + if(btimeall) +- { timeAll(pszfile,trumps,leader); ++ { success = timeAll(pszfile,trumps,leader); + goto cleanup; + } + else if(pszxcn) +- { timeg(pszfile,-1,1,1,pszxcn,(leader==-1?0:leader),bverbose); ++ { success = timeg(pszfile,-1,1,1,pszxcn,(leader==-1?0:leader),bverbose); + goto cleanup; + } + else if(pszgiblib) +- { giblib(pszfile,-1,1,1,pszgiblib); ++ { success = giblib(pszfile,-1,1,1,pszgiblib); + goto cleanup; + } + +@@ -312,7 +313,7 @@ int main(int argc, char *argv[]) + } + + if(btricks) +- { tricks(&gib,deal,-1,1,1); ++ { success = tricks(&gib,deal,-1,1,1); + goto cleanup; + } + +@@ -330,7 +331,7 @@ int main(int argc, char *argv[]) + } + + // set up dds10 +- if(setDDS(&gib,&dl) == false) ++ if(success = setDDS(&gib,&dl) == false) + return -1; + + printf("\n"); +@@ -352,7 +353,7 @@ int main(int argc, char *argv[]) + cleanup: + cleanSB(); + +- return 0; ++ return !success; + + } // main + // ***************************************************************************** +@@ -757,8 +758,11 @@ bool giblib(char *pszfile, int target, i + pszgiblib,format64(totalnodes,sz1), + ntotal?format64(totalnodes/ntotal,sz2):format64(totalnodes,sz2), + totalelapsed,ntotal?totalelapsed/(double)ntotal:totalelapsed); +- if(nerror) ++ if(nerror) ++ { + printf("*** ERROR: nerror=%d, tricks and score different\n",nerror); ++ return false; ++ } + printf("\n"); + + fclose(fp); --- dds-1.1.9+ddd105.orig/debian/patches/dll.h-extern_c +++ dds-1.1.9+ddd105/debian/patches/dll.h-extern_c @@ -0,0 +1,11 @@ +--- a/dll.h ++++ b/dll.h +@@ -309,7 +309,7 @@ extern FILE * fp2, *fp7, *fp11; + EXTERN_C DLLEXPORT int STDCALL SolveBoard(struct deal dl, + int target, int solutions, int mode, struct futureTricks *futp); + +-void InitStart(void); ++EXTERN_C void InitStart(void); + void InitGame(int gameNo, int moveTreeFlag, int first, int handRelFirst); + void InitSearch(struct pos * posPoint, int depth, + struct moveType startMoves[], int first, int mtd);