Lines Matching refs:size
69 file->size = file->st.st_size; in LoadFileContents()
70 file->data = malloc(file->size); in LoadFileContents()
80 ssize_t bytes_read = fread(file->data, 1, file->size, f); in LoadFileContents()
81 if (bytes_read != file->size) { in LoadFileContents()
83 filename, (long)bytes_read, (long)file->size); in LoadFileContents()
95 if (retouch_mask_data(file->data, file->size, in LoadFileContents()
104 SHA(file->data, file->size, file->sha1); in LoadFileContents()
171 size_t* size = malloc(pairs * sizeof(size_t)); in LoadPartitionContents() local
176 size[i] = strtol(size_str, NULL, 10); in LoadPartitionContents()
177 if (size[i] == 0) { in LoadPartitionContents()
187 size_array = size; in LoadPartitionContents()
229 file->data = malloc(size[index[pairs-1]]); in LoadPartitionContents()
231 file->size = 0; // # bytes read so far in LoadPartitionContents()
237 size_t next = size[index[i]] - file->size; in LoadPartitionContents()
257 file->size += read; in LoadPartitionContents()
278 size[index[i]], sha1sum[index[i]]); in LoadPartitionContents()
318 free(size); in LoadPartitionContents()
335 ssize_t bytes_written = FileSink(file->data, file->size, &fd); in SaveFileContents()
336 if (bytes_written != file->size) { in SaveFileContents()
338 filename, (long)bytes_written, (long)file->size, in SaveFileContents()
554 ssize_t size; member
560 if (msi->size - msi->pos < len) { in MemorySink()
755 if (MakeFreeSpaceOnCache(source_file->size) < 0) { in GenerateTarget()
795 if (MakeFreeSpaceOnCache(source_file->size) < 0) { in GenerateTarget()
840 msi.size = target_size; in GenerateTarget()
860 ssize_t header_bytes_read = patch->size; in GenerateTarget()
868 result = ApplyBSDiffPatch(source_to_use->data, source_to_use->size, in GenerateTarget()
872 result = ApplyImagePatch(source_to_use->data, source_to_use->size, in GenerateTarget()