]> git.lyx.org Git - features.git/commitdiff
fix read problems on win32
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 21 Jun 2001 10:55:48 +0000 (10:55 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 21 Jun 2001 10:55:48 +0000 (10:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2139 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/LaTeX.C
src/support/ChangeLog
src/support/filetools.C

index 55f9e2535338e448dc38dc3f4851ddcc4668993d..47b70bd4eff52644a7e205cba8be0453aa214827 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-20  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * LaTeX.C (scanAuxFile):
+       (deplog): remove trailing \r when reading stream (useful under
+       win32)  
+
 2001-06-15  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * BufferView_pimpl.C (fitCursor): emit a signal updateParagraph.
index a8106ccf2fd5f4ff3f811f22d8e967b8834441c5..d2e152cc06de9dce164f51c648225f3a2cab5090 100644 (file)
@@ -407,6 +407,7 @@ void LaTeX::scanAuxFile(string const & file, Aux_Info & aux_info)
        LRegex reg4("\\\\@input\\{([^}]+)\\}");
 
        while (getline(ifs, token)) {
+               token = strip(token, '\r');
                if (reg1.exact_match(token)) {
                        LRegex::SubMatches const & sub = reg1.exec(token);
                        string data = LSubstring(token, sub[1].first,
@@ -645,6 +646,7 @@ void LaTeX::deplog(DepTable & head)
                string foundfile;
                string token;
                getline(ifs, token);
+               token = strip(token, '\r');
                if (token.empty()) continue;
                
                if (reg1.exact_match(token)) {
index 6e804ed00d8deeae697cb9b0de3402106f15e9ec..38661281ace2120a13aaaf896c2a0cacd64b8fd0 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-20  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * filetools.C (findtexfile): strip final \r if necessary (for
+       cygwin)
+
 2001-06-19  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FileInfo.C:
index 10335730aac05a05de296288debc686638ebdd97..9ced099097b83d47669d1f33a8e0ff976637fe54 100644 (file)
@@ -1072,7 +1072,10 @@ findtexfile(string const & fil, string const & /*format*/)
         lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"
                             << "kpse result = `" << strip(c.second, '\n') 
                             << "'" << endl;
-        return c.first != -1 ? strip(c.second, '\n') : string();
+       if (c.first != -1) 
+               return strip(strip(c.second, '\n'), '\r');
+       else
+               return string();
 }