]> git.lyx.org Git - lyx.git/blobdiff - src/Lexer.cpp
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / Lexer.cpp
index 781aa52d15c5784e830a7bd4fde90549e0d979da..3ad6c8f27bff4d076a9d8f924c57345ba167f931 100644 (file)
@@ -18,6 +18,7 @@
 #include "support/debug.h"
 
 #include "support/convert.h"
+#include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/gzstream.h"
 #include "support/lstrings.h"
@@ -51,21 +52,21 @@ public:
        ///
        Pimpl(keyword_item * tab, int num);
        ///
-       std::string const getString() const;
+       string const getString() const;
        ///
        docstring const getDocString() const;
        ///
-       void printError(std::string const & message) const;
+       void printError(string const & message) const;
        ///
-       void printTable(std::ostream & os);
+       void printTable(ostream & os);
        ///
        void pushTable(keyword_item * tab, int num);
        ///
        void popTable();
        ///
-       bool setFile(support::FileName const & filename);
+       bool setFile(FileName const & filename);
        ///
-       void setStream(std::istream & i);
+       void setStream(istream & i);
        ///
        void setCommentChar(char c);
        ///
@@ -81,29 +82,29 @@ public:
        /// test if there is a pushed token or the stream is ok
        bool inputAvailable();
        ///
-       void pushToken(std::string const &);
+       void pushToken(string const &);
        /// fb_ is only used to open files, the stream is accessed through is.
-       std::filebuf fb_;
+       filebuf fb_;
 
        /// gz_ is only used to open files, the stream is accessed through is.
        gz::gzstreambuf gz_;
 
        /// the stream that we use.
-       std::istream is;
+       istream is;
        ///
-       std::string name;
+       string name;
        ///
        keyword_item * table;
        ///
        int no_items;
        ///
-       std::string buff;
+       string buff;
        ///
        int status;
        ///
        int lineno;
        ///
-       std::string pushTok;
+       string pushTok;
        ///
        char commentChar;
 private:
@@ -124,7 +125,7 @@ private:
                int table_siz;
        };
        ///
-       std::stack<pushed_table> pushed;
+       stack<pushed_table> pushed;
 };
 
 
@@ -132,7 +133,7 @@ private:
 namespace {
 
 class compare_tags
-       : public std::binary_function<keyword_item, keyword_item, bool> {
+       : public binary_function<keyword_item, keyword_item, bool> {
 public:
        // used by lower_bound, sort and sorted
        bool operator()(keyword_item const & a, keyword_item const & b) const
@@ -669,7 +670,7 @@ void Lexer::printError(string const & message) const
 }
 
 
-bool Lexer::setFile(support::FileName const & filename)
+bool Lexer::setFile(FileName const & filename)
 {
        return pimpl_->setFile(filename);
 }
@@ -840,7 +841,7 @@ void Lexer::pushToken(string const & pt)
 
 Lexer::operator void const *() const
 {
-       // This behaviour is NOT the same as the std::streams which would
+       // This behaviour is NOT the same as the streams which would
        // use fail() here. However, our implementation of getString() et al.
        // can cause the eof() and fail() bits to be set, even though we
        // haven't tried to read 'em.
@@ -854,7 +855,7 @@ bool Lexer::operator!() const
 }
 
 
-Lexer & Lexer::operator>>(std::string & s)
+Lexer & Lexer::operator>>(string & s)
 {
        if (isOK()) {
                next();
@@ -929,7 +930,7 @@ Lexer & Lexer::operator>>(bool & s)
 /// quotes a string, e.g. for use in preferences files or as an argument of the "log" dialog
 string const Lexer::quoteString(string const & arg)
 {
-       std::ostringstream os;
+       ostringstream os;
        os << '"' << subst(subst(arg, "\\", "\\\\"), "\"", "\\\"") << '"';
        return os.str();
 }