]> git.lyx.org Git - lyx.git/blobdiff - src/Chktex.C
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / Chktex.C
index 4f2fc6c6ae8bc36f3ed3526a4e5ddeacfaf398a2..6ae01d7df850bc8c83da896f489fd957db0dad66 100644 (file)
 
 #include "LaTeX.h" // TeXErrors
 
-#include "support/BoostFormat.h"
+#include "support/convert.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
-#include "support/lyxlib.h"
 #include "support/systemcall.h"
 
+#include <boost/format.hpp>
+
 #include <fstream>
 
-using lyx::support::atoi;
-using lyx::support::ChangeExtension;
-using lyx::support::OnlyFilename;
+using lyx::support::changeExtension;
+using lyx::support::onlyFilename;
 using lyx::support::split;
 using lyx::support::Systemcall;
 
@@ -43,7 +43,7 @@ Chktex::Chktex(string const & chktex, string const & f, string const & p)
 int Chktex::run(TeXErrors &terr)
 {
        // run bibtex
-       string log = OnlyFilename(ChangeExtension(file, ".log"));
+       string log = onlyFilename(changeExtension(file, ".log"));
        string tmp = cmd + " -q -v0 -b0 -x " + file + " -o " + log;
        Systemcall one;
        int result = one.startscript(Systemcall::Wait, tmp);
@@ -61,12 +61,12 @@ int Chktex::scanLogFile(TeXErrors & terr)
        string token;
        int retval = 0;
 
-       string const tmp = OnlyFilename(ChangeExtension(file, ".log"));
+       string const tmp = onlyFilename(changeExtension(file, ".log"));
 
 #if USE_BOOST_FORMAT
-       boost::format msg(_("ChkTeX warning id # %1$d"));
+       boost::format msg(lyx::to_utf8(_("ChkTeX warning id # %1$d")));
 #else
-       string const msg(_("ChkTeX warning id # "));
+       string const msg(lyx::to_utf8(_("ChkTeX warning id # ")));
 #endif
        ifstream ifs(tmp.c_str());
        while (getline(ifs, token)) {
@@ -81,7 +81,7 @@ int Chktex::scanLogFile(TeXErrors & terr)
                token = split(token, warno, ':');
                token = split(token, warning, ':');
 
-               int const lineno = atoi(line);
+               int const lineno = convert<int>(line);
 
 #if USE_BOOST_FORMAT
                msg % warno;