Switch to unified view

a/src/utils/readfile.h b/src/utils/readfile.h
...
...
27
 * for reading in a file, computing an md5...
27
 * for reading in a file, computing an md5...
28
 */
28
 */
29
class FileScanDo {
29
class FileScanDo {
30
public:
30
public:
31
    virtual ~FileScanDo() {}
31
    virtual ~FileScanDo() {}
32
    virtual bool init(unsigned int size, string *reason) = 0;
32
    virtual bool init(size_t size, string *reason) = 0;
33
    virtual bool data(const char *buf, int cnt, string* reason) = 0;
33
    virtual bool data(const char *buf, int cnt, string* reason) = 0;
34
};
34
};
35
bool file_scan(const string &filename, FileScanDo* doer, string *reason = 0);
35
bool file_scan(const string &filename, FileScanDo* doer, string *reason = 0);
36
/* Same but only process count cnt from offset offs. Set cnt to size_t(-1) 
36
/* Same but only process count cnt from offset offs. Set cnt to size_t(-1) 
37
 * for no limit */
37
 * for no limit */