diff options
Diffstat (limited to 'lib/libfetch/file.c')
-rw-r--r-- | lib/libfetch/file.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c index 42ce68d..a1492ba 100644 --- a/lib/libfetch/file.c +++ b/lib/libfetch/file.c @@ -50,11 +50,11 @@ fetchXGetFile(struct url *u, struct url_stat *us, const char *flags) f = fopen(u->doc, "r"); if (f == NULL) - _fetch_syserr(); + fetch_syserr(); if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) { fclose(f); - _fetch_syserr(); + fetch_syserr(); } return (f); @@ -77,25 +77,25 @@ fetchPutFile(struct url *u, const char *flags) f = fopen(u->doc, "w+"); if (f == NULL) - _fetch_syserr(); + fetch_syserr(); if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) { fclose(f); - _fetch_syserr(); + fetch_syserr(); } return (f); } static int -_fetch_stat_file(const char *fn, struct url_stat *us) +fetch_stat_file(const char *fn, struct url_stat *us) { struct stat sb; us->size = -1; us->atime = us->mtime = 0; if (stat(fn, &sb) == -1) { - _fetch_syserr(); + fetch_syserr(); return (-1); } us->size = sb.st_size; @@ -107,7 +107,7 @@ _fetch_stat_file(const char *fn, struct url_stat *us) int fetchStatFile(struct url *u, struct url_stat *us, const char *flags __unused) { - return (_fetch_stat_file(u->doc, us)); + return (fetch_stat_file(u->doc, us)); } struct url_ent * @@ -122,7 +122,7 @@ fetchListFile(struct url *u, const char *flags __unused) int l; if ((dir = opendir(u->doc)) == NULL) { - _fetch_syserr(); + fetch_syserr(); return (NULL); } @@ -136,10 +136,10 @@ fetchListFile(struct url *u, const char *flags __unused) while ((de = readdir(dir)) != NULL) { strncpy(p, de->d_name, l - 1); p[l - 1] = 0; - if (_fetch_stat_file(fn, &us) == -1) + if (fetch_stat_file(fn, &us) == -1) /* should I return a partial result, or abort? */ break; - _fetch_add_entry(&ue, &size, &len, de->d_name, &us); + fetch_add_entry(&ue, &size, &len, de->d_name, &us); } return (ue); |