To get rid of most of the "conflicting types for built-in function" warnings add
#include <stdlib.h>`
to diffract.h and add -std=c89
to CFLAGS in the Makefile. To get the stuff in Src to use the diffract.h in Lib you can use a symlink; another option is adding also -I../Lib
to CFLAGS:
CFLAGS=-g -std=c89 -I../Lib
This will make it much easier to find the actual errors.
Some errors you'll have to fix by hand. For example picout.c
tries to use fwrite
as if it was fprintf
, which makes me wonder if this code was ever working:
/* was: fwrite(stderr,"Error in writing picture.\n"); */
fprintf(stderr,"Error in writing picture.\n");
The UnWrap.c
file uses a symbolic constant called HUGE
which is not defined anywhere. In files under the RCS directory you can find this declaration, which you can add to diffract.h:
#define HUGE 1.701411733192644270e38
Also in a few places there are calls to abort(1)
, which is an error because the abort function takes no parameters. In those cases just remove the 1
. Other than that the code seems to compile on GCC.