fgetc() moves pointer one step forward
The most basic solution would be to store the character read by fgetc, for example, instead of:

if(!isspace(fgetc(handle)))


you'd write:

char val = fgetc(handle);
if(!isspace(val))


This way if the isspacecall returns false you will still have the latest character in the val variable.

I'd also suggest you look into the switch statement instead of using multiple if-else blocks: http://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/switch.html