recollindex builds. Still need to implement quite a lot of ifndefed stuff (pathut, rclconfig)
--HG-- branch : WINDOWSPORT
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
#ifndef TEST_MD5
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#ifndef TEST_MIMEPARSE
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -32,10 +33,7 @@
|
||||
#include "transcode.h"
|
||||
#include "smallut.h"
|
||||
|
||||
|
||||
#ifndef NO_NAMESPACES
|
||||
using namespace std;
|
||||
#endif /* NO_NAMESPACES */
|
||||
|
||||
//#define DEBUG_MIMEPARSE
|
||||
#ifdef DEBUG_MIMEPARSE
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
#include "readfile.h"
|
||||
#include "smallut.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(A,B) ((A) < (B) ? (A) : (B))
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string>
|
||||
using std::string;
|
||||
|
||||
/**
|
||||
* Read file in chunks, calling an accumulator for each chunk. Can be used
|
||||
@@ -29,23 +28,23 @@ using std::string;
|
||||
class FileScanDo {
|
||||
public:
|
||||
virtual ~FileScanDo() {}
|
||||
virtual bool init(size_t size, string *reason) = 0;
|
||||
virtual bool data(const char *buf, int cnt, string* reason) = 0;
|
||||
virtual bool init(size_t size, std::string *reason) = 0;
|
||||
virtual bool data(const char *buf, int cnt, std::string* reason) = 0;
|
||||
};
|
||||
bool file_scan(const string &filename, FileScanDo* doer, string *reason = 0);
|
||||
bool file_scan(const std::string &filename, FileScanDo* doer, std::string *reason = 0);
|
||||
/* Same but only process count cnt from offset offs. Set cnt to size_t(-1)
|
||||
* for no limit */
|
||||
bool file_scan(const string &fn, FileScanDo* doer, off_t offs, size_t cnt,
|
||||
string *reason = 0);
|
||||
bool file_scan(const std::string &fn, FileScanDo* doer, off_t offs, size_t cnt,
|
||||
std::string *reason = 0);
|
||||
|
||||
/**
|
||||
* Read file into string.
|
||||
* @return true for ok, false else
|
||||
*/
|
||||
bool file_to_string(const string &filename, string &data, string *reason = 0);
|
||||
bool file_to_string(const std::string &filename, std::string &data, std::string *reason = 0);
|
||||
|
||||
/** Read file chunk into string. Set cnt to size_t(-1) for whole file */
|
||||
bool file_to_string(const string &filename, string &data,
|
||||
off_t offs, size_t cnt, string *reason = 0);
|
||||
bool file_to_string(const std::string &filename, std::string &data,
|
||||
off_t offs, size_t cnt, std::string *reason = 0);
|
||||
|
||||
#endif /* _READFILE_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user