From: Lars Gullik Bjønnes Date: Mon, 28 Jul 2003 12:47:20 +0000 (+0000) Subject: correct magic for gzip and compress X-Git-Tag: 1.6.10~16419 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=618ad871409354f871d0bcffdd727307f867d48e;p=features.git correct magic for gzip and compress git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7412 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/support/ChangeLog b/src/support/ChangeLog index bbd9ad4366..f8f3627e32 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,6 +1,11 @@ 2003-07-28 Lars Gullik Bjønnes - * gzstream.h: new file + * filetools.C (getExtFromContents): correct magic for gzip and + compress. + + * path_defines.[Ch]: move lyx_localedir out of anon namespace + + * gzstream.h: new fileq * gzstream.C: new file diff --git a/src/support/filetools.C b/src/support/filetools.C index b7f4eea293..99d2420407 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -955,9 +955,9 @@ string const GetExtension(string const & name) // ...static char *... // XWD \000\000\000\151 (0x00006900) decimal 105 // -// GZIP \037\213\010\010... http://www.ietf.org/rfc/rfc1952.txt +// GZIP \037\213 http://www.ietf.org/rfc/rfc1952.txt // ZIP PK... http://www.halyava.ru/document/ind_arch.htm -// Z \037\177 UNIX compress +// Z \037\235 UNIX compress /// return the "extension" which belongs to the contents. /// for no knowing contents return the extension. Without @@ -975,13 +975,13 @@ string const getExtFromContents(string const & filename) return string(); // gnuzip - string const gzipStamp = "\037\213\010\010"; + string const gzipStamp = "\037\213"; // PKZIP string const zipStamp = "PK"; // compress - string const compressStamp = "\037\177"; + string const compressStamp = "\037\235"; // Maximum strings to read int const max_count = 50;