diff -ruNd textproc/mswordview/patches/patch-ba textproc/mswordview/patches/patch-ba --- textproc/mswordview/patches/patch-ba Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-ba Fri Dec 10 04:23:20 1999 @@ -0,0 +1,12 @@ +--- doc_limits.c.orig Mon May 10 19:10:56 1999 ++++ doc_limits.c Fri Dec 10 04:21:45 1999 +@@ -43,8 +43,7 @@ + charset="utf-8"; + + if ((doc_style == NULL) || (doc_style->begin == NULL)) +- fprintf(outputfile,"\n\n\n\n\n",charset); ++ fprintf(outputfile,"\n\n\n\n\n",charset); + else + { + astring = expand_variables(doc_style->begin,NULL); diff -ruNd textproc/mswordview/patches/patch-bb textproc/mswordview/patches/patch-bb --- textproc/mswordview/patches/patch-bb Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bb Sun Dec 12 22:14:16 1999 @@ -0,0 +1,38 @@ +--- config-mswordview.orig Tue May 11 15:22:32 1999 ++++ config-mswordview Sun Dec 12 22:14:09 1999 +@@ -39,23 +39,21 @@ + Document + { + Start " +- +- +- $title +- +- " ++ ++ ++ $title ++ ++" + VTWIPS 76 + HTWIPS 76 + End "
+-

+- Document converted from ms word 8 by +- +- MSWordView($version)
+- MSWordView written by +- Caolan McNamara +- +- " ++


++ Document converted from ms word 8 by ++ ++ MSWordView($version)
++ MSWordView written by ++ Caolan McNamara and patched @BABOLO ++ " + } + + # A style configuration has the following syntax diff -ruNd textproc/mswordview/patches/patch-bc textproc/mswordview/patches/patch-bc --- textproc/mswordview/patches/patch-bc Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bc Fri Dec 10 22:33:17 1999 @@ -0,0 +1,20 @@ +--- config-test.orig Tue May 11 14:59:38 1999 ++++ config-test Fri Dec 10 22:32:35 1999 +@@ -39,12 +39,11 @@ + Document + { + Start " +- +- +- $title +- +- " ++ ++ ++ $title ++ ++" + VTWIPS 76 + HTWIPS 76 + End "
diff -ruNd textproc/mswordview/patches/patch-bd textproc/mswordview/patches/patch-bd --- textproc/mswordview/patches/patch-bd Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bd Sun Dec 12 21:08:32 1999 @@ -0,0 +1,13 @@ +--- oledecod/Makefile.in.orig Wed Apr 28 16:40:05 1999 ++++ oledecod/Makefile.in Sun Dec 12 21:07:10 1999 +@@ -16,6 +16,10 @@ + + all: oledecod.o + ++mstest: clean ++ $(CC) $(CFLAGS) -DVERBOSE=1 -c oledecod.c ++ $(CC) -o mstest oledecod.o demo.c ++ + %.o: %.c + $(CC) $(CFLAGS) -c $*.c + diff -ruNd textproc/mswordview/patches/patch-be textproc/mswordview/patches/patch-be --- textproc/mswordview/patches/patch-be Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-be Sun Dec 12 21:12:59 1999 @@ -0,0 +1,42 @@ +--- oledecod/demo.c.orig Wed Dec 2 17:23:39 1998 ++++ oledecod/demo.c Sun Dec 12 21:12:20 1999 +@@ -24,9 +24,38 @@ + + + #include ++#include "../mswordview.h" + +-#include ++#include "oledecod.h" + ++U8 sgetc(U8 *in) ++ { ++ return(*in); ++ } ++ ++U16 sread_16ubit(U8 *in) ++ { ++ U8 temp1,temp2; ++ U16 ret; ++ temp1 = *in; ++ temp2 = *(in+1); ++ ret = temp2; ++ ret = ret << 8; ++ ret += temp1; ++ return(ret); ++ } ++ ++U32 sread_32ubit(U8 *in) ++ { ++ U16 temp1,temp2; ++ U32 ret; ++ temp1 = sread_16ubit(in); ++ temp2 = sread_16ubit(in+2); ++ ret = temp2; ++ ret = ret << 16; ++ ret+=temp1; ++ return(ret); ++ } + + int + main (int argc, char **argv) diff -ruNd textproc/mswordview/patches/patch-bf textproc/mswordview/patches/patch-bf --- textproc/mswordview/patches/patch-bf Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bf Sun Dec 12 21:14:40 1999 @@ -0,0 +1,11 @@ +--- oledecod/oledecod.h.orig Wed Dec 2 17:23:40 1998 ++++ oledecod/oledecod.h Sun Dec 12 21:13:53 1999 +@@ -41,7 +41,7 @@ + + #include + +-#include ++#include "support.h" + + + struct pps_block diff -ruNd textproc/mswordview/patches/patch-bg textproc/mswordview/patches/patch-bg --- textproc/mswordview/patches/patch-bg Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bg Sun Dec 12 21:25:14 1999 @@ -0,0 +1,58 @@ +--- mswordview.c.orig Tue Jul 13 12:30:55 1999 ++++ mswordview.c Sun Dec 12 21:23:48 1999 +@@ -62,6 +62,7 @@ + /*end table*/ + + int notablewidth=0; ++int testonly=0; + + int list_author_key=0; + +@@ -268,7 +269,7 @@ + config_style *temp_styles; + /*end config stuff*/ + +- if (configfile != NULL) ++ if (configfile != NULL && !testonly) + { + in = fopen(configfile,"rb"); + if (in == NULL) +@@ -278,18 +279,19 @@ + if (in == NULL) + { + in = fopen(CONFIGFILE,"rb"); +- if (in == NULL) ++ if (in == NULL && !testonly) + fprintf(erroroutput,"Sorry, couldn't open config file %s\nnot a problem using internal defaults.\n",CONFIGFILE); + } + + if (mainfd == NULL) + { ++ if (testonly) {printf("-----\n"); exit(-1);}; + fprintf(erroroutput,"There was no document stream, this is probably not a word file at all\n"); + return(10); + } + + +- if (outputfilename == NULL) ++ if (outputfilename == NULL && !testonly) + { + outputfilename = malloc(strlen(filename) + strlen(".html") + 1); + if (outputfilename == NULL) +@@ -300,7 +302,7 @@ + sprintf(outputfilename,"%s%s",filename,".html"); + } + +- if (strcmp(outputfilename,"-")) ++ if (!testonly && strcmp(outputfilename,"-")) + { + outputfile = fopen(outputfilename,"w"); + if (outputfile == NULL) +@@ -321,6 +323,7 @@ + wvGetFIB(&fib,mainfd); + + /*begin from microsofts kb q 40*/ ++ if (testonly) {printf("%05d\n", fib.nFib); exit(0);}; + if (fib.nFib <101) + { + fprintf(erroroutput,"this is an unsupported (as of yet) pre word 6 doc, sorry\nthis converter is solely for word8 at the moment\n"); diff -ruNd textproc/mswordview/patches/patch-bh textproc/mswordview/patches/patch-bh --- textproc/mswordview/patches/patch-bh Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bh Fri Jan 7 19:14:18 2000 @@ -0,0 +1,77 @@ +--- main.c.orig Fri Jul 23 12:22:34 1999 ++++ main.c Fri Jan 7 19:08:05 2000 +@@ -44,6 +44,7 @@ + extern int riskbadole; + extern int NORMAL; + extern int notablewidth; ++extern int testonly; + extern int ignoreheadings; + extern int noheaders; + extern int doannos; +@@ -90,7 +91,7 @@ + "[--ignoreheadings] [-m] [--mainonly] [-b] [--riskbadole] [-e] [--nofontfaces]\n" + "[-o] [--outputfile] [-g erroroutputfile] [--errorfile erroroutputfile] \n" + "[-y tabvalue] [--tabsize tabvalue] [-i] [--imagesdir] [-j] [--imagesurl] [-k]\n" +- "[--notablewidth] [-a] [--noannotations] [-r] [--norevisions]\n" ++ "[--notablewidth] [-a] [--noannotations] [-r] [--norevisions] [-T]\n" + "[-x truetypedir] [--truetypedir truetypedir] [-z configfile] \n" + "[--configfile configfile] filename.doc\n"); + exit(-1); +@@ -146,6 +147,7 @@ + { "patternurl",1,0,'p'}, + { "tabsize",1,0,'y'}, + { "notablewidth",1,0,'k'}, ++ { "testonly",1,0,'T'}, + { "configfile",1,0,'z'}, + { "truetypedir",1,0,'x'}, + { 0, 0, 0, '0' }, +@@ -157,7 +159,7 @@ + + while (1) + { +- c = getopt_long (argc, argv, "abcd:ef:g:hi:j:kmno:p:rs:t:u:vw:x:y:z:", long_options, &index); ++ c = getopt_long (argc, argv, "abcd:ef:g:hi:j:kTmno:p:rs:t:u:vw:x:y:z:", long_options, &index); + if (c == -1) + break; + switch(c) +@@ -181,12 +183,18 @@ + } + break; + case 'v': +- printf("%s, by Caolan.McNamara@ul.ie\n\nWeb pages for updates exist at \nhttp://www.gnu.org/~caolan/docs/MSWordView.html\nhttp://www.csn.ul.ie/~caolan/docs/MSWordView.html\n\n", wv_version); ++ printf("%s, by Caolan.McNamara@ul.ie\n" ++ "@BABOLO patched\n\n" ++ "Web pages for updates exist at \nhttp://www.gnu.org/~caolan/docs/MSWordView.html\n" ++ "http://www.csn.ul.ie/~caolan/docs/MSWordView.html\n\n", wv_version); + exit (0); + break; + case 'k': + notablewidth=1; + break; ++ case 'T': ++ testonly=1; ++ break; + case 'm': + noheaders=1; + break; +@@ -477,6 +485,7 @@ + ret = wvOLEdecode(filename,&mainfd,&tablefd0,&tablefd1,&data,&summary); + if (ret) + { ++ if (testonly) {printf("-----\n"); exit(0);}; + fprintf(erroroutput,"Sorry main document stream couldnt be found in doc \n%s\n",filename); + fprintf(erroroutput,"if this *is* a word 8 file, it appears to be corrupt\n"); + fprintf(erroroutput,"remember, mswordview cannot handle rtf,word 6 or word 7 etc\n"); +@@ -536,8 +545,10 @@ + + if (tail) + { +- fprintf(outputfile,"


\nDocument converted from word 8 by \nMSWordView (%s)
\n",wv_version); +- fprintf(outputfile,"MSWordView written by Caolan McNamara\n\n"); ++ fprintf(outputfile,"


\nDocument converted from word 8 by \n" ++ "MSWordView (%s)
\n",wv_version); ++ fprintf(outputfile,"MSWordView written by Caolan McNamara\n" ++ "and patched @BABOLO\n"); + } + if (core) + fprintf(outputfile,"\n\n"); diff -ruNd textproc/mswordview/patches/patch-bi textproc/mswordview/patches/patch-bi --- textproc/mswordview/patches/patch-bi Thu Jan 1 03:00:00 1970 +++ textproc/mswordview/patches/patch-bi Sun Dec 12 21:47:20 1999 @@ -0,0 +1,169 @@ +--- laolareplace.old.c.orig Mon May 10 15:36:35 1999 ++++ laolareplace.old.c Sun Dec 12 21:46:37 1999 +@@ -38,6 +38,7 @@ + #define MAXBLOCKS 256 + + extern FILE *erroroutput; ++extern int testonly; + + struct pps_block + { +@@ -143,31 +144,31 @@ + ungetc(c,input); + + if(isprint(c)) { +- fprintf(erroroutput,"File looks like a plain text file.\n"); ++ if (!testonly) fprintf(erroroutput,"File looks like a plain text file.\n"); + return 8; + /* check for MS OLE wrapper */ + } else if(c==0xd0) { + Block = malloc(512); + if (Block == NULL) + { +- fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",512); ++ if (!testonly) fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",512); + return(5); + } + /* read header block */ + if(fread(Block,512,1,input)!=1) { +- fprintf(erroroutput,"1 ===========> Input file has faulty OLE format\n"); ++ if (!testonly) fprintf(erroroutput,"1 ===========> Input file has faulty OLE format\n"); + return 5; + } + num_bbd_blocks=(S32)LongInt(Block+0x2c); + if ((num_bbd_blocks == 0) || (num_bbd_blocks < 0)) + { +- fprintf(erroroutput,"2 ===========> Input file has ridiculous bbd, mem for the depot was %d\n",512*num_bbd_blocks); ++ if (!testonly) fprintf(erroroutput,"2 ===========> Input file has ridiculous bbd, mem for the depot was %d\n",512*num_bbd_blocks); + return(5); + } + BDepot = malloc(512*num_bbd_blocks); + if (BDepot == NULL) + { +- fprintf(erroroutput,"2 ===========> couldnt alloc ole mem for the depot of %d\n",512*num_bbd_blocks); ++ if (!testonly) fprintf(erroroutput,"2 ===========> couldnt alloc ole mem for the depot of %d\n",512*num_bbd_blocks); + return(5); + } + s = BDepot; +@@ -184,19 +185,19 @@ + { + if (0x4c+(i*4) > 512) + { +- fprintf(erroroutput,"2.1 ===========> Input file has faulty bbd\n"); ++ if (!testonly) fprintf(erroroutput,"2.1 ===========> Input file has faulty bbd\n"); + return 5; + } + FilePos = 512*(LongInt(Block+0x4c+(i*4))+1); + if (FilePos > fullen) + { +- fprintf(erroroutput,"2.2 ===========> Input file has faulty bbd\n"); ++ if (!testonly) fprintf(erroroutput,"2.2 ===========> Input file has faulty bbd\n"); + return 5; + } + fseek(input,FilePos,SEEK_SET); + if(fread(s,512,1,input)!=1) + { +- fprintf(erroroutput,"2.3 ===========> Input file has faulty bbd\n"); ++ if (!testonly) fprintf(erroroutput,"2.3 ===========> Input file has faulty bbd\n"); + return 5; + } + s += 0x200; +@@ -209,7 +210,7 @@ + sbd_list[len] = LongInt(BDepot+(sbd_list[len-1]*4)); + else + { +- fprintf(erroroutput,"3 ===========> Input file has faulty OLE format\n"); ++ if (!testonly) fprintf(erroroutput,"3 ===========> Input file has faulty OLE format\n"); + return(5); + } + if(sbd_list[len]==-2) break; +@@ -217,7 +218,7 @@ + SDepot = malloc(512*len); + if (SDepot== NULL) + { +- fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",512*len); ++ if (!testonly) fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",512*len); + return(5); + } + s = SDepot; +@@ -226,7 +227,7 @@ + FilePos = 512 *(sbd_list[i]+1); + fseek(input,FilePos,SEEK_SET); + if(fread(s,512,1,input)!=1) { +- fprintf(erroroutput,"3 ===========> Input file has faulty OLE format\n"); ++ if (!testonly) fprintf(erroroutput,"3 ===========> Input file has faulty OLE format\n"); + return 5; + } + s += 0x200; +@@ -236,7 +237,7 @@ + { + if ( ((root_list[len-1]*4) >= (512*num_bbd_blocks)) || ( (root_list[len-1]*4) < 0) ) + { +- fprintf(erroroutput,"3.1 ===========> Input file has faulty OLE format\n"); ++ if (!testonly) fprintf(erroroutput,"3.1 ===========> Input file has faulty OLE format\n"); + return(5); + } + root_list[len] = LongInt(BDepot+(root_list[len-1]*4)); +@@ -245,7 +246,7 @@ + Root = malloc(512*len); + if (Root == NULL) + { +- fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",512*len); ++ if (!testonly) fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",512*len); + return(5); + } + s = Root; +@@ -254,7 +255,7 @@ + FilePos = 512 *(root_list[i]+1); + fseek(input,FilePos,SEEK_SET); + if(fread(s,512,1,input)!=1) { +- fprintf(erroroutput,"4 ===========> Input file has faulty OLE format\n"); ++ if (!testonly) fprintf(erroroutput,"4 ===========> Input file has faulty OLE format\n"); + return 5; + } + s += 0x200; +@@ -264,7 +265,7 @@ + pps_list = malloc(len*4*sizeof(pps_entry *)); + if (pps_list == NULL) + { +- fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",len*4*sizeof(pps_entry *)); ++ if (!testonly) fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",len*4*sizeof(pps_entry *)); + return(5); + } + for(j=0;j probable corrupt ole file, unable to allocate %d bytes\n",sizeof(pps_entry)); ++ if (!testonly) fprintf(erroroutput,"1 ===========> probable corrupt ole file, unable to allocate %d bytes\n",sizeof(pps_entry)); + return(5); + } + } +@@ -283,7 +284,7 @@ + i=ShortInt(s+0x40); + if (((j*0x80) + i) >= (512 * len)) + { +- fprintf(erroroutput,"1.1 ===========> probable corrupt ole file\n"); ++ if (!testonly) fprintf(erroroutput,"1.1 ===========> probable corrupt ole file\n"); + return(5); + } + for(p=pps_list[j]->name,t=s;t Input file has faulty OLE format\n"); ++ if (!testonly) fprintf(erroroutput,"5 ===========> Input file has faulty OLE format\n"); + return(5); + } + fwrite(Block,bytes,1,OLEfile); +@@ -396,7 +397,7 @@ + return 0; + } else { + /* not a OLE file! */ +- fprintf(erroroutput,"7 ===========> Input file is not an OLE file\n"); ++ if (!testonly) fprintf(erroroutput,"7 ===========> Input file is not an OLE file\n"); + return 8; + } + }