#include "support/textutils.h"
#include "support/convert.h"
+#if !defined (HAVE_FORK)
+# define fork() -1
+#endif
+
#include <boost/bind.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/operations.hpp>
using std::string;
using std::time_t;
-
namespace lyx {
using support::addName;
namespace {
-int const LYX_FORMAT = 289; //MV, index collapsable
+int const LYX_FORMAT = 295; //Uwe: htmlurl, href
} // namespace anon
bibfilesCache_.clear();
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
- if (it->lyxCode() == Inset::BIBTEX_CODE) {
+ if (it->lyxCode() == BIBTEX_CODE) {
InsetBibtex const & inset =
static_cast<InsetBibtex const &>(*it);
vector<FileName> const bibfiles = inset.getFiles(*this);
bibfilesCache_.insert(bibfilesCache_.end(),
bibfiles.begin(),
bibfiles.end());
- } else if (it->lyxCode() == Inset::INCLUDE_CODE) {
+ } else if (it->lyxCode() == INCLUDE_CODE) {
InsetInclude & inset =
static_cast<InsetInclude &>(*it);
inset.updateBibfilesCache(*this);
InsetList::const_iterator end = insets.end();
for ( ; it != end; ++it) {
//lyxerr << "found inset code " << it->inset->lyxCode() << std::endl;
- if (it->inset->lyxCode() == Inset::MATHMACRO_CODE) {
+ if (it->inset->lyxCode() == MATHMACRO_CODE) {
MathMacroTemplate const & mac
= static_cast<MathMacroTemplate const &>(*it->inset);
insertMacro(mac.name(), mac.asMacroData());
void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
- Inset::Code code)
+ InsetCode code)
{
//FIXME: This does not work for child documents yet.
- BOOST_ASSERT(code == Inset::CITE_CODE || code == Inset::REF_CODE);
+ BOOST_ASSERT(code == CITE_CODE || code == REF_CODE);
// Check if the label 'from' appears more than once
vector<docstring> labels;
- if (code == Inset::CITE_CODE) {
+ if (code == CITE_CODE) {
BiblioInfo keys;
keys.fillWithBibKeys(this);
BiblioInfo::const_iterator bit = keys.begin();
};
+#if !defined (HAVE_FORK)
+# define fork() -1
+#endif
+
int AutoSaveBuffer::generateChild()
{
// tmp_ret will be located (usually) in /tmp
// will that be a problem?
- pid_t const pid = fork(); // If you want to debug the autosave
- // you should set pid to -1, and comment out the
- // fork.
+ pid_t const pid = fork();
+ // If you want to debug the autosave
+ // you should set pid to -1, and comment out the fork.
if (pid == 0 || pid == -1) {
// pid = -1 signifies that lyx was unable
// to fork. But we will do the save