4
* Open a file and read it, assuming it contains a single long value.
5
* Return 0 if we read a valid value, otherwise -1.
11
int getintfile(const char *path, long *val)
21
ep = buffer + fread(buffer, 1, sizeof buffer-1, f);
25
*val = strtol(buffer, &ep, 0);
26
if ( *ep && *ep != '\n' )