recollindex builds. Still need to implement quite a lot of ifndefed stuff (pathut, rclconfig)

--HG--
branch : WINDOWSPORT
This commit is contained in:
Jean-Francois Dockes
2015-08-30 15:30:50 +02:00
parent d4cd1dd91c
commit 75517f7497
24 changed files with 344 additions and 59 deletions
+2
View File
@@ -16,6 +16,8 @@
*/
#ifndef TEST_MD5
#include "autoconfig.h"
#include <stdio.h>
#include <string.h>
+1 -3
View File
@@ -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
+2 -2
View File
@@ -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
+8 -9
View File
@@ -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_ */