From 95fdfb772b02ca5ca9f6ef18256d9c1e5154a2ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Thu, 12 Oct 2000 00:11:06 +0000 Subject: [PATCH] the mkfifo change, make it compile on egcs git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1103 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 12 ++++++++++++ po/POTFILES.in | 2 -- src/buffer.C | 2 +- src/buffer.h | 2 +- src/layout.C | 2 +- src/layout.h | 2 +- src/lyx_cb.C | 6 +++--- src/lyxserver.C | 4 ++-- src/support/lyxfunctional.h | 6 ++++++ 9 files changed, 27 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6990620b20..e6ee06d0c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2000-10-12 + + * src/support/lyxfunctional.h: add operator= that takes a reference + + * src/lyxserver.C (mkfifo): make first arg const + + * src/layout.h: renamed name(...) to setName(...) to work around + bugs in egcs. + + * src/buffer.C (setFileName): had to change name of function to + work around bugs in egcs. (renamed from fileName) + 2000-10-11 Lars Gullik Bjønnes * src/support/translator.h: move helper template clsses to diff --git a/po/POTFILES.in b/po/POTFILES.in index 555803d5ac..f0d27987a3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -26,9 +26,7 @@ src/frontends/kde/formcitationdialog.C src/frontends/kde/FormCopyright.C src/frontends/kde/FormIndex.C src/frontends/kde/formindexdialog.C -src/frontends/kde/formindexdialogdata.C src/frontends/kde/FormPrint.C -src/frontends/kde/formprintdialogdata.C src/frontends/kde/FormRef.C src/frontends/kde/formrefdialog.C src/frontends/kde/FormToc.C diff --git a/src/buffer.C b/src/buffer.C index 02e54b6794..eb5b792e98 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -219,7 +219,7 @@ void Buffer::resetAutosaveTimers() const } -void Buffer::fileName(string const & newfile) +void Buffer::setFileName(string const & newfile) { filename = MakeAbsPath(newfile); filepath = OnlyPath(filename); diff --git a/src/buffer.h b/src/buffer.h index 95fbc22d49..1fb0bbff59 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -236,7 +236,7 @@ public: string const getLatexName(bool no_path = true) const; /// Change name of buffer. Updates "read-only" flag. - void fileName(string const & newfile); + void setFileName(string const & newfile); /// Name of the document's parent void setParentName(string const &); diff --git a/src/layout.C b/src/layout.C index 4fd40f1107..0132a875f6 100644 --- a/src/layout.C +++ b/src/layout.C @@ -871,7 +871,7 @@ bool LyXTextClass::Read(string const & filename, bool merge) error = do_readStyle(lexrc, lay); } else { LyXLayout lay; - lay.name(name); + lay.setName(name); if (!(error = do_readStyle(lexrc, lay))) layoutlist.push_back(lay); } diff --git a/src/layout.h b/src/layout.h index 7359b2d4a0..723401e81b 100644 --- a/src/layout.h +++ b/src/layout.h @@ -210,7 +210,7 @@ public: /// string const & name() const { return name_; } /// - void name(string const & n) { name_ = n; } + void setName(string const & n) { name_ = n; } /// string const & obsoleted_by() const { return obsoleted_by_; } /// diff --git a/src/lyx_cb.C b/src/lyx_cb.C index 853d2b4f69..232f54448e 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -254,7 +254,7 @@ bool MenuWriteAs(Buffer * buffer) bufferlist.close(bufferlist.getBuffer(s)); // Ok, change the name of the buffer, but don't save! - buffer->fileName(s); + buffer->setFileName(s); buffer->markDirty(); ShowMessage(buffer, _("Document renamed to '"), @@ -271,7 +271,7 @@ bool MenuWriteAs(Buffer * buffer) } // Ok, change the name of the buffer - buffer->fileName(s); + buffer->setFileName(s); buffer->markDirty(); bool unnamed = buffer->isUnnamed(); buffer->setUnnamed(false); @@ -280,7 +280,7 @@ bool MenuWriteAs(Buffer * buffer) // of the document. // Hope this is fixed this way! (Jug) if (!MenuWrite(buffer)) { - buffer->fileName(oldname); + buffer->setFileName(oldname); buffer->setUnnamed(unnamed); ShowMessage(buffer, _("Document could not be saved!"), _("Holding the old name."), MakeDisplayPath(oldname)); diff --git a/src/lyxserver.C b/src/lyxserver.C index 76a7d19975..1760a0f618 100644 --- a/src/lyxserver.C +++ b/src/lyxserver.C @@ -72,8 +72,8 @@ using std::endl; // provide an empty mkfifo() if we do not have one. This disables the // lyxserver. #ifndef HAVE_MKFIFO -int mkfifo( char *__path, mode_t __mode ) { - return 0; +int mkfifo(char const * __path, mode_t __mode ) { + return 0; } #endif diff --git a/src/support/lyxfunctional.h b/src/support/lyxfunctional.h index 5eedb9098b..854ab573e1 100644 --- a/src/support/lyxfunctional.h +++ b/src/support/lyxfunctional.h @@ -41,6 +41,12 @@ public: return *this; } + back_insert_fun_iterator & + operator=(Type & val) { + container.push_back((val.*pmf)()); + return *this; + } + back_insert_fun_iterator & operator*() { return *this; } -- 2.39.5