On 2007-10-17, Mark Bluemel <mark_bluemel@pobox.com> wrote:
>
> theRecord.clno is a pointer to unsigned long. Subtracting 1 from it
> moves it "back" (for some value of back) by sizeof(unsigned long). Again
> you pass printf() two pointers but tell it that they are longs, again
> you "get away" with it...
Barely, it would seem.
> Your code would work acceptably simply by amending the structure to
> contain unsigned longs, rather than pointers to them, and removing the
> mallocs...
Done and it now works as expected. Many thanks, and I'll try to get this
into my head in future.
Jim
--
http://www.ursaMinorBeta.co.uk
BRADWORTHY (n.)
One who is skilled in the art of naming loaves.