Windows msvc: rename dirent.h->msvc_dirent.h. mh_text: fix mimeconf-win and warning
This commit is contained in:
parent
9bc49866e5
commit
d9c1a9648c
@ -198,7 +198,7 @@ bool MimeHandlerText::readnext()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_text = m_alltext.substr(m_offs, m_pagesz);
|
m_text = m_alltext.substr((size_t)m_offs, m_pagesz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_text.length() == 0) {
|
if (m_text.length() == 0) {
|
||||||
|
|||||||
@ -21,31 +21,33 @@
|
|||||||
// Generic Xapian exception catching code. We do this quite often,
|
// Generic Xapian exception catching code. We do this quite often,
|
||||||
// and I have no idea how to do this except for a macro
|
// and I have no idea how to do this except for a macro
|
||||||
#define XCATCHERROR(MSG) \
|
#define XCATCHERROR(MSG) \
|
||||||
catch (const Xapian::Error &e) { \
|
catch (const Xapian::Error &e) { \
|
||||||
MSG = e.get_msg(); \
|
MSG = e.get_msg(); \
|
||||||
if (MSG.empty()) MSG = "Empty error message"; \
|
if (MSG.empty()) MSG = "Empty error message"; \
|
||||||
} catch (const std::string &s) { \
|
} catch (const std::string &s) { \
|
||||||
MSG = s; \
|
MSG = s; \
|
||||||
if (MSG.empty()) MSG = "Empty error message"; \
|
if (MSG.empty()) MSG = "Empty error message"; \
|
||||||
} catch (const char *s) { \
|
} catch (const char *s) { \
|
||||||
MSG = s; \
|
MSG = s; \
|
||||||
if (MSG.empty()) MSG = "Empty error message"; \
|
if (MSG.empty()) MSG = "Empty error message"; \
|
||||||
} catch (...) { \
|
} catch (std::exception& ex) { \
|
||||||
MSG = "Caught unknown xapian exception"; \
|
MSG = std::string("Caught std::exception: ") + ex.what(); \
|
||||||
}
|
} catch (...) { \
|
||||||
|
MSG = std::string("Caught unknown exception??"); \
|
||||||
|
}
|
||||||
|
|
||||||
#define XAPTRY(STMTTOTRY, XAPDB, ERSTR) \
|
#define XAPTRY(STMTTOTRY, XAPDB, ERSTR) \
|
||||||
for (int tries = 0; tries < 2; tries++) { \
|
for (int tries = 0; tries < 2; tries++) { \
|
||||||
try { \
|
try { \
|
||||||
STMTTOTRY; \
|
STMTTOTRY; \
|
||||||
ERSTR.erase(); \
|
ERSTR.erase(); \
|
||||||
break; \
|
break; \
|
||||||
} catch (const Xapian::DatabaseModifiedError &e) { \
|
} catch (const Xapian::DatabaseModifiedError &e) { \
|
||||||
ERSTR = e.get_msg(); \
|
ERSTR = e.get_msg(); \
|
||||||
XAPDB.reopen(); \
|
XAPDB.reopen(); \
|
||||||
continue; \
|
continue; \
|
||||||
} XCATCHERROR(ERSTR); \
|
} XCATCHERROR(ERSTR); \
|
||||||
break; \
|
break; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -18,7 +18,13 @@
|
|||||||
#include "autoconfig.h"
|
#include "autoconfig.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include "msvc_dirent.h"
|
||||||
|
#else // !_MSC_VER
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#endif // _MSC_VER
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
@ -22,7 +22,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "safefcntl.h"
|
#include "safefcntl.h"
|
||||||
#include "safeunistd.h"
|
#include "safeunistd.h"
|
||||||
#include "dirent.h"
|
|
||||||
#include "cstr.h"
|
#include "cstr.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "safewindows.h"
|
#include "safewindows.h"
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -29,6 +28,12 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "pathut.h"
|
#include "pathut.h"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include "msvc_dirent.h"
|
||||||
|
#else // !_MSC_VER
|
||||||
|
#include <dirent.h>
|
||||||
|
#endif // _MSC_VER
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "safefcntl.h"
|
#include "safefcntl.h"
|
||||||
#include "safeunistd.h"
|
#include "safeunistd.h"
|
||||||
|
|||||||
@ -173,6 +173,7 @@ text/calendar = execm python rclics;mimetype=text/plain
|
|||||||
text/css = internal text/plain
|
text/css = internal text/plain
|
||||||
text/html = internal
|
text/html = internal
|
||||||
text/plain = internal
|
text/plain = internal
|
||||||
|
text/plain1 = internal
|
||||||
#text/rtf = execm python rclrtf.py
|
#text/rtf = execm python rclrtf.py
|
||||||
text/rtf = exec unrtf --nopict --html;mimetype=text/html
|
text/rtf = exec unrtf --nopict --html;mimetype=text/html
|
||||||
text/x-c = internal
|
text/x-c = internal
|
||||||
|
|||||||
@ -167,6 +167,7 @@ copyrecoll()
|
|||||||
chkcp $RCL/windows/mimeview $DESTDIR/Share/examples
|
chkcp $RCL/windows/mimeview $DESTDIR/Share/examples
|
||||||
chkcp $RCL/sampleconf/recoll.conf $DESTDIR/Share/examples
|
chkcp $RCL/sampleconf/recoll.conf $DESTDIR/Share/examples
|
||||||
chkcp $RCL/sampleconf/recoll.qss $DESTDIR/Share/examples
|
chkcp $RCL/sampleconf/recoll.qss $DESTDIR/Share/examples
|
||||||
|
chkcp $RCL/sampleconf/recoll-dark.qss $DESTDIR/Share/examples
|
||||||
|
|
||||||
chkcp $RCL/python/recoll/recoll/rclconfig.py $FILTERS
|
chkcp $RCL/python/recoll/recoll/rclconfig.py $FILTERS
|
||||||
chkcp $RCL/python/recoll/recoll/conftree.py $FILTERS
|
chkcp $RCL/python/recoll/recoll/conftree.py $FILTERS
|
||||||
@ -312,6 +313,7 @@ copypyrecoll()
|
|||||||
PYRCLWHEEL=${PYRECOLL}/dist/Recoll-${VERSION}-cp37-cp37m-win32.whl
|
PYRCLWHEEL=${PYRECOLL}/dist/Recoll-${VERSION}-cp37-cp37m-win32.whl
|
||||||
DEST=${DESTDIR}/Share/dist
|
DEST=${DESTDIR}/Share/dist
|
||||||
test -d $DEST || mkdir $DEST || fatal cant create $DEST
|
test -d $DEST || mkdir $DEST || fatal cant create $DEST
|
||||||
|
rm -f ${DEST}/*
|
||||||
chkcp ${PYRCLWHEEL} $DEST
|
chkcp ${PYRCLWHEEL} $DEST
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user