From 391fa7a9495b0d5534600daa5a0b968f52d99ff1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sun, 7 Apr 2002 15:31:16 +0000 Subject: [PATCH] parch from Herbert git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3931 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 4 ++++ src/support/filetools.C | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index e61fc01c14..6b14f8c1ba 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2002-04-07 Herbert Voss + + * filetools.C: fix bug for eps. scans now a whole line + 2002-04-06 Lars Gullik Bjønnes * lyxstring.C (operator>>): use the better solution, this fixes a diff --git a/src/support/filetools.C b/src/support/filetools.C index 878e1e7b7b..b95b23c767 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -997,7 +997,8 @@ string const GetExtension(string const & name) // TGIF %TGIF... // TIFF II... or MM... // XBM ..._bits[]... -// XPM /* XPM */ +// XPM /* XPM */ sometimes missing (f.ex. tgif-export) +// ...static char *... // XWD \000\000\000\151 (0x00006900) decimal 105 // // GZIP \037\213\010\010... http://www.ietf.org/rfc/rfc1952.txt @@ -1042,9 +1043,9 @@ string const getExtFromContents(string const & filename) break; } - ifs >> str; - lyxerr[Debug::GRAPHICS] - << "Scanstring: " << str << endl; + getline(ifs, str); + lyxerr[Debug::GRAPHICS] << "Scanstring: " << str << endl; + string const stamp = str.substr(0,2); if (firstLine && str.size() >= 2) { // at first we check for a zipped file, because this @@ -1130,7 +1131,7 @@ string const getExtFromContents(string const & filename) else if (contains(str,"_bits[]")) format = "xbm"; - else if (contains(str,"XPM")) + else if (contains(str,"XPM") || contains(str, "static char *")) format = "xpm"; else if (contains(str,"BITPIX")) -- 2.39.2