please apply

HErbert

Kornel Benko wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> 
> On Sunday, 7. April 2002 12:15, you wrote:
> 
>>please, try the patch
>>
>>herbert
>>
> 
> Yes, this is working. Of course, the view-creation
> (due to convert) is very slow.





-- 
http://www.lyx.org/help/
Index: src/support/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/ChangeLog,v
retrieving revision 1.93
diff -u -r1.93 ChangeLog
--- src/support/ChangeLog       6 Apr 2002 13:01:03 -0000       1.93
+++ src/support/ChangeLog       7 Apr 2002 10:44:39 -0000
@@ -1,3 +1,7 @@
+2002-04-07  Herbert Voss  <[EMAIL PROTECTED]>
+
+       * filetools.C: fix bug for eps. scans now a whole line
+
 2002-04-06  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
        * lyxstring.C (operator>>): use the better solution, this fixes a
Index: src/support/filetools.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/filetools.C,v
retrieving revision 1.113
diff -u -r1.113 filetools.C
--- src/support/filetools.C     6 Apr 2002 12:42:42 -0000       1.113
+++ src/support/filetools.C     7 Apr 2002 10:44:39 -0000
@@ -997,7 +997,8 @@
 // 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
@@ -1013,6 +1014,7 @@
        if (filename.empty() || !IsFileReadable(filename))
                return string();
 
+       
        ifstream ifs(filename.c_str());
        if (!ifs)
                // Couldn't open file...
@@ -1041,10 +1043,8 @@
                                << endl;
                        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
@@ -1089,7 +1089,7 @@
                            format =  "sgi";
                        else if ((stamp == "II") || (stamp == "MM"))
                            format =  "tiff";
-                       else if (str == "%TGIF")
+                       else if (prefixIs(str,"%TGIF"))
                            format =  "tgif";
                        else if (prefixIs(str,"GIF"))
                            format =  "gif";
@@ -1130,7 +1130,7 @@
                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"))

Reply via email to