struct Source {
char *filename;
- size_t from;
- size_t to;
- size_t start; // starting position in concatenated file
+ ssize_t from;
+ ssize_t to;
+ ssize_t start; // starting position in concatenated file
int fd;
};
static struct {
struct Source *array;
int count;
- size_t size;
+ ssize_t size;
} sources;
#if DEBUG
m = i;
}
}
+ fprintf( stderr, "m=%d s=%d\n", m, s );
// Copy the filename, and set from and to
p->filename = strndup( in, ( s < 0 )? e : s );
struct stat buf;
if ( p->from < 0 ) {
p->from = 0;
}
+ fprintf( stderr, "p->from=%ld\n", p->from );
p->to = ( m < 0 )? buf.st_size : atol( in+m+1 );
if ( p->from > p->to || p->to > buf.st_size ) {
return 1;