Initial import of tar ball

Import from http://henku.home.xs4all.nl/html/dealer/download.html

Version from year 2004

Authors include:
Hans van Staveren <sater@xs4all.nl>
Bruce Moore <Bruce.Moore@akamail.com>
Francois Dellacherie <sr007-2@dial.oleane.com>
Robin Barker <Robin.Barker@npl.co.uk>
Danil Suits <DSuits@silknet.com>
Alex Martelli <alex@magenta.com>
Paul Hankin <pdh13@cam.ac.uk>
Micke Hovmoller <micke.hovmoller@adacra.com>
Paul Baxter <dealer@paje.globalnet.co.uk>
Add static archive to ignore list

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Add debug symbols to build

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Mask upper random bits out to avoid accessing past array

This patch is from debian package.
Make test run and pass in linux

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Remove dealer binary in the clean target

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Some yacc warning fixes from debian
Add test output to ignore list

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Allow filtering average results

To test correctness of complex dealer rules defining a biding system one
can use average function to show there is no overlap between bids. Too
bad number of checks quickly grows large with most of them passing.
Filtering passed checks from output makes it easier to notice failed ones.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Optimise tree evaluation if same variable is referenced multiple times

If variables are referenced multiple times in tree evaluation same
result is excepted. By caching the user defined variables we can easily
skip a lot of calculation to reevaluate same variable for multiple
references.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Add test for filtered averages

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Reduce distribution map to 3D array

If we know length of 3 suits the missing one has always one define
length. That makes enough to have only 3 suits stored in distribution
map making look ups a bit cache friendlier.

It might be even better to have single allocation addressed using
clubs*14*14 + diamonds*14 + hearts but I didn't want to try to figure
out but that leaves nearly 2200 entries unused in the array.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Make it struct tree extensible

To allow a bit more complex storage format for tree leafs, tree needs to be
extendable based on type field.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Allow unlimited number of shape declarations

To allow complex biding system definations input need unlimited number
of shape declarations to make writing rules easier. For that purpose
each shape node in the tree store 560 bits field for quick checking
which of possible shapes are allowed by that node.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Make functions and variables static

Static allows compiler to inline and not fill global namespace with
stuff used in a single file.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Add readme entry to note this is modified version

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Makefile rewrite

* Use nonrecursive make to allow parallel buid of subdirectories
* Add silent rules to make easier to spot warnings
* Use gcc generated dependencies for build targets
* Use separate build directory

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Use vectorization optimization

There is huge gain to be made if using vector operations on large
arrays. But that has down side of requiring strict alignment for arrays.
32 byte alignment matches 512 bits provided by avx.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Add makefile targets for unit test coverage

To improve unit test coverage before rewrite it is good to know what
code is run by current test set.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Use system getopt on unix systems

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>