!DPlngScan
----------

This zip file contains the following:
1) A complete !DPlngScan application
2) The source code in the Source folder
3) The utils folder

The Source code folder contains all the source files required to
produce the binary !RunImage for !DPlngScan, in folders c, s and h
respectively. There is also an example makefile and a couple of
example obey files to start the compilation process. The compilation
should work from wherever this CJDPScan folder is placed on your file
system, or can be organised to suit your own system arrangement. A
successful compilation should result in a binary file, !RunImage,
being saved in the Source folder.

The compilation is set up to run under the Acorn/ROOL DDE compiler.
Note that if warnings are fully turned on in the compiler a number of
non-fatal warnings will be issued during compilation. Typical ones are
variables being declared but not used, arguments to functions not
used, and getting upset when ints are assigned values in the format
0xNNNN. I have never spent the time to edit the sources to prevent
this.

To complete the compilation, it requires linking to external
libraries. These are:
1) the standard CLib library, supplied with the Acorn DDE
2) the TaskLib library, (CJDPTaskLib), available from this site
https://www.davidpilling.com/wiki/index.php/ChrisJohnson
3) the PNG library
4) the zlib library
5) the JPEG lirary
6) the TWAIN library
7) the TIFF library
Compiled versions of these other image libraries are also available
from this site. Note that there are two versions of the JPEGv9d
library supplied. One is a straight compilation of the source code.
The second, used by default, is a customised version that uses
TaskLib's flex memory management functions, rather than the malloc
function available in the DDE CLib. The malloc function does not
release memory back to the system when freed, unlike the flex
functions.

The source files and the make file refer to the external libraries
by means of system path variables, which should be set up first. The
C: and clib paths are set up automatically by the DDE. Paths to other
libraries can be set up, for example, by simple obey files. My system
uses commands such as

  *set TaskLib$Path <Obey$Dir>.Libraries.TaskLib.

to set up the paths. Beside C:, the following paths are used by
DPlngScan and need to be set before compilation - TaskLib:, pnglib:,
zlib:, jpeg9d_fl:, Tiff, and TwainLib.

If the names of any of these libraries are changed, then the makefile
and the #includes in the source files will need changing to suit.

The linking step will fail if the library paths have not been set up.

The utils folder
----------------
The utils folder contains a BASIC program, and a simple taskobey file
to run it in a task window. The program MakeMenus is used to create
the data structure for the menus used by the application. This data
structure, named Menus, is loaded by the application when launched. If
it is required to change any of the menus used by the program, or
produce menus in a different language, then this BASIC program must be
edited to suit and then run to create the new menu data structure,
which must be placed in the !DPlngScan.Resources.UK folder (or other
country folder as necessary). If the menus are changed for any reason,
other than translated to a different language, then the source code
functions dealing with the menus must also be modified as appropriate.


If you need any help or advice I can be contacted at
chris@chris-johnson.org.uk

