]> git.lyx.org Git - lyx.git/blobdiff - src/Chktex.C
bug 183
[lyx.git] / src / Chktex.C
index 87a8c18972b34c038a4f93d57dfbf646d6823da1..1193c7590a72eb39c9ba92f13ef25b3dd2c75a4b 100644 (file)
@@ -3,7 +3,7 @@
  * 
  *           LyX, The Document Processor        
  *          Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  *           This file is Copyright 1997-1998
  *           Asger Alstrup
 
 #include <config.h>
 
-#include <fstream>
-#include <cstdlib> // atoi
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
 #include "Chktex.h"
 #include "LaTeX.h" // TeXErrors
-#include "support/filetools.h"
 #include "lyxlex.h"
-#include "support/FileInfo.h"
 #include "debug.h"
+#include "gettext.h"
+
+#include "support/FileInfo.h"
+#include "support/filetools.h"
 #include "support/syscall.h"
 #include "support/syscontr.h"
 #include "support/path.h"
-#include "gettext.h"
+#include "support/lstrings.h"
+
+#include <fstream>
 
 using std::ifstream;
 using std::getline;
@@ -69,14 +70,18 @@ int Chktex::scanLogFile(TeXErrors & terr)
 
        ifstream ifs(tmp.c_str());
        while (getline(ifs, token)) {
-               string srcfile, line, pos, warno, warning;
+               string srcfile;
+               string line;
+               string pos;
+               string warno;
+               string warning;
                token = split(token, srcfile, ':');
                token = split(token, line, ':');
                token = split(token, pos, ':');
                token = split(token, warno, ':');
                token = split(token, warning, ':');
 
-               int lineno = atoi(line.c_str());
+               int lineno = lyx::atoi(line);
                warno = _("ChkTeX warning id #") + warno;
                terr.insertError(lineno, warno, warning);
                ++retval;