fix type of filesize output parameter of got_object_blob_dump_to_file()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
diff --git a/got/got.c b/got/got.c
index e0a4032..d471800 100644
--- a/got/got.c
+++ b/got/got.c
@@ -4438,7 +4438,7 @@ cmd_blame(int argc, char *argv[])
char *commit_id_str = NULL;
struct blame_cb_args bca;
int ch, obj_type, i;
- size_t filesize;
+ off_t filesize;
memset(&bca, 0, sizeof(bca));
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 170666b..34bd7e8 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -3960,7 +3960,7 @@ gw_output_file_blame(struct gw_trans *gw_trans)
char *path = NULL, *in_repo_path = NULL;
struct gw_blame_cb_args bca;
int i, obj_type;
- size_t filesize;
+ off_t filesize;
if (asprintf(&path, "%s%s%s",
gw_trans->repo_folder ? gw_trans->repo_folder : "",
diff --git a/include/got_object.h b/include/got_object.h
index 3adf5f3..e5ebc4d 100644
--- a/include/got_object.h
+++ b/include/got_object.h
@@ -277,7 +277,7 @@ void got_object_blob_rewind(struct got_blob_object *);
* file in the int argument, and line offsets in the off_t argument
* (NULL can be passed for any output argument).
*/
-const struct got_error *got_object_blob_dump_to_file(size_t *, int *,
+const struct got_error *got_object_blob_dump_to_file(off_t *, int *,
off_t **, FILE *, struct got_blob_object *);
/*
diff --git a/lib/blame.c b/lib/blame.c
index 6d0ab27..5cfa91f 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -54,7 +54,7 @@ struct got_blame {
FILE *f;
off_t size;
struct diff_config *cfg;
- size_t filesize;
+ off_t filesize;
int nlines;
int nannotated;
struct got_blame_line *lines; /* one per line */
@@ -162,7 +162,7 @@ blame_commit(struct got_blame *blame, struct got_object_id *id,
struct got_blob_object *blob = NULL, *pblob = NULL;
struct got_diffreg_result *diffreg_result = NULL;
FILE *f1 = NULL, *f2 = NULL;
- size_t size1, size2;
+ off_t size1, size2;
int nlines1, nlines2;
int *linemap1 = NULL;
diff --git a/lib/diff.c b/lib/diff.c
index 344e936..ea5a062 100644
--- a/lib/diff.c
+++ b/lib/diff.c
@@ -65,7 +65,7 @@ diff_blobs(off_t **line_offsets, size_t *nlines,
char hex1[SHA1_DIGEST_STRING_LENGTH];
char hex2[SHA1_DIGEST_STRING_LENGTH];
char *idstr1 = NULL, *idstr2 = NULL;
- size_t size1, size2;
+ off_t size1, size2;
struct got_diffreg_result *result;
off_t outoff = 0;
int n;
@@ -222,7 +222,7 @@ diff_blob_file(struct got_diffreg_result **resultp,
FILE *f1 = NULL;
char hex1[SHA1_DIGEST_STRING_LENGTH];
char *idstr1 = NULL;
- size_t size1;
+ off_t size1;
struct got_diffreg_result *result = NULL;
if (resultp)
diff --git a/lib/object.c b/lib/object.c
index b885546..7c0aac0 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -1274,7 +1274,7 @@ got_object_blob_read_block(size_t *outlenp, struct got_blob_object *blob)
}
const struct got_error *
-got_object_blob_dump_to_file(size_t *filesize, int *nlines,
+got_object_blob_dump_to_file(off_t *filesize, int *nlines,
off_t **line_offsets, FILE *outfile, struct got_blob_object *blob)
{
const struct got_error *err = NULL;
diff --git a/tog/tog.c b/tog/tog.c
index ed5c1bc..54c37e9 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -333,7 +333,7 @@ struct tog_blame_thread_args {
struct tog_blame {
FILE *f;
- size_t filesize;
+ off_t filesize;
struct tog_blame_line *lines;
int nlines;
off_t *line_offsets;