projects
/
rrq
/
fusefile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f08d9c3
)
use signed offsets
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 13 Nov 2021 09:08:57 +0000
(20:08 +1100)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 13 Nov 2021 09:08:57 +0000
(20:08 +1100)
fusefile.c
patch
|
blob
|
history
diff --git
a/fusefile.c
b/fusefile.c
index 5aa29170a23e3ebc3f7cf195d486092f4fa3ab87..00f7f7fd33e3565e6cff5966cbf7690ed58273c8 100644
(file)
--- a/
fusefile.c
+++ b/
fusefile.c
@@
-36,16
+36,16
@@
struct Source {
char *filename;
struct Source {
char *filename;
- size_t from;
- size_t to;
- size_t start; // starting position in concatenated file
+ s
s
ize_t from;
+ s
s
ize_t to;
+ s
s
ize_t start; // starting position in concatenated file
int fd;
};
static struct {
struct Source *array;
int count;
int fd;
};
static struct {
struct Source *array;
int count;
- size_t size;
+ s
s
ize_t size;
} sources;
#if DEBUG
} sources;
#if DEBUG
@@
-76,6
+76,7
@@
static size_t scan_source(char *in,struct Source *p) {
m = i;
}
}
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;
// Copy the filename, and set from and to
p->filename = strndup( in, ( s < 0 )? e : s );
struct stat buf;
@@
-87,6
+88,7
@@
static size_t scan_source(char *in,struct Source *p) {
if ( p->from < 0 ) {
p->from = 0;
}
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;
p->to = ( m < 0 )? buf.st_size : atol( in+m+1 );
if ( p->from > p->to || p->to > buf.st_size ) {
return 1;