Checked out the SPIEEPROM code, looks like my code went a bit further so I decided to add support for int, long, float, and double to mine.
Decided to start using bitbucket too. Check my version out:
(I usually rename the 'spieep' dir to SPIEEP all uppercase btw, not sure how to make that happen by default)
In addition to read, write, readn, writen, read_page, write_page, I now have:
read_int, write_int, readn_int, writen_int, read_int_offset, write_int_offset, readn_int_offset and writen_int_offset
along with long, float, and double variants of all those functions.
The EEPROM "address" you supply to each of those int/long/float/double variants gets multiplied by the size of those variables, so you could for instance use the whole EEPROM as one huge array of double's, accessing each item's address by incrementing a variable one at a time (rather than having to compute byte addresses yourself). The "offset" variants allows you to specify a origin byte-level address where the int/long/float/double address should start counting.
Or in plain code:
read_int(p) runs the underlying readn() with (byte) address = p * sizeof(int)
read_int_offset(offset, p) runs the underlying readn() with (byte) address = p * sizeof(int) + offset
Since these functions use my readn and writen functions, they can work across page boundaries without requiring any further consideration.
I haven't actually tested the int/long/float/double variants yet, just forewarning... I will do that later :)
Hope this helps!