Change the log and output handling

Now the log file contains all the errors messages,
and all the tag lines.
This commit is contained in:
Andrea Mazzoleni 2015-02-02 23:39:46 +01:00
parent ce20be0ded
commit b5ce575981
32 changed files with 1127 additions and 1036 deletions

View file

@ -19,6 +19,7 @@
#define __HANDLE_H
#include "state.h"
#include "support.h"
/****************************************************************************/
/* handle */
@ -52,7 +53,7 @@ int handle_truncate(struct snapraid_handle* handle, struct snapraid_file* file);
* Opens a file.
* The file is opened for reading.
*/
int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int mode, FILE* out);
int handle_open(struct snapraid_handle* handle, struct snapraid_file* file, int mode, fptr* out);
/**
* Closes a file.
@ -63,7 +64,7 @@ int handle_close(struct snapraid_handle* handle);
* Read a block from a file.
* If the read block is shorter, it's padded with 0.
*/
int handle_read(struct snapraid_handle* handle, struct snapraid_block* block, unsigned char* block_buffer, unsigned block_size, FILE* out);
int handle_read(struct snapraid_handle* handle, struct snapraid_block* block, unsigned char* block_buffer, unsigned block_size, fptr* out);
/**
* Writes a block to a file.