Nonogram Solver
================


Requirements
~~~~~~~~~~~~

You need the Nonogram Library (NonoLib) from:

http://www.comp.lancs.ac.uk/computing/users/ss/pub/nonogram/software.html#simps-nonolib


Unix Installation
~~~~~~~~~~~~~~~~~

To install this package on a Unix system, create a configuration file
for 'make' called nonogram-env.mk, ensuring that this file can be
located when you run 'make'.

Put into nonogram-env.mk configuration details such as:

* PREFIX - where you want to install the headers and libraries;

* CC, CFLAGS - compiler and options to ensure an ISO compiler, access
to the <nonogram.h> header file provided by simps-nonolib, and any
configuration macros (e.g. OLDSWITCHES),

* LDFLAGS - linker options to ensure access to the -lnonogram library
provided by simps-nonolib.

and ensure that RANLIB, AR and INSTALL are the names of the commands
equivalent to 'ranlib', 'ar' and 'install' on your system.

This approach aims to separate local installation details from the
distribution, since the file nonogram-env.mk can be kept out of the
unpacked distribution, which can be replaced without fear of
overwriting previous installation parameters.

For example:

INSTALL=install
PREFIX=/usr/local
CFLAGS += -I$(PREFIX)/include
LDFLAGS += -L$(PREFIX)/lib
CFLAGS += -ansi -Wall -pedantic-errors

(assuming the Nonogram library 'nonolib' was installed in /usr/local).

Targets for 'make'
~~~~~~~~~~~~~~~~~~

A variety of targets can be specified for building with 'make':

% make
% make nonogram

Make the command-line nonogram solver.

% make install

Make and install the executable program "nonogram".

% make tidy

Remove files that really shouldn't be there, e.g. emacs auto-save files
and core.

% make clean

Remove intermediate files (*.o) and files that really shouldn't be
there.

% make blank

Remove generated files that weren't in the distribution.


Compilation Options
~~~~~~~~~~~~~~~~~~~

Compile with the C macro OLDSWITCHES defined to treat -i/is as the
executing switch.

Compile with the C macro NOAUTOEXEC defined to disable the automatical
appending of -x to the arguments if a context-changing switch is used,
and -x isn't already there.

Compile with the C macro NOVISUAL defined to disable the visual
display.

Compile with the C macro BBCVDU to use BBC Microcomputer VDU
cursor-positioning codes for the visual display.

Compile with the C macro BBCGFX to use BBC Microcomputer VDU graphics
codes for the visual display. The program will assume a 16-colour
graphics screen mode is in use.

Define options by adding them to CFLAGS, e.g.

% make "CFLAGS+=-DNOVISUAL"

for Unix systems (and others). Alternatively, uncomment the relevant
lines in options.h.


Testing
~~~~~~~

An example nonogram puzzle is supplied: humpback.non. To test the
compilation, after:

% make nonogram

try:

% ./nonogram +o -v -i humpback.non

You should see the puzzle being solved on the screen.
