p->to = filestat.st_size;
// Process any range variation
if ( range && *(++range) ) {
- int a,b;
+ long int a,b;
if ( 0 ) {
- } else if ( RANGE( sscanf( range, "%d:%d%n", &a, &b, &c ), 2 )) {
+ } else if ( RANGE( sscanf( range, "%ld:%ld%n", &a, &b, &c ), 2 )) {
p->from = ( a < 0 )? ( p->to + a ) : a;
p->to = ( b < 0 )? ( p->to + b ) : b;
- } else if ( RANGE( sscanf( range, "%d+%d%n", &a, &b, &c ), 2 )) {
+ } else if ( RANGE( sscanf( range, "%ld+%ld%n", &a, &b, &c ), 2 )) {
p->from = ( a < 0 )? ( p->to + a ) : a;
p->to = ( ( b < 0 )? p->to : p->from ) + b;
- } else if ( RANGE( sscanf( range, "%d+%n", &a, &c ), 1 )) {
+ } else if ( RANGE( sscanf( range, "%ld+%n", &a, &c ), 1 )) {
p->from = ( a < 0 )? ( p->to + a ) : a;
- } else if ( RANGE( sscanf( range, ":%d%n", &b, &c ), 1 )) {
+ } else if ( RANGE( sscanf( range, ":%ld%n", &b, &c ), 1 )) {
p->to = ( b < 0 )? ( p->to + b ) : b;
- } else if ( RANGE( sscanf( range, "%d:%n", &a, &c ), 1 )) {
+ } else if ( RANGE( sscanf( range, "%ld:%n", &a, &c ), 1 )) {
p->from = ( a < 0 )? ( p->to + a ) : a;
- } else if ( RANGE( sscanf( range, "%d%n", &a, &c ), 1 )) {
+ } else if ( RANGE( sscanf( range, "%ld%n", &a, &c ), 1 )) {
if ( a >= 0 ) {
p->from = a;
} else {