libsparse: cleanups

Move block loops into sparse.c with iterator helpers in backed_block.c.
Simplify chunk writing by moving skip chunk calls from output_file.c to
sparse.c.
Rename variables to be consistent with new naming.
Remove use of u8, u32, u64.

Change-Id: Ic138ad58bef9f96239266ccee12ee83ea285e7eb
diff --git a/libsparse/output_file.h b/libsparse/output_file.h
index b12194f..cb2feb7 100644
--- a/libsparse/output_file.h
+++ b/libsparse/output_file.h
@@ -26,11 +26,12 @@
 		int gz, int sparse, int chunks, int crc);
 struct output_file *open_output_fd(int fd, unsigned int block_size, int64_t len,
 		int gz, int sparse, int chunks, int crc);
-void write_data_block(struct output_file *out, int64_t off, void *data, int len);
-void write_fill_block(struct output_file *out, int64_t off, unsigned int fill_val, int len);
-void write_data_file(struct output_file *out, int64_t off, const char *file,
-		int64_t offset, int len);
-void pad_output_file(struct output_file *out, int64_t len);
+int write_data_chunk(struct output_file *out, unsigned int len, void *data);
+int write_fill_chunk(struct output_file *out, unsigned int len,
+		uint32_t fill_val);
+int write_file_chunk(struct output_file *out, unsigned int len,
+		const char *file, int64_t offset);
+int write_skip_chunk(struct output_file *out, int64_t len);
 void close_output_file(struct output_file *out);
 
 #endif