read int/long from sd card

        long data[1];

A one element array. How useful.

if ( c == '\0' )

The address of a static array (c) will never be '\0'.

          data[0] = atol(c); // atol()  convert string to long

But, c is NOT a string. A string is a NULL terminated array of chars. While c is an array of chars, it is not NULL terminated, so it can not be passed as input to a function that expects a string.

That code no longer loops to read every record. It reads exactly one character from the file. I fail to see how that is useful.