Compare commits
50 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84eb878fde | ||
|
|
361c597926 | ||
|
|
b5e7e8ad78 | ||
|
|
f3f71a3912 | ||
|
|
dd50e2c596 | ||
|
|
dfd32ae64a | ||
|
|
14e2dfc0be | ||
|
|
19d32295b0 | ||
|
|
7f92fb8f85 | ||
|
|
5294339952 | ||
|
|
dd699fcea0 | ||
|
|
71da4bdc7a | ||
|
|
0aec8b6a90 | ||
|
|
582551fa27 | ||
|
|
41f8ff65d1 | ||
|
|
9f705f938a | ||
|
|
fa7de8d6f3 | ||
|
|
6ea3602b26 | ||
|
|
e9777c64a4 | ||
|
|
e63467d05b | ||
|
|
e415748290 | ||
|
|
8542e8ffce | ||
|
|
e74dfcba7f |
||
|
|
234ef2f962 | ||
|
|
584e64c725 | ||
|
|
0803f12fbb |
||
|
|
60ae2ce942 | ||
|
|
98cc1a1d3c | ||
|
|
b249f01645 | ||
|
|
b97bedaf6d | ||
|
|
63422a2ad5 | ||
|
|
04c9c7f7d6 | ||
|
|
10240b028b | ||
|
|
6d3ae147c4 | ||
|
|
b2da604f2d | ||
|
|
77b8dce611 | ||
|
|
a2da04536e | ||
|
|
895c42e6bf | ||
|
|
702ea5bfd2 | ||
|
|
31ea804e15 | ||
|
|
bf02b1e6cb | ||
|
|
3ac51cd2dd | ||
|
|
512caf8088 | ||
|
|
1bb64d8c75 | ||
|
|
e20fb4d274 | ||
|
|
ddaa8dd3d8 | ||
|
|
dbbac3172b | ||
|
|
7d1e3370f2 | ||
|
|
7f15469303 | ||
|
|
2858a11e49 |
9 changed files with 432 additions and 40 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
15
50_antiword-manpage-hyphen-to-minus.patch
Normal file
15
50_antiword-manpage-hyphen-to-minus.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Description: Fix hyphen in antiword.1 to be a minus
|
||||
Author: Olly Betts <olly@survex.com>
|
||||
Last-Update: 2011-11-26
|
||||
|
||||
--- antiword-0.37.orig/Docs/antiword.1
|
||||
+++ antiword-0.37/Docs/antiword.1
|
||||
@@ -108,7 +108,7 @@ file that cannot be opened for reading.
|
||||
Antiword uses the environment variable ``ANTIWORDHOME'' as the first directory
|
||||
to look for its files. Antiword uses the environment variable ``HOME'' to find
|
||||
the user's home directory. When in text mode it uses the variable ``COLUMNS''
|
||||
-to set the width of the output (unless overridden by the -w option).
|
||||
+to set the width of the output (unless overridden by the \-w option).
|
||||
|
||||
Antiword uses the environment variables ``LC_ALL'', ``LC_CTYPE'' and ``LANG''
|
||||
(in that order) to get the current locale and uses this information to
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: antiword
|
||||
# $Id$
|
||||
NAME := antiword
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- ./Makefile.gege Sat Jul 21 21:58:03 2001
|
||||
+++ ./Makefile Mon Oct 15 16:56:48 2001
|
||||
+++ ./Makefile.Linux Mon Oct 15 16:56:48 2001
|
||||
@@ -8,7 +8,7 @@
|
||||
# must be equal to DEBUG or NDEBUG
|
||||
DB = NDEBUG
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
From a17e48746d7203f91a2c3bb1cdcbe9023c8d37a0 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Keil <fk () fabiankeil de>
|
||||
Date: Tue, 25 Nov 2014 18:58:52 +0100
|
||||
Subject: [PATCH] bGetPPS(): Prevent overflow of atPPSlist[].szName[]
|
||||
|
||||
---
|
||||
wordole.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/wordole.c b/wordole.c
|
||||
index 8a95fb9..7797d1f 100644
|
||||
--- a/wordole.c
|
||||
+++ b/wordole.c
|
||||
@@ -259,6 +259,11 @@ bGetPPS(FILE *pFile,
|
||||
}
|
||||
tNameSize = (size_t)usGetWord(0x40, aucBytes);
|
||||
tNameSize = (tNameSize + 1) / 2;
|
||||
+ if (tNameSize >= sizeof(atPPSlist[0].szName)) {
|
||||
+ werr(0, "PPS %d appears to be invalid.", iIndex);
|
||||
+ atPPSlist = xfree(atPPSlist);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
|
||||
atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
|
||||
if (atPPSlist[iIndex].ucType == 5) {
|
||||
--
|
||||
2.1.2
|
||||
|
||||
11
antiword.sh
Normal file
11
antiword.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
# a shell wrapper to make 'antiword' usage reasonable on UTF-8 systems.
|
||||
#
|
||||
# Michal Jaegermann, michal@harddata.com, 2004/Nov/03
|
||||
# - simplify and we may be printing on a Postcript printer
|
||||
# - so do not use -i0, 2006/May/08
|
||||
|
||||
echo "$@" | egrep -q -- '-p|-a' && lang="env LANG=${LANG%%.*}"
|
||||
$lang antiword.bin "$@"
|
||||
exit
|
||||
173
antiword.spec
173
antiword.spec
|
|
@ -1,43 +1,54 @@
|
|||
Summary: MS Word to ASCII/Postscript converter
|
||||
Name: antiword
|
||||
Version: 0.37
|
||||
Release: 3
|
||||
Source: http://www.winfield.demon.nl/linux/%{name}-%{version}.tar.gz
|
||||
Release: 43%{?dist}
|
||||
Source0: http://www.winfield.demon.nl/linux/%{name}-%{version}.tar.gz
|
||||
Source1: antiword.sh
|
||||
URL: http://www.winfield.demon.nl/
|
||||
Patch0: antiword-0.32-fix-flags.patch
|
||||
License: GPL
|
||||
Group: Applications/Text
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Patch1: http://seclists.org/oss-sec/2014/q4/att-870/antiword-bGetPPS-Prevent-buffer-overflow-of-atPPSlist-_szName.diff
|
||||
Patch2: 50_antiword-manpage-hyphen-to-minus.patch
|
||||
Patch3: docx.patch
|
||||
Patch4: remove-cjb.net-references.patch
|
||||
# Automatically converted from old format: GPLv2+ - review is highly recommended.
|
||||
License: GPL-2.0-or-later
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
|
||||
%description
|
||||
Antiword is a free MS-Word reader for Linux, BeOS and RISC OS. It converts
|
||||
the documets from Word 6, 7, 97 and 2000 to ASCII and Postscript. Antiword
|
||||
the documents from Word 6, 7, 97 and 2000 to ASCII and Postscript. Antiword
|
||||
tries to keep the layout of the document intact.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0
|
||||
%patch -P0 -p0
|
||||
%patch -P1 -p1
|
||||
%patch -P2 -p1
|
||||
%patch -P3 -p1
|
||||
%patch -P4 -p1
|
||||
%{__chmod} a+r * Resources/* Docs/*
|
||||
|
||||
%build
|
||||
OPT="$RPM_OPT_FLAGS" make all %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_bindir}
|
||||
%{__install} -m 755 antiword $RPM_BUILD_ROOT%{_bindir}
|
||||
%{__install} -m 755 antiword $RPM_BUILD_ROOT%{_bindir}/antiword.bin
|
||||
%{__install} -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/antiword
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -a Resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
%{__cp} Docs/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
%{__chmod} 644 kantiword
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
iconv -f iso-8859-1 -t utf-8 Docs/antiword.php > Docs/antiword.php.utf8
|
||||
iconv -f iso-8859-1 -t utf-8 Docs/Netscape > Docs/Netscape.utf8
|
||||
%{__mv} Docs/antiword.php.utf8 Docs/antiword.php
|
||||
%{__mv} Docs/Netscape.utf8 Docs/Netscape
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc Docs/COPYING Docs/FAQ Docs/ReadMe Docs/Netscape Docs/ChangeLog
|
||||
%license Docs/COPYING
|
||||
%doc Docs/FAQ Docs/ReadMe Docs/Netscape Docs/ChangeLog
|
||||
%doc Docs/Exmh Docs/Mozilla Docs/QandA Docs/Mutt Docs/antiword.php
|
||||
%doc Docs/Emacs Docs/History kantiword
|
||||
%{_bindir}/*
|
||||
|
|
@ -45,6 +56,132 @@ OPT="$RPM_OPT_FLAGS" make all %{?_smp_mflags}
|
|||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-43
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-42
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-41
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2024 Miroslav Suchý <msuchy@redhat.com> - 0.37-40
|
||||
- convert license to SPDX
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-39
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-38
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-37
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-36
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-35
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-34
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-33
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-32
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-31
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-30
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-28
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-27
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-26
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Thu Jul 19 2018 Adrian Reber <adrian@lisas.de> - 0.37-25
|
||||
- Added BR: gcc
|
||||
- Added three patches from the debian package
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-24
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.37-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Tue Dec 02 2014 Adrian Reber <adrian@lisas.de> - 0.37-17
|
||||
- added patch for "CVE-2014-8123 antiword: buffer overflow of atPPSlist[].szName[]" (#1169665)
|
||||
- fixed dates in changelog
|
||||
|
||||
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sun Apr 06 2008 Adrian Reber <adrian@lisas.de> - 0.37-7
|
||||
- added wrapper script from Michal Jaegermann to better
|
||||
handle UTF input files (#191060)
|
||||
|
||||
* Tue Feb 12 2008 Adrian Reber <adrian@lisas.de> - 0.37-6
|
||||
- rebuilt for gcc43
|
||||
|
||||
* Wed Dec 12 2007 Adrian Reber <adrian@lisas.de> - 0.37-5
|
||||
- rebuilt for EL-5 branch
|
||||
- added dist tag
|
||||
- fixed a few rpmlint warnings
|
||||
|
||||
* Fri Aug 24 2007 Adrian Reber <adrian@lisas.de> - 0.37-4
|
||||
- rebuilt
|
||||
|
||||
* Mon Sep 11 2006 Adrian Reber <adrian@lisas.de> - 0.37-3
|
||||
- rebuilt
|
||||
|
||||
|
|
@ -57,7 +194,7 @@ OPT="$RPM_OPT_FLAGS" make all %{?_smp_mflags}
|
|||
* Tue May 10 2005 Adrian Reber <adrian@lisas.de> - 0.36.1-2
|
||||
- updated to 0.36.1
|
||||
|
||||
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
|
||||
* Thu Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
|
||||
- rebuilt
|
||||
|
||||
* Thu Feb 03 2005 Adrian Reber <adrian@lisas.de> - 0:0.36-1
|
||||
|
|
@ -68,10 +205,10 @@ OPT="$RPM_OPT_FLAGS" make all %{?_smp_mflags}
|
|||
- better spec file
|
||||
|
||||
* Wed Apr 23 2003 Adrian Reber <adrian@lisas.de> - 0.33-0.fdr.2
|
||||
- s/$RPM_BUILD_ROOT/%{buildroot}/
|
||||
- s/$RPM_BUILD_ROOT/%%{buildroot}/
|
||||
- Epoch:0 added
|
||||
- make %{?_smp_mflags}
|
||||
- removed unnecessary Prefix: %{_prefix}
|
||||
- make %%{?_smp_mflags}
|
||||
- removed unnecessary Prefix: %%{_prefix}
|
||||
- fixed group
|
||||
- applied more of the fedora spec template
|
||||
|
||||
|
|
|
|||
182
docx.patch
Normal file
182
docx.patch
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
Description: Try to reduce confusion around docx files
|
||||
Now also checks for XML files and HTML files
|
||||
Author: Olly Betts <olly@survex.com>
|
||||
Bug-Debian: https://bugs.debian.org/758959
|
||||
Bug-Debian: https://bugs.debian.org/791532
|
||||
Forwarded: no
|
||||
Last-Update: 2015-01-11
|
||||
|
||||
--- a/Docs/antiword.1
|
||||
+++ b/Docs/antiword.1
|
||||
@@ -14,7 +14,11 @@
|
||||
.br
|
||||
A wordfile named - stands for a Word document read from the standard input.
|
||||
.br
|
||||
-Only documents made by MS Word version 2 and version 6 or later are supported.
|
||||
+Only the binary format documents made by MS Word version 2, 6, 7, 97, 2000 and
|
||||
+2003 are supported. Newer Word versions default to using a completely
|
||||
+different format consisting of XML files in a ZIP container (usually with a
|
||||
+".docx" file extension) which antiword doesn't support. It also doesn't
|
||||
+support the "flat" XML format which MS Word 2003 supported.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI "\-a " papersize
|
||||
--- a/antiword.h
|
||||
+++ b/antiword.h
|
||||
@@ -695,6 +695,9 @@
|
||||
extern BOOL bIsWordForDosFile(FILE *, long);
|
||||
extern BOOL bIsRtfFile(FILE *);
|
||||
extern BOOL bIsWordPerfectFile(FILE *);
|
||||
+extern BOOL bIsZipFile(FILE *);
|
||||
+extern BOOL bIsXMLFile(FILE *);
|
||||
+extern BOOL bIsHTMLFile(FILE *);
|
||||
extern BOOL bIsWinWord12File(FILE *, long);
|
||||
extern BOOL bIsMacWord45File(FILE *);
|
||||
extern int iGuessVersionNumber(FILE *, long);
|
||||
--- a/main_u.c
|
||||
+++ b/main_u.c
|
||||
@@ -187,10 +187,29 @@
|
||||
werr(0, "%s is not a Word Document."
|
||||
" It is probably a Rich Text Format file",
|
||||
szFilename);
|
||||
- } if (bIsWordPerfectFile(pFile)) {
|
||||
+ } else if (bIsWordPerfectFile(pFile)) {
|
||||
werr(0, "%s is not a Word Document."
|
||||
" It is probably a Word Perfect file",
|
||||
szFilename);
|
||||
+ } else if (bIsZipFile(pFile)) {
|
||||
+ werr(0, "%s is not a Word Document."
|
||||
+ " It seems to be a ZIP file, so is probably"
|
||||
+ " an OpenDocument file, or a \"docx\" file"
|
||||
+ " from MS Word 2007 or newer"
|
||||
+ " (antiword only handles binary format"
|
||||
+ " documents from MS Word 2003 and earlier)",
|
||||
+ szFilename);
|
||||
+ } else if (bIsXMLFile(pFile)) {
|
||||
+ werr(0, "%s is not a Word Document."
|
||||
+ " It seems to be an XML file, perhaps"
|
||||
+ " the XML format from MS Word 2003"
|
||||
+ " (antiword only handles binary format"
|
||||
+ " documents from MS Word 2003 and earlier)",
|
||||
+ szFilename);
|
||||
+ } else if (bIsHTMLFile(pFile)) {
|
||||
+ werr(0, "%s is not a Word Document."
|
||||
+ " It is probably an HTML file",
|
||||
+ szFilename);
|
||||
} else {
|
||||
#if defined(__dos)
|
||||
werr(0, "%s is not a Word Document or the filename"
|
||||
--- a/wordlib.c
|
||||
+++ b/wordlib.c
|
||||
@@ -41,7 +41,7 @@
|
||||
BOOL
|
||||
bIsWordForDosFile(FILE *pFile, long lFilesize)
|
||||
{
|
||||
- static UCHAR aucBytes[] =
|
||||
+ static const UCHAR aucBytes[] =
|
||||
{ 0x31, 0xbe, 0x00, 0x00, 0x00, 0xab }; /* Word for DOS */
|
||||
|
||||
DBG_MSG("bIsWordForDosFile");
|
||||
@@ -64,7 +64,7 @@
|
||||
static BOOL
|
||||
bIsWordFileWithOLE(FILE *pFile, long lFilesize)
|
||||
{
|
||||
- static UCHAR aucBytes[] =
|
||||
+ static const UCHAR aucBytes[] =
|
||||
{ 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1 };
|
||||
int iTailLen;
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
BOOL
|
||||
bIsRtfFile(FILE *pFile)
|
||||
{
|
||||
- static UCHAR aucBytes[] =
|
||||
+ static const UCHAR aucBytes[] =
|
||||
{ '{', '\\', 'r', 't', 'f', '1' };
|
||||
|
||||
DBG_MSG("bIsRtfFile");
|
||||
@@ -122,7 +122,7 @@
|
||||
BOOL
|
||||
bIsWordPerfectFile(FILE *pFile)
|
||||
{
|
||||
- static UCHAR aucBytes[] =
|
||||
+ static const UCHAR aucBytes[] =
|
||||
{ 0xff, 'W', 'P', 'C' };
|
||||
|
||||
DBG_MSG("bIsWordPerfectFile");
|
||||
@@ -131,13 +131,65 @@
|
||||
} /* end of bIsWordPerfectFile */
|
||||
|
||||
/*
|
||||
+ * This function checks whether the given file is or is not a ZIP file
|
||||
+ */
|
||||
+BOOL
|
||||
+bIsZipFile(FILE *pFile)
|
||||
+{
|
||||
+ static const UCHAR aucBytes[] =
|
||||
+ { 'P', 'K', 0x03, 0x04 };
|
||||
+
|
||||
+ DBG_MSG("bIsZipFile");
|
||||
+
|
||||
+ return bCheckBytes(pFile, aucBytes, elementsof(aucBytes));
|
||||
+} /* end of bIsZipFile */
|
||||
+
|
||||
+/*
|
||||
+ * This function checks whether the given file is or is not a XML file
|
||||
+ */
|
||||
+BOOL
|
||||
+bIsXMLFile(FILE *pFile)
|
||||
+{
|
||||
+ static const UCHAR aucBytes[] =
|
||||
+ { '<', '?', 'x', 'm', 'l' };
|
||||
+
|
||||
+ DBG_MSG("bIsXMLFile");
|
||||
+
|
||||
+ return bCheckBytes(pFile, aucBytes, elementsof(aucBytes));
|
||||
+} /* end of bIsXMLFile */
|
||||
+
|
||||
+/*
|
||||
+ * This function checks whether the given file is or is not a HTML file
|
||||
+ */
|
||||
+BOOL
|
||||
+bIsHTMLFile(FILE *pFile)
|
||||
+{
|
||||
+ static const UCHAR aucBytes[2][5] = {
|
||||
+ { '<', 'h', 't', 'm', 'l' },
|
||||
+ { '<', 'H', 'T', 'M', 'L' },
|
||||
+ };
|
||||
+ int iIndex;
|
||||
+
|
||||
+ DBG_MSG("bIsHTMLFile");
|
||||
+
|
||||
+ for (iIndex = 0; iIndex < (int)elementsof(aucBytes); iIndex++) {
|
||||
+ if (bCheckBytes(pFile,
|
||||
+ aucBytes[iIndex],
|
||||
+ elementsof(aucBytes[iIndex]))) {
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+} /* end of bIsHTMLFile */
|
||||
+
|
||||
+/*
|
||||
* This function checks whether the given file is or is not a "Win Word 1 or 2"
|
||||
* document
|
||||
*/
|
||||
BOOL
|
||||
bIsWinWord12File(FILE *pFile, long lFilesize)
|
||||
{
|
||||
- static UCHAR aucBytes[2][4] = {
|
||||
+ static const UCHAR aucBytes[2][4] = {
|
||||
{ 0x9b, 0xa5, 0x21, 0x00 }, /* Win Word 1.x */
|
||||
{ 0xdb, 0xa5, 0x2d, 0x00 }, /* Win Word 2.0 */
|
||||
};
|
||||
@@ -171,7 +223,7 @@
|
||||
BOOL
|
||||
bIsMacWord45File(FILE *pFile)
|
||||
{
|
||||
- static UCHAR aucBytes[2][6] = {
|
||||
+ static const UCHAR aucBytes[2][6] = {
|
||||
{ 0xfe, 0x37, 0x00, 0x1c, 0x00, 0x00 }, /* Mac Word 4 */
|
||||
{ 0xfe, 0x37, 0x00, 0x23, 0x00, 0x00 }, /* Mac Word 5 */
|
||||
};
|
||||
40
remove-cjb.net-references.patch
Normal file
40
remove-cjb.net-references.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
Description: Remove cjb.net references
|
||||
The domain has been let lapse and is now a holding page.
|
||||
Author: Olly Betts <olly@survex.com>
|
||||
Forwarded: no
|
||||
Last-Update: 2016-01-11
|
||||
|
||||
--- antiword-0.37.orig/Docs/ReadMe
|
||||
+++ antiword-0.37/Docs/ReadMe
|
||||
@@ -101,7 +101,6 @@ Most recent version
|
||||
|
||||
Most recent version of Antiword can be found on the author's website:
|
||||
==>> http://www.winfield.demon.nl/index.html <<==
|
||||
-==>> http://antiword.cjb.net/ <<==
|
||||
|
||||
|
||||
Author
|
||||
@@ -109,6 +108,5 @@ Author
|
||||
|
||||
The author can be reached by e-mail:
|
||||
antiword@winfield.demon.nl
|
||||
-comments@antiword.cjb.net
|
||||
|
||||
But PLEASE read the FAQ before you write!!
|
||||
--- antiword-0.37.orig/Docs/antiword.1
|
||||
+++ antiword-0.37/Docs/antiword.1
|
||||
@@ -125,14 +125,8 @@ PostScript output is only available in I
|
||||
The most recent released version of Antiword is always available from:
|
||||
.br
|
||||
http://www.winfield.demon.nl/index.html
|
||||
-.br
|
||||
-or try
|
||||
-.br
|
||||
-http://antiword.cjb.net/
|
||||
.SH AUTHOR
|
||||
Adri van Os <antiword@winfield.demon.nl>
|
||||
-.br
|
||||
-or try <comments@antiword.cjb.net>
|
||||
.sp
|
||||
R.F. Smith <rsmith@xs4all.nl> and
|
||||
.br
|
||||
Loading…
Add table
Add a link
Reference in a new issue