]> www.wagner.pp.ru Git - oss/catdoc.git/commitdiff
Now searches root entry by entry type, not by name
authorVictor Wagner <vitus@wagner.pp.ru>
Sat, 25 Feb 2006 15:28:14 +0000 (15:28 +0000)
committerVictor Wagner <vitus@wagner.pp.ru>
Sat, 25 Feb 2006 15:28:14 +0000 (15:28 +0000)
configure.in
src/makefile.tc
src/ole.c

index d1b2d4c313b10a2500242fc33a2f1dd47d9a54b9..4735c3ad5095982fa309dbd486bb48dc1b0ee80a 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(acconfig.h)
-catdoc_version=0.94.1
+catdoc_version=0.94.2
 dnl Checks for programs.
 AC_PROG_CC
 case ${CC} in
index 53f8df17e663e40667d45a110bd38016e206749b..aeaa6544197d88a1b53d1285f8e18c54f60a6373 100644 (file)
@@ -1,7 +1,7 @@
 CC=tcc
 TCDIR=c:\tc
 LIB=$(TCDIR)\lib
-CFLAGS=-v -w -mc -DHAVE_LANGINFO -DHAVE_STRDUP -DCATDOC_VERSION="0.94.1"
+CFLAGS=-v -w -mc -DHAVE_LANGINFO -DHAVE_STRDUP -DCATDOC_VERSION="0.94.2"
 OBJ=charsets.obj substmap.obj reader.obj writer.obj fileutil.obj langinfo.obj analyze.obj confutil.obj rtfread.obj numutils.obj sheet.obj xlsparse.obj ole.obj strftime.obj pptparse.obj
 .c.obj:
        $(CC) -v -c -mc -I../compat  $(CFLAGS) $*
index ff21a30e587c4d5f735fec4ba548b07ced0c1d46..9931b579cea2fc7a48cc4e536c316d519347f80a 100644 (file)
--- a/src/ole.c
+++ b/src/ole.c
@@ -2,7 +2,7 @@
  * @file   ole.c
  * @author Alex Ott, Victor B Wagner
  * @date   Wed Jun 11 12:33:01 2003
- * Version: $Id: ole.c,v 1.1 2006-02-24 17:44:06 vitus Exp $
+ * Version: $Id: ole.c,v 1.2 2006-02-25 15:28:14 vitus Exp $
  * Copyright: Victor B Wagner, 1996-2003 Alex Ott, 2003
  * 
  * @brief  Parsing structure of MS Office compound document
@@ -243,7 +243,7 @@ FILE* ole_init(FILE *f, void *buffer, size_t bufSize)  {
        
 /* Find Root Entry */
        while((tEntry=(oleEntry*)ole_readdir(newfile)) != NULL) {
-               if (!tEntry->name[0]||strcmp(tEntry->name,"Root Entry") == 0) {
+               if (tEntry->type == oleRootDir ) {
                        rootEntry=tEntry;
                        break;
                }
@@ -252,8 +252,7 @@ FILE* ole_init(FILE *f, void *buffer, size_t bufSize)  {
        propCurNumber = 0;
        fseek(newfile, 0, SEEK_SET);
        if (!rootEntry) {
-               fprintf(stderr,"Cannot find root entry in this file!\n");
-               ole_finish();
+               fprintf(stderr,"Broken OLE structure. Cannot find root entry in this file!\n");         ole_finish();
                return NULL;
        }       
        return newfile;