wp2x-2.5-mhi/ 40755 0 0 0 7122462034 11015 5ustar rootrootwp2x-2.5-mhi/test/ 40755 0 0 0 7122456660 12004 5ustar rootrootwp2x-2.5-mhi/test/inputs/ 40755 0 0 0 7122453536 13325 5ustar rootrootwp2x-2.5-mhi/test/inputs/simple-iso.wp100644 0 0 11671 7122453536 16101 0ustar rootrootWPC2 2BJ ZrCourierHelveticaSymbolx6X@KX@00 SPARCprinter (sp)APLASPLU.PRSx  @hhhh) `X@22 :3|xc SPARCprinter (sp)APLASPLU.PRSx  @hhhh) `X@cCourierHelvetica2XX<=c"m^88Goo,CCNu8C88oooooooooo88uuuo˅z8dozz888^o,oodoo8oo,,d,ooooCd8oddddC4CuC8CC!CCCCCCCCCCz8oooooȲdoooo88888888ooooooooodoozodoooooddddooooooooooooo88888,88ddo,o,o,o,o,ooooooȽCCCddddz8z8z8oooooodzdzdzdoo,oCdz8ddoooNF8koCzoooooJIoCoC&CCoCCoodd,CCT?xxxDx6X@KX@L1sC8-(:s2PkCXPD1mC8P:m2PAXP/paX/lhbit/arlirew.pstty9 006sc8-parenb ixon clocal cread -opost 0<&2!H0"< ^8CGdo,CCdn2n28dddddddddd88nnnY˅z8dozz88C^o,oodoo8oo,,d,ooooCd8odddd`(`uN\8koCzoooodJIoCoC&CCoCCoodd,CCunnn8!nBBnnnyyPn7c1RyyXyycnnnndccccccccyMMMMMMMMMMMMϐ~nyRzczXzcyhCBnnshcnnonvyXzXshn~XyBBnss~|y~~~~~~~~~~~~~~~~~~~XXXXXXXyyyyyyyyyyyyyyyyyyyyBBBBBBBBBBBBnnnnnnnsssssssssssszC 6&6& StandardGes6& IpFxOPHpZ0LO88pH 6&StandardGesAPLASPLU.PRSx  c۰ wpruler X` hp x (#%'0*,.8135@8: "U = F ss =  paragraph =  ISOLatin1 Chars:  0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163-  164- 165-  166-| 167- 168- 169- 170- 171-  172- 173- 174- 175- 176-$ 177- 178- 179- 180- 181- 182- 183- 184- 185-N 186- 187-  188- 189- 190- 191- 192-  193- 194- 195-L 196- 197-" 198-$ 199-& 200-. 201-( 202-* 203-, 204-6 205-0 206-2 207-4 208-V 209-8 210-@ 211-: 212-< 213-R 214-> 215-' 216-P 217-H 218-B 219-D 220-F 221-T 222-X 223- 224-! 225- 226- 227-M 228- 229-# 230-% 231-' 232-/ 233-) 234-+ 235-- 236-7 237-1 238-3 239-5 240-W 241-9 242-A 243-; 244-= 245-S 246-? 247- 248-Q 249-I 250-C 251-E 252-G 253-U 254-Y 255-K wp2x-2.5-mhi/test/inputs/simple-iso.wp.uu100644 0 0 15514 7122453536 16531 0ustar rootrootbegin 644 simple-iso.wp M_U=00S(( !"@ ! /O_!0 R ! 6 8 !" !P 9 2@ M P 6@ * #__P8 #Z ! <@!#;W5R:65R $AE;'9E=&EC M80!3>6UB;VP > #^%3806 < $$4#) /P82P 3 %@"0/[^_O[^_O[__O__ M__[___[__________________________S P(%-005)#<')I;G1E#!>,"@ 01 M0,D A\\! $ : %H 6@!: 'P*1L)8%@"0 0 /O_!0 R *@! & @ M R 0 "0 " .@$ /__ @ )0! #__Q( "6 0 #-\ '@ !C MVR!34$%20W!R:6YT97(@*'-P*0 05!,05-03%4N M4%)3 -L!> 4'@P7C H $$4#) (?/ 0 ! &@!: %H 6@!\"D;"6!8 D!C MVT-O=7)I97( 2&5L=F5T:6-A /O_!0 R .\$ ! KT! #: 0 #P!8 0 MEP, /__6 #P! #__ST !C $B (( _____VT!____________ M_________________UXX.$=O;[*%+$-#3G4X0S@X;V]O;V]O;V]O;S@X=75U M;\N%A9"0A7JI"%O86%>C@X.%YO+&]O9&]O.&]O+"QD M+*=O;V]O0V0X;V209&1D0S1#=>E#.$-#R"%#0T, $-#0T-#0P 0WHX M (5OA6^%;X5OA6_(LI!DA6^%;X5OA6\X.#@X.#@X.)!OG&^<;YQOG&^0;Y!O MD&^0;X5DA6^0;YQZG&^%9)!OA6^%;X5OA6^09)!DD&209)!OA6^%;X5OA6^< M;YQOG&^<;YQOG&^0;Y!O.#@X.#@L.#@ &0 A61O+&\L;RQO+&\LD&^0;Y!O MD&^<;YQOR+V00Y!#D$.%9(5DA62%9'HX>CAZ.)!OD&^0;Y!OD&^0;[V0A61Z M9'ID>F0 )!O;RR0;Y!#A61Z.(5DA620;YQOD&].1@ . !K;T-Z;V]O;P!O M2DFGIV]# ).3;Z=# "8 $-#;\A#0P ;V_( 9&3( M L0P R 0U0%__^) #\ > !X '@ L 0! 43BVP%X M /X5-A!8!P 010,D _!A+ !, 6 ) _O[^_O[^_O_^_____O___O______ M____________________3 8 )< ,0!S $, . "P! $ " !+2@Z G, Y!LR M%+P' !!0L0"S:T,!$P!8 E#^_O[^_O[^__[____^___^________ O\" M______________]$!P EP Q &T 0P X + $ 0 2 &24#H";0#D&S(4O < M $%"Q *(/L )! 5@"4/[^_O[^_O[__O____[___[__O______________ M______________\ +0 " "\ <&$ %@>+VQH8FET+V%R;&ER978\ M ?GY^?GY^?GY^?GY^?GY^?GY^?EA86%A86%AY>7EY>7EY>7EY>7EY>7EY M>7EY>4)"0D)"0D)"0D)"0FYN;FYN;FYS#!>,"@ !C MV[ $L 2P!+ $ 0 @(" @ P$ $' '=PT" H M(X EV"F5I M8VAE;CH*"B)A(#T@P!\!P" @(F\@/2# /P' (" B=2 ](,!' < *"B)!(#T@ MP!X!P" @(D\@/2# /@' (" B52 ](,!& < *"G-S(#T@P!2 @(#$R,BUZ(" @,3(S+7L@(" Q,C0M?" @(#$R-2U] M(" @,3(V+7X@(" Q,CR8";0#/&;X0I@@ 0(%#L (F*-Q+[ 28" M4/[^_O[^_O[__O____[___[__________________________P !(@"" %,! M: &9 >D!#0+T KL#@@3_____A@3_______]>-CU57%RCCST]/5RC/3T]/5Q< M7%Q<7%Q<7%P]/;>CMU&CA'-^B'-MA(@]1X%SIHB$:81Z8G.(A*V$A'<]/3U< M7#U17%%<43U<7#,S7#./7%Q<7$1',UQWM[>W MM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[=.A(2$ M7 !<7#U12TM<7*%<7%RCHUQ!7%Q<7*-! #U< %]?7*,P,+>W7%QP<(NW7+=< MA%P ;9F99F:C '@]7P '@ *T W0 02*WM[>WA(2WM[=W M7X2$HZ.WM[< 7.6CH[>WMP 8 *-WMX1PMZ.$ MA(2$A(2$A(2$ #VW7(1<9ERCMX2W>EP]7(117&F$CWZWMX2$A(2$A(2$A(2W MM[>WMUBWA(2$A+>WM[>WM[>WM[>WM[< M[>WM[>WA(2WMWBWM[>@>G"/MX2W M M[< 3FT M (2$A(0 +>W M +< 'BW M\6$A(1(2$A(2$A(2$/0 (2$ MA#T "$A(0] A(2$/0 (2$A(0 "$ M A (2$A(0 "$ MA(3%A'!S9@ <&9Z47-'=U&(4811/3.!47IFIF:(47IIA,k" P7P=IA,=_ p^7 r4^& t2]^XÚTÐ ˃>Yu0@vf1n1)r&!^ZXPRV%>tPRV3>tSQWVQ"T^mzFzzzFzzzzzzoFoF  zM   Z  zzzzzffff oxzzzzf     Fzfzfzfzf                 fz ff  F Z  zzz/ooooooooooooooooooooooooooooooooooooooooooooooooN   zBFFFzF__oooo 22FxzxZ"oooo  ooo oo  FFoooFFooo0Fzzooooo oF          zo Fo oz  oo          oooooo    ooooooooooooooooooo  ooxooo?o ooo    oooxoo     o  ooo                                          x        z   z   z   z               zfM     z   zz    zzx26 J ?"T^Q\\\\\\\\\\k\\\\zzaL\Lzk\z\\\\LzzzzzkLkLkLkLLkkL7kz\\\/N\uu aa\GGx\xAa"$\\\\zxuxx\\\\zkzzzkLzzzzzkz\\\z\x  -Preparing a document for submission   6with WordPerfect >XAbstract(#  XThis document is a demonstration of how papers should be prepared when preparing with WordPerfect. In this document, each section will be formatted in the way that our conversion software expects to see it.   m0  Section Headings  T< Should be numbered, and in a VeryLarge font. You may want to make them bold, but that will have no effect in headers. No blank lines should be left between paragraphs. You may want to turn on display of hard returns by doing ShiftF1, 2 (Display), 6 (EditScreen Options), 4 (Hard Return), ControlV.  T Note, that font changes are perfectly acceptable, so long as you use only bold , and italics. Italics will usually be shown, and many printers actually print underlines, but some will recall that this is just a convention that authors used to indicate italics to printers. Our conversion software will not understand other kinds of font changes, and we depend on you indicating headings with specific size changes.  ^  Spacing of the document  Although we have shown an empty paragraph before and after a heading, there is no real requirement that you do the same. The heading, once recognized as a heading, will make its own space above and below it. It does look a bit odd while composing though.  ^   Subsections  T Are just fine. In order to indicate the depth of the heading, you should use a smaller font.  T In other words, use ExtraLarge for titles, VeryLarge for major headings, Large for the first level of  T subheadings, onwards through to Small and Fine . This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like.  ^j  Bibliography The bibliography should be a heading on its own, with the word Bibliography as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting:  T  X[Walthers80] ` ` Feline disposal methods for radioactive waste, Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 1457.(# wp2x-2.5-mhi/test/inputs/wp.wp.uu100644 0 0 62200 7122453536 15070 0ustar rootrootbegin 644 wp.wp M_U=00P\_ !"@ ! /O_!0 R (X% & @ !" __]6 5@ M \ 6@( *P #__UH T!0 ""-\ %$ @*%-C86QA8FQE*0"Z /__ MA S &T /0 V "P! 0 $C>R8";0#/&;X0I@@ 0(%#L (F*-Q+[ 28" M4/[^_O[^_O[__O____[___[__________________________[H !@"$ #, M;0 ] #8 + $! 2-[)@)M ,\9OA"F" ! @4.P B8HW$OL!)@)0!0(# M_O[^_O_^____ ?___O__________________________ ; (4 ,@!P #T M-@ L 0$ % !R6@F G \QFX$5\( $"!P[ !>$#<2^P$F I#^_O[^_O[^ M__[________^__________________________^Z < Q@!- *0 7 !1 "P! M 0 $?7#D#I #/&;X0I@@ 0(%#L (F*-Q+[ 3D#4/[^_O[^_O[__O__ M_P;___[__________________________[H '0"> #X @P!) $$ + $! M 6LBE *# ,\9OA"F" ! @4.P B8HW$OL!E )0_O[^_O[^_O_^____!/__ M_O__________________________ < )\ /0"& $D 00 L 0$ % !@3V4 M H8 \QFX$5\( $"!P[ !>$#<2^P&4 I#^_O[^_O[^__[________^____ M______________________^Z !@ " %G -H >@!M "P! 0 &*HTP$V@#/ M&;X0I@@ 0(%#L (F*-Q+[ 4P$4/[^_O[^_O[__O____[___[_________ M_________________P ___' $P J !< %$ + $! !0 75'.0.H /,9N!%? M" ! @<.P 7A W$OL!.0.0_O[^_O[^_O_^_________O______________ M____________A+>WM[>WM[>WM[>WM[< M[>WM[>WA(2WMWBWM[>@>G"/MX2W M M[< 3FT M (2$A(0 +>W M +< 'BW M\6$A(1(2$A(2$A(2$/0 (2$ MA#T "$A(0] A(2$/0 (2$A(0 "$ M A (2$A(0 "$ MA(3%A'!S9@ <&9Z47-'=U&(4811/3.!47IFIF:(47ID!#0+T KL#@@3_____A@3_______]>-CU5 M7%RCCST]/5RC/3T]/5Q<7%Q<7%Q<7%P]/;>CMU&CA'-^B'-MA(@]1X%SIHB$ M:81Z8G.(A*V$A'<]/3U<7#U17%%<43U<7#,S7#./7%Q<7$1',UQWM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>W MM[>WM[>WM[>WM[=.A(2$7 !<7#U12TM<7*%<7%RCHUQ!7%Q<7*-! #U< %]? M7*,P,+>W7%QP<(NW7+=WA(2WM[=W7X2$HZ.WM[< 7.6CH[>WMP 8 M *-WMX1PMZ.$A(2$A(2$A(2$ #VW7(1<9ERCMX2W>EP]7(117&F$ MCWZWMX2$A(2$A(2$A(2WM[>WMUBWA(2$A+>WM[>WM[>WM[>WM[< M[>WM[>W MA(2WMWBWM[>@>G"/MX2W M[< 3FT M (2$A(0 M +>W +< 'BW M\6$ MA(1(2$A(2$A(2$/0 (2$A#T "$A(0] A(2$/0 (2$A(0 "$ M M A (2$A(0 "$A(3%A'!S9@ <&9Z47-'=U&(4811/3.!47IFIF:( M47IJV$CW"/A&9ZA(2WA(1Z/3T]7%P]7&919E%!7&8S/68SF69<9F911SUF M7(1<7%%<7%RWSUP47%P %Q<7#T]/3U<7%Q<7%Q< %Q<9C, A%R$7(1E%Z44EQZ7 CUR/7(]EQZ7'I'>C, (22A&:$9H]EQZ7'IE$3/0 M7%P !< /3TOM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>WM[>W MM[>WM[>WM[>WM[>WM[>WM[>W3H2$A%P 7%P]7$Y.7%RS7%QWMX2$M[>W7(2WMVF$A*.CM[>W %SE MHZ.WM[< & "C7#T]M[>WM[>$<+>CA(2$A(2$A(2$A ]MUR$7&9$MWI< M/5R$45QIA(]^M[>$A(2$A(2$A(2$M[>WM[=8MX2$A(2WM[>WM[>WM[>WM[>W M +>WM[>WMX2$M[=XM[>WH'IPC[>$MP +>W $YM M "$A(2$ M "WMP "W !XMP M +?%A(2$7(2$MX2$M[>W A(0 "$7 (2$A(1< A(2$A(0 M "$A(0 "$A(0 "$A(0 "$A(2$A(2$A(2$A(2$A A (2$ MA(2$A 'B$A(2$A(2$A#T "$A(0] A(2$/0 (2$A#T "$A(2$ M A M (0 "$A(2$ A(2$Q81P>F8 '!F>E%Z1WI1CU&$44G"$9H]P<'"$>H]'7(^$A'!1< !P M '!P #T]7%Q< %P A M "/ %Q<7 M "$A(0 !P /0 < )< M43T > $!(@#B (0"K@(0 [ #^ /&!50'X@C_____Z@C_______]> %$ 7 !_ M (H B@#T -8 7 !< %P B@#T %P 7 !< %P B@"* (H B@"* (H B@"* (H MB@!< %P $P'T !,!>@#T ,< K0"\ ,P K0"C ,< S !< &L P@"M /H S #' M )X QP"W )0 K0#, ,< ! '' ,< L@!< %P 7 "* (H 7 !Z (H >@"* 'H M7 "* (H 3 !, (H 3 #6 (H B@"* (H 9@!K $P B@"* ,< B@"* 'H >@"* M 'H $P'/ (H > "* (H (H B@"* %P 7 !< %P >@"* (H B@"* (H MB@ (H B@"* $P #' 'H QP!Z ,< >@#' 'H QP!Z /0 MP"\ 'H K0!Z M *T >@"M 'H K0!Z %P 3 !< $P 7 !, %P 3 #, (H QP"* ,< B@#' (H MQP"* ,P B@#, (H S "* ,P B@#' (H QP!Z ,P B@#' (H QP"* ,< B@#, M (H G@"* ,< B@#' (H QP"* "\ (H O "* +P B@#, (H K0"* *T MB@"M (H K0"* #' (H QP"* ,< B@#' (H QP"* ,P B@#, (H B@!, M (H B@"* (H > "* ,D F0"* (H P@"* "M (H K0"* *T 3 "M $P M ,P HP#, (H S "* ,< B@#' (H ] #' "W (H MP"* "4 M &L E "* )0 B@"M (H K0"* *T B@#, (H S "* ,P B@#, (H S "* ,P MB@ $ << QP"* "R 'H $P!< "* (H B@ M !< %P +P 3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,! M$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 M 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P%. ,< QP#' (H "* (H 7 !Z ' M< "* (H \0"* (H B@#T /0 B@!A (H B@"* (H ] !A 7 "* CP"/ M (H ] !' $< $P$3 8H B@"H *@ T0 3 8H $P&* ,< B@ *, Y0#E )D MF0#T > !< (\ > ! $ $L! M &$ (@ 3 1,!$P$3 << QP 3 1,!$P&* ,< $P$3 8\ QP#' /0 ] 3 1,! M$P$ (H Y0#T /0 $P$3 1,! D M ] "* %P 7 3 1,!$P$3 1,!QP"H !,!] #' ,< QP#' ,< QP#' ,< MQP#' 7 3 8H QP"* )D B@#T !,!QP 3 ;< B@!< (H QP!Z (H G@#' M -8 O 3 1,!QP#' ,< QP#' ,< QP#' ,< QP 3 1,!$P$3 1,!A 3 << MQP#' ,< $P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$ !,!$P$3 1,!$P$3 M << QP 3 1,!> 3 1,!$P'O +< J #6 !,!QP 3 0 !,!$P$ M '4 HP M M QP#' ,< QP M $P$3 0 M$P$ > 3 0 !,!Q0#' M ,< QP"* ,< QP 3 << QP 3 1,!$P$ #' ,< QP!Z M ,< QP#' ,< >@ #' ,< QP#' ,< QP#' ,< M QP#' ,< QP#' ,< QP#' ,< QP#' ,< QP#' ,< MQP#' ,< QP#' #' ,< QP#' ,< QP#' M '@ QP#' ,< QP#' ,< QP#' %P QP#' ,< 7 #' ,< MQP!< ,< QP#' %P QP#' ,< QP #' M M M ,< QP#' ,< QP #' ,< QP#% ,< J "M )D M *@ F0"W 'H K0!K +( >@#, 'H QP!Z %P 3 #" 'H MP"9 /H F0#, M 'H MP"* ,< >@#' *@ G@"* *@ B@ (H K0!Z ,< >@"W *@ QP"9 -8 MJ "H *@ QP"M ,P 7 "* ,< QP#' *@ >@"H J *@ J %P 7 "* M (H B@ (H M #' M S M (H B@"* M QP#' ,< J M !< "H ( B@!Z %P !X /O_!0 R M .TU # NX( #)& ! +N" MR$ /__6@( *4J % NX( #_+ M 0$B .( A *N A #L /X \8%5 ?B"/_____J"/_______UX 00!) &8 ;@!N M ,0 JP!) $D 20!N ,0 20!) $D 20!N &X ;@!N &X ;@!N &X ;@!N $D M20#< ,0 W !B ,0 GP"+ )< HP"+ (( GP"C $D 5@"; (L R "C )\ ?@"? M ), =@"+ *, GP#0 )\ GP"/ $D 20!) &X ;@!) &( ;@!B &X 8@!) &X M;@ ] #T ;@ ] *L ;@!N &X ;@!1 %8 /0!N &X GP!N &X 8@!B &X 8@#< M ,\ ;@!X &X ;@ ;@!N &X 20!) $D 20!B &X ;@!N &X ;@!N M;@!N &X /0 )\ 8@"? &( GP!B )\ 8@"? &( Q "3 )< 8@"+ &( BP!B M (L 8@"+ &( 20 ] $D /0!) #T 20 ] *, ;@"? &X GP!N )\ ;@"? &X MHP!N *, ;@"C &X HP!N )\ ;@"? &( HP!N )\ ;@"? &X GP!N *, ;@!^ M &X GP!N )\ ;@"? &X )< ;@"7 &X EP!N *, ;@"+ &X BP!N (L M;@"+ &X )\ ;@"? &X GP!N )\ ;@"? &X HP!N *, ;@!N #T ;@!N M &X ;@!X '@ H0!Z &X ;@"; &X (L ;@"+ &X BP ] (L /0 MHP"" *, ;@"C &X GP!N )\ ;@#$ )\ ), ;@"3 &X '8 5@!V M &X =@!N (L ;@"+ &X BP!N *, ;@"C &X HP!N *, ;@"C &X HP!X - MGP"? &X (\ 8@ 3 $D &X ;@ !N M $D 20 O -P W #< -P W #< -P W #< -P W #< -P W #< -P MW #< -P W #< -P W #< -P W #< -P W #< -P W #< -P W #< -P W #< M -P W #< -P W #< -P W #< $X GP"? )\ ;@ &X ;@!) &( 6@!: &X M;@#! &X ;@!N ,0 Q !N $T ;@!N &X ;@#$ $T !) &X !R '( ;@#$ M #D .0#< -P ;@!N (8 A@"G -P ;@#< &X GP!N @@"W +< >@!Z ,0 M !X $D <@ !X #0 "0$ 30 B M -P W #< -P GP"? -P W #< &X GP#< -P <@"? )\ Q #$ -P W #< M ;@#E ,0 Q #< -P W !T #$ M &X 20!) -P W #< -P W "? (8 W #$ )\ GP"? )\ GP"? )\ GP"? )\ M !) -P ;@"? &X >@!N ,0 W "? -P DP!N $D ;@"? &( ;@!^ )\ JP"7 M -P W "? )\ GP"? )\ GP"? )\ GP"? -P W #< -P W !J -P GP"? )\ MGP#< -P W #< -P W #< -P W #< -P W #< W #< -P W #< -P GP"? M -P W !X -P W #< +\ DP"& *L W "? -P W #< M7@"" M M "? )\ GP"? M #< -P #< M !X -P W #% )\ GP"? M &X GP"? -P GP"? -P W #< )\ GP "? &( MGP"? )\ GP!B )\ GP"? )\ GP "? )\ GP "? M )\ GP "? )\ GP "? )\ GP"? )\ GP"? )\ GP"? )\ MGP"? )\ )\ GP"? )\ GP"? )\ > "? M )\ GP"? )\ GP"? )\ 20 "? )\ GP!) )\ GP"? $D M GP"? )\ 20 "? )\ GP"? )\ M M M GP "? )\ GP"? )\ GP"? ,4 GP"& (L >@ MA@!Z ), 8@"+ %8 CP!B *, 8@"? &( 20 ] )L 8@"3 'H R !Z *, 8@"3 M &X GP!B )\ A@!^ &X A@!N ;@"+ &( GP!B ), A@"? 'H JP"& (8 MA@"? (L HP!) &X GP"? )\ A@!B (8 "& A@"& 20!) &X ;@!N M ;@ M )\ M "C M ;@!N &X "? M )\ GP "& M $D (8 @!N &( 20 '@ 0$B .( A *N M A #L /X \8%5 ?B"/_____J"/_______UX 00!) &8 ;@!N ,0 MP!) $D M20!N ,0 20!) $D 20!N &X ;@!N &X ;@!N &X ;@!N $D 20#< ,0 W !N M ,0 GP"3 )\ GP"3 (8 JP"K %8 :@"K ), T "? *L A@"K )\ >@"3 )\ MGP#< )\ GP"3 $D 20!) &X ;@!) &X >@!B 'H 8@!- &X >@ ] $D >@ ] M +< >@!N 'H >@!B %8 20!Z &X GP!N &X 8@!N &X ;@#< ,\ ;@ 8 &X M;@ ;@!N &X 20!) $D 20!N &X ;@!N &X ;@!N ;@!N 'H /0 M )\ ;@"? &X GP!N )\ ;@"? &X Y "? )\ 8@"3 &( DP!B ), 8@"3 &( M5@ ] %8 /0!6 #T 5@ ] )\ >@"K &X JP!N *L ;@"K &X GP!Z )\ >@"? M 'H GP!Z )\ ;@"? &X GP!Z *L ;@"K &X GP!N )\ ;@"& 'H GP!N )\ M;@"? &X )\ ;@"? &X GP!N )\ >@"3 &X DP!N ), ;@"3 &X M *L ;@"K &X JP!N *L ;@"K &X JP!Z *L >@!N #T ;@!Z &X ;@!6 'H MR !^ &X ;@"K 'H ), ;@"3 &X DP!6 ), /0 GP"O )\ >@"? M 'H JP!N *L ;@#Y *, )\ ;@"? &X 'H 5@!Z &X >@!N ), M;@"3 &X DP!N )\ >@"? 'H GP!Z )\ >@"? 'H GP!Z -P GP"? &X M ), 8@ 3 $D &X ;@ !N $D M20 O -P W #< -P W #< -P W #< -P W #< -P W #< -P W #< -P W #< M -P W #< -P W #< -P W #< -P W #< -P W #< -P W #< -P W #< -P MW #< -P W #< $X GP"? )\ ;@ &X ;@!) &X 7@!> &X ;@#7 &X ;@!N M ,0 Q !N $T ;@!N &X ;@#$ $T !) &X !^ 'X ;@#$ #D .0#< -P M;@!N (8 A@"G -P ;@#< &X GP!N BP"W +< >@!Z ,0 !X M $D ?@ !X #0 0$ 30 B -P W #< -P MGP"? -P W #< &X GP#< -P ?@"? )\ Q #$ -P W #< M ;@#E ,0 Q #< -P W !T #$ &X 20!) -P MW #< -P W "? (8 W #$ )\ GP"? )\ GP"? )\ GP"? )\ !) -P ;@"? M &X >@!N ,0 W "? -P DP!N $D ;@"? &( ;@!^ )\ JP"7 -P W "? )\ MGP"? )\ GP"? )\ GP"? -P W #< -P W !J -P GP"? )\ GP#< -P W #< M -P W #< -P W #< -P W #< W #< -P W #< -P GP"? -P W !X -P MW #< +\ DP"& *L W "? -P W #< 7@"" M M "? M )\ GP"? M #< -P #< M !X -P W #% )\ GP"? &X GP"? -P MGP"? -P W #< )\ GP "? &X GP"? )\ GP!N M )\ GP"? )\ GP "? )\ GP "? )\ GP M "? )\ GP "? )\ GP"? )\ GP"? )\ GP"? )\ GP"? )\ M )\ GP"? )\ GP"? )\ > "? )\ GP"? )\ MGP"? )\ 20 "? )\ GP!) )\ GP"? $D GP"? M )\ 20 "? )\ GP"? )\ M M GP M "? )\ GP"? )\ GP"? ,4 GP"& ), >@ A@!Z ), 8@"3 M %8 DP!B *L 8@"? &( 5@ ] *L 8@"3 'H T !Z )\ 8@"3 &X JP!B )\ MA@"& &X A@!N ;@"3 &( GP!B ), A@"? 'H JP"& (8 A@"? ), JP!6 M &X JP"? )\ A@!B (8 "& A@"& 20!) &X ;@!N ;@ M )\ M M "K ;@!N M &X "? )\ GP M "& M $D (8 @!N &( 20 '@ N@ # (0 ,P!M #T -@ L 0$ M !(WLF FT SQF^$*8( $"!0[ ")BC<2^P$F E#^ @/^_O[^__[___\! M___^__________________________\ !< A0 R ' /0 V "P! 0 4 ') M:"8"< #S&;@17P@ 0('#L %X0-Q+[ 28"D/[^_O[^_O[__O________[_ M_________________________[H &0#& $T I !< %$ + $! 1]<.0.D M ,\9OA"F" ! @4.P B8HW$OL!.0-0_O[^_O[^_O_^_____O___O______ M____________________N@ 8 )X /@"# $D 00 L 0$ !:R*4 H, SQF^ M$*8( $"!0[ ")BC<2^P&4 E#^_O[^_O[^__[___\$___^____________ M______________\ /__GP ] (8 20!! "P! 0 4 &!/90"A@#S&;@17P@ M 0('#L %X0-Q+[ 90"D/[^_O[^_O[__O________[_________________ M______________\+ON\)Z BQ!":L"L!T!>BM,NOU70@!Z +< 1@%Z 'H >@!Z +< MP"W +< MP"W +< MP"W +< >@!Z M &\!1@%O :, 1@$) >< ^P 0 >< V0 ) 1 !>@"/ (!YP!- 1 !"0'3 D! M] #% .< $ $) 5H!"0$) >X >@!Z 'H MP"W 'H HP"W *, MP"C 'H MP"W M &8 9@"W &8 '0&W +< MP"W (@ CP!F +< MP ) ;< MP"C *, MP"C &\! MSP"W '@ MP"W "W +< MP!Z 'H >@!Z *, MP"W +< MP"W +< "W M +< MP!F "0&C D!HP ) :, "0&C D!HP!& ?0 ^P"C .< HP#G *, MYP"C .< HP!Z &8 >@!F 'H 9@!Z &8 $ &W D!MP ) ;< "0&W D!MP 0 M ;< $ &W ! !MP 0 ;< "0&W D!HP 0 ;< "0&W D!MP ) ;< $ &W -, MMP ) ;< "0&W D!MP ^P"W /L MP#[ +< $ &W .< MP#G +< YP"W M .< MP "0&W D!MP ) ;< "0&W D!MP 0 ;< $ &W +< 9@"W +< MMP"W 'H MP ,

@ MP"W +< M >@!Z "\ ;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O M 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\! M;P%O 6\!;P%O 6\!;P%O 6\!3@ ) 0D!"0&W MP"W 'H HP"5 )4 MP"W M $(!MP"W +< 1@%& ;< @0"W +< MP"W $8!@0 'H MP +X O@"W $8! M7P!? &\!;P&W +< X #@ !8!;P&W &\!MP ) ;< #9 #(!,@', ,P 1@$ M '@ >@"^ '@ %H! "Y 0 "! "( M;P%O 6\!;P$) 0D!;P%O 6\!MP ) 6\!;P&_ D!"0%& 48!;P%O 6\! M "W .4 1@%& 6\!;P%O 0 , $8! MMP!Z 'H ;P%O 6\!;P%O 0D!X !O 48!"0$) 0D!"0$) 0D!"0$) 0D!"0$ M 'H ;P&W D!MP#, +< 1@%O 0D!;P'T +< >@"W D!HP"W -, "0$= ?L M;P%O 0D!"0$) 0D!"0$) 0D!"0$) 0D!;P%O 6\!;P%O ;$ ;P$) 0D!"0$) M 6\!;P%O 6\!;P%O 6\!;P%O 6\!;P%O 6\! !O 6\!;P%O 6\!;P$) 0D! M;P%O 7@ ;P%O 6\!/P'T . '0%O 0D!;P$ !O 6\! "< M -D M M D!"0$) 0D! M &\!;P$ &\! M '@ ;P$ !O <4 "0$) 0D! MMP ) 0D!;P$) 0D!;P%O 6\! "0$) 0 D!HP ) M 0D!"0$) :, "0$) 0D!"0$) 0 D!"0$) 0 D! M"0$) 0 D!"0$) 0 D!"0$) 0D!"0$) 0D!"0$) 0D!"0$) M 0D!"0$ "0$ ) 0D!"0$) 0D!"0$ !X D! M"0$) 0D!"0$) 0D!"0%Z D!"0$) 7H "0$) 0D!>@ M ) 0D!"0%Z D!"0$) 0D! "0$ M M M ) 0 D!"0$) 0D! "0$) 0D!Q0 ) > YP#, #@ M ,P ] "C .< CP#N *, $ &C D!HP!Z &8 @&C /0 S !-

X #@ M D!YP 0 7H MP ) 0D!"0'@ *, X . #@ . !Z 'H MP"W +< M "W M "0$ M ! ! M "W +< MP D! M"0$) 0 . M >@ X " +< HP!Z > #[_P4 ,@ M!@+N" 'S8 /__# $H ( ( -/P $!(@#B M (0"K@(0 [ #^ /&!50'X@C_____Z@C_______]> %$ 7 !_ (H B@#T .4 M7 !< %P B@#T %P 7 !< %P B@"* (H B@"* (H B@"* (H B@!< %P $P'T M !,!B@#T ,< MP#' ,< MP"H -8 U@!K (0 U@"W 0!QP#6 *@ U@#' )D MMP#' ,< $P'' ,< MP!< %P 7 "* (H 7 "* )D >@"9 'H 80"* )D 3 !< M )D 3 #E )D B@"9 )D >@!K %P F0"* ,< B@"* 'H B@"* (H $P'/ (H M'P"* (H (H B@"* %P 7 !< %P B@"* (H B@"* (H B@ (H B@"9 M $P #' (H QP"* ,< B@#' (H QP"* !T!QP#' 'H MP!Z +< >@"W 'H MMP!Z &L 3 !K $P :P!, &L 3 #' )D U@"* -8 B@#6 (H U@"* ,< F0#' M )D QP"9 ,< F0#' (H QP"* ,< F0#6 (H U@"* ,< B@#' (H J "9 ,< MB@#' (H QP"* #' (H QP"* ,< B@#' )D MP"* +< B@"W (H MP"* M #6 (H U@"* -8 B@#6 (H U@"* -8 F0#6 )D B@!, (H F0"* (H M:P"9 /H G0"* (H U@"9 "W (H MP"* +< :P"W $P ,< VP#' M )D QP"9 -8 B@#6 (H -P', #' (H QP"* "9 &L F0"* )D MB@"W (H MP"* +< B@#' )D QP"9 ,< F0#' )D QP"9 ,< F0 3 << QP"* M "W 'H $P!< "* (H B@ M !< %P +P 3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 M 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$3 1,! M$P$3 1,!$P$3 1,!$P%. ,< QP#' (H "* (H 7 "* '4 =0"* (H # &* M (H B@#T /0 B@!A (H B@"* (H ] !A 7 "* G@"> (H ] !' $< M$P$3 8H B@"H *@ T0 3 8H $P&* ,< B@ *T Y0#E )D F0#T M > !< )X > ! $ $$! &$ (@ 3 1,! M$P$3 << QP 3 1,!$P&* ,< $P$3 9X QP#' /0 ] 3 1,!$P$ M (H Y0#T /0 $P$3 1,! D ] "* %P M7 3 1,!$P$3 1,!QP"H !,!] #' ,< QP#' ,< QP#' ,< QP#' 7 3 M 8H QP"* )D B@#T !,!QP 3 ;< B@!< (H QP!Z (H G@#' -8 O 3 1,! MQP#' ,< QP#' ,< QP#' ,< QP 3 1,!$P$3 1,!A 3 << QP#' ,< $P$3 M 1,!$P$3 1,!$P$3 1,!$P$3 1,!$P$ !,!$P$3 1,!$P$3 << QP 3 1,! M> 3 1,!$P'O +< J #6 !,!QP 3 0 !,!$P$ '4 HP M M M QP#' ,< QP M $P$3 0 $P$ M > 3 0 !,!Q0#' ,< QP"* ,< MQP 3 << QP 3 1,!$P$ #' ,< QP"* ,< QP#' M ,< B@ #' ,< QP#' ,< QP#' ,< QP#' ,< M QP#' ,< QP#' ,< QP#' ,< QP#' ,< QP#' ,< QP#' M #' ,< QP#' ,< QP#' '@ QP#' ,< MQP#' ,< QP#' %P QP#' ,< 7 #' ,< QP!< M ,< QP#' %P QP#' ,< QP #' M M ,< M QP#' ,< QP #' ,< QP#% ,< J "W )D *@ F0"W M 'H MP!K +< >@#6 'H QP!Z &L 3 #6 'H MP"9 0!F0#' 'H MP"* -8 M>@#' *@ J "* *@ B@ (H MP!Z ,< >@"W *@ QP"9 -8 J "H *@ QP"W M -8 :P"* -8 QP#' *@ >@"H J *@ J %P 7 "* (H B@ (H M #' M M U@ M (H B@"* QP#' ,< M J M !< "H ( B@!Z %P !X U $, &" &( M# !U- &!@ ! @8 !M#4!0@ +0#E" @ !=3# ,-0'!E8W1S('1O('-E92!I="X@QM @ M" ?&"@K4 0P ;' &T , @, '4PPS#PP'#4V5C=&EO;B!(96%D:6YG<\0! MQ,0,Q H*U $, &A0!4 #P*# !U%-H;W5L9"!B92!N=6UB97)E9"P@86YD M(&EN(&$@PPS#5F5R>4QA2!A8V-E<'1A8FQE+"!S;R!L;VYG(&%S('EO=2!U2###,-B;VQDQ S$+"!A;F0@PP[#:71A;&EC<\0.Q"X@PP[#271A;&EC M<\0.Q"!W:6QL#75S=6%L;'D@8F4@F4@ M8VAA;F=E2!P87)A9W)A<&@@8F5F;W)E(&%N9"!A9G1E L7# !U,,,P\,"PU-U8G-E8W1I;VYSQ S$"M0!# M!H0 5 (& P =3$ L1!'1R84QA6]U(&9O=7(@;&5V96QS(&]F(&AE861I;F=S+"!A M;F0@82!T:71L92!F;VYT+ UW:&EC:"!S:&]U;&0@8F4@;6]R92!T:&%N('-U M9F9I8VEE;G0N($YU;6)E<0.Q"!A6]U('=O=6QD M(&9O# !U,,, MP\( 6 ((!P@'%@#"P8"P!+ $#@#!6U=A;'1H97)S.#!=Q S$P0)@"6 )'0#! MPP[#1F5L:6YE(&1I 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166- 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- wp2x-2.5-mhi/test/outputs/simple-iso.ascii100644 0 0 4574 7122456663 16734 0ustar rootroot[BOF] Ein kleiner Test![HRt] [HRt] Deutsche Umlaute & Sonderzeichen:[HRt] [HRt] "a = "o = "u = [HRt] [HRt] "A = "O = "U = [HRt] [HRt] ss = [Math On] paragraph = [HRt] [HRt] [HRt] ISO[hard-]Latin1 Chars:[HRt] [HRt] 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. [SRt] 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. [HRt] 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. [HRt] 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. [HRt] 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' [HRt] 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ [HRt] 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 [HRt] 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? [HRt] 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G [HRt] 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O [HRt] 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W [HRt] 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ [HRt] 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g [HRt] 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o [HRt] 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w [HRt] 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. [HRt] 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. [HRt] 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. [HRt] 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. [HRt] 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. [HRt] 160-. 161- 162- 163- 164- 165- 166- 167- [HRt] 168- 169- 170- 171- 172- 173- 174- 175- [HRt] 176- 177- 178- 179- 180- 181- 182- 183- [HRt] 184- 185- 186- 187- 188- 189- 190- 191- [HRt] 192- 193- 194- 195- 196- 197- 198- 199- [HRt] 200- 201- 202- 203- 204- 205- 206- 207- [HRt] 208- 209- 210- 211- 212- 213- 214- 215- [HRt] 216- 217- 218- 219- 220- 221- 222- 223- [HRt] 224- 225- 226- 227- 228- 229- 230- 231- [HRt] 232- 233- 234- 235- 236- 237- 238- 239- [HRt] 240- 241- 242- 243- 244- 245- 246- 247- [HRt] 248- 249- 250- 251- 252- 253- 254- 255- [SRt] [HRt] [HRt] [EOF] wp2x-2.5-mhi/test/outputs/simple-iso.gml100644 0 0 4515 7122456663 16416 0ustar rootroot.* This file was created by the WP2X program, using a GML .* descriptor file (Version 0.3) written by Raymond Chen. .* .* Do not expect everything to be converted perfectly. .* .im gmlthesi .im laser :GDOC :FRONTM :eFRONTM :BODY Ein kleiner Test!Deutsche Umlaute & Sonderzeichen:"a = "o = "u = "A = "O = "U = ss = paragraph = ISO-Latin1 Chars: 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166- 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- .* :eBODY :eGDOC .* End of file wp2x-2.5-mhi/test/outputs/simple-iso.html100644 0 0 5303 7122456663 16577 0ustar rootroot Return to contents page

Ein kleiner Test!

Deutsche Umlaute & Sonderzeichen:

"a = "o = "u =

"A = "O = "U =

ss = paragraph =

ISO-Latin1 Chars:

0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-.

16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-.

24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-.

32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-'

40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/

48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7

56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-?

64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G

72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O

80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W

88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_

96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g

104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o

112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w

120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-.

128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-.

136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-.

144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-.

152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-.

160-. 161- 162- 163- 164- 165- 166- 167-

168- 169- 170- 171- 172- 173- 174- 175-

176- 177- 178- 179- 180- 181- 182- 183-

184- 185- 186- 187- 188- 189- 190- 191-

192- 193- 194- 195- 196- 197- 198- 199-

200- 201- 202- 203- 204- 205- 206- 207-

208- 209- 210- 211- 212- 213- 214- 215-

216- 217- 218- 219- 220- 221- 222- 223-

224- 225- 226- 227- 228- 229- 230- 231-

232- 233- 234- 235- 236- 237- 238- 239-

240- 241- 242- 243- 244- 245- 246- 247-

248- 249- 250- 251- 252- 253- 254- 255-

_______________________________

Return to contents page

wp2x-2.5-mhi/test/outputs/simple-iso.latex100644 0 0 4562 7122456663 16756 0ustar rootroot% This file was created by the WP2X program, using a LaTeX % descriptor file (Version 0.6) written by Raymond Chen. % Do not expect everything to be converted perfectly. % \documentstyle{article} \begin{document} % Ein kleiner Test! Deutsche Umlaute & Sonderzeichen: "a = "o = "u = "A = "O = "U = ss = paragraph = ISO{-}Latin1 Chars: 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166- 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- \end{document} % That's all, folks. wp2x-2.5-mhi/test/outputs/simple-iso.sample100644 0 0 4247 7122456663 17122 0ustar rootroot\documentstyle{article} =sectionEin kleiner Test! Deutsche Umlaute & Sonderzeichen: "a = "o = "u = "A = "O = "U = ss = paragraph = ISO{-}Latin1 Chars: 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166- 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- \end{document} wp2x-2.5-mhi/test/outputs/simple-iso.script100644 0 0 4441 7122456663 17141 0ustar rootroot.* This file was created by the WP2X program, using a Script .* descriptor file (Version 0.3) written by Raymond Chen. .* .* Do not expect everything to be converted perfectly. .* .dc cont + .ud set | Ein kleiner Test!Deutsche Umlaute & Sonderzeichen:"a = "o = "u = "A = "O = "U = ss = paragraph = ISO-Latin1 Chars: 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166- 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- .* End of file wp2x-2.5-mhi/test/outputs/simple-iso.tex100644 0 0 5237 7122456663 16441 0ustar rootroot% This file was created by the WP2X program, using a TeX % descriptor file (Version 0.6) written by Raymond Chen. % Do not expect everything to be converted perfectly. % % Macros for page numbering. \def\numberleft{\tenrm\folio\hss} \def\numbercenter{\hss\tenrm\folio\hss} \def\numberright{\tenrm\folio\hss} \def\numberevenodd{\ifodd\pageno\numberright\else\numberleft\fi} % Macros for conditional end of page \def\CondEOP#1{\vskip0pt plus#1\baselineskip\penalty0 \vskip0pt plus-#1\baselineskip} % Ein kleiner Test! Deutsche Umlaute & Sonderzeichen: "a = "o = "u = "A = "O = "U = ss = paragraph = ISO{-}Latin1 Chars: 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166- 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- \vfill\eject\end % That's all, folks. wp2x-2.5-mhi/test/outputs/simple-iso.troff100644 0 0 5541 7122456663 16757 0ustar rootroot.\" This file was created by the WP2X program, using a troff .\" descriptor file (Version 1.2) written by Raymond Chen. .\" .\" Do not expect everything to be converted perfectly. .\" .\" The macro `hd' is our header, and `fo' is our footer. By default, .\" they do nothing (yet). These macros are intentionally crude (they .\" don't preserve the environment or anything) because you'll probably .\" end up hand-editing them anyway. .de hd 'sp 1 .. .de fo 'sp 1 .. .wh 0 hd .wh -1 fo .\" .\" Conditional page eject macro. .de CP .ne \\$1/2u .. Ein kleiner Test! .br .br Deutsche Umlaute & Sonderzeichen: .br .br "a = "o = "u = .br .br "A = "O = "U = .br .br ss = paragraph = .br .br .br ISO-Latin1 Chars: .br .br 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. .br 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. .br 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. .br 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' .br 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ .br 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 .br 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? .br 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G .br 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O .br 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W .br 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ .br 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g .br 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o .br 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w .br 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. .br 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. .br 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. .br 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. .br 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. .br 160-. 161- 162- 163- 164- 165- 166- 167- .br 168- 169- 170- 171- 172- 173- 174- 175- .br 176- 177- 178- 179- 180- 181- 182- 183- .br 184- 185- 186- 187- 188- 189- 190- 191- .br 192- 193- 194- 195- 196- 197- 198- 199- .br 200- 201- 202- 203- 204- 205- 206- 207- .br 208- 209- 210- 211- 212- 213- 214- 215- .br 216- 217- 218- 219- 220- 221- 222- 223- .br 224- 225- 226- 227- 228- 229- 230- 231- .br 232- 233- 234- 235- 236- 237- 238- 239- .br 240- 241- 242- 243- 244- 245- 246- 247- .br 248- 249- 250- 251- 252- 253- 254- 255- .br .br .\" .\" End of file wp2x-2.5-mhi/test/outputs/simple-iso.txt100644 0 0 4166 7122453536 16454 0ustar rootrootEin kleiner Test! Deutsche Umlaute & Sonderzeichen: "a = "o = "u = "A = "O = "U = ss = paragraph = ISO-Latin1 Chars: 0-. 1-. 2-. 3-. 4-. 5-. 6-. 7-. 8-. 9-. 10-. 11-. 12-. 13-. 14-. 15-. 16-. 17-. 18-. 19-. 20-. 21-. 22-. 23-. 24-. 25-. 26-. 27-. 28-. 29-. 30-. 31-. 32- 33-! 34-" 35-# 36-$ 37-% 38-& 39-' 40-( 41-) 42-* 43-+ 44-, 45-- 46-. 47-/ 48-0 49-1 50-2 51-3 52-4 53-5 54-6 55-7 56-8 57-9 58-: 59-; 60-< 61-= 62-> 63-? 64-@ 65-A 66-B 67-C 68-D 69-E 70-F 71-G 72-H 73-I 74-J 75-K 76-L 77-M 78-N 79-O 80-P 81-Q 82-R 83-S 84-T 85-U 86-V 87-W 88-X 89-Y 90-Z 91-[ 92-\ 93-] 94-^ 95-_ 96-` 97-a 98-b 99-c 100-d 101-e 102-f 103-g 104-h 105-i 106-j 107-k 108-l 109-m 110-n 111-o 112-p 113-q 114-r 115-s 116-t 117-u 118-v 119-w 120-x 121-y 122-z 123-{ 124-| 125-} 126-~ 127-. 128-. 129-. 130-. 131-. 132-. 133-. 134-. 135-. 136-. 137-. 138-. 139-. 140-. 141-. 142-. 143-. 144-. 145-. 146-. 147-. 148-. 149-. 150-. 151-. 152-. 153-. 154-. 155-. 156-. 157-. 158-. 159-. 160-. 161- 162- 163- 164- 165- 166-| 167- 168- 169- 170- 171- 172- 173- 174- 175- 176- 177- 178- 179- 180- 181- 182- 183- 184- 185- 186- 187- 188- 189- 190- 191- 192- 193- 194- 195- 196- 197- 198- 199- 200- 201- 202- 203- 204- 205- 206- 207- 208- 209- 210- 211- 212- 213- 214- 215- 216- 217- 218- 219- 220- 221- 222- 223- 224- 225- 226- 227- 228- 229- 230- 231- 232- 233- 234- 235- 236- 237- 238- 239- 240- 241- 242- 243- 244- 245- 246- 247- 248- 249- 250- 251- 252- 253- 254- 255- wp2x-2.5-mhi/test/outputs/wp.accent100644 0 0 3660 7122456663 15441 0ustar rootrootPreparing a document for submissionwith WordPerfectAbstractThis document is a demonstration of how papers should be prepared when preparing withWordPerfect. In this document, each section will be formatted in the way that ourconversion software expects to see it. Section HeadingsShould be numbered, and in a VeryLarge font. You may want to make them bold, but that will have noeffect in headers.No blank lines should be left between paragraphs. You may want to turn on display of hard returns bydoing ShiftF1, 2 (Display), 6 (EditScreen Options), 4 (Hard Return), ControlV.Note, that font changes are perfectly acceptable, so long as you use only bold, and italics. Italics willusually be shown, and many printers actually print underlines, but some will recall that this is just aconvention that authors used to indicate italics to printers.Our conversion software will not understand other kinds of font changes, and we depend on youindicating headings with specific size changes.Spacing of the documentAlthough we have shown an empty paragraph before and after a heading, there is no real requirementthat you do the same. The heading, once recognized as a heading, will make its own space above andbelow it. It does look a bit odd while composing though.SubsectionsAre just fine. In order to indicate the depth of the heading, you should use a smaller font.In other words, use ExtraLarge for titles, VeryLarge for major headings, Large for the first level ofsubheadings, onwards through to Small and Fine. This gives you four levels of headings, and a title font,which should be more than sufficient. Number your headings if you like.BibliographyThe bibliography should be a heading on its own, with the word Bibliography as its heading. It shouldbe formatted just like you would format any bibliography. Here is our suggest mechanism for formatting:[Walthers80]Feline disposal methods for radioactive waste, Moron, J. et al, Cat's Quarterly, V. 3winter, pp. 1457.wp2x-2.5-mhi/test/outputs/wp.ascii100644 0 0 4521 7122456663 15271 0ustar rootroot[BOF] Preparing a document for submission[HRt] with WordPerfect[HRt] [Ind]Abstract[ind][HRt] [HRt] [DIndent]This document is a demonstration of how papers should be prepared when preparing with[SRt] WordPerfect. In this document, each section will be formatted in the way that our[SRt] conversion software expects to see it. [HRt] [HRt] [B]Section Headings[b][HRt] [HRt] Should be numbered, and in a [B]VeryLarge[b] font. You may want to make them bold, but that will have no[SRt] effect in headers.[HRt] No blank lines should be left between paragraphs. You may want to turn on display of hard returns by[SRt] doing [U][u][U]Shift[hard-]F1[u], [U]2[u] (Display), [U]6[u] (Edit[hard-]Screen Options), [U]4[u] (Hard Return), [U]Control[hard-]V[u].[HRt] Note, that font changes are perfectly acceptable, so long as you use only [B]bold[b], and [U]italics[u]. [U]Italics[u] will[SRt] usually be shown, and many printers actually print [U]underlines[u], but some will recall that this is just a[SRt] convention that authors used to indicate italics to printers.[HRt] Our conversion software will not understand other kinds of font changes, and we depend on you[SRt] indicating headings with specific size changes.[HRt] [HRt] [B]Spacing of the document[b][HRt] [HRt] Although we have shown an empty paragraph before and after a heading, there is no real requirement[SRt] that you do the same. The heading, once recognized as a heading, will make its own space above and[SRt] below it. It does look a bit odd while composing though.[HRt] [B]Subsections[b][HRt] Are just fine. In order to indicate the depth of the heading, you should use a smaller font.[HRt] In other words, use [B]ExtraLarge[b] for titles, [B]VeryLarge[b] for major headings, [B]Large[b] for the first level of[SRt] subheadings, onwards through to [B]Small[b] and [B]Fine[b]. This gives you four levels of headings, and a title font,[SRt] which should be more than sufficient. Number your headings if you like.[HRt] [B]Bibliography[b][HRt] The bibliography should be a heading on its own, with the word [U]Bibliography[u] as its heading. It should[SRt] be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting:[HRt] [B][Ind][Walthers80][b][U]Feline disposal methods for radioactive waste[u], Moron, J. et al, Cat's Quarterly, V. 3[SRt] winter, pp. 14[hard-]57.[ind][HRt] [EOF] wp2x-2.5-mhi/test/outputs/wp.gml100644 0 0 4726 7122456663 14767 0ustar rootroot.* This file was created by the WP2X program, using a GML .* descriptor file (Version 0.3) written by Raymond Chen. .* .* Do not expect everything to be converted perfectly. .* .im gmlthesi .im laser :GDOC :FRONTM :eFRONTM :BODY Preparing a document for submissionwith WordPerfect:LQ.Abstract:eLQ. This document is a demonstration of how papers should be prepared when preparing withWordPerfect. In this document, each section will be formatted in the way that ourconversion software expects to see it. :hp2.Section Headings:ehp2. Should be numbered, and in a :hp2.VeryLarge:ehp2. font. You may want to make them bold, but that will have no effect in headers.No blank lines should be left between paragraphs. You may want to turn on display of hard returns bydoing :hp1.:ehp1.:hp1.Shift-F1:ehp1., :hp1.2:ehp1. (Display), :hp1.6:ehp1. (Edit-Screen Options), :hp1.4:ehp1. (Hard Return), :hp1.Control-V:ehp1.. Note, that font changes are perfectly acceptable, so long as you use only :hp2.bold:ehp2., and :hp1.italics:ehp1.. :hp1.Italics:ehp1. will usually be shown, and many printers actually print :hp1.underlines:ehp1., but some will recall that this is just a convention that authors used to indicate italics to printers.Our conversion software will not understand other kinds of font changes, and we depend on youindicating headings with specific size changes.:hp2.Spacing of the document:ehp2. Although we have shown an empty paragraph before and after a heading, there is no real requirementthat you do the same. The heading, once recognized as a heading, will make its own space above andbelow it. It does look a bit odd while composing though.:hp2.Subsections:ehp2. Are just fine. In order to indicate the depth of the heading, you should use a smaller font.In other words, use :hp2.ExtraLarge:ehp2. for titles, :hp2.VeryLarge:ehp2. for major headings, :hp2.Large:ehp2. for the first level of subheadings, onwards through to :hp2.Small:ehp2. and :hp2.Fine:ehp2.. This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like.:hp2.Bibliography:ehp2. The bibliography should be a heading on its own, with the word :hp1.Bibliography:ehp1. as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting::hp2.:LQ.[Walthers80]:ehp2.:hp1.Feline disposal methods for radioactive waste:ehp1., Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14-57.:eLQ. .* :eBODY :eGDOC .* End of file wp2x-2.5-mhi/test/outputs/wp.html100644 0 0 5411 7122456663 15144 0ustar rootroot Return to contents page

Preparing a document for submission

with WordPerfect

Abstract

This document is a demonstration of how papers should be prepared when preparing with WordPerfect. In this document, each section will be formatted in the way that our conversion software expects to see it.

Section Headings

Should be numbered, and in a VeryLarge font. You may want to make them bold, but that will have no effect in headers.

No blank lines should be left between paragraphs. You may want to turn on display of hard returns by doing Shift-F1 , 2 (Display), 6 (Edit-Screen Options), 4 (Hard Return), Control-V .

Note, that font changes are perfectly acceptable, so long as you use only bold , and italics . Italics will usually be shown, and many printers actually print underlines , but some will recall that this is just a convention that authors used to indicate italics to printers.

Our conversion software will not understand other kinds of font changes, and we depend on you indicating headings with specific size changes.

Spacing of the document

Although we have shown an empty paragraph before and after a heading, there is no real requirement that you do the same. The heading, once recognized as a heading, will make its own space above and below it. It does look a bit odd while composing though.

Subsections

Are just fine. In order to indicate the depth of the heading, you should use a smaller font.

In other words, use ExtraLarge for titles, VeryLarge for major headings, Large for the first level of subheadings, onwards through to Small and Fine . This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like.

Bibliography

The bibliography should be a heading on its own, with the word Bibliography as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting:

[Walthers80] Feline disposal methods for radioactive waste , Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14-57.

_______________________________

Return to contents page

wp2x-2.5-mhi/test/outputs/wp.latex100644 0 0 4647 7122456663 15327 0ustar rootroot% This file was created by the WP2X program, using a LaTeX % descriptor file (Version 0.6) written by Raymond Chen. % Do not expect everything to be converted perfectly. % \documentstyle{article} \begin{document} % Preparing a document for submission with WordPerfect {\narrower Abstract\par} {\narrower This document is a demonstration of how papers should be prepared when preparing with WordPerfect. In this document, each section will be formatted in the way that ourconversion software expects to see it. {\bf Section Headings} Should be numbered, and in a {\bf VeryLarge} font. You may want to make them bold, but that will have no effect in headers. No blank lines should be left between paragraphs. You may want to turn on display of hard returns bydoing {\em \/}{\em Shift{-}F1\/}, {\em 2\/} (Display), {\em 6\/} (Edit{-}Screen Options), {\em 4\/} (Hard Return), {\em Control{-}V\/}. Note, that font changes are perfectly acceptable, so long as you use only {\bf bold}, and {\em italics\/}. {\em Italics\/} will usually be shown, and many printers actually print {\em underlines\/}, but some will recall that this is just a convention that authors used to indicate italics to printers. Our conversion software will not understand other kinds of font changes, and we depend on youindicating headings with specific size changes. {\bf Spacing of the document} Although we have shown an empty paragraph before and after a heading, there is no real requirementthat you do the same. The heading, once recognized as a heading, will make its own space above andbelow it. It does look a bit odd while composing though. {\bf Subsections} Are just fine. In order to indicate the depth of the heading, you should use a smaller font. In other words, use {\bf ExtraLarge} for titles, {\bf VeryLarge} for major headings, {\bf Large} for the first level of subheadings, onwards through to {\bf Small} and {\bf Fine}. This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like. {\bf Bibliography} The bibliography should be a heading on its own, with the word {\em Bibliography\/} as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting: {\bf {\narrower [Walthers80]}{\em Feline disposal methods for radioactive waste\/}, Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14{-}57.\par} \end{document} % That's all, folks. wp2x-2.5-mhi/test/outputs/wp.outtakes100644 0 0 327 7122453536 16014 0ustar rootrootReading config file: html.cfg HTML descriptor file for WP2X by Michael Richardson Document created with WordPerfect 5.1 Document starts at: 10603 [296b] Ignoring fixed [c1] Ignoring fixed [c2] Ignoring fixed [c6] wp2x-2.5-mhi/test/outputs/wp.sample100644 0 0 4140 7122456663 15457 0ustar rootroot\documentstyle{article} =sectionPreparing a document for submission with WordPerfect Abstract This document is a demonstration of how papers should be prepared when preparing withWordPerfect. In this document, each section will be formatted in the way that ourconversion software expects to see it. Section Headings Should be numbered, and in a VeryLarge font. You may want to make them bold, but that will have noeffect in headers. No blank lines should be left between paragraphs. You may want to turn on display of hard returns bydoing {\em \/}{\em Shift{-}F1\/}, {\em 2\/} (Display), {\em 6\/} (Edit{-}Screen Options), {\em 4\/} (Hard Return), {\em Control{-}V\/}. Note, that font changes are perfectly acceptable, so long as you use only bold, and {\em italics\/}. {\em Italics\/} will usually be shown, and many printers actually print {\em underlines\/}, but some will recall that this is just a convention that authors used to indicate italics to printers. Our conversion software will not understand other kinds of font changes, and we depend on youindicating headings with specific size changes. Spacing of the document Although we have shown an empty paragraph before and after a heading, there is no real requirementthat you do the same. The heading, once recognized as a heading, will make its own space above andbelow it. It does look a bit odd while composing though. Subsections Are just fine. In order to indicate the depth of the heading, you should use a smaller font. In other words, use ExtraLarge for titles, VeryLarge for major headings, Large for the first level ofsubheadings, onwards through to Small and Fine. This gives you four levels of headings, and a title font,which should be more than sufficient. Number your headings if you like. Bibliography The bibliography should be a heading on its own, with the word {\em Bibliography\/} as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting: [Walthers80]{\em Feline disposal methods for radioactive waste\/}, Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14{-}57. \end{document} wp2x-2.5-mhi/test/outputs/wp.script100644 0 0 4522 7122456663 15506 0ustar rootroot.* This file was created by the WP2X program, using a Script .* descriptor file (Version 0.3) written by Raymond Chen. .* .* Do not expect everything to be converted perfectly. .* .dc cont + .ud set | Preparing a document for submissionwith WordPerfect.in +5 Abstract.in This document is a demonstration of how papers should be prepared when preparing withWordPerfect. In this document, each section will be formatted in the way that ourconversion software expects to see it. + .bd Section Headings| Should be numbered, and in a + .bd VeryLarge| font. You may want to make them bold, but that will have no effect in headers.No blank lines should be left between paragraphs. You may want to turn on display of hard returns bydoing + .us |+ .us Shift-F1|, + .us 2| (Display), + .us 6| (Edit-Screen Options), + .us 4| (Hard Return), + .us Control-V|. Note, that font changes are perfectly acceptable, so long as you use only + .bd bold|, and + .us italics|. + .us Italics| will usually be shown, and many printers actually print + .us underlines|, but some will recall that this is just a convention that authors used to indicate italics to printers.Our conversion software will not understand other kinds of font changes, and we depend on youindicating headings with specific size changes.+ .bd Spacing of the document| Although we have shown an empty paragraph before and after a heading, there is no real requirementthat you do the same. The heading, once recognized as a heading, will make its own space above andbelow it. It does look a bit odd while composing though.+ .bd Subsections| Are just fine. In order to indicate the depth of the heading, you should use a smaller font.In other words, use + .bd ExtraLarge| for titles, + .bd VeryLarge| for major headings, + .bd Large| for the first level of subheadings, onwards through to + .bd Small| and + .bd Fine|. This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like.+ .bd Bibliography| The bibliography should be a heading on its own, with the word + .us Bibliography| as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting:+ .bd .in +5 [Walthers80]|+ .us Feline disposal methods for radioactive waste|, Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14-57. .in .* End of file wp2x-2.5-mhi/test/outputs/wp.tex100644 0 0 5330 7122456663 15000 0ustar rootroot% This file was created by the WP2X program, using a TeX % descriptor file (Version 0.6) written by Raymond Chen. % Do not expect everything to be converted perfectly. % % Macros for page numbering. \def\numberleft{\tenrm\folio\hss} \def\numbercenter{\hss\tenrm\folio\hss} \def\numberright{\tenrm\folio\hss} \def\numberevenodd{\ifodd\pageno\numberright\else\numberleft\fi} % Macros for conditional end of page \def\CondEOP#1{\vskip0pt plus#1\baselineskip\penalty0 \vskip0pt plus-#1\baselineskip} % Preparing a document for submission with WordPerfect {\narrower Abstract\par} {\narrower This document is a demonstration of how papers should be prepared when preparing with WordPerfect. In this document, each section will be formatted in the way that ourconversion software expects to see it. {\bf Section Headings} Should be numbered, and in a {\bf VeryLarge} font. You may want to make them bold, but that will have no effect in headers. No blank lines should be left between paragraphs. You may want to turn on display of hard returns bydoing {\it \/}{\it Shift{-}F1\/}, {\it 2\/} (Display), {\it 6\/} (Edit{-}Screen Options), {\it 4\/} (Hard Return), {\it Control{-}V\/}. Note, that font changes are perfectly acceptable, so long as you use only {\bf bold}, and {\it italics\/}. {\it Italics\/} will usually be shown, and many printers actually print {\it underlines\/}, but some will recall that this is just a convention that authors used to indicate italics to printers. Our conversion software will not understand other kinds of font changes, and we depend on youindicating headings with specific size changes. {\bf Spacing of the document} Although we have shown an empty paragraph before and after a heading, there is no real requirementthat you do the same. The heading, once recognized as a heading, will make its own space above andbelow it. It does look a bit odd while composing though. {\bf Subsections} Are just fine. In order to indicate the depth of the heading, you should use a smaller font. In other words, use {\bf ExtraLarge} for titles, {\bf VeryLarge} for major headings, {\bf Large} for the first level of subheadings, onwards through to {\bf Small} and {\bf Fine}. This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like. {\bf Bibliography} The bibliography should be a heading on its own, with the word {\it Bibliography\/} as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting: {\bf {\narrower [Walthers80]}{\it Feline disposal methods for radioactive waste\/}, Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14{-}57.\par} \vfill\eject\end % That's all, folks. wp2x-2.5-mhi/test/outputs/wp.troff100644 0 0 5475 7122456663 15332 0ustar rootroot.\" This file was created by the WP2X program, using a troff .\" descriptor file (Version 1.2) written by Raymond Chen. .\" .\" Do not expect everything to be converted perfectly. .\" .\" The macro `hd' is our header, and `fo' is our footer. By default, .\" they do nothing (yet). These macros are intentionally crude (they .\" don't preserve the environment or anything) because you'll probably .\" end up hand-editing them anyway. .de hd 'sp 1 .. .de fo 'sp 1 .. .wh 0 hd .wh -1 fo .\" .\" Conditional page eject macro. .de CP .ne \\$1/2u .. Preparing a document for submission .br with WordPerfect .br .in +0.5i Abstract .in -0.5i .br .br .in +0.5i This document is a demonstration of how papers should be prepared when preparing with WordPerfect. In this document, each section will be formatted in the way that our conversion software expects to see it. .br .br \fBSection Headings\fP .br .br Should be numbered, and in a \fBVeryLarge\fP font. You may want to make them bold, but that will have no effect in headers. .br No blank lines should be left between paragraphs. You may want to turn on display of hard returns by doing \fI\^\fP\fIShift-F1\^\fP, \fI2\^\fP (Display), \fI6\^\fP (Edit-Screen Options), \fI4\^\fP (Hard Return), \fIControl-V\^\fP. .br Note, that font changes are perfectly acceptable, so long as you use only \fBbold\fP, and \fIitalics\^\fP. \fIItalics\^\fP will usually be shown, and many printers actually print \fIunderlines\^\fP, but some will recall that this is just a convention that authors used to indicate italics to printers. .br Our conversion software will not understand other kinds of font changes, and we depend on you indicating headings with specific size changes. .br .br \fBSpacing of the document\fP .br .br Although we have shown an empty paragraph before and after a heading, there is no real requirement that you do the same. The heading, once recognized as a heading, will make its own space above and below it. It does look a bit odd while composing though. .br \fBSubsections\fP .br Are just fine. In order to indicate the depth of the heading, you should use a smaller font. .br In other words, use \fBExtraLarge\fP for titles, \fBVeryLarge\fP for major headings, \fBLarge\fP for the first level of subheadings, onwards through to \fBSmall\fP and \fBFine\fP. This gives you four levels of headings, and a title font, which should be more than sufficient. Number your headings if you like. .br \fBBibliography\fP .br The bibliography should be a heading on its own, with the word \fIBibliography\^\fP as its heading. It should be formatted just like you would format any bibliography. Here is our suggest mechanism for formatting: .br \fB .in +0.5i [Walthers80]\fP\fIFeline disposal methods for radioactive waste\^\fP, Moron, J. et al, Cat's Quarterly, V. 3 winter, pp. 14-57. .in -0.5i .br .\" .\" End of file wp2x-2.5-mhi/test/do-regress100755 0 0 565 7122456526 14070 0ustar rootroot#!/bin/sh for input in ${INPUTS} do for cfg in ${CFGFILES} do basecfg=`basename $cfg .cfg`; basein=`basename $input .wp`; echo -n Testing input: $input with cfg: $cfg ' -> ' if ( ../src/wp2x ../cfg/$cfg inputs/$input 2>/dev/null | diff outputs/$basein.$basecfg - ) ; \ then echo passed; else echo failed; fi done done wp2x-2.5-mhi/test/gen-regress100755 0 0 515 7122456660 14231 0ustar rootroot#!/bin/sh for input in ${INPUTS} do for cfg in ${CFGFILES} do basecfg=`basename $cfg .cfg`; basein=`basename $input .wp`; if [ ! -r outputs/$input.$cfg ] then echo "Generating input: \"$input\" with cfg \"$cfg\"" ../src/wp2x ../cfg/$cfg inputs/$input >outputs/$basein.$basecfg fi done done wp2x-2.5-mhi/test/Makefile100644 0 0 524 7122456645 13525 0ustar rootrootCFGFILES = accent.cfg ascii.cfg gml.cfg html.cfg latex.cfg sample.cfg\ script.cfg tex.cfg troff.cfg INPUTS = simple-iso.wp wp.wp test: @echo Starting regression tests. INPUTS='$(INPUTS)' CFGFILES='$(CFGFILES)' sh do-regress gentest: @echo Generating regression data INPUTS='$(INPUTS)' CFGFILES='$(CFGFILES)' sh gen-regress wp2x-2.5-mhi/filters/ 40755 0 0 0 7122453536 12474 5ustar rootrootwp2x-2.5-mhi/filters/htmlcleanup1.pl100755 0 0 1424 7122453536 15527 0ustar rootroot#!/usr/local/bin/perl # things this script does: # 1. removes empty lines # 2. removes with nothing between it # 3. changes foo to

foo

while(<>) { if($ARGV ne $oldargv) { rename($ARGV, $ARGV . '.1.bak'); open(ARGVOUT, ">$ARGV"); select(ARGVOUT); $oldargv = $ARGV; } chop; next if /^$/; # kill empty lines if($suck_em && /^\<\/em\>$/) { next; } $suck_em=0; s,\<[bB]\> \,,g; # kill empty annotation # if one sees a bolding on a line by itself, then turn it into a second level heading. s,^\<[bB]\> ([^<]*)\$,

\1

,; if(s,^\<[bB]\> \([^<]*)\$,

\1

,) { # suck next line as well if it contains just
$suck_em=1; } print "$_\n"; } wp2x-2.5-mhi/filters/htmlcleanup2.pl100755 0 0 622 7122453536 15507 0ustar rootroot#!/usr/local/bin/perl # things this script does: # 1. removes consecutive

's $sawp=0; $sawnonp=0; while(<>) { if($ARGV ne $oldargv) { rename($ARGV, $ARGV . '.2.bak'); open(ARGVOUT, ">$ARGV"); select(ARGVOUT); $oldargv = $ARGV; } chop; if(/^\<[pP]\>$/) { if(!$sawp) { print "

\n"; } $sawp=1; } else { $sawp=0; print "$_\n"; } } wp2x-2.5-mhi/filters/htmlcleanup3.pl100755 0 0 1165 7122453536 15533 0ustar rootroot#!/usr/local/bin/perl # things this script does: # 2. converts single lines followed by

to

 blocks.

$sawp=0;
$sawnonp=0;

while(<>) {
    if($ARGV ne $oldargv) {
	rename($ARGV, $ARGV . '.2.bak');
	open(ARGVOUT, ">$ARGV");
	select(ARGVOUT);
	$oldargv = $ARGV;
    }

    chop;

    if(/^\<[pP]\>$/) {
	if($sawsingle==1) {
	    if(!$startpre) {
		$startpre=1;
		print "
\n";
	    }
	}
    }
    else {
	if(!/\/) {
	    $sawsingle++;
	    if($sawsingle>1 && $startpre) {	# have seen a second line with no intervening 

print "

\n"; $startpre=0; } } print "$_\n"; } } wp2x-2.5-mhi/ChangeLog100644 0 0 2044 7122460312 12661 0ustar rootrootChangeLog: --- Version 2.5-mhi, Summer 2000 --- * New directory layout * Completely rewritten Makefiles * Fixed overflow bug in src/dopen.c * Various Linux-related changes --- Original HISTORY file --- * During Summer 1991, I made another request for beta testers in comp.text.tex, and responses was decent. The result of this testing phase is what you see before you. * During Summer 1990, yet more control codes were added, and my beta testers from 1989 seemed to have forgotten about me, so the testing phase was abandoned. * During Summer 1989, some more control codes were added and a request for beta testers posted to the net. Response was mild. * The first WP2X was written in Spring 1989 as a volunteer effort for the Princeton University Computing and Information Technology Information Center. (How's that for a mouthful.) People seemed to need to convert WP4.2 files into other stuff, so I figured, hey, why not just hack one up? How hard can it be? It seemed to work fine, for the limited cases thrown at it. wp2x-2.5-mhi/wp2x.lsm100644 0 0 1551 7122461336 12535 0ustar rootrootBegin3 Title: wp2x - WordPerfect 5.1 to whatever converter Version: 2.5 Entered-date: 2000-06-12 Description: Wp2x is intended to convert simple files stored in Word Perfect 5.1 format into any other document processing language that uses plain text files. Examples include TeX, LaTeX, troff, GML and HTML. Keywords: wordperfect, conversion, html, tex, troff Author: mhi@penguin.cz (Martin Hinner) Maintained-by: mhi@penguin.cz (Martin Hinner) Primary-site: ftp.penguin.cz /pub/users/mhi/wp2x/ 20 kB wp2x-2.5-mhi.tar.bz2 0.5 kB wp2x-2.5-mhi.lsm Alternate-site: metalab.unc.edu /??? 20 kB wp2x-2.5-mhi.tar.bz2 0.5 kB wp2x-2.5-mhi.lsm Platforms: Linux/Unix Copying-policy: Freely distributable End wp2x-2.5-mhi/INSTALL100644 0 0 5130 7122457641 12152 0ustar rootroot Edit the Makefile. Decide where you want to install the cfg files, manual pages and the binary. If you need getopt, change the SRCS define near the top of src/Makefile. make make test if you like make install to copy to cfg files to the right place. [ Send email to: majordomo@journal.biology.carleton.ca, with the body: subscribe wp2x-workers ] - this address doesn't seem to work anymore Hints for compiling on various platforms ------------------------------------------------------------------------------- UNIX with gcc gcc -v -ansi -funsigned-char -DUNIX -DWP2X_DIR=\"/usr/local/lib/wp2x\" -o wp2x wp2x.c ------------------------------------------------------------------------------- Amiga, courtesy of Dale Gold (dgold@basso.actrix.gen.nz) # Makefile for SAS 5.10 on the Amiga. # # -b0 No base relative addressing # -cu All char unsigned # -L Automatically link # -DNO_CONST compiler does not support `const' qualifier wp2x: wp2x.c lmkfile lc -b0 -cu -L -DNO_CONST -DAMIGA wp2x.c ------------------------------------------------------------------------------- IBM PC / Turbo C 2.0, suggested by Raymond Chen (raymond@math.berkeley.edu) tcc -mt -G -K -O -f- -r -Z -p -DCdecl=cdecl -DMSDOS wp2x.c -mt = tiny model -G = compile for speed -K = unsigned characters -O = optimize jumps -f- = no floating point -r = register variables -Z = optimize register usage -p = pascal calling convention -DCdecl=cdecl = for tagging variadic functions Note, however, that setting the -O switch means that the killer switch() statement causes TC2.0 to act like it's gone out to lunch. It hasn't; it's chugging away, albeit incredibly slowly. ------------------------------------------------------------------------------- IBM PC / MSC 6.0, suggested by Raymond Chen (raymond@math.berkeley.edu) cl -AS -Gr -J -Ozax -DCdecl=_cdecl -DMSDOS wp2x.c -AS = small model -Gr = use fastcalls calling convention -J = unsigned chars -Ozax = maximum optimization -DCdecl=_cdecl = for tagging variadic functions ------------------------------------------------------------------------------- IBM PC / MS C 5.1, suggested by Richard Reiner cl -AS -Gc -J -Ox -DCdecl=cdecl -DMSDOS wp2x.c -AS = small model -Gc = pascal calling convention -J = unsigned chars -Ox = maximum optimization -DCdecl=cdecl = for tagging variadic functions wp2x-2.5-mhi/Makefile100644 0 0 1276 7122461561 12564 0ustar rootroot# Copyright (c) 2000 Martin Hinner # The original Makefile was removed. WP2X_DIR = /usr/local/lib/wp2x BINDIR = /usr/local/bin MANDIR = /usr/local/man VERSION = 2.5 all: wp2x wp2x: cd src && make wp2x WP2X_DIR=$(WP2X_DIR) VERSION=$(VERSION) install: mkdir -p $(BINDIR) mkdir -p $(MANDIR)/man1 mkdir -p $(WP2X_DIR) cd src && make install BINDIR=$(BINDIR) WP2X_DIR=$(WP2X_DIR) cd cfg && make install BINDIR=$(BINDIR) WP2X_DIR=$(WP2X_DIR) cd doc && make install MANDIR=$(MANDIR) WP2X_DIR=$(WP2X_DIR) depend: cd src && make depend clean: rm -f *~ *.o core cd src && make clean cd cfg && make clean test: wp2x cd test && make test gentest:wp2x cd test && make gentest wp2x-2.5-mhi/doc/ 40755 0 0 0 7122460765 11573 5ustar rootrootwp2x-2.5-mhi/doc/wp2x.1l100644 0 0 44351 7122460402 13041 0ustar rootroot.TH WP2X 1 .SH NAME wp2x \- A WordPerfect 5.0 to whatever converter .SH SYNOPSIS .B wp2x [ .B \-s ] [ .B \-v ] [ .BI \-n blip ] configfile wpfile .SH DESCRIPTION .de Tx .if n TeX\\$1 .if t T\v'12u'E\v'-12u'X\\$1 .. .de Lt .if n LaTeX\\$1 .if t L\v'-12u'A\v'12u'T\v'12u'E\v'-12u'X\\$1 .. .I Wp2x is intended to convert .I simple files stored in WordPerfect 5.1 format into any other document processing language that uses plain text files. Examples include .Tx , .Lt , troff, GML and HTML. .PP .I Wp2x reads a configuration file and a WordPerfect 5.1 input file, and uses the information in them to produce an output file, which is sent to stdout. If the configuration file cannot be found, a suffix of .I .cfg is appended. The current directory is searched, as well as the lib directory specified by the .I WP2X_DIR variable in the Makefile. (Usually .I /usr/local/lib/wp2x ) and the directories specified by the environment variables .I PATH , .I DPATH , and .I WP2XLIB . .PP .fi Some codes are not translated because documents that require these codes typically would require significant hand-editing. Hence, there's no point in trying to emulate something you're going to delete anyway. (Remember, .I wp2x is not intended to be used as an automated conversion program. Rather, it is intended to be used as a single step in the document conversion process, which gets most of the the grunt work of conversion done and out of the way, so that you can concentrate your efforts on converting the trickier parts of the document. The object of the game is to produce a readable conversion, rather than a perfect conversion.) .PP As the program runs, a dot is printed to .I stderr for every 1024 characters converted. This can be suppressed with the .B \-s switch, and the interval between dots can be changed with the .B -n switch. .SH OPTIONS .TP .B \-s Suppresses all non-error output to .IR stderr , including the .I typeout banner, the progress dots, and warnings about undefined expansions. .TP .BI \-n blip Every .I blip tokens, a dot is emitted to .IR stderr , unless the .B \-s switch is given. The value .I blip must appear imediately following the .B \-n without an intervening space. If no .B \-n switch is supplied, then a value of 1024 is assumed. .TP .B \-v prints the version number and the program usage. .SH USAGE The configuration file controls how the file is converted from WordPerfect 5.1 format. Each line of the configuration file is of the form .sp 1 .ce 1 identifier="list of codes" .sp 1 where the list of codes is a string which will be placed in the output stream whenever the corresponding WordPerfect code is encountered. Standard C-style backslash-escape sequences are recognized, as well as \exFF for hex values. You do not have to backslash-protect a newline. Some identifiers supply replacable parameters, which can be interpolated as follows: .TP %1 interpolate first parameter as a decimal integer. .TP %2 interpolate second parameter as a decimal integer. .TP %c interpolate first parameter as an ASCII character. .TP %\en interpolate a newline if the most-recently-output character was not already a newline. (The .I \en can be either the C-style escape sequence, or an actual newline character.) Use this if the expansion must take place at the beginning of a line. (For example, .I troff control characters must appear as the first character in the line in order to take effect.) This sequence is meaningful only at the beginning of the string; if it appears elsewhere, it is flagged as erroneous. .TP %% interpolate a percent-sign. .PP A percent sign followed by any other character is considered an error. It is also an error to interpolate a parameter that is not applicable to the identifier being defined. You may interpolate the parameters as many times as, and in whatever order, you wish. (With the exception of the .I %\en code.) .PP Here follows a list of the accepted identifiers. In the discussion, `%1' represents the first parameter, and `%2' the second. Remember that the character version of %1 is available as `%c'. .sp 1 .PD 0 .TP 15 BEGIN Expanded at the beginning of the file. .TP END Expanded at the end of the file. .TP COMMENT Expanded when wp2x needs to insert a comment into the output. The comment is passed as %s. .sp 1 .TP PageNo Insert current page number .TP RomanPage Set page number to %1, and set roman-numeral mode .TP ArabicPage Set page number to %1, and set arabic-numeral mode .sp 1 .TP Tab What to do when you see a tab character. .TP BeginTabs Emitted when tab settings are about to change. The .B BeginTabs code should delete all existing tabs and prepare for new tab settings to start. All tab values are given in columns measured from the physical left edge of the paper. (Not from the left margin.) .TP SetTab Set a normal (left-justified) tabstop at column %1. .TP SetTabCenter Set a centered tabstop at column %1. .TP SetTabRight Set a right-justified tabstop at column %1. .TP SetTabDecimal Set a decimal tab at column %1. .TP EndTabs Finish the setting of tabstops. .sp 1 .PP For example, if the WordPerfect file contains a code that says `Set new tabstops as follows: Regular tab at column 15, a centered tab at column 40, a right-justified tab at column 59, and a regular tab at column 60', then the following expansions are made in succession: .nf BeginTabs SetTab(15) SetTabCenter(40) SetTabright(59) SetTab(60) EndTabs .fi .TP HSpace Hard (nonbreakable) space. .TP HPg Hard page break. .TP CondEOP Force a new page if fewer than %1 half-lines remain on current page. .sp 1 .TP HRt Hard return. .TP SRt Soft return. .sp 1 .TP \- Breakable hyphen. .TP \-\- Breakable hyphen, appearing at the end of a line. .TP = Non-breakable hyphen. .TP \e\- Discretionary hyphen. .TP \e\-\- Discretionary hyphen, appearing at the end of a line. .sp 1 .TP Marg Set left margin at %1 characters and right margin at %2 characters. .TP TopMargin Set top margin to %1 lines. .TP PageLength Set page length to %1 lines. .sp 1 .TP SS Single spacing. .TP DS Double spacing. .TP 1.5S One-and-a-half spacing. .TP TS Triple spacing. .TP LS Other line spacing. %1 is twice the desired spacing. (For example, a request for 2.5-spacing sets %1=5.) .TP LPI Set %1 lines per inch (%1 is either 6 or 8) .sp 1 .TP Bold Begin boldface .TP bold End boldface .TP Und Begin underline .TP und End underline .TP DoubleUnd Begin double underline .TP doubleund End double underline .TP Red Begin redline .TP red End redline .TP Strike Begin strikeout .TP strike End strikeout .TP Rev Begin reverse video .TP rev End reverse video .TP Outline Begin outline text .TP outline End outline text .TP Fine Begin fine font size .TP fine End fine font size .TP Over Begin overstrike font .TP over End overstrike font .TP Sup Begin superscript .TP sup End superscript .TP Sub Begin subscript .TP sub End subscript .TP Large Begin large font size .TP large End large font size .TP Small Begin small font size .TP small End small font size .TP VeryLarge Begin very large font size .TP verylarge End very large font size .TP ExtraLarge Begin extra large font size .TP extralarge End extra large font size .TP Italics Begin an italics font .TP italics End an italics font .TP Shadow Begin shadow font .TP shadow End shadow font .TP SmallCaps Begin small capitals font (fixed width) .TP smallcaps End small capitals font (fixed width) .sp 1 .TP UpHalfLine Advance printer up 1/2 line .TP DownHalfLine Advance printer down 1/2 line .TP AdvanceToHalfLine Advance to absolute vertical position. %1 is what WordPerfect thinks the current vertical page position is, in half-lines. %2 is the desired position, also in half-lines. .sp 1 .TP Indent Expanded when an "Indent" code appears. .TP indent Expanded at the end of an indented paragraph. .TP DIndent Expanded when a "left-and-right-indent" code appears. .TP dindent Expanded at the end of an double indent .TP MarginRelease Margin release. %1 is the number of characters to move left. .sp 1 .TP Center Center current line .TP center End centering .TP CenterHere Center line around current column .TP centerhere End centering .sp 1 .TP Align Begin alignment .TP align End alignment .TP AlignChar Set alignment character .TP FlushRight Begin flush right .TP flushright End flush right .sp 1 .TP Math Begin math mode .TP math End math mode .TP MathCalc Begin math calc mode .TP MathCalcColumn Math calc column .sp 1 .TP SubTotal Do subtotal .TP IsSubTotal Subtotal entry .TP Total Do total .TP IsTotal Total entry .TP GrandTotal Do grand total .sp 1 .TP Col Begin column mode .TP col End column mode .sp 1 .TP Fn Expanded at the beginning of a footnote. .TP fn Expanded at the end of a footnote. .TP En Expanded at the beginning of an endnote. .TP en Expanded at the end of an endnote. .TP SetFn# Set the number for the next footnote to %1. .TP FNote# Footnote number. .TP ENote# Endnote number. .TP Figure# Figure number. .TP TableMarker Insert table of contents here .sp 1 .TP Hyph Enable hyphenation. .TP hyph Disable hyphenation. .TP Just Enable justification. .TP just Disable justification. .TP Wid Enable widow/orphan protection. .TP wid Disable widow/orphan protection. .TP HZone The hyphenation zone. %1 and %2 are the two magical values that WordPerfect uses to control hyphenation. .TP DAlign Set the decimal alignment character to that whose ASCII value is %1. (`%c' is useful here.) .sp 1 .TP Header Begin header text .TP header End header text .TP Footer Begin footer text .TP footer End footer text .sp 1 .TP Supp Suppress page number/header/footer information for one page. %1 argument is a bit field which describes what sort of suppression is desired. Here's what the bits mean: .nf 1 = all 2 = page number 4 = page numbers moved to bottom 8 = all headers 16 = header a 32 = header b 64 = footer a 128 = footer b .fi .TP CtrPg Center page vertically .sp 1 .TP SetFont Change pitch or font. %1 is the desired pitch. (Negative means proportionally-spaced.) %2 is the font number. .TP SetBin Select paper bin to %1 = 0, 1, ... .sp 1 .TP PN0 No page numbering. .TP PN1 Page number in top left. .TP PN2 Page number in top center. .TP PN3 Page number in top right. .TP PN4 Page number on top outside corners (even/odd). .TP PN5 Page number in lower left. .TP PN6 Page number in bottom center. .TP PN7 Page number in lower right. .TP PN8 Page number on bottom outside corners (even/odd). .PD .PP If no expansion is supplied for an identifier, then nothing is emitted to .IR stdout , but a warning message is sent to .IR stderr . This warning message will appear at most once per identifier, and it can be suppressed completely by the .B \-s option. .PP The special identifier .I typeout causes its replacement text to be displayed on the screen every time the configuration file is read. This is useful for identification messages, or reminders to the user. .PP A special identifier is any character enclosed in single quotation marks, which represent themselves. For example, .nf '\(*a'="{\e\ealpha}" .fi causes the string "{\ealpha}" to be emitted when an \(*a is encountered. This could also have been written as .nf '\exE0'="{\e\ealpha}" .fi if the character \(*a has ASCII value 0xE0. (Which is true for the IBM PC encoding.) .PP If no definition exists for a particular special character, it is transmitted undisturbed. If a special character is encountered from the upper half of the ASCII character set, and if it has no definition, then a warning message is also emitted. (Which can be suppressed with the .B \-s option.) .PP Lines beginning with the # character are comments. .SH NOTES This is based on an original WP 4.2 to anything translator. The file format has changed a lot between 4.2 and 5.0. This translator no longer reads WP 4.2 files, although it could be extended to do so. The 5.0+ format starts with a standard header file. There is a four byte magic number at the head of the file, followed by various product and version information. All WordPerfect Corporation utilities use this standard header. See the WPproducts array in .I wp2x.c Once the contents of the file have been located, there are three kinds of codes: simple one byte controls (WP 4.2 had only these kinds), fixed length controls, and variable length controls. There are a large number of undefined types defined for future use. If .B wp2x detects something it doesn't understand, it can extract the length and skip that code. There are a number of defined codes that are unimplemented. Please see the code, specifically .I tokens.c where much of the input processing is done. .SH FILES The sample configuration files in .I /usr/local/lib/wp2x give you some sort of idea what a `production quality' configuration file might look like. They are not intended to be used as-is, but rather are meant to be modified to suit your particular needs. .SH "SEE ALSO" .IR tex (1), .IR latex (1), .IR nroff (1), .IR troff (1), .IR WordPerfect Developer's Toolkit .IR getopt(3). .SH DIAGNOSTICS .TP Ignoring byte [XX] Indicates that an unimplemented single byte code was ignored. .TP Ignoring fixed [XX] Indicates that an unimplemented fixed length code was ignored. .TP Ignoring variable [XX] sub [XX] length Indicates that an unimplemented variable length code was ignored, and gives its length. .TP Warning: Expected XX but received XX at pos: YYYY something is wrong in the input file at byte YYYY. .TP Warning: No expansion for XX (C) A WP code for which no expansion was defined in the config file was encountered. .TP Internal error: Invalid escape C An error occured while processing an expansion escape (%x substitution). Probably it was not a recognized escape, check the config file. .TP Fixed Length block [XX] incorrectly terminated by [YY] as pos Z Something is wrong with the input file, a fixed length block was screwed up. .TP Reserved code [XX] seen Something that WPC defined as reserved was seen. Check with WPC for new meaning. .TP Not a recognized file type. The file did not start with the right WPC magic number. Maybe this is a 4.2 file, or not a WordPerfect file at all? .TP Error: Cannot open X (reason) The file X could not be opened, for the indicated reason. .TP Error: Expecting a hex digit Inside a string, you typed the characters `\ex', but the next character was not a valid hex digit. .TP Error: string pool overflow The configuration file contained too many strings. Increase the value of POOL_SIZE and recompile. .TP Error: Unknown identifier X The word X was encountered in the configuration file when .I wp2x expected a token identifier like `HRt'. Most likely, you either misspelled it, or you got your quotation marks out of sync. .TP Error: Identifier not followed by = sign After an identifier must come an equals-sign. .TP Error: Quotation mark expected After the equals-sign must come a quotation mark. .TP Error: X: `%\en' not at start of expansion The expansion for the identifier X contained the indicated sequence of characters somewhere other than the beginning of the string. The `%\en' interpolation code is meaningful only at the beginning of a string. .TP Error: X: invalid escape `%x' The expansion for the identifier X contained an invalid escape. Either you used `%1', `%2' or `%c' when the identifier X does not supply that parameter, or you meant for a genuine percent sign to be output, in which case you should put `%%' in the expansion. .TP Error: Invalid character identifier Character identifiers can only be one character long (after backslash interpretation). .TP Warning: Expected XX but received YY. The program expected the next byte from the WP file to be XX, but the byte YY was encountered instead. This means either that your WP file is damaged, or that the program is seriously confused. (Or both.) The program will pretend that the byte in the file was indeed XX, which may lead to synchronization errors later on. .TP Warning: No expansion for X The WP file contained the token X, but the configuration file did not contain any expansion text for it. A null expansion was assumed. .TP Warning: No expansion for XX (c) The WP file contained the character c (hex code XX), but the configuration file did not contain any expansion text for it. The character was emitted unaltered. Beware that this may give your text formatter indigestion if it does not handle eight-bit characters. .TP Warning: X code not supported The file being converted uses a code which .I wp2x does not know how to convert. A comment is placed in the output file in its place. If you ever encounter a `WPCorp reserved' or a `WPCorp undefined' code, the author would appreciate hearing from you. .TP Internal error: Invalid escape, %x While processing text, .I wp2x noticed that you used an invalid escape. Nothing is emitted as the escape text. (The internal-ness is that this error is supposed to be caught at the time the configuration file is read.) .SH BUGS Naive configuration files will fail if your WP file doesn't nest its tags properly. A typical case is .nf [Center][B]Hello[center] [Center]There[b][center] .fi to produce a centered boldface `Hello'. If you use the naive encoding of .nf Center="\e\ecenterline{" center="}\en" Bold="{\e\ebf " bold="}" .fi then this will expand to .nf \ecenterline{{\ebf Hello} \ecenterline{There}} .fi WordPerfect has no clean concept of grouping; it lets you change fonts at any time and let those changes propagate outside the current environment. (With the exception of headers, footers, footnotes, and endnotes.) .PP Now sure, you could write complicated configuration strings to try to handle this `properly', but it'd probably not be worth the trouble. After all, the purpose is not to perform a perfect conversion, but rather to produce a .I readable conversion, which can then be massaged by hand to produce a perfect manuscript. .PP Another potential problem is combined attributes, like boldface underline. Under a naive configuration, .nf [B]Boldface [U]Underlined boldface[b] Underlined[u] normal. .fi comes out as .nf {\ebf Boldface {\eit Underlined boldface} Underlined\e/} normal. .fi which is wrong for two reasons. One is the nesting problem discussed above. The other is that .Tx font attributes do not combine. .PP Similar problems exist for other document preparation systems. So be careful. .SH AUTHORS Original author: Raymond Chen Previous maintainer: Michael Richardson Current maintainer: Martin Hinner wp2x-2.5-mhi/doc/wp2x.cat100644 0 0 60547 7122457140 13306 0ustar rootroot WP2X(1) WP2X(1) NNAAMMEE wp2x - A WordPerfect 5.0 to whatever converter SSYYNNOOPPSSIISS wwpp22xx [ --ss ] [ --vv ] [ --nn_b_l_i_p ] configfile wpfile DDEESSCCRRIIPPTTIIOONN _W_p_2_x is intended to convert _s_i_m_p_l_e files stored in Word Perfect 5.1 format into any other document processing lan guage that uses plain text files. Examples include TeX, LaTeX, troff, GML and HTML. _W_p_2_x reads a configuration file and a WordPerfect 5.1 input file, and uses the information in them to produce an output file, which is sent to stdout. If the configura tion file cannot be found, a suffix of _._c_f_g is appended. The current directory is searched, as well as the lib directory specified by the _W_P_2_X___D_I_R variable in the Make file. (Usually _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_w_p_2_x ) and the directories specified by the environment variables _P_A_T_H _, _D_P_A_T_H _, and _W_P_2_X_L_I_B _. Some codes are not translated because documents that require these codes typically would require significant hand-editing. Hence, there's no point in trying to emu late something you're going to delete anyway. (Remember, _w_p_2_x is not intended to be used as an automated conversion program. Rather, it is intended to be used as a single step in the document conversion process, which gets most of the the grunt work of conversion done and out of the way, so that you can concentrate your efforts on convert ing the trickier parts of the document. The object of the game is to produce a readable conversion, rather than a perfect conversion.) As the program runs, a dot is printed to _s_t_d_e_r_r for every 1024 characters converted. This can be suppressed with the --ss switch, and the interval between dots can be changed with the --nn switch. OOPPTTIIOONNSS --ss Suppresses all non-error output to _s_t_d_e_r_r, includ ing the _t_y_p_e_o_u_t banner, the progress dots, and warnings about undefined expansions. --nn_b_l_i_p Every _b_l_i_p tokens, a dot is emitted to _s_t_d_e_r_r, unless the --ss switch is given. The value _b_l_i_p must appear imediately following the --nn without an intervening space. If no --nn switch is supplied, then a value of 1024 is assumed. --vv prints the version number and the program usage. 1 WP2X(1) WP2X(1) UUSSAAGGEE The configuration file controls how the file is converted from WordPerfect 5.1 format. Each line of the configura tion file is of the form identifier="list of codes" where the list of codes is a string which will be placed in the output stream whenever the corresponding WordPer fect code is encountered. Standard C-style backslash- escape sequences are recognized, as well as \xFF for hex values. You do not have to backslash-protect a newline. Some identifiers supply replacable parameters, which can be interpolated as follows: %1 interpolate first parameter as a decimal integer. %2 interpolate second parameter as a decimal integer. %c interpolate first parameter as an ASCII character. %\n interpolate a newline if the most-recently-output character was not already a newline. (The _\_n can be either the C-style escape sequence, or an actual newline character.) Use this if the expansion must take place at the beginning of a line. (For exam ple, _t_r_o_f_f control characters must appear as the first character in the line in order to take effect.) This sequence is meaningful only at the beginning of the string; if it appears elsewhere, it is flagged as erroneous. %% interpolate a percent-sign. A percent sign followed by any other character is consid ered an error. It is also an error to interpolate a parameter that is not applicable to the identifier being defined. You may interpolate the parameters as many times as, and in whatever order, you wish. (With the exception of the _%_\_n code.) Here follows a list of the accepted identifiers. In the discussion, `%1' represents the first parameter, and `%2' the second. Remember that the character version of %1 is available as `%c'. BEGIN Expanded at the beginning of the file. END Expanded at the end of the file. COMMENT Expanded when wp2x needs to insert a com ment into the output. The comment is passed as %s. PageNo Insert current page number RomanPage Set page number to %1, and set roman- 2 WP2X(1) WP2X(1) numeral mode ArabicPage Set page number to %1, and set arabic- numeral mode Tab What to do when you see a tab character. BeginTabs Emitted when tab settings are about to change. The BBeeggiinnTTaabbss code should delete all existing tabs and prepare for new tab settings to start. All tab values are given in columns measured from the physical left edge of the paper. (Not from the left margin.) SetTab Set a normal (left-justified) tabstop at column %1. SetTabCenter Set a centered tabstop at column %1. SetTabRight Set a right-justified tabstop at column %1. SetTabDecimal Set a decimal tab at column %1. EndTabs Finish the setting of tabstops. For example, if the WordPerfect file contains a code that says `Set new tabstops as follows: Regular tab at column 15, a centered tab at column 40, a right-justified tab at column 59, and a regular tab at column 60', then the fol lowing expansions are made in succession: BeginTabs SetTab(15) SetTabCenter(40) SetTabright(59) SetTab(60) EndTabs HSpace Hard (nonbreakable) space. HPg Hard page break. CondEOP Force a new page if fewer than %1 half-lines remain on current page. HRt Hard return. SRt Soft return. - Breakable hyphen. -- Breakable hyphen, appearing at the end of a line. = Non-breakable hyphen. \- Discretionary hyphen. \-- Discretionary hyphen, appearing at the end of a line. Marg Set left margin at %1 characters and right margin at %2 characters. TopMargin Set top margin to %1 lines. PageLength Set page length to %1 lines. 3 WP2X(1) WP2X(1) SS Single spacing. DS Double spacing. 1.5S One-and-a-half spacing. TS Triple spacing. LS Other line spacing. %1 is twice the desired spac ing. (For example, a request for 2.5-spacing sets %1=5.) LPI Set %1 lines per inch (%1 is either 6 or 8) Bold Begin boldface bold End boldface Und Begin underline und End underline DoubleUnd Begin double underline doubleund End double underline Red Begin redline red End redline Strike Begin strikeout strike End strikeout Rev Begin reverse video rev End reverse video Outline Begin outline text outline End outline text Fine Begin fine font size fine End fine font size Over Begin overstrike font over End overstrike font Sup Begin superscript sup End superscript Sub Begin subscript sub End subscript Large Begin large font size large End large font size Small Begin small font size small End small font size VeryLarge Begin very large font size verylarge End very large font size ExtraLarge Begin extra large font size extralarge End extra large font size Italics Begin an italics font italics End an italics font Shadow Begin shadow font shadow End shadow font 4 WP2X(1) WP2X(1) SmallCaps Begin small capitals font (fixed width) smallcaps End small capitals font (fixed width) UpHalfLine Advance printer up 1/2 line DownHalfLine Advance printer down 1/2 line AdvanceToHalfLine Advance to absolute vertical position. %1 is what WordPerfect thinks the current vertical page posi tion is, in half-lines. %2 is the desired posi tion, also in half-lines. Indent Expanded when an "Indent" code appears. indent Expanded at the end of an indented paragraph. DIndent Expanded when a "left-and-right-indent" code appears. dindent Expanded at the end of an double indent MarginRelease Margin release. %1 is the number of characters to move left. Center Center current line center End centering CenterHere Center line around current column centerhere End centering Align Begin alignment align End alignment AlignChar Set alignment character FlushRight Begin flush right flushright End flush right Math Begin math mode math End math mode MathCalc Begin math calc mode MathCalcColumn Math calc column SubTotal Do subtotal IsSubTotal Subtotal entry Total Do total 5 WP2X(1) WP2X(1) IsTotal Total entry GrandTotal Do grand total Col Begin column mode col End column mode Fn Expanded at the beginning of a footnote. fn Expanded at the end of a footnote. En Expanded at the beginning of an endnote. en Expanded at the end of an endnote. SetFn# Set the number for the next footnote to %1. FNote# Footnote number. ENote# Endnote number. Figure# Figure number. TableMarker Insert table of contents here Hyph Enable hyphenation. hyph Disable hyphenation. Just Enable justification. just Disable justification. Wid Enable widow/orphan protection. wid Disable widow/orphan protection. HZone The hyphenation zone. %1 and %2 are the two magi cal values that WordPerfect uses to control hyphen ation. DAlign Set the decimal alignment character to that whose ASCII value is %1. (`%c' is useful here.) Header Begin header text header End header text Footer Begin footer text footer End footer text Supp Suppress page number/header/footer information for one page. %1 argument is a bit field which describes what sort of suppression is desired. Here's what the bits mean: 1 = all 2 = page number 4 = page numbers moved to bottom 8 = all headers 16 = header a 32 = header b 64 = footer a 128 = footer b CtrPg Center page vertically SetFont Change pitch or font. %1 is the desired pitch. (Negative means proportionally-spaced.) %2 is the 6 WP2X(1) WP2X(1) font number. SetBin Select paper bin to %1 = 0, 1, ... PN0 No page numbering. PN1 Page number in top left. PN2 Page number in top center. PN3 Page number in top right. PN4 Page number on top outside corners (even/odd). PN5 Page number in lower left. PN6 Page number in bottom center. PN7 Page number in lower right. PN8 Page number on bottom outside corners (even/odd). If no expansion is supplied for an identifier, then noth ing is emitted to _s_t_d_o_u_t, but a warning message is sent to _s_t_d_e_r_r. This warning message will appear at most once per identifier, and it can be suppressed completely by the --ss option. The special identifier _t_y_p_e_o_u_t causes its replacement text to be displayed on the screen every time the configuration file is read. This is useful for identification messages, or reminders to the user. A special identifier is any character enclosed in single quotation marks, which represent themselves. For example, 'a'="{\\alpha}" causes the string "{\alpha}" to be emitted when an a is encountered. This could also have been written as '\xE0'="{\\alpha}" if the character a has ASCII value 0xE0. (Which is true for the IBM PC encoding.) If no definition exists for a particular special charac ter, it is transmitted undisturbed. If a special charac ter is encountered from the upper half of the ASCII char acter set, and if it has no definition, then a warning message is also emitted. (Which can be suppressed with the --ss option.) Lines beginning with the # character are comments. NNOOTTEESS This is based on an original WP 4.2 to anything transla tor. The file format has changed a lot between 4.2 and 5.0. This translator no longer reads WP 4.2 files, although it could be extended to do so. The 5.0+ format starts with a standard header file. There is a four byte magic number at the head of the file, 7 WP2X(1) WP2X(1) followed by various product and version information. All WordPerfect Corporation utilities use this standard header. See the WPproducts array in _w_p_2_x_._c Once the contents of the file have been located, there are three kinds of codes: simple one byte controls (WP 4.2 had only these kinds), fixed length controls, and variable length controls. There are a large number of undefined types defined for future use. If wwpp22xx detects something it doesn't understand, it can extract the length and skip that code. There are a number of defined codes that are unimplemented. Please see the code, specifically _t_o_k_e_n_s_._c where much of the input processing is done. FFIILLEESS The sample configuration files in _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_w_p_2_x give you some sort of idea what a `production quality' configu ration file might look like. They are not intended to be used as-is, but rather are meant to be modified to suit your particular needs. SSEEEE AALLSSOO _t_e_x(1), _l_a_t_e_x(1), _n_r_o_f_f(1), _t_r_o_f_f(1), _W_o_r_d_P_e_r_f_e_c_tDevel oper's_T_o_o_l_k_i_t _g_e_t_o_p_t_(_3_)_. DDIIAAGGNNOOSSTTIICCSS Ignoring byte [XX] Indicates that an unimplemented single byte code was ignored. Ignoring fixed [XX] Indicates that an unimplemented fixed length code was ignored. Ignoring variable [XX] sub [XX] length Indicates that an unimplemented variable length code was ignored, and gives its length. Warning: Expected XX but received XX at pos: YYYY something is wrong in the input file at byte YYYY. Warning: No expansion for XX (C) A WP code for which no expansion was defined in the config file was encountered. Internal error: Invalid escape C An error occured while processing an expansion escape (%x substitution). Probably it was not a recognized escape, check the config file. Fixed Length block [XX] incorrectly terminated by [YY] as pos Z Something is wrong with the input file, a fixed 8 WP2X(1) WP2X(1) length block was screwed up. Reserved code [XX] seen Something that WPC defined as reserved was seen. Check with WPC for new meaning. Not a recognized file type. The file did not start with the right WPC magic number. Maybe this is a 4.2 file, or not a WordPerfect file at all? Error: Cannot open X (reason) The file X could not be opened, for the indicated reason. Error: Expecting a hex digit Inside a string, you typed the characters `\x', but the next character was not a valid hex digit. Error: string pool overflow The configuration file contained too many strings. Increase the value of POOL_SIZE and recompile. Error: Unknown identifier X The word X was encountered in the configuration file when _w_p_2_x expected a token identifier like `HRt'. Most likely, you either misspelled it, or you got your quotation marks out of sync. Error: Identifier not followed by = sign After an identifier must come an equals-sign. Error: Quotation mark expected After the equals-sign must come a quotation mark. Error: X: `%\n' not at start of expansion The expansion for the identifier X contained the indicated sequence of characters somewhere other than the beginning of the string. The `%\n' inter polation code is meaningful only at the beginning of a string. Error: X: invalid escape `%x' The expansion for the identifier X contained an invalid escape. Either you used `%1', `%2' or `%c' when the identifier X does not supply that parame ter, or you meant for a genuine percent sign to be output, in which case you should put `%%' in the expansion. Error: Invalid character identifier Character identifiers can only be one character long (after backslash interpretation). 9 WP2X(1) WP2X(1) Warning: Expected XX but received YY. The program expected the next byte from the WP file to be XX, but the byte YY was encountered instead. This means either that your WP file is damaged, or that the program is seriously confused. (Or both.) The program will pretend that the byte in the file was indeed XX, which may lead to synchronization errors later on. Warning: No expansion for X The WP file contained the token X, but the configu ration file did not contain any expansion text for it. A null expansion was assumed. Warning: No expansion for XX (c) The WP file contained the character c (hex code XX), but the configuration file did not contain any expansion text for it. The character was emitted unaltered. Beware that this may give your text formatter indigestion if it does not handle eight- bit characters. Warning: X code not supported The file being converted uses a code which _w_p_2_x does not know how to convert. A comment is placed in the output file in its place. If you ever encounter a `WPCorp reserved' or a `WPCorp unde fined' code, the author would appreciate hearing from you. Internal error: Invalid escape, %x While processing text, _w_p_2_x noticed that you used an invalid escape. Nothing is emitted as the escape text. (The internal-ness is that this error is supposed to be caught at the time the configura tion file is read.) BBUUGGSS Naive configuration files will fail if your WP file doesn't nest its tags properly. A typical case is [Center][B]Hello[center] [Center]There[b][center] to produce a centered boldface `Hello'. If you use the naive encoding of Center="\\centerline{" center="}\n" Bold="{\\bf " bold="}" then this will expand to \centerline{{\bf Hello} 10 WP2X(1) WP2X(1) \centerline{There}} WordPerfect has no clean concept of grouping; it lets you change fonts at any time and let those changes propagate outside the current environment. (With the exception of headers, footers, footnotes, and endnotes.) Now sure, you could write complicated configuration strings to try to handle this `properly', but it'd proba bly not be worth the trouble. After all, the purpose is not to perform a perfect conversion, but rather to produce a _r_e_a_d_a_b_l_e conversion, which can then be massaged by hand to produce a perfect manuscript. Another potential problem is combined attributes, like boldface underline. Under a naive configuration, [B]Boldface [U]Underlined boldface[b] Underlined[u] normal. comes out as {\bf Boldface {\it Underlined boldface} Underlined\/} normal. which is wrong for two reasons. One is the nesting prob lem discussed above. The other is that TeX font attributes do not combine. Similar problems exist for other document preparation sys tems. So be careful. AAUUTTHHOORR Original author: Raymond Chen Current maintainer: Michael Richardson 11 wp2x-2.5-mhi/doc/Makefile100644 0 0 214 7122457155 13304 0ustar rootrootall: echo "use ../Makefile" install: install -c -m 644 -o root -g root wp2x.1l $(MANDIR)/man1 wp2x.cat: wp2x.1l man wp2x.1l > wp2x.cat wp2x-2.5-mhi/doc/HACKERSGUIDE100644 0 0 2626 7122457727 13463 0ustar rootroot A Guide to making changes to WP2X. Source files: src/charsets.c - contains a table of equivalents to WP Corp/IBM character sets. Currently only ISO-Latin1 is supported, and there is no way to pick another character set. src/charsets.h - structure definitions for above. src/dopen.c - some file utility functions (mostly historical) src/getopt.c - an implementation of the getopt(3) routines, use them if you don't have getopt in your libc. src/getopt.h - header for above. src/patchlevel.h- records the version of the source src/tokens.c - helper routines for token reader. src/tokens.h - header for above src/wp2x.c - main code Notes: The code in wp2x.c should be split up into smaller pieces. Routines of importance: process_token: Tokens come in five types: reserved, literal, singleByte, fixedLength, varLength The table of tokens is defined tokens.c. The codes are taken from the WP technical reference manual. Several support routines include: ignoreByte, ignoreFixed, ignoreVar These functions simple skip over an untranslateable (or undefined) code. outputToken: Takes the output type from the third column and calls process0. process0: looks up configuration element types, and output the right string defined in the configuration. The attributeOn/attributeOff routines can call generate calls to process0 as well. More to be added. wp2x-2.5-mhi/doc/README.original100644 0 0 6526 7122453536 14362 0ustar rootroot This is the second release a new wp2x. It mostly uses exactly the same configuration files, with a number of additions, and some changes in meaning. These are, of course, presently undocumented, this being a very alpha release. There is a Unix Makefile included. I haven't tried it on anything other than a Sparc II running 4.1.1, compiled with gcc. Please let me know how things go for you. The HTML config is oriented towards converting WP documents to a format suitable for the Journal. See wp.wp or wp.html. wp.wp-uu is a uuencoded version of wp.wp. Thanks to Thorsten Ludewig for the full Latin-1 character set array. There is a mailing list, wp2x-workers. Send mail to majordomo@spiff.ccs.carleton.ca with the body "subscribe wp2x-workers" to join. :!mcr!: HOME: mcr@sandelman.ocunix.on.ca +1 613 788 2600 3853 Michael Richardson WORK: mcr@spiff.carleton.ca Here is an Return to contents page

" # At the end of the file, we end the document, sign it. END="

_______________________________

Return to contents page

" # How to make a one-line comment in HTML. Comment="" # Protect percent signs and other magic symbols. '<'="<" '&'="&" # PageNo="\\folio{}" # insert page number # RomanPage="%\n%% Set roman page number %1\n" # set roman numerals # ArabicPage="%\n%% Set arabic page number %1\n" # set arabic numerals HSpace=" " # Unbreakable space Tab=" " # Tabs mean nothing HPg="\n

\n" # Do Hard pages have any meaning in HTML? CondEOP="\n

\n" HRt="\n

\n\n" # Hard return terminates paragraph SRt="\n" # Soft return is a newline #-="-" # Hyphens are ignored, since wrapping is up the clients. #--="-\n" # Hyphen at the end of a line gets a % =="-" # Nonbreaking hyphen #\-="-" # Discretionary hyphen XXX #\--="-\n" # Discretionary hyphen at the end of the line XXX NoHyphWord="" # Inhibit hyphenation of this word # Margins are left as comments, since you shouldn't change margins # willy-nilly in HTML. Marg="\n" TopMarg="\n" PageLength="\n" # Line spacing changes are treated by setting \baselinestretch and then # calling \normalbaselines to let the change take effect. SS="" 1.5S="" DS="" TS="" LS="" LPI="\n" ExtraLarge="

" extralarge="

" VeryLarge="

" verylarge="

" Large="

" large="

" Small="

" small="

" Fine="
" fine="
" Bold="\n " # Boldface bold="\n" Und="\n " # Underlining is in "emphasized" und="\n" # with italic correction stuck in always. Red=" " # Redline XXX red="" Strike="" # Strikeout XXX strike="" Italics="" italics="" Rev="" # Reverse video XXX rev="" Over="" # overprinting not supported XXX over="" Sup="" # fake superscript HTML doesn't do this... sup="" Sub="" # fake subscript sub="" # UpHalfLine, DownHalfLine, AdvanceToHalf -- undefined Indent="" # indent="" DIndent="
" # is not a perfect solution, but it's a start. dindent="
" MarginRelease="\n" # Not supported centerhere="\n" Align="\n" # could work... but # need to insert
  • before each line... align="\n" FlushRight="\n\n" flushright="\n\n" # Math, math, MathCalc, MathCalcColumn, SubTtl, IsSubTtl, Ttl, IsTtl, GrandTtl # Col, col -- undefined Fn="\n\n" # begin footnote - should be hypertext link! fn="\n\n" SetFn#="\n\n" # hypertext doesn't have numbers. En="\n\n" en="\n\n" FNote#="" ENote#="" # TableMarker -- undefined BeginTabs="" SetTab="" SetTabCenter="" SetTabRight="" SetTabDecimal="" EndTabs="" Hyph="" # Allow hyphenation hyph="" # Disable hyphenation Just="" # Right justify XXX just="" # Ragged right XXX Wid="" # Widow protection wid="" # Allow widows # HZone, DAlign -- undefined # These guys are left as comments, since you're not supposed to do # them in LaTeX. #Header="

    " #header="

    " #Footer="" #footer="" Supp="\n\n" CtrPg="\n\n" SetFont="\n\n" SetBin="\n\n" # Same reason for these. PN0="\n\n" PN1="\n\n" PN2="\n\n" PN3="\n\n" PN4="\n\n" PN5="\n\n" PN6="\n\n" PN7="\n\n" PN8="\n\n" wp2x-2.5-mhi/cfg/latex.cfg100644 0 0 14347 7122453536 13507 0ustar rootroot# LaTeX configuration file for WP2X. # # Written 12/15/89 by Raymond Chen '89. # Updated 7/05/91 by Raymond Chen. # # If you change this file, please make a note of it below # and in the BEGIN string. (And probably also in the typeout # string.) # # Version 0.0: Initial version. # Version 0.2: Add new tags, reorder existing tags for easier comparison. # Version 0.3: Tab markers, improved(?) header/footer # Version 0.4: Fix percent signs. # Version 0.5: Add \begin{document}, discuss { } \ # Version 0.6: New output scheme. typeout="LaTeX descriptor file for WP2X by Raymond Chen\n" # At the beginning of the file, we claim to be using article style. BEGIN="%% This file was created by the WP2X program, using a LaTeX %% descriptor file (Version 0.6) written by Raymond Chen. %% Do not expect everything to be converted perfectly. %% \\documentstyle{article} \\begin{document} %% " # At the end of the file, we end the document. END="\\end{document} %% That's all, folks. " # How to make a one-line comment in LaTeX. Comment="%\n" comment="\n" # Protect percent signs and other magic symbols. '%'="\\%%" '$'="\\$" '#'="\\#" '&'="\\&" '^'="\\^{}" '_'="\\_" '~'="\\~{}" # Curly braces and backslashes are intentionally left untranslated. # If you want them to be converted, uncomment these three lines. # # '{'="$\\{$" # '}'="$\\}$" # '\\'="$\\backslash$" # # These characters are left untranslated because they do not exist # in the TeX font tables. I.e., they won't be printed in boldface # or italic or whatever font you selected; they always come from # the math font. # Now the actual code expansions. # Many of these tags emit comments, since there is an official LaTeX way # of doing them. PageNo="\\folio{}" # insert page number RomanPage="%\n%% Set roman page number %1\n" # set roman numerals ArabicPage="%\n%% Set arabic page number %1\n" # set arabic numerals HSpace="~" # Unbreakable space Tab="\\indent " # Tabs mean to indent and start a new para. HPg="%\n\\vfill\\eject\n" # Hard page is just a \vfill\eject CondEOP="%\n%% Conditional end-of-page for %1 lines\n" HRt="%\n\n" # Hard return becomes a blank line SRt="%\n" # Soft return is a newline -="-" # Hyphens are hyphens --="-%%\n" # Hyphen at the end of a line gets a % =="{-}" # Nonbreaking hyphen \-="\\-" # Discretionary hyphen \--="\\-%%\n" # Discretionary hyphen at the end of the line NoHyphWord="\\mbox{}" # Inhibit hyphenation of this word # Margins are left as comments, since you shouldn't change margins # willy-nilly in LaTeX. Marg="%%\n%% left margin %1, right margin %2\n" TopMarg="%%\n%% top margin %1\n" PageLength="%%\n%% page length %1\n" # Line spacing changes are treated by setting \baselinestretch and then # calling \normalbaselines to let the change take effect. SS="\\def\\baselinestretch{1}\\normalbaselines\n" 1.5S="\\def\\baselinestretch{1.5}\\normalbaselines\n" DS="\\def\\baselinestretch{2}\\normalbaselines\n" TS="\\def\\baselinestretch{3}\\normalbaselines\n" LS="{\\count0=%1 \\count1=\\count0 \\divide\\count1 by 2 \\global\\edef\\baselinestretch{\\number\\count1\\ifodd\\count0.5\\fi}} \\normalbaselines} " LPI="%\n%% Change to %1 lines per inch\n" Bold="{\\bf " # Boldface bold="}" Und="{\\em " # Underlining is in "emphasized" und="\\/}" # with italic correction stuck in always. Red="{\\redline " # Redline red="}" Strike="{\\strikeout " # Strikeout strike="}" Rev="{\\reverse " # Reverse video rev="}" Over="\\llap{" # Overprinting is faked with \llap over="}" Sup="\\raise.5ex\\hbox{" # fake superscript sup="}" Sub="\\lower.5ex\\hbox{" # fake subscript sub="}" # UpHalfLine, DownHalfLine, AdvanceToHalf -- undefined Indent="{\\narrower " # Indented paragraphs use \narrower; this DIndent="{\\narrower " # is not a perfect solution, but it's a start. indent="\\par}\n" MarginRelease="%\n%% Margin release, move back %1 characters\n" Center="%\n\\begin{center}\n" # enter centering environment center="%\n\\end{center}" CenterHere="%\n\\begin{centerhere}\n" # Not supported centerhere="%\n\\end{centerhere}" Align="%\n\\begin{align}\n" # Not supported align="%\n\\end{align}" FlushRight="%\n\\begin{flushright}\n" flushright="%\n\\end{flushright}" # Math, math, MathCalc, MathCalcColumn, SubTtl, IsSubTtl, Ttl, IsTtl, GrandTtl # Col, col -- undefined Fn="%\n\\begin{footnote}\n" # begin footnote fn="%\n\\end{footnote}\n" SetFn#="%\n%% Set Footnote number to %1\n" # don't do this in LaTeX En="%\n\\begin{endnote}\n" # You'll have to write your own endnote environ. en="%\n\\end{endnote}\n" FNote#="" # Note numbers are automatically generated. ENote#="" # Note numbers are automatically generated. # TableMarker -- undefined BeginTabs="%\n%% Set tabs at" SetTab=" %1" SetTabCenter=" %1c" SetTabRight=" %1r" SetTabDecimal=" %1d" EndTabs="\n" Hyph="\\hyphenpenalty=50\n" # Allow hyphenation hyph="\\hyphenpenalty=10000\n" # Disable hyphenation Just="\\rightskip=0pt\n" # Right justify just="\\raggedright\n" # Ragged right Wid="\\clubpenalty=150 \\widowpenalty=150\n" # Widow protection wid="\\clubpenalty=0 \\widowpenalty=0\n" # Allow widows # HZone, DAlign -- undefined # These guys are left as comments, since you're not supposed to do # them in LaTeX. Header="%\n%% Change header to\n\\toks0={" header="}\n" Footer="%\n%% Change footer to\n\\toks0={" footer="}\n" Supp="%\n%% Suppress headers and footers on this page\n" CtrPg="%\n%% Center this page vertically\n" SetFont="%\n%% Change to %1 pitch, font %2\n" SetBin="%\n%% Change to paper bin %1\n" # Same reason for these. PN0="%\n%% no page numbers\n" PN1="%\n%% page numbers in upper left corner\n" PN2="%\n%% page numbers top center\n" PN3="%\n%% page numbers in upper right corner\n" PN4="%\n%% page numbers in alternating even/odd upper corners\n" PN5="%\n%% page numbers in bottom left corner\n" PN6="%\n%% page numbers bottom center\n" PN7="%\n%% page numbers in bottom right corner\n" PN8="%\n%% page numbers in alternating even/odd bottom corners\n" wp2x-2.5-mhi/cfg/sample.cfg100644 0 0 7467 7122453536 13640 0ustar rootroot# Sample configuration file for WP2X for a mythical conversion job. # # This is a configuration file that might be used to convert a # multi-chapter paper from WordPerfect into LaTeX. # # One way to approach writing a configuration file is to first use a null.cfg # file that defines nothing, then run your WP file through it, making careful # note of the warning messages. Then study how those tokens are used in the # WP file and write a configuration file based thereon. # # We will use article style. See the description of HPg for why there is # a =section at the end of the BEGIN string. BEGIN="\\documentstyle{article}\n=section" END="\\end{document}\n" # How to make a one-line comment in LaTeX. Comment="%\n%% " comment="\n" # Protect percent signs and other magic symbols. '%'="\\%%" '$'="\\$" '#'="\\#" '&'="\\&" '^'="\\^{}" '_'="\\_" '~'="\\~{}" # Now the actual code expansions. These are taken straight from latex.cfg HSpace="~" # Unbreakable space HRt="%\n\n" # Hard return becomes a blank line SRt="%\n" # Soft return is a newline -="-" # Hyphens are hyphens --="-%%\n" # Hyphen at the end of a line gets a % =="{-}" # Nonbreaking hyphen \-="\\-" # Discretionary hyphen \--="\\-%%\n" # Discretionary hyphen at the end of the line Und="{\\em " # Underlining is in "emphasized" und="\\/}" # with italic correction stuck in always. # As part of the postprocessing, I'd probably want to remove spurious italic # corrections, via # # %s/\\\/},/},/g # %s/\\\/}./}./g # # The only time boldface is used is in the section headings, so I can make # the codes expand to nothing, since LaTeX boldfaces the section headings # automatically. Bold="" bold="" # Since my paper never uses the equal-sign `=', I can use it as a special # tag in the output file. # # The style used in this paper is that all section and subsection headings # appear as centered lines, and centered lines are used nowhere else in # the paper. Sections start after a hard page break; subsections continue # in the middle of a page. So what we'll do is leave a tag here, then # postprocess the output with some vi macros. HPg="%\n\n=section" Center="=center{" center="}\n" # Afterwards, the following vi commands will turn the centering commands # into the proper \section or \subsection commands. # # %s/^=section=center/\\section/ # %s/^=center/\\subsection/ # # The only time single spacing is needed is during quotations, so we'll # use SS and DS as signals to enter and exit the quotation environment. # This produces a spurious \end{quote} at the top of the document, which # we'll delete as part of the postprocessing. Consequently, I don't # need DIndent, since the {quote} environment does that for me. SS="%\n\\begin{quote}\n" DS="%\n\\end{quote}\n" DIndent="" indent="" # The only characters I use overlap to produce is a capital O with a slash # through it. So afterwards, a simple # # %s/O=<\//{\\O}/g # # will turn all `O overprint /' into `{\O}'. # Over="=<" over="" # Though I do need some other accented characters for words like # r\'egime, r\^ole, na\"{\i}ve, and co\"operation. '\202'="\\'e" '\223'="\\^o" '\213'="\\\"{\\i}" '\224'="\\\"o" Fn="%\n\\begin{footnote}\n" # begin footnote fn="%\n\\end{footnote}\n" FNote#="" # Note numbers are automatically generated. ENote#="" # Note numbers are automatically generated. # I'll ignore headers and footers and suppression, since LaTeX does # that automatically. # them in LaTeX. Header="%\n%% header\n\\toks0={" header="} %% delete these lines!\n" Footer="%\n%% footer\n\\toks0={" footer="} %% delete these lines!\n" Supp="" PN0="" PN1="" PN2="" PN3="" PN4="" PN5="" PN6="" PN7="" PN8="" wp2x-2.5-mhi/cfg/script.cfg100644 0 0 4176 7122453536 13655 0ustar rootroot# Script configuration file for WP2X. # # Written 5/20/89 by Raymond Chen. # If you change this file, please make a note of it below # and in the BEGIN string. # # Version 0.0: Initial version. # Version 0.1: COMMENT tag added 23-Jul-1991. # Version 0.2: Note numbers. # Version 0.3: New output scheme. HPg="%\n.pa\n" # Hard page forces a new page HRt="%\n" # Hard return does nothing; the .pp will be # produced when we hit a Tab. SRt="%\n" # Soft return is a newline Tab=".pp\n" # Tab marks the start of a new paragraph -="-" # Hyphens are hyphens --="-+\\n" # Hyphen at the end of a line gets a + =="-" # Nonbreaking hyphen (does it exist?) \-="" # Discretionary hyphen does not exist \--="+\n" # Discretonary hyphen at the end of the line Und="+\n.us " # Underlining und="|" Bold="+\n.bd " # Boldface bold="|" # Margins are left as comments, since changing the margin on the fly # is tricky. Marg="%\n.* left margin %1, right margin %2\n" Indent="%\n.in +5\n" # Push our margin in, please. indent="%\n.in\n" # Pop it back. Fn="%\n.footnote\n" # You'll have to write these macros yourself. fn="%\n.footnote end\n" En="%\n.endnote\n" en="%\n.endnote end\n" FNote#="" # Note numbers should be automatically generated. ENote#="" # Note numbers should be automatically generated. # There is no way to do spacing different from 1 or 2. SS="%\n.ss\n" 1.5S="%\n.* Switch to 1.5 spacing\n" DS="%\n.ds\n" TS="%\n.* Switch to triple spacing\n" LS="%\n.* Switch to %1/2 spacing\n" # At the beginning of the file, we load the proper style file # and the laser files. # We also put in some identification. BEGIN=".* This file was created by the WP2X program, using a Script .* descriptor file (Version 0.3) written by Raymond Chen. .* .* Do not expect everything to be converted perfectly. .* .dc cont + .ud set | " END="\n.* End of file\n" Comment="%\n.* " comment="\n" wp2x-2.5-mhi/cfg/tex.cfg100644 0 0 14373 7122453536 13171 0ustar rootroot# TeX configuration file for WP2X. # # Written 5/20/89 by Raymond Chen. # Updated 7/05/91 by Raymond Chen. # # If you change this file, please make a note of it below # and in the BEGIN string. (And probably also in the typeout # string.) # # Version 0.0: Initial version. # Version 0.1: Add more magic characters. # Version 0.2: Add new tags, reorder existing tags for easier comparison. # Version 0.3: Fix Note# # Version 0.4: Fix some %'s that weren't doubled # Version 0.5: Discuss { } \ # Version 0.6: New output scheme. typeout="TeX descriptor file for WP2X by Raymond Chen\n" # At the beginning of the file, we put some macros which are # used by the page numbering routines. BEGIN="%% This file was created by the WP2X program, using a TeX %% descriptor file (Version 0.6) written by Raymond Chen. %% Do not expect everything to be converted perfectly. %% %% Macros for page numbering. \\def\\numberleft{\\tenrm\\folio\\hss} \\def\\numbercenter{\\hss\\tenrm\\folio\\hss} \\def\\numberright{\\tenrm\\folio\\hss} \\def\\numberevenodd{\\ifodd\\pageno\\numberright\\else\\numberleft\\fi} %% Macros for conditional end of page \\def\\CondEOP#1{\\vskip0pt plus#1\\baselineskip\\penalty0 \\vskip0pt plus-#1\\baselineskip} %% " END="\\vfill\\eject\\end %% That's all, folks. " # How to make a one-line comment in TeX. Comment="%\n%% " comment="\n" # Protect magic characters. '%'="\\%%" '$'="\\$" '#'="\\#" '&'="\\&" '^'="\\^{}" '_'="\\_" '~'="\\~{}" # Curly braces and backslashes are intentionally left untranslated. # If you want them to be converted, uncomment these three lines. # # '{'="$\\{$" # '}'="$\\}$" # '\\'="$\\backslash$" # # These characters are left untranslated because they do not exist # in the TeX font tables. I.e., they won't be printed in boldface # or italic or whatever font you selected; they always come from # the math font. # Now the actual code expansions. PageNo="\\folio{}" # insert page number RomanPage="\\pageno=-%1 " # set roman numerals ArabicPage="\\pageno=%1 " # set arabic numerals HSpace="~" # Unbreakable space # If you use tables, you may want to change the definition of Tab below. Tab="%\n\n\\indent " # Tabs mean to indent and start a new para. BeginTabs="%\n%% [Tab settings at " SetTab="%1 " SetTabCenter="%1(center) " SetTabRight="%1(right) " SetTabDecimal="%1(decimal) " EndTabs="]\n" HPg="%\n\\vfill\\eject\n" # Hard page is just a \vfill\eject CondEOP="\\CondEOP{%1}" # Conditional end-of-page HRt="%\n\n" # Hard return becomes a blank line SRt="%\n" # Soft return is a newline -="-" # Hyphens are hyphens --="-%%\n" # Hyphen at the end of a line gets a % =="{-}" # Nonbreaking hyphen \-="\\-" # Discretionary hyphen \--="\\-%%\n" # Discretionary hyphen at the end of the line # Margins are left as comments, since TeX margins are rather hairy # The only interesting that left/right margins does is end the paragraph. Marg="%\n\n%% left margin %1, right margin %2\n" TopMarg="%\n%% top margin %1\n" PageLength="%\n%% page length %1\n" # Line spacing changes are treated by storing the proper value into # \baselineskip. SS="\\baselineskip=\\normalbaselineskip\n" 1.5S="\\baselineskip=1.5\\normalbaselineskip\n" DS="\\baselineskip=2\\normalbaselineskip\n" TS="\\baselineskip=3\\normalbaselineskip\n" LS="\\baselineskip=%1\\normalbaselineskip \\divide\\baselineskip by2\n" LPI="%\n%% Change to %1 lines per inch\n" Bold="{\\bf " # Boldface bold="}" Und="{\\it " # Underlining is in italics und="\\/}" # with italic correction stuck in always. Red="{\\redline " # Redline red="}" Strike="{\\strikeout " # Strikeout strike="}" Rev="{\\reverse " # Reverse video rev="}" Over="\\llap{" # Overprinting is faked with \llap over="}" Sup="\\raise.5ex\\hbox{" # fake superscript sup="}" Sub="\\lower.5ex\\hbox{" # fake subscript sub="}" # UpHalfLine, DownHalfLine, AdvanceToHalf -- undefined Indent="%\n\n{\\narrower " # Indented paragraphs use \narrower; this DIndent="%\n\n{\\narrower " # is not a perfect solution, but it's a start. indent="\\par}" MarginRelease="\\leavevmode\\kern-%1em " Center="%\n\n\\centerline{" center="}" CenterHere="\\centerhere{" # Not supported centerhere="}" Align="\\align{" # Not supported align="}" FlushRight="\\rightline{" flushright="}" # Math, math, MathCalc, MathCalcColumn, SubTtl, IsSubTtl, Ttl, IsTtl, GrandTtl # Col, col -- undefined Fn="\\note{" # This uses the \note macros in the TeXbook fn="}" SetFn#="\\notenumber=%1 " En="\\endnote{" # You'll have to write your own \endnote macro en="}" FNote#="" # Note numbers are automatically generated. ENote#="" # Note numbers should be automatically generated. # TableMarker -- undefined Hyph="\\hyphenpenalty=50\n" # Allow hyphenation hyph="\\hyphenpenalty=10000\n" # Disable hyphenation NoHyphWord="\\hbox{}" # Suppress hyphenation of next word Just="\\rightskip=0pt\n" # Right justify just="\\raggedright\n" # Ragged right Wid="\\clubpenalty=150 \\widowpenalty=150\n" # Widow protection wid="\\clubpenalty=0 \\widowpenalty=0\n" # Allow widows # HZone, DAlign -- undefined # Headers and footers Header="\\headline={" header="}" Footer="\\footline={" footer="}" # These guys are left as comments, since actually doing them right # requires all sorts of icky things I'd rather not think about. Supp="%\n%% Suppress headers and footers on this page\n" CtrPg="%\n%% Center this page vertically\n" SetFont="%\n%% Change to %1 pitch, font %2\n" SetBin="%\n%% Change to paper bin %1\n" # Page numbering PN0="\\headline={\\hss}\\footline={\\hss}%%\n" PN1="\\headline={\\numberleft}\\footline={\\hss}%%\n" PN2="\\headline={\\numbercenter}\\footline={\\hss}%%\n" PN3="\\headline={\\numberright}\\footline={\\hss}%%\n" PN4="\\headline={\\numberevenodd}\\footline={\\hss}%%\n" PN5="\\headline={\\hss}\\footline={\\numberleft}%%\n" PN6="\\headline={\\hss}\\footline={\\numbercenter}%%\n" PN7="\\headline={\\hss}\\footline={\\numberright}%%\n" PN8="\\headline={\\hss}\\footline={\\numberevenodd}%%\n" wp2x-2.5-mhi/cfg/troff.cfg100644 0 0 12522 7122453536 13503 0ustar rootroot# troff configuration file for WP2X. # # Written 12/15/89 by Raymond Chen. # # If you change this file, please make a note of it below # and in the BEGIN string. # # Version 0.0: Initial version. # Version 1.0: COMMENT tag added 23-Jul-1991. # Version 1.1: Improved comments, assorted new tags. # Version 1.2: New output scheme. # # Known bugs (err... design decisions). # # No attempt is made to insert \& at the start of every text line. # So beware of lines that happen to begin with a period or an apostrophe. # # At the beginning of the file, we put in some identification. BEGIN=".\\\" This file was created by the WP2X program, using a troff .\\\" descriptor file (Version 1.2) written by Raymond Chen. .\\\" .\\\" Do not expect everything to be converted perfectly. .\\\" .\\\" The macro `hd' is our header, and `fo' is our footer. By default, .\\\" they do nothing (yet). These macros are intentionally crude (they .\\\" don't preserve the environment or anything) because you'll probably .\\\" end up hand-editing them anyway. .de hd 'sp 1 .. .de fo 'sp 1 .. .wh 0 hd .wh -1 fo .\\\" .\\\" Conditional page eject macro. .de CP .ne \\\\$1/2u .. " # At the end of the file, we close up some tags. END="\n.\\\" .\\\" End of file " Comment="\n.\\\" " comment="\n" # Protect magic characters. '\\'="\\e" # Now the actual code expansions. PageNo="%%" # insert page number (only works in head/footers) RomanPage="\n.pn %1\n.af %% i\n" # set roman numerals ArabicPage="\n.pn %1\n.af %% 1\n" # set arabic numerals HSpace="\\ " # Unbreakable space Tab="\t" # Leave tabs as is. BeginTabs="\n.ta " SetTab="%1 " SetTabCenter="%1C " SetTabRight="%1R " SetTabDecimal="%1d " EndTabs="\n" HPg="\n.bp\n" # Hard page forces a new page CondEOP="\n.CP %1\n" # Conditional end-of-page HRt="\n.br\n" # Hard return. SRt="\n" # Soft return is a newline -="-" # Hyphens are hyphens --="-\\c\n" # Hyphen at the end of a line gets a \c =="-" # Nonbreaking hyphen (does it exist?) \-="\\%%" # Discretionary hyphen \--="\\%%\\c\n" # Discretonary hyphen at the end of the line # Margins are left as comments, since changing the margin on the fly # is tricky. Marg="\n.\\\" left margin %1, right margin %2\n" TopMarg="\n.\\\" top margin %1\n" #$$ PageLength="\n.\\\" page length %1\n" #$$ # There is no way to do fractional spacing without playing with .vs SS="\n.ls 1\n" 1.5S="\n.\\\" Switch to 1.5 spacing\n" DS="\n.ls 2\n" TS="\n.ls 3\n" LS="\n.\\\" Switch to %1/2 spacing\n" LPI="\n.\\\" Change to %1 lines per inch\n" Bold="\\fB" # Boldface bold="\\fP" Und="\\fI" # Underlining uses italics und="\\^\\fP" # insert italic correction Red="\\f(RE" # Change `RE' to your redline font red="\\fP" Strike="\\f(ST" # Change `ST' to your strikeout font strike="\\fP" Rev="\\f(RV" # Change `RV' to your reverse font rev="\\fP" # Overstriking is nasty because WP puts the overstrike code AFTER # the character being overstruck. So we can't use the \o'...' service. Over="\\h'-\\n(.wu'" over="" # Super and subscript are done by \u and \d. If you want, use \v instead. Sup="\\u" sup="\\d" Sub="\\d" sub="\\u" UpHalfLine="\\u" DownHalfLine="\\d" AdvanceToHalfLine="?" #$$ Indent="\n.in +0.5i\n" # Indented paragraph DIndent="\n.in +0.5i\n" # not really, but we have to do it this way. indent="\n.in -0.5i\n" # so that this works MarginRelease="\\h'-%1'" Center="\n.ce 1\n" center="\n" # FlushRight # flushright Fn="\n.FS\n" # Go write your own fn="\n.FE\n" # footnote and En="\n.ES\n" # endnote en="\n.EE\n" # macros FNote#="" # Note numbers should be automatically generated. ENote#="" # Other random parameters Hyph="\n.hy\n" hyph="\n.nh\n" NoHyphWord="\\%%" # Suppress hyphenation of next word Just="\n.ad\n" just="\n.na\n" Wid="\n.\\\" Widow protection on\n" wid="\n.\\\" Widow protection off\n" # Headers and footers. These are totally bogus definitions, since # they'll have `.' instead of apostrophes, but the purpose is to do # some sort of conversion AT ALL. Header="\n.de hd\n" # new header macro header="\n..\n" # (totally bogus) Footer="\n.de fo\n" # new footer macro footer="\n..\n" # (totally bogus) # These guys are left as comments, since actually doing them right # requires all sorts of icky things I'd rather not think about. Supp="\n.\\\" Suppress headers and footers on this page\n" CtrPg="\n.\\\" Center this page vertically\n" SetFont="\n.\\\" Change to %1 pitch, font %2\n" SetBin="\n.\\\"%% Change to paper bin %1\n" # Page numbering PN0="\n.de hd\n.tl ''''\n..\n.de fo\n.tl ''''\n..\n" PN1="\n.de hd\n.tl '%%'''\n..\n.de fo\n.tl ''''\n..\n" PN2="\n.de hd\n.tl ''%%''\n..\n.de fo\n.tl ''''\n..\n" PN3="\n.de hd\n.tl '''%%'\n..\n.de fo\n.tl ''''\n..\n" PN4="\n.de hd\n.if e .tl '%%'''\n.el .tl '''%%'\n..\n.de fo\n.tl ''''\n..\n" PN5="\n.de hd\n.tl ''''\n..\n.de fo\n.tl '%%'''\n..\n" PN6="\n.de hd\n.tl ''''\n..\n.de fo\n.tl ''%%''\n..\n" PN7="\n.de hd\n.tl ''''\n..\n.de fo\n.tl '''%%'\n..\n" PN8="\n.de hd\n.tl ''''\n..\n.de fo\n.if e .tl '%%'''\n.el .tl '''%%'\n..\n" wp2x-2.5-mhi/TODO100644 0 0 137 7122462011 11556 0ustar rootroot- Czech codepage(s) support - RPM/deb/FreeBSD support - make binary && make tarball - autoconf wp2x-2.5-mhi/README100644 0 0 2175 7122461432 12000 0ustar rootrootThis is wp2x, a WordPerfect 5.1 to whatever converter ftp://ftp.penguin.cz/pub/users/mhi/wp2x/ ------------------ Copyright (C) 1989-1991 Raymond Chen Copyright (c) 1993-1994 Michael Richardson Copyright (c) 2000 Martin Hinner This program and its supporting files are Copyright 1991 by Raymond Chen. You may distribute the program freely, provided it is distributed in its entirely, including this README file. Any modifications to the program should be clearly marked as such. ------------------ Wp2x is intended to convert simple files stored in Word Perfect 5.1 format into any other document processing language that uses plain text files. Examples include TeX, LaTeX, troff, GML and HTML. I (mhi) found this program in May 2000. It didn't compile successfully on my Linux and BSD boxes, so I wrote some patches. Because Raymond Chen's e-mail addresses are no longer working, I decided to maintain this useful software myself. PLEASE, if you know author's current e-mail address, let me know. For more information see doc/README.original or ChangeLog wp2x-2.5-mhi/src/ 40755 0 0 0 7122462000 11575 5ustar rootrootwp2x-2.5-mhi/src/charsets.c100644 0 0 30301 7122460542 13700 0ustar rootroot /* * Define structures to hold extended character set translations * */ #include "charsets.h" char NOC[] = "%"; char *isolatin1_chars[9][256] = { /* charset 0 */ { NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 1 */ { NOC, "", NOC, NOC, "", NOC, "", "", "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", NOC, "", "", "", "Q", "R", "", "", "", "", "", "", "", "", "", "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 2 */ { NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 3 */ { NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 4 */ { NOC, NOC, NOC, NOC, NOC, "", "", "", "", "", "", "", "", NOC, NOC, "", "", "", "", "", "", NOC, "", "", "", "", "", NOC, NOC, NOC, NOC, "\"", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "*", "*", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "\"", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 5 */ { NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 6 */ { NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 7 */ { NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC }, /* charset 8 */ { NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, "", NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC, NOC } }; wp2x-2.5-mhi/src/charsets.h100644 0 0 163 7122453536 13655 0ustar rootroot/* * Define structures to hold extended character set translations * */ extern char *isolatin1_chars[9][256]; wp2x-2.5-mhi/src/dopen.c100644 0 0 10445 7122460542 13200 0ustar rootroot/*dopen.c,v 1.3 1994/01/06 14:32:26 mcr Exp */ /* dopen() is a massively system-dependent function, so I've placed * it in a separate file. */ /* Macros used... * IS_ABS -- a macro that returns nonzero if the string argument is an * absolute path, or 0 if it is a relative path. * PATH_STR -- a string of characters which separate directory components. * SUF_STR -- suffix for configuration files * PATH_SEP -- character to separate directory from filename. * LIST_SEP -- character that separates pathnames in a list. * exists(f) -- returns nonzero if the file f exists. * if not defined, then use fopen to determine existence. * HAS_ENV -- if defined, environment variables are searched. * */ /* * Our algorithm is to try the following in sequence, until one works. * * The filename as-is. * The filename with SUF_STR appended. * * If IS_ABS returns nonzero, then fail. * * Else, we call the system-dependent get_dir() function. Each call * provides a directory to look in. * * For each directory, append the filename (perhaps inserting the * PATH_SEP). If that fails, try again after appending SUF_STR. * * When we run out of directories, we fail. */ #include #include #include #include #ifdef UNIX #define HAS_ENV #define exists(f) (access(f, 0) == 0) #define IS_ABS(f) (*f == '/') #define SUF_STR ".cfg" #define PATH_SEP '/' #define PATH_STR "/" #define LIST_SEP ':' #endif #ifdef MSDOS #define HAS_ENV #include #define exists(f) (access(f, 0) == 0) #define IS_ABS(f) (f[1] == ':' || strchr(PATH_STR, *f)) #define SUF_STR ".cfg" #define PATH_SEP '/' #define PATH_STR "/\\:" #define LIST_SEP ';' #endif #ifdef VMS /* VMS is really different */ #define IS_ABS(f) (strchr(f, ':') || strchr(PATH_STR, *f)) #define SUF_STR ".cfg" #define PATH_SEP '.' #define PATH_STR "[.]" #endif #ifdef AMIGA #define IS_ABS(f) (strchr(f, ':') || *f == '/') #define SUF_STR ".cfg" #define PATH_SEP '/' #define PATH_STR "/" #endif /* If user specified no operating system, be very pessimistic. * Don't do anything beyond adding the `.cfg. suffix. */ #ifndef SUF_STR #define IS_ABS 1 #define SUF_STR ".cfg" #undef PATH_SEP #undef PATH_STR #undef HAS_ENV #endif /* If we don't have an exists(), then we'll just use fopen. */ #ifndef exists #define exists(f) (descriptor = fopen(f, "rt")) #endif #ifdef HAS_ENV /* We search a handful of environment variables */ const char *envlist[] = {"PATH", "DPATH", "WP2XDIR", NULL}; char * get_dir (void) { static const char **nextenv = envlist; static char *nextpath = NULL; char *s; /* get the next environment variable */ while (nextpath == NULL || *nextpath == '\0') { if (*nextenv == NULL) return NULL; /* out of ideas */ nextpath = getenv (*nextenv++); if (nextpath) { nextpath = strdup (nextpath); } } s = nextpath; while (*nextpath && *nextpath != LIST_SEP) nextpath++; if (*nextpath) { *nextpath = '\0'; nextpath++; } return s; /* return pointer to start of string */ } #else /* On non-UNIX systems, we don't have environment variables. */ /* We might have other things, though, so insert your local version here */ char * get_dir (void) { return NULL; } #endif /* s is where to copy the filename, and f is the filename to try. */ FILE * try_directory (char *dir, const char *f) { int dirlen; char *buf; FILE *d; dirlen = strlen (dir); buf = alloca (dirlen + strlen (f) + 0x10); strcpy (buf, dir); if (buf[dirlen - 1] != PATH_SEP) { buf[dirlen++] = PATH_SEP; buf[dirlen] = '\0'; } strcat (buf, f); if (exists (buf)) { d = fopen (buf, "rt"); return d; } strcat (buf, SUF_STR); if (exists (buf)) { d = fopen (buf, "rt"); return d; } return NULL; } FILE * dopen (const char *f) { char *s; FILE *d; /* First, try it as-is */ if ((d = try_directory ("./", f)) != NULL) return d; #ifdef WP2X_DIR if ((d = try_directory (WP2X_DIR, f)) != NULL) return d; #endif /* Skip if an absolute path */ if (!IS_ABS (f)) { /* Iterate through the possible directories */ while (s = get_dir ()) { if ((d = try_directory (s, f)) != NULL) return d; } } error (NULL, "Cannot find file %s\n", f); return NULL; } wp2x-2.5-mhi/src/getopt.c100644 0 0 6352 7122460542 13357 0ustar rootroot /* getopt.c - getopt() for those systems that don't have it. Derived from comp.sources.unix/volume3/att_getopt. Modified by James Clark (jjc@jclark.com). */ #include #include #include "getopt.h" #ifdef SWITCHAR #include #endif int opterr = 1; int optind = 1; int optopt; char *optarg; #ifndef OPTION_CHAR #define OPTION_CHAR '-' #endif int getopt (argc, argv, opts) int argc; char **argv; char *opts; { #ifdef SWITCHAR union REGS regs; static char switchar = '\0'; #endif static int sp = 1; register int c; register char *cp; char *message; #ifdef SWITCHAR if (switchar == '\0') { regs.x.ax = 0x3700; intdos (®s, ®s); if (!regs.x.cflag) switchar = regs.h.dl; else switchar = '/'; } #endif if (sp == 1) { if (optind >= argc) return EOF; if (( #ifdef SWITCHAR argv[optind][0] != switchar && #endif argv[optind][0] != OPTION_CHAR) || argv[optind][1] == '\0') { #ifdef REORDER_ARGS int i; for (i = optind; i < argc; i++) if (( #ifdef SWITCHAR argv[i][0] == switchar || #endif argv[i][0] == OPTION_CHAR) && argv[i][1] != '\0') break; if (i < argc) { c = argv[i][1]; #ifdef CASE_INSENSITIVE_OPTIONS if (isupper (c)) c = tolower (c); #endif if (c != ':' && c != OPTION_CHAR && (cp = strchr (opts, c)) != NULL && cp[1] == ':' && argv[i][2] == 0 && i < argc - 1) { int j; char *temp1 = argv[i]; char *temp2 = argv[i + 1]; for (j = i - 1; j >= optind; j--) argv[j + 2] = argv[j]; argv[optind] = temp1; argv[optind + 1] = temp2; } else { int j; char *temp = argv[i]; for (j = i - 1; j >= optind; j--) argv[j + 1] = argv[j]; argv[optind] = temp; } } else #endif return EOF; } if ((argv[optind][0] == OPTION_CHAR && argv[optind][1] == OPTION_CHAR && argv[optind][2] == '\0') #ifdef SWITCHAR || (argv[optind][0] == switchar && argv[optind][1] == switchar && argv[optind][2] == '\0') #endif ) { optind++; return (EOF); } } optopt = c = argv[optind][sp]; #ifdef CASE_INSENSITIVE_OPTIONS if ( #ifdef USE_ISASCII isascii (c) && #endif /* USE_ISASCII */ isupper ((unsigned char) c)) optopt = c = tolower ((unsigned char) c); #endif /* CASE_INSENSITIVE_OPTIONS */ if (c == ':' || (cp = strchr (opts, c)) == NULL) { if (argv[optind][++sp] == '\0') { optind++; sp = 1; } message = ": illegal option -- "; goto bad; } if (*++cp == ':') { if (argv[optind][sp + 1] != '\0') optarg = &argv[optind++][sp + 1]; else if (++optind >= argc) { sp = 1; message = ": option requires an argument -- "; goto bad; } else optarg = argv[optind++]; sp = 1; } else { if (argv[optind][++sp] == '\0') { sp = 1; optind++; } optarg = NULL; } return c; bad: if (opterr) { fputs (argv[0], stderr); fputs (message, stderr); fputc (optopt, stderr); fputc ('\n', stderr); } return '?'; } /* Local Variables: c-indent-level: 4 c-continued-statement-offset: 4 c-brace-offset: 4 c-argdecl-indent: 4 c-label-offset: -4 tab-width: 4 End: */ wp2x-2.5-mhi/src/getopt.h100644 0 0 427 7122453536 13346 0ustar rootroot/* Declare getopt() and associated variables. */ /* Don't use prototypes in case some system header file has a conflicting definition. Systems differ on how they declare the second parameter. */ extern int getopt(); extern char *optarg; extern int optind; extern int opterr; wp2x-2.5-mhi/src/patchlevel.h100644 0 0 26 7122453536 14146 0ustar rootroot#define PATCHLEVEL 5 wp2x-2.5-mhi/src/tokens.c100644 0 0 40246 7122460542 13400 0ustar rootroot/* * Definitions for each WP token. * * */ #include #include "tokens.h" #include "charsets.h" extern int silent; int popEnvironment (state * st, struct WPToken *wpt, void *data) { extern void leave_environment (state *, int); leave_environment (st, wpt->wp_intdata); return 1; } int hardReturn (state * st, struct WPToken *wpt, void *data) { process0 (st, HRt); return 1; } int softPage (state * st, struct WPToken *wpt, void *data) { return 1; } int hardReturnSoftPage (state * st, struct WPToken *wpt, void *data) { hardReturn (st, wpt, data); softPage (st, wpt, data); return 1; } int ignoreByte (state * st, struct WPToken *wpt, void *data) { if (!silent) { fprintf (stderr, "Ignoring byte [%02x]\n", wpt->wp_code); } return 1; } int ignoreFixed (state * st, struct WPToken *wpt, void *data) { if (!silent) { fprintf (stderr, "Ignoring fixed [%02x]\n", wpt->wp_code); } return (1); } int ignoreVar (state * st, struct WPToken *wpt, void *data) { struct VariableCode *vc = data; if (!silent) { fprintf (stderr, "Ignoring variable [%02x] sub [%02x] length: %d\n", vc->func, vc->subFunc, vc->len); } return 1; } int hardPage (state * st, struct WPToken *wpt, void *data) { process0 (st, HPg); return 1; } int softReturn (state * st, struct WPToken *wpt, void *data) { process0 (st, SRt); return 1; } int outputToken (state * st, struct WPToken *wpt, void *data) { process0 (st, wpt->wp_intdata); return 1; } int extendedChar (state * st, struct WPToken *wpt, void *data) { char *bytes = data; int char_code = bytes[1]; int char_set = bytes[2]; if (char_set >= 0 && char_set <= 8) fputs (isolatin1_chars[char_set][char_code], st->outfile); else fprintf (st->outfile, "", char_set, char_code); return 1; } int attributeOn (state * st, struct WPToken *wpt, void *data) { char *bytes = data; char attribute = bytes[1]; switch (attribute) { case 0: /* extra large */ process0 (st, ExtraLarge); break; case 1: /* very large */ process0 (st, VeryLarge); break; case 2: /* large */ process0 (st, Large); break; case 3: /* small */ process0 (st, Small); break; case 4: /* fine */ process0 (st, Fine); break; case 5: /* superscript */ process0 (st, Sup); break; case 6: /* subscript */ process0 (st, Sub); break; case 7: /* outline */ process0 (st, Outline); break; case 8: /* italics */ process0 (st, Italics); break; case 9: /* shadow */ process0 (st, Shadow); break; case 10: /* redline */ process0 (st, Red); break; case 11: /* double underline */ process0 (st, DoubleUnd); break; case 12: /* bold */ process0 (st, Bold); break; case 13: /* strikeout */ process0 (st, Strike); break; case 14: /* underline */ process0 (st, Und); break; case 15: /* small caps */ process0 (st, SmallCaps); break; } return 1; } int attributeOff (state * st, struct WPToken *wpt, void *data) { char *bytes = data; char attribute = bytes[1]; switch (attribute) { case 0: /* extra large */ process0 (st, eExtraLarge); break; case 1: /* very large */ process0 (st, eVeryLarge); break; case 2: /* large */ process0 (st, eLarge); break; case 3: /* small */ process0 (st, eSmall); break; case 4: /* fine */ process0 (st, eFine); break; case 5: /* superscript */ process0 (st, eSup); break; case 6: /* subscript */ process0 (st, eSub); break; case 7: /* outline */ process0 (st, eOutline); break; case 8: /* italics */ process0 (st, eItalics); break; case 9: /* shadow */ process0 (st, eShadow); break; case 10: /* redline */ process0 (st, eRed); break; case 11: /* double underline */ process0 (st, eDoubleUnd); break; case 12: /* bold */ process0 (st, eBold); break; case 13: /* strikeout */ process0 (st, eStrike); break; case 14: /* underline */ process0 (st, eUnd); break; case 15: /* small caps */ process0 (st, eSmallCaps); break; } return 1; } int endIndent (state * st, struct WPToken *wpt, void *data) { /* do nothing */ return 1; } int startIndent (state * st, struct WPToken *wpt, void *data) { char *bytes = data; if (bytes[1] & 1) { /* left/right indent */ process0 (st, DIndent); } else { process0 (st, Indent); } do { if (process_token (st) == 0) return 0; } while (!(st->lastToken->wp_handleFunction == endIndent)); if (bytes[1] & 1) { /* left/right indent */ process0 (st, eDIndent); } else { process0 (st, eIndent); } return 1; } struct WPToken wp_tokens[] = { /* wp_type wp_code wp_intdata wp_strdata wp_size wp_handleFunction */ {reserved, 0x00, 0, NULL, 0, NULL}, {singleByte, 0x01, 0, NULL, 0, ignoreByte}, {singleByte, 0x02, 0, NULL, 0, ignoreByte}, {singleByte, 0x03, 0, NULL, 0, ignoreByte}, {singleByte, 0x04, 0, NULL, 0, ignoreByte}, {singleByte, 0x05, 0, NULL, 0, ignoreByte}, {singleByte, 0x06, 0, NULL, 0, ignoreByte}, {singleByte, 0x07, 0, NULL, 0, ignoreByte}, {reserved, 0x08, 0, NULL, 0, NULL}, {reserved, 0x09, 0, NULL, 0, NULL}, {singleByte, 0x0A, 0, NULL, 0, hardReturn}, {singleByte, 0x0B, 0, NULL, 0, softPage}, {singleByte, 0x0C, 0, NULL, 0, hardPage}, {singleByte, 0x0D, 0, NULL, 0, softReturn}, {singleByte, 0x0E, 0, NULL, 0, ignoreByte}, {singleByte, 0x0F, 0, NULL, 0, ignoreByte}, {singleByte, 0x10, 0, NULL, 0, ignoreByte}, {singleByte, 0x11, 0, NULL, 0, ignoreByte}, {singleByte, 0x12, 0, NULL, 0, ignoreByte}, {singleByte, 0x13, 0, NULL, 0, ignoreByte}, {singleByte, 0x14, 0, NULL, 0, ignoreByte}, {singleByte, 0x15, 0, NULL, 0, ignoreByte}, {singleByte, 0x16, 0, NULL, 0, ignoreByte}, {reserved, 0x17, 0, NULL, 0, NULL}, {reserved, 0x18, 0, NULL, 0, NULL}, {reserved, 0x19, 0, NULL, 0, NULL}, {reserved, 0x1A, 0, NULL, 0, NULL}, {reserved, 0x1B, 0, NULL, 0, NULL}, {reserved, 0x1C, 0, NULL, 0, NULL}, {reserved, 0x1D, 0, NULL, 0, NULL}, {reserved, 0x1E, 0, NULL, 0, NULL}, {reserved, 0x1F, 0, NULL, 0, NULL}, {literal, 0x20, 0x20, NULL, 0, NULL}, {literal, 0x21, 0x21, NULL, 0, NULL}, {literal, 0x22, 0x22, NULL, 0, NULL}, {literal, 0x23, 0x23, NULL, 0, NULL}, {literal, 0x24, 0x24, NULL, 0, NULL}, {literal, 0x25, 0x25, NULL, 0, NULL}, {literal, 0x26, 0x26, NULL, 0, NULL}, {literal, 0x27, 0x27, NULL, 0, NULL}, {literal, 0x28, 0x28, NULL, 0, NULL}, {literal, 0x29, 0x29, NULL, 0, NULL}, {literal, 0x2A, 0x2A, NULL, 0, NULL}, {literal, 0x2B, 0x2B, NULL, 0, NULL}, {literal, 0x2C, 0x2C, NULL, 0, NULL}, {literal, 0x2D, 0x2D, NULL, 0, NULL}, {literal, 0x2E, 0x2E, NULL, 0, NULL}, {literal, 0x2F, 0x2F, NULL, 0, NULL}, {literal, 0x30, 0x30, NULL, 0, NULL}, {literal, 0x31, 0x31, NULL, 0, NULL}, {literal, 0x32, 0x32, NULL, 0, NULL}, {literal, 0x33, 0x33, NULL, 0, NULL}, {literal, 0x34, 0x34, NULL, 0, NULL}, {literal, 0x35, 0x35, NULL, 0, NULL}, {literal, 0x36, 0x36, NULL, 0, NULL}, {literal, 0x37, 0x37, NULL, 0, NULL}, {literal, 0x38, 0x38, NULL, 0, NULL}, {literal, 0x39, 0x39, NULL, 0, NULL}, {literal, 0x3A, 0x3A, NULL, 0, NULL}, {literal, 0x3B, 0x3B, NULL, 0, NULL}, {literal, 0x3C, 0x3C, NULL, 0, NULL}, {literal, 0x3D, 0x3D, NULL, 0, NULL}, {literal, 0x3E, 0x3E, NULL, 0, NULL}, {literal, 0x3F, 0x3F, NULL, 0, NULL}, {literal, 0x40, 0x40, NULL, 0, NULL}, {literal, 0x41, 0x41, NULL, 0, NULL}, {literal, 0x42, 0x42, NULL, 0, NULL}, {literal, 0x43, 0x43, NULL, 0, NULL}, {literal, 0x44, 0x44, NULL, 0, NULL}, {literal, 0x45, 0x45, NULL, 0, NULL}, {literal, 0x46, 0x46, NULL, 0, NULL}, {literal, 0x47, 0x47, NULL, 0, NULL}, {literal, 0x48, 0x48, NULL, 0, NULL}, {literal, 0x49, 0x49, NULL, 0, NULL}, {literal, 0x4A, 0x4A, NULL, 0, NULL}, {literal, 0x4B, 0x4B, NULL, 0, NULL}, {literal, 0x4C, 0x4C, NULL, 0, NULL}, {literal, 0x4D, 0x4D, NULL, 0, NULL}, {literal, 0x4E, 0x4E, NULL, 0, NULL}, {literal, 0x4F, 0x4F, NULL, 0, NULL}, {literal, 0x50, 0x50, NULL, 0, NULL}, {literal, 0x51, 0x51, NULL, 0, NULL}, {literal, 0x52, 0x52, NULL, 0, NULL}, {literal, 0x53, 0x53, NULL, 0, NULL}, {literal, 0x54, 0x54, NULL, 0, NULL}, {literal, 0x55, 0x55, NULL, 0, NULL}, {literal, 0x56, 0x56, NULL, 0, NULL}, {literal, 0x57, 0x57, NULL, 0, NULL}, {literal, 0x58, 0x58, NULL, 0, NULL}, {literal, 0x59, 0x59, NULL, 0, NULL}, {literal, 0x5A, 0x5A, NULL, 0, NULL}, {literal, 0x5B, 0x5B, NULL, 0, NULL}, {literal, 0x5C, 0x5C, NULL, 0, NULL}, {literal, 0x5D, 0x5D, NULL, 0, NULL}, {literal, 0x5E, 0x5E, NULL, 0, NULL}, {literal, 0x5F, 0x5F, NULL, 0, NULL}, {literal, 0x60, 0x60, NULL, 0, NULL}, {literal, 0x61, 0x61, NULL, 0, NULL}, {literal, 0x62, 0x62, NULL, 0, NULL}, {literal, 0x63, 0x63, NULL, 0, NULL}, {literal, 0x64, 0x64, NULL, 0, NULL}, {literal, 0x65, 0x65, NULL, 0, NULL}, {literal, 0x66, 0x66, NULL, 0, NULL}, {literal, 0x67, 0x67, NULL, 0, NULL}, {literal, 0x68, 0x68, NULL, 0, NULL}, {literal, 0x69, 0x69, NULL, 0, NULL}, {literal, 0x6A, 0x6A, NULL, 0, NULL}, {literal, 0x6B, 0x6B, NULL, 0, NULL}, {literal, 0x6C, 0x6C, NULL, 0, NULL}, {literal, 0x6D, 0x6D, NULL, 0, NULL}, {literal, 0x6E, 0x6E, NULL, 0, NULL}, {literal, 0x6F, 0x6F, NULL, 0, NULL}, {literal, 0x70, 0x70, NULL, 0, NULL}, {literal, 0x71, 0x71, NULL, 0, NULL}, {literal, 0x72, 0x72, NULL, 0, NULL}, {literal, 0x73, 0x73, NULL, 0, NULL}, {literal, 0x74, 0x74, NULL, 0, NULL}, {literal, 0x75, 0x75, NULL, 0, NULL}, {literal, 0x76, 0x76, NULL, 0, NULL}, {literal, 0x77, 0x77, NULL, 0, NULL}, {literal, 0x78, 0x78, NULL, 0, NULL}, {literal, 0x79, 0x79, NULL, 0, NULL}, {literal, 0x7A, 0x7A, NULL, 0, NULL}, {literal, 0x7B, 0x7B, NULL, 0, NULL}, {literal, 0x7C, 0x7C, NULL, 0, NULL}, {literal, 0x7D, 0x7D, NULL, 0, NULL}, {literal, 0x7E, 0x7E, NULL, 0, NULL}, {literal, 0x7F, 0x7F, NULL, 0, NULL}, {singleByte, 0x80, 0, NULL, 0, ignoreByte}, {singleByte, 0x81, FlushRight, NULL, 0, outputToken}, {singleByte, 0x82, eFlushRight, NULL, 0, outputToken}, {singleByte, 0x83, 0, NULL, 0, popEnvironment}, {reserved, 0x84, 0, NULL, 0, NULL}, {singleByte, 0x85, 0, NULL, 0, ignoreByte}, {singleByte, 0x86, CtrPg, NULL, 0, outputToken}, {singleByte, 0x87, Col, NULL, 0, outputToken}, {singleByte, 0x88, eCol, NULL, 0, popEnvironment}, {reserved, 0x89, 0, NULL, 0, NULL}, {singleByte, 0x8A, Wid, NULL, 0, outputToken}, {singleByte, 0x8B, eWid, NULL, 0, outputToken}, {singleByte, 0x8C, 0, NULL, 0, hardReturnSoftPage}, {singleByte, 0x8D, FNoteNum, NULL, 0, outputToken}, {singleByte, 0x8E, FigureNum, NULL, 0, outputToken}, {singleByte, 0x8F, eCenter, NULL, 0, outputToken}, {singleByte, 0x90, 0, NULL, 0, ignoreByte}, {singleByte, 0x91, 0, NULL, 0, ignoreByte}, {singleByte, 0x92, 0, NULL, 0, ignoreByte}, {literal, 0x93, 0x20, NULL, 0, outputToken}, /* SRt -> space */ {singleByte, 0x94, 0, NULL, 0, ignoreByte}, {singleByte, 0x95, 0, NULL, 0, ignoreByte}, {singleByte, 0x96, 0, NULL, 0, ignoreByte}, /* block on */ {singleByte, 0x97, 0, NULL, 0, ignoreByte}, /* block off */ {singleByte, 0x98, TableMarker, NULL, 0, outputToken}, {singleByte, 0x99, 0, NULL, 0, hardReturn}, {singleByte, 0x9A, NoHyphWord, NULL, 0, outputToken}, {singleByte, 0x9B, 0, NULL, 0, ignoreByte}, {reserved, 0x9C, 0, NULL, 0, NULL}, {reserved, 0x9D, Col, NULL, 0, outputToken}, {singleByte, 0x9E, Hyph, NULL, 0, outputToken}, {singleByte, 0x9F, eHyph, NULL, 0, outputToken}, {singleByte, 0xA0, HSpace, NULL, 0, outputToken}, {singleByte, 0xA1, SubTtl, NULL, 0, outputToken}, {singleByte, 0xA2, IsSubTtl, NULL, 0, outputToken}, {singleByte, 0xA3, Ttl, NULL, 0, outputToken}, {singleByte, 0xA4, IsTtl, NULL, 0, outputToken}, {singleByte, 0xA5, GrandTtl, NULL, 0, outputToken}, {singleByte, 0xA6, MathCalcColumn, NULL, 0, outputToken}, {singleByte, 0xA7, Math, NULL, 0, outputToken}, {singleByte, 0xA8, eMath, NULL, 0, outputToken}, {singleByte, 0xA9, HHyph, NULL, 0, outputToken}, {singleByte, 0xAA, HHyph, NULL, 0, outputToken}, {singleByte, 0xAB, HHyph, NULL, 0, outputToken}, {singleByte, 0xAC, NHyph, NULL, 0, outputToken}, {singleByte, 0xAD, NHyph, NULL, 0, outputToken}, {singleByte, 0xAE, NHyph, NULL, 0, outputToken}, {singleByte, 0xAF, eCol, NULL, 0, outputToken}, {singleByte, 0xB0, eCol, NULL, 0, outputToken}, {singleByte, 0xB1, NegateTotal, NULL, 0, outputToken}, {singleByte, 0xB2, eOutline, NULL, 0, outputToken}, {reserved, 0xB3, 0, NULL, 0, NULL}, {reserved, 0xB4, 0, NULL, 0, NULL}, {reserved, 0xB5, 0, NULL, 0, NULL}, {reserved, 0xB6, 0, NULL, 0, NULL}, {reserved, 0xB7, 0, NULL, 0, NULL}, {reserved, 0xB8, 0, NULL, 0, NULL}, {reserved, 0xB9, 0, NULL, 0, NULL}, {reserved, 0xBA, 0, NULL, 0, NULL}, {reserved, 0xBB, 0, NULL, 0, NULL}, {reserved, 0xBC, 0, NULL, 0, NULL}, {singleByte, 0xBD, 0, NULL, 0, ignoreByte}, {singleByte, 0xBE, 0, NULL, 0, ignoreByte}, {singleByte, 0xBF, 0, NULL, 0, ignoreByte}, {fixedLength, 0xC0, 0, NULL, 4, extendedChar}, {fixedLength, 0xC1, 0, NULL, 9, ignoreFixed}, /* Center/Align/Tab/Margin release */ {fixedLength, 0xC2, 0, NULL, 11, startIndent}, /* Indent */ {fixedLength, 0xC3, 0, NULL, 3, attributeOn}, {fixedLength, 0xC4, 0, NULL, 3, attributeOff}, {fixedLength, 0xC5, 0, NULL, 5, ignoreFixed}, /* Block Protect */ {fixedLength, 0xC6, 0, NULL, 6, endIndent}, /* End of Indent */ {fixedLength, 0xC7, 0, NULL, 7, ignoreFixed}, /* Hyphenation stuff */ {fixedLength, 0xC8, 0, NULL, 4, ignoreFixed}, {fixedLength, 0xC9, 0, NULL, 5, ignoreFixed}, {fixedLength, 0xCA, 0, NULL, 6, ignoreFixed}, {fixedLength, 0xCB, 0, NULL, 6, ignoreFixed}, {fixedLength, 0xCC, 0, NULL, 8, ignoreFixed}, {fixedLength, 0xCD, 0, NULL, 10, ignoreFixed}, {fixedLength, 0xCE, 0, NULL, 10, ignoreFixed}, {fixedLength, 0xCF, 0, NULL, 12, ignoreFixed}, {varLength, 0xD0, 0, NULL, 0, ignoreVar}, {varLength, 0xD1, 0, NULL, 0, ignoreVar}, {varLength, 0xD2, 0, NULL, 0, ignoreVar}, {varLength, 0xD3, 0, NULL, 0, ignoreVar}, {varLength, 0xD4, 0, NULL, 0, ignoreVar}, {varLength, 0xD5, 0, NULL, 0, ignoreVar}, {varLength, 0xD6, 0, NULL, 0, ignoreVar}, {varLength, 0xD7, 0, NULL, 0, ignoreVar}, {varLength, 0xD8, 0, NULL, 0, ignoreVar}, {varLength, 0xD9, 0, NULL, 0, ignoreVar}, {varLength, 0xDA, 0, NULL, 0, ignoreVar}, {varLength, 0xDB, 0, NULL, 0, ignoreVar}, {varLength, 0xDC, 0, NULL, 0, ignoreVar}, {varLength, 0xDD, 0, NULL, 0, ignoreVar}, {varLength, 0xDE, 0, NULL, 0, ignoreVar}, {varLength, 0xDF, 0, NULL, 0, ignoreVar}, {varLength, 0xE0, 0, NULL, 0, ignoreVar}, {varLength, 0xE1, 0, NULL, 0, ignoreVar}, {varLength, 0xE2, 0, NULL, 0, ignoreVar}, {varLength, 0xE3, 0, NULL, 0, ignoreVar}, {varLength, 0xE4, 0, NULL, 0, ignoreVar}, {varLength, 0xE5, 0, NULL, 0, ignoreVar}, {varLength, 0xE6, 0, NULL, 0, ignoreVar}, {varLength, 0xE7, 0, NULL, 0, ignoreVar}, {varLength, 0xE8, 0, NULL, 0, ignoreVar}, {varLength, 0xE9, 0, NULL, 0, ignoreVar}, {varLength, 0xEA, 0, NULL, 0, ignoreVar}, {varLength, 0xEB, 0, NULL, 0, ignoreVar}, {varLength, 0xEC, 0, NULL, 0, ignoreVar}, {varLength, 0xED, 0, NULL, 0, ignoreVar}, {varLength, 0xEE, 0, NULL, 0, ignoreVar}, {varLength, 0xEF, 0, NULL, 0, ignoreVar}, {varLength, 0xF0, 0, NULL, 0, ignoreVar}, {varLength, 0xF1, 0, NULL, 0, ignoreVar}, {varLength, 0xF2, 0, NULL, 0, ignoreVar}, {varLength, 0xF3, 0, NULL, 0, ignoreVar}, {varLength, 0xF4, 0, NULL, 0, ignoreVar}, {varLength, 0xF5, 0, NULL, 0, ignoreVar}, {varLength, 0xF6, 0, NULL, 0, ignoreVar}, {varLength, 0xF7, 0, NULL, 0, ignoreVar}, {varLength, 0xF8, 0, NULL, 0, ignoreVar}, {varLength, 0xF9, 0, NULL, 0, ignoreVar}, {varLength, 0xFA, 0, NULL, 0, ignoreVar}, {varLength, 0xFB, 0, NULL, 0, ignoreVar}, {varLength, 0xFC, 0, NULL, 0, ignoreVar}, {varLength, 0xFD, 0, NULL, 0, ignoreVar}, {varLength, 0xFE, 0, NULL, 0, ignoreVar}, {varLength, 0xFF, 0, NULL, 0, ignoreVar}, }; wp2x-2.5-mhi/src/tokens.h100644 0 0 20632 7122453536 13407 0ustar rootroot/* * Structure to hold all the tokens * */ typedef struct state { FILE *infile; FILE *outfile; struct WPToken *lastToken; char *data; } state; struct WPToken { enum token_class { reserved, literal, singleByte, fixedLength, varLength, } wp_type; int wp_code; int wp_intdata; char *wp_strdata; int wp_size; /* for fixed length types */ int (*wp_handleFunction)(state *st,struct WPToken *wpt,void *data); }; extern struct WPToken wp_tokens[]; struct VariableCode { char func; char subFunc; short len; char data[1]; }; /************************************************************************/ /* Remembering the expansions */ /************************************************************************/ /* The array "expansion" contains the expansions for everything. * Everything is initialized to NULL. * * We set up things as follows: * expansion[0..255] contain the expansions for the possible characters. * expansion[256...] contain the expansions for the special codes. * * Make sure this table is kept in parallel with the names[] array * * */ /* name value When is it expanded? */ /* ---- --- -------------------- */ enum token_type { /* Some compilers do not like unnamed enums */ typeout = 256, /* Typed out as soon as it is encountered */ BEGIN , /* Before the first character of the file */ END , /* After the last character of the file */ Comment , /* For wp2x-generated comments */ eComment , PageNo , /* Current page number */ RomanPage , /* Set page number (to roman numerals) */ ArabicPage , /* Set page number (to arabic) */ HSpace , /* unbreakable space (`Hard space') */ Tab , /* Tab character */ BeginTabs , /* Begin tab settings */ /* DO NOT CHANGE THE RELATIVE ORDER OF THESE FOUR TOKENS */ SetTab , /* Set normal tabstop at %d */ SetTabCenter , /* Set center tabstop at %d */ SetTabRight , /* Set right-justified tab at %d */ SetTabDecimal, /* Set decimal tab at %d */ EndTabs , /* End tab settings */ HPg , /* Hard page break */ CondEOP , /* Conditional end-of-page */ HRt , /* Hard return */ SRt , /* Soft return */ NHyph , /* Normal hyphen */ NHyphE , /* Normal hyphen at the end of a line */ HHyph , /* Hard (nonbreakable) hyphen */ DHyph , /* Discretionary hyphen */ DHyphE , /* Discretionary hyphen at the end of a line */ NoHyphWord , /* Do not hyphenate this word */ Marg , /* Margin settings */ TopMarg , /* Set top margin */ PageLength , /* Set page length */ SS , /* Single spacing */ DS , /* Double spacing */ OHS , /* 1.5 spacing (One and a Half Spacing) */ TS , /* Triple spacing */ LS , /* Generic line spacing */ LPI , /* set 6 or 8 LPI */ Bold , /* Begin boldface */ eBold , /* End boldface */ Und , /* Begin underline */ eUnd , /* End underline */ DoubleUnd , /* Begin double underline */ eDoubleUnd , /* End double underline */ Red , /* Begin redline */ eRed , /* End redline */ Strike , /* Begin strikeout */ eStrike , /* End strikeout */ Rev , /* Begin reverse video */ eRev , /* End reverse video */ Outline , /* Begin outline mode */ eOutline , /* End outline mode */ Fine , /* Begin fine mode */ eFine , /* End fine mode */ Over , /* Overstrike */ eOver , /* [mythical "end overstroke" code] */ Sup , /* Superscript */ eSup , /* [mythical "end superscript" code] */ Sub , /* Subscript */ eSub , /* [mythical "end subscript" code] */ Large , /* Large */ eLarge , /* end Large */ Small , /* Small */ eSmall , /* end Small */ VeryLarge , /* VeryLarge */ eVeryLarge , /* end very large */ ExtraLarge , /* extra large */ eExtraLarge , /* end extra large */ Italics , /* Italics */ eItalics , /* end Italics */ Shadow , /* Shadow */ eShadow , /* end shadow */ SmallCaps , /* start small caps */ eSmallCaps , /* end small caps */ UpHalfLine , /* Advance printer up 1/2 line */ DownHalfLine , /* Advance printer down 1/2 line */ AdvanceToHalfLine, /* Advance to absolute vertical position */ Indent , /* Indented paragraph */ DIndent , /* Left-and-right-indented paragraph */ eIndent , /* End indented paragraph */ eDIndent , /* End left-and-right paragraph */ MargRel , /* Margin release (unknown argument) */ Center , /* Center current line */ eCenter , /* End centering */ CenterHere , /* Center line around current column */ eCenterHere , /* End centering */ Align , /* Begin alignment */ eAlign , /* End alignment */ AlignChar , /* Set alignment character */ FlushRight , /* Begin flush right */ eFlushRight , /* End flush right */ Math , /* Begin math mode */ eMath , /* End math mode */ MathCalc , /* Begin math calc mode */ MathCalcColumn, /* Math calc column */ SubTtl , /* Do subtotal */ IsSubTtl , /* Subtotal entry */ Ttl , /* Do total */ IsTtl , /* Total entry */ GrandTtl , /* Do grand total */ NegateTotal , /* Negate current total */ Col , /* Begin column mode */ eCol , /* End column mode */ Fn , /* Begin footnote */ eFn , /* End footnote */ En , /* Begin endnote */ eEn , /* End endnote */ SetFnNum , /* Set footnote number */ FNoteNum , /* Footnote number */ ENoteNum , /* Endnote number */ FigureNum , /* Figure number */ TableMarker , /* Table of contents or whatever marker */ Hyph , /* Hyphenation on */ eHyph , /* off */ Just , /* Justification on */ eJust , /* off */ Wid , /* Widow/orphan protection on */ eWid , /* off */ HZone , /* Hyphenation zone */ DAlign , /* Decimal alignment character */ Header , /* Begin header text */ eHeader , /* End header text */ Footer , /* Begin footer text */ eFooter , /* End footer text */ Supp , /* Suppress formatting for one page */ CtrPg , /* Center page vertically */ SetFont , /* Change pitch or font */ SetBin , /* Select paper bin (0, 1, ...) */ PN , /* Page number position (PN+0 through PN+8) */ /* Internal tokens for unsupported operations */ UnsupportedPlaceHolder = PN + 9, SetPageNumberColumn, SetTabs, SetUnderlineMode, DefineColumn, SetFootnoteAttributes, SetParagraphNumberingStyle, NumberedParagraph, BeginMarkedText, EndMarkedText, DefineMarkedText, DefineIndexMark, DefineMathColumns, Obsolete, ReservedCode, UnknownCode, MergeCode, LastToken }; #define process0(st,c) process(st,c,0,0) #define process1(st,c,a) process(st,c,a,0) #define process2(st,c,a,b) process(st,c,a,b) wp2x-2.5-mhi/src/wp2x.c100644 0 0 103222 7122460542 13007 0ustar rootroot/* wp2x.c,v 1.9 1994/03/26 19:28:43 mcr Exp */ /* Before compiling, read the section titled `portability concerns'. */ /************************************************************************ * wp2x.c,v * Revision 1.9 1994/03/26 19:28:43 mcr * Hacker's guide added. * getopt routines included * Regression test outputs automated. * * Revision 1.8 1994/02/13 22:18:35 mcr * Fixed bug in -v option * * Revision 1.7 1994/02/13 22:13:41 mcr * Reorganized wp2x files into sub-directories. Updated man page. * * Revision 1.6 1994/01/06 14:32:28 mcr * Checkin of patch1 * * Revision 1.5 1993/09/07 18:19:21 mcr * Fixed html.cfg to ignore soft hyphens. * Fixed wp2x.c to deal with options correctly. * * Revision 1.4 1993/09/05 20:29:17 mcr * First alpha at 5.1 compatible wp2x. * * Revision 1.3 1993/09/03 23:09:37 mcr * Hacking on files. * * Revision 1.2 1993/08/27 14:50:17 mcr * More hacks to html.cfg. * * Revision 1.1.1.1 1993/08/23 19:09:21 mcr * Local hacks included * * Revision 1.10 91/08/18 15:05:41 raymond * Descriptor file stuff. * * Revision 1.9 91/08/06 09:08:09 raymond * add missing `break' in check_arity * * Revision 1.8 91/08/06 08:31:21 raymond * Avoid infinite loop if file is corrupted. * Better error-checking on configuration file (new output scheme). * * Revision 1.7 91/08/02 13:35:37 raymond * Epsilonically better handling of environments that didn't end properly. * Change return type of main() to keep gcc quiet. * MSC support. * * Revision 1.6 91/07/28 21:08:53 raymond * BeginTabs et al, FNote#, ENote#, NegateTotal, more unsupported codes * Improve character tokens, Header, Footer * Take care when people don't end lines with HRt * Fix major bugs in endnote processing, footnote numbering (and nobody * noticed!) * More worries about signed characters. * * Revision 1.5 91/07/23 22:59:43 raymond * Add COMMENT token, and some bug fixes. * * Revision 1.4 91/07/23 22:09:23 raymond * Concessions to slightly non-ANSI compilers. (`const', `unsigned char') * More patches for machines with signed characters. * Fix blatant bug in hex constants. (Amazed nobody noticed.) * New tags SetFn#, Header, Footer. * Warning messages for unsupported tokens. * Backslahes processed in character tags. * Fixed(?) footnotes, endnotes, page length changes. * Inserted missing `break's into the huge switch. * * Revision 1.3 91/07/12 15:39:44 raymond * Spiffy Turbo C support. * Some 's don't declare errno et al. * Command line switches `-s' and `-n' added. * More cute warning messages. * Dots periodically emitted. * Give the enum of token types a name, to placate QuickC. * Fix problems with pitch changes and signed characters. * * Revision 1.2 91/06/22 08:18:22 raymond * and fputchar() aren't sufficiently portable. * strerror() fails to exist on some so-called ANSI platforms. * Removed assumption that characters are unsigned. * Forgot to #include * */ /************************************************************************ * PORTABILITY CONCERNS ************************************************************************ * * If possible, compile with unsigned characters. (Though I think * I've taken care of all the places where I assumed characters are * unsigned.) * * This program assumes that your compiler is fully ANSI-conformant. * Depending on how non-conformant your compiler is, you may need to * set the following symbols at compile time: * * NO_CONST -- set this if your compiler does not know what `const' means. * Cdecl -- how to tag functions that are variadic. * * Cdecl is used if you need special declarations for variadic functions. * This is used by IBM PC compilers so that you can make the default * parameter passing Pascal-style or Fastcalls. * * Some very machine-dependent stuff happens when trying to open the * descriptor file. Please read dopen.c as well. */ #ifdef NO_CONST #define const #endif #ifndef Cdecl /* default is nothing */ #define Cdecl #endif /************************************************************************ * This program divides naturally into two parts. * * The first part reads in the descriptor file and builds the expansions * for each of the identifiers listed above. * This is the easy part. * * The second part reads the input file and uses the expansions collected * in the first part to transform the file into the output. * This is the hard part. * ************************************************************************/ /* And now, the code. * We start off with some obvious header files. */ #include #include #include #include #include #include #include #include #include #include "tokens.h" #include "patchlevel.h" /* Some platforms do not define these externals in stdlib.h */ extern int Cdecl errno; extern char *Cdecl sys_errlist[]; extern int Cdecl sys_nerr; /************************************************************************/ /* Some common idioms */ /************************************************************************/ #define do_nothing /* twiddle thumbs */ /************************************************************************/ /* Blowing up */ /************************************************************************/ /* The function "error" accepts two arguments. A FILE pointer and * a printf-style argument list. The printf-style arguments are * printed to stderr. If the FILE is non-NULL, the the remaining * contents of the file are printed as well (to provide context), up * to 80 characters. */ void Cdecl error (FILE * fp, char *fmt,...) { int i; va_list ap; fputs ("Error: ", stderr); va_start (ap, fmt); vfprintf (stderr, fmt, ap); va_end (ap); fputc ('\n', stderr); if (fp) { fprintf (stderr, "Unread text: "); for (i = 0; i < 80 && !feof (fp); i++) fputc (getc (fp), stderr); fputc ('\n', stderr); } exit (1); } /************************************************************************/ /* Command-line switches */ /************************************************************************/ int silent = 0; int blipinterval = 1024; /* display blips every 1K */ int blipcount; /************************************************************************/ /* Basic file manipulations */ /************************************************************************/ /* We here define a few basic functions. Let us hope that the first * three functions' names are self-descriptive. */ int next_non_whitespace (FILE * fp) { register int c; while ((c = getc (fp)) != EOF && isspace (c)) do_nothing; return c; } int next_non_space_or_tab (FILE * fp) { register int c; while ((c = getc (fp)) != EOF && (c == ' ' || c == '\t')) do_nothing; return c; } void eat_until_newline (FILE * fp) { register int c; while ((c = getc (fp)) != EOF && c != '\n') do_nothing; } /* The function parse_hex grabs a (no-more-than-two-character) hex * constant. Similarly, parse_octal does the same for octal constants. */ int parse_hex (FILE * fp) { register int c, value; if (!isxdigit (c = toupper (getc (fp)))) error (fp, "Expecting a hex digit"); if ((value = c - '0') > 9) value += '0' - 'A' + 10; if (!isxdigit (c = getc (fp))) { ungetc (c, fp); return value; } c = toupper (c); value = (value << 4) + c - '0'; if (c > '9') value += '0' - 'A' + 10; return value; } int parse_octal (FILE * fp, register int c) { register int value = c - '0'; if ((c = getc (fp)) < '0' || c > '7') { ungetc (c, fp); return value; } value = (value << 3) + c - '0'; if ((c = getc (fp)) < '0' || c > '7') { ungetc (c, fp); return value; } return (value << 3) + c - '0'; } /************************************************************************/ /* Storing the input strings */ /************************************************************************/ /* The input strings are allocated from a large pool we set up at * startup. This lets us do our thing without having to fight * with people like malloc and friends. This method does limit * our configuration file to 32K, however. We hope that this is * not a problem. (It also means that the program can be translated * to almost any other language without too much difficulty.) * * Here's how it works. * * "pool" is an array of POOL_SIZE characters. The value of POOL_SIZE * is flexible, but shouldn't exceed 65535, since that's the size of * an IBM PC segment. If your configuration file is more than 64K, * then there's probably something wrong. * * "pool_ptr" points to the next character in "pool" that hasn't been * used for anything yet. * * "top_of_pool" points one character beyond the end of pool, so we can * see if we've run out of memory. * * When we want to put something into the pool, we simply store into "pool" * and increment "pool_ptr" appropriately. * * Access to these variables is done through the following functions, * implemented as macros. * * "anchor_string()" is called before you start throwing things into * the pool. It returns a pointer to the beginning of the string * being built up. * * "add_to_string(c)" adds the character "c" to the string being built up. * * "finish_string()" gets ready for building a new string. We check * that we did not overflow our pool. We pull the sneaky trick of * a dummy else clause so that [1] "else"s match up properly if this * is nested inside an "if" statement, [2] the semicolon gets eaten * up correctly. * * "remove_string(s)" removes all strings from the one called "s" onwards. * */ #define POOL_SIZE 32768U char pool[POOL_SIZE]; char *pool_ptr = pool; #define top_of_pool (pool + POOL_SIZE) #define anchor_string() pool_ptr #define add_to_string(c) (*pool_ptr++ = c) #define finish_string() \ if (pool_ptr >= top_of_pool) error(NULL, "string pool overflow."); \ else do_nothing #define remove_string(s) (pool_ptr = s) char *expansion[LastToken]; /************************************************************************/ /* Naming the identifiers */ /************************************************************************/ /* Extreme care must be taken to ensure that this list parallels the list * of token names above. */ typedef struct identifier { char *name; int arity; } Identifier; Identifier names[] = { {"typeout", 0}, {"BEGIN", 0}, {"END", 0}, {"Comment", 0}, {"comment", 0}, {"PageNo", 0}, {"RomanPage", 1}, {"ArabicPage", 1}, {"HSpace", 0}, {"Tab", 0}, {"BeginTabs", 0}, {"SetTab", 1}, {"SetTabCenter", 1}, {"SetTabRight", 1}, {"SetTabDecimal", 1}, {"EndTabs", 0}, {"HPg", 0}, {"CondEOP", 1}, {"HRt", 0}, {"SRt", 0}, {"-", 0}, /* NHyph */ {"--", 0}, /* NHyphE */ {"=", 0}, /* HHyph */ {"\\-", 0}, /* DHyph */ {"\\--", 0}, /* DHyphE */ {"NoHyphWord", 0}, {"Marg", 2}, {"TopMarg", 1}, {"PageLength", 1}, {"SS", 0}, {"DS", 0}, {"1.5S", 0}, /* OHS */ {"TS", 0}, {"LS", 1}, {"LPI", 1}, {"Bold", 0}, {"bold", 0}, {"Und", 0}, {"und", 0}, {"DoubleUnd", 0}, {"doubleund", 0}, {"Red", 0}, {"red", 0}, {"Strike", 0}, {"strike", 0}, {"Rev", 0}, {"rev", 0}, {"Outline", 0}, {"outline", 0}, {"Fine", 0}, {"fine", 0}, {"Over", 0}, {"over", 0}, {"Sup", 0}, {"sup", 0}, {"Sub", 0}, {"sub", 0}, {"Large", 0}, {"large", 0}, {"Small", 0}, {"small", 0}, {"VeryLarge", 0}, {"verylarge", 0}, {"ExtraLarge", 0}, {"extralarge", 0}, {"Italics", 0}, {"italics", 0}, {"Shadow", 0}, {"shadow", 0}, {"SmallCaps", 0}, {"smallcaps", 0}, {"UpHalfLine", 0}, {"DownHalfLine", 0}, {"AdvanceToHalfLine", 2}, {"Indent", 0}, {"DIndent", 0}, {"indent", 0}, {"dindent", 0}, {"MarginRelease", 1}, {"Center", 0}, {"center", 0}, {"CenterHere", 0}, {"centerhere", 0}, {"Align", 0}, {"align", 0}, {"AlignChar", 1}, {"FlushRight", 0}, {"flushright", 0}, {"Math", 0}, {"math", 0}, {"MathCalc", 0}, {"MathCalcColumn", 0}, {"SubTotal", 0}, {"IsSubTotal", 0}, {"Total", 0}, {"IsTotal", 0}, {"GrandTotal", 0}, {"NegateTotal", 0}, {"Col", 0}, {"col", 0}, {"Fn", 0}, {"fn", 0}, {"En", 0}, {"en", 0}, {"SetFn#", 1}, {"FNote#", 0}, {"ENote#", 0}, {"Figure#", 0}, {"TableMarker", 0}, {"Hyph", 0}, {"hyph", 0}, {"Just", 0}, {"just", 0}, {"Wid", 0}, {"wid", 0}, {"HZone", 2}, {"DAlign", 1}, {"Header", 0}, {"header", 0}, {"Footer", 0}, {"footer", 0}, {"Supp", 1}, {"CtrPg", 0}, {"SetFont", 2}, {"SetBin", 1}, {"PN0", 0}, {"PN1", 0}, {"PN2", 0}, {"PN3", 0}, {"PN4", 0}, {"PN5", 0}, {"PN6", 0}, {"PN7", 0}, {"PN8", 0}, {NULL, 0}, /* UnsupportedPlaceHolder -- keeps match_identifier happy */ {"set page number column", 0}, {"extended tabs", 0}, {"underline mode", 0}, {"define column", 0}, {"footnote attributes", 0}, {"paragraph numbering style", 0}, {"numbered paragraph", 0}, {"begin marked text", 0}, {"end marked text", 0}, {"define marked text", 0}, {"define index mark", 0}, {"define math columns", 0}, {"WPCorp obsolete", 0}, {"WPCorp reserved", 0}, {"Merge Code", 0}, {"WPCorp undefined", 0}, }; /* The file pointer "descriptor" points to our descriptor file * and "input" points to our input file. * * Kinda makes sense that way. */ FILE *descriptor, *input; /* And the function match_identifier(s) takes a string and converts * it to its corresponding integer. Or blows up if it couldn't * find one. */ int match_identifier (const char *s) { Identifier *I; /* Maybe it is a special character */ if (s[0] == '\'' && s[2] == '\'' && s[3] == '\0') return (int) (unsigned char) s[1]; /* Else it must be a multi-character guy */ for (I = names; I->name; I++) if (!strcmp (I->name, s)) return typeout + (I - names); /* Otherwise, I don't know what to do with it */ error (descriptor, "Unknown identifier %s", s); /*NOTREACHED */ return 0; } /* check_arity ensures that the expansion string is valid */ void check_arity (int ident, char *t) { char *s; int arity = 0; if (ident > typeout) arity = names[ident - typeout].arity; for (s = t; *s; s++) { if (*s != '%') continue; switch (*++s) { case '\n': if (s != t + 1) error (descriptor, "%s: `%%\\n' not at start of expansion", names[ident - typeout].name); break; case '1': case 'c': if (arity < 1) goto bad_escape; break; case '2': if (arity < 2) goto bad_escape; break; case '%': break; default: bad_escape: error (descriptor, "%s: invalid escape `%%%c'", names[ident - typeout].name, *s); } } } /* expand_backslash() is called when a backslash is encountered in * the descriptor file. Its job is to parse a backslash-sequence. * The usual C-escapes (\a \b \f \n \r \t \v) are understood, as * well as the octal escape \000 [up to three octal digits] and * the hex escape \xFF [up to two hex digits]. */ int expand_backslash (FILE * d) { int c; switch (c = getc (d)) { case 'a': c = '\a'; break; case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\v'; break; case 'x': case 'X': c = parse_hex (d); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': c = parse_octal (d, c); break; default: /* c = c; */ break; } return c; } /* The function read_identifier() attempts to match an identifier * in the descriptor file. It returns EOF if the end of the descriptor * file was reached, or the code of the identifier we found. * (or blows up if an error was detected.) * We build the identifier in "s", with the help of our * pool-managing functions above, then discard it, immediately, * since we don't use it any more. */ int read_identifier (FILE * d) { register int c; /* A character we have read */ char *s; /* The identifier we are building */ int ident; /* The identifier we found */ /* Skip over comments */ while ((c = next_non_whitespace (d)) == '#') eat_until_newline (d); if (c == EOF) return EOF; /* At this point, "c" contains the first letter of a potential * identifier. Let's see what it could possibly be. */ s = anchor_string (); if (c == '\'') { /* a character token */ add_to_string (c); if ((c = getc (d)) == '\\') c = expand_backslash (d); add_to_string (c); if ((c = getc (d)) != '\'') error (descriptor, "Invalid character identifier"); add_to_string (c); c = next_non_space_or_tab (d); } else do { /* a name token */ add_to_string (c); c = next_non_space_or_tab (d); if (c == '\\') c = expand_backslash (d); } while (c != EOF && c != '=' && c != '\n'); if (c != '=') error (d, "Identifier not followed by = sign"); /* A boo-boo. Something bad happened. */ add_to_string ('\0'); /* Make it a standard C string. */ finish_string (); ident = match_identifier (s); /* Go find one. */ remove_string (s); /* And we're done with it now. */ return ident; } /* The function grab_expansion() reads expansion text from the * descriptor file and adds it to the pool, returning a pointer * to the string it just created. * * After anchoring a new string, we look for the opening quotation * mark, then start gobbling characters. Everything gets copied * straight into the string. * */ char * grab_expansion (FILE * d) { register int c; /* Characters being read */ char *s; /* The string we are building */ s = anchor_string (); if (next_non_whitespace (d) != '\"') error (d, "Quotation mark expected"); /* Now read the stream until we hit another quotation mark. */ while ((c = getc (d)) != EOF && c != '\"') { if (c == '\\') c = expand_backslash (d); add_to_string (c); } add_to_string ('\0'); finish_string (); return s; } /* Ah, now with all of these beautiful functions waiting for us, * we can now write our first Useful Function: do_descriptor_file. * It reads the descriptor file and loads up the "expansion" array * with the text expansions we are reading from the file. * * If we grabbed the expansion of a "typeout", we type it out * and discard the string. * * We stop when the descriptor file runs dry. * */ void do_descriptor_file (FILE * d) { register int ident; while ((ident = read_identifier (d)) != EOF) { expansion[ident] = grab_expansion (d); if (ident == typeout && !silent) { fputs (expansion[typeout], stderr); remove_string (expansion[typeout]); expansion[typeout] = NULL; } else check_arity (ident, expansion[ident]); } } /************************************************************************/ /* Reading from the input file */ /************************************************************************/ /* The function verify(c) checks that the next character in the input * stream is indeed "c". It eats the character, if all is well. * If something went wrong, we complain to stderr, but keep going. */ void verify (state * st, int c) { int d = getc (st->infile); if (d != c) fprintf (stderr, "Warning: Expected %02X but received %02X at pos: %ld.\n", c, d, ftell (st->infile)); } /* The function gobble(n) simply eats "n" characters from the input * file. */ void gobble (state * st, int n) { while (n--) (void) getc (st->infile); } int last_HRt = 0; /* most recent output was HRt */ /* Processing a special code simply entails dumping its expansion. * If the expansion is NULL, then we either * [1] print nothing, if it is a code, * [2] print the character itself, if it is an ASCII character. * * In dumping its expansion, we expand the following percent-escapes: * * The percent-escapes are: * %\n -- newline if previous character was not a newline * (meaningful only as first character in sequence) * %1 -- first parameter, in decimal form * %2 -- second parameter, in decimal form * %c -- first parameter, in character form * %% -- literal percent sign * * all other %-escapes are flagged as warnings (but should never occur, * since they are trapped at the time the descriptor file is read.) */ void process (state * st, int c, int d1, int d2) { char *s; static int last_newline = 0; last_HRt = 0; /* the killer switch sets this */ if (expansion[c] == NULL) { /* invent a default action */ if (c < 256) { /* single character */ expansion[c] = anchor_string (); /* emits itself */ add_to_string (c); add_to_string ('\0'); finish_string (); if (!silent) fprintf (stderr, "Warning: No expansion for %02X (%c)\n", c, c); } else { /* provide null expansion */ expansion[c] = ""; if (!silent) { fprintf (stderr, "Warning: No expansion for %s\n", names[c - typeout].name); } } } s = expansion[c]; if (!*s) return; /* the rest of the code assumes non-null string */ do { if (*s != '%') putc (*s++, st->outfile); else { s++; switch (*s++) { case '\n': if (!last_newline) putc ('\n', st->outfile); break; case '1': fprintf (st->outfile, "%d", d1); break; case '2': fprintf (st->outfile, "%d", d2); break; case 'c': putc (d1, st->outfile); break; case '%': putc ('%', st->outfile); break; default: fprintf (stderr, "Internal error: Invalid escape, %%%c\n", s[-1]); break; } } } while (*s); last_newline = s[-1] == '\n'; } void unsupported (state * st, int b, int c) { if (!silent && !expansion[c]) { expansion[c] = ""; fprintf (stderr, "Warning: `%s' [%02X] code not supported\n", names[c - typeout].name, b); } process0 (st, Comment); fputs (names[c - typeout].name, stdout); process0 (st, eComment); } /* The function gobble_until(c) eats characters from the input file * until it reaches a c or reaches EOF. */ void gobble_until (state * st, int c) { int i; while ((i = getc (st->infile)) != EOF && (int) (unsigned char) i != c) do_nothing; } /* line_spacing(l) is called whenever we hit a line-spacing-change command. * The argument is the desired line spacing, multiplied by two. * So single spacing gets a 2, 1.5 spacing gets a 3, etc. */ void line_spacing (state * st, int l) { switch (l) { case 2: process0 (st, SS); break; case 3: process0 (st, OHS); break; case 4: process0 (st, DS); break; case 6: process0 (st, TS); break; default: process1 (st, LS, l); break; } } int environment_status = 0; /* cleanup at HRt */ void leave_environment (state * st, int force_HRt) { if (environment_status) { process0 (st, environment_status); environment_status = 0; } if (force_HRt && !last_HRt) process0 (st, HRt); } /* The "note_status" flag has one of three values: * 0 if we are not inside a note * 1 if we are inside a footnote * 2 if we are inside an endnote * * The function handle_note() is called to deal with footnotes and * endnotes. It adjusts the note_status accordingly. */ int note_status = 0; void handle_note (state * st) { if (note_status) { leave_environment (st, 1); process0 (st, note_status); note_status = 0; } else { /* Decide whether it is an endnote or a footnote */ if (getc (st->infile) & 2) { process0 (st, En); note_status = eEn; gobble (st, 5); } else { process0 (st, Fn); note_status = eFn; gobble (st, 7); } verify (st, 0xFF); gobble (st, 2); /* margins */ } } /* The tab_table is a bit field. Each set bit represents a tabstop. * Note, however, that the bits are counted from MSB to LSB. * * The tab_attribute_table is a nybble field. The n'th nybble represents * the attributes of the n'th tabstop. */ unsigned char tab_table[32]; unsigned char tab_attribute_table[20]; int next_attribute; void process_tab_attribute (state * st, int i) { int b; if (next_attribute & 1) b = tab_attribute_table[next_attribute / 2] & 3; else b = (tab_attribute_table[next_attribute / 2] / 16) & 3; next_attribute++; /* Bottom two bites define what kind of tab. * Bit 2 is set if we need dot filling. * Bit 3 is unused. * We `&3' above because we won't support dot filling. */ process1 (st, SetTab + b, i); } void process_tab_table (state * st) { int i; next_attribute = 0; process0 (st, BeginTabs); for (i = 0; i < 32; i++) { if (tab_table[i] == 0) continue; /* early out */ if (tab_table[i] & 0x80) process_tab_attribute (st, i * 8 + 0); if (tab_table[i] & 0x40) process_tab_attribute (st, i * 8 + 1); if (tab_table[i] & 0x20) process_tab_attribute (st, i * 8 + 2); if (tab_table[i] & 0x10) process_tab_attribute (st, i * 8 + 3); if (tab_table[i] & 0x08) process_tab_attribute (st, i * 8 + 4); if (tab_table[i] & 0x04) process_tab_attribute (st, i * 8 + 5); if (tab_table[i] & 0x02) process_tab_attribute (st, i * 8 + 6); if (tab_table[i] & 0x01) process_tab_attribute (st, i * 8 + 7); } process0 (st, EndTabs); } void handle_tabs (state * st) { /* pad the tables to force no new tabs, and left tabs everywhere */ memset (tab_table, 0, sizeof (tab_table)); memset (tab_attribute_table, 0, sizeof (tab_attribute_table)); fread (tab_table, 20, 1, input); /* old-style tabs */ process_tab_table (st); } void handle_extended_tabs (state * st) { fread (tab_table, 32, 1, input); fread (tab_attribute_table, 20, 1, input); process_tab_table (st); } /* The FF_status flag tells us what we should do when we encounter an 0xFF. * It contains the token code of the active code, or 0 if no code is active. */ int FF_status = 0; void handle_FF (state * st) { if (FF_status) { /* finish header/footer */ leave_environment (st, 1); process0 (st, FF_status); gobble (st, 2); verify (st, 0xD1); FF_status = 0; } else process0 (st, 0xFF); } /* * read short */ short read_word (FILE * f) { short a; int c; c = getc (f); a = c; c = getc (f); a = (a | c << 8); return (a); } long read_dword (FILE * f) { long a; int c1, c2, c3, c4; c1 = getc (f); c2 = getc (f); c3 = getc (f); c4 = getc (f); a = (c4 << 24) | (c3 << 16) | (c2 << 8) | (c1); return (a); } /* * Safe memory allocator */ void * safemalloc (int size) { void *memory; memory = malloc (size); if (!memory) { fprintf (stderr, "Ran out of memory trying to allocate %d bytes\n", size); abort (); } return (memory); } /* The function process_token does all of the real work. * Given the first character of a token, we eat up everything * that belongs to that token. This routine might be called * recursively, since some tokens are defined in terms of other * tokens. (For example, the subscript code is expanded as * [Sub] [sub] * and the might involve other token * expansions; specifically, it might be an IBM Extended character.) * * Luckily, most of our tokens are not recursive. The macro * bracket(before, after) * does the recursive stuff for us, bracketing the next token * between expansions of "before" and "after". * */ #define bracket(before,after) process0(st,before); process_token(); \ process0(st,after); int process_token (state * st) { int c = getc (st->infile); int len; struct WPToken *wpt; char smallBuf[256]; struct VariableCode *group; int stat; if (c == EOF) return 0; if (!--blipcount && !silent) { blipcount = blipinterval; putc ('.', stderr); } wpt = &wp_tokens[c]; st->lastToken = wpt; stat = 1; switch (wpt->wp_type) { case reserved: /* ignore it! */ if (!silent) { fprintf (stderr, "Reserved code [%02x] seen\n", c); } break; case literal: /* output it */ putc (wpt->wp_intdata, st->outfile); break; case singleByte: assert (wpt->wp_handleFunction != NULL); (*wpt->wp_handleFunction) (st, wpt, NULL); break; case fixedLength: smallBuf[0] = c; if (fread (smallBuf + 1, wpt->wp_size - 1, 1, st->infile) != 1) { perror ("Reading fixedLength"); exit (5); } assert (wpt->wp_handleFunction != NULL); if (smallBuf[wpt->wp_size - 1] != wpt->wp_code) { fprintf (stderr, "Fixed Length block [%02x] incorrectly terminated by [%02x] at pos %ld\n", wpt->wp_code, smallBuf[wpt->wp_size - 1], ftell (st->infile)); } else { stat = (*wpt->wp_handleFunction) (st, wpt, smallBuf); } break; case varLength: /* get subfunction */ c = getc (input); len = read_word (input); group = (struct VariableCode *) safemalloc (sizeof (struct VariableCode) + len); if (fread (group->data, len, 1, input) != 1) { perror ("reading variable group"); exit (5); } group->func = wpt->wp_code; group->subFunc = c; group->len = len; assert (wpt->wp_handleFunction != NULL); stat = (*wpt->wp_handleFunction) (st, wpt, (void *) group); free (group); break; } return stat; } /* Now do the other Useful Function. */ int process_input (state * st) { process0 (st, BEGIN); while (process_token (st)) do_nothing; process0 (st, END); return 1; } int wptoh (int wpl) { char *p, *q; int result; /* convert to network byte order */ /* WP is Intel byte order */ p = (char *) (&wpl); q = (char *) (&result); q[0] = p[3]; q[1] = p[2]; q[2] = p[1]; q[3] = p[0]; return (htonl (result)); } static char *WPproducts[] = { "none", "WordPerfect", "Shell", "Notebook", "Calculator", "File Manager", "Calendar", "Program Editor/Ed Editor", "Macro Editor", "Plan Perfect", "DataPerfect", "Mail", "Printer", "Scheduler", "WordPerfect Office", "DrawPerfect", "LetterPerfect", }; #define MAX_WP_PRODUCT 16 int process_preamble (state * st) { int c; char prefix[16]; int documentAreaOffset; c = getc (st->infile); if (c != 255) { /* not a WP 5 file! */ return 0; } prefix[0] = c; if (fread (prefix + 1, 15, 1, st->infile) != 1) { perror ("No prefix block"); return 0; } /* check for WP Corp token */ if (prefix[1] != 'W' || prefix[2] != 'P' || prefix[3] != 'C') { fprintf (stderr, "Not a recognized file type: %02x %02x %02x\n", prefix[1], prefix[2], prefix[3]); return 0; } documentAreaOffset = *((int *) &prefix[4]); documentAreaOffset = wptoh (documentAreaOffset); fseek (st->infile, documentAreaOffset, SEEK_SET); fprintf (stderr, "Document created with %s %d.%d\nDocument starts at: %d [%4x]\n", (prefix[8] > MAX_WP_PRODUCT) ? "unknown" : WPproducts[prefix[8]], (prefix[10] == 0 ? 5 : prefix[10]), prefix[11], documentAreaOffset, documentAreaOffset); return 1; } /************************************************************************/ /* The main program */ /************************************************************************/ /* First, a pretty little function which tries to open a file and * complains loudly if it cannot. */ FILE * efopen (const char *s, const char *m) { FILE *fp = fopen (s, m); if (fp == NULL) { fprintf (stderr, "Error: Cannot open %s", s); if (errno > 0 && errno < sys_nerr) fprintf (stderr, " (%s)\n", s, sys_errlist[errno]); fprintf (stderr, "\n"); exit (1); } return fp; } extern FILE *dopen (char *); /* Our main program does very little, really. * After checking the command line, it proceeds to open the descriptor * file in text mode, and the input file in binary mode. * It then calls our two Useful Functions in turn, closing each file * after it has served its purpose. */ int main (int argc, char **argv) { extern char *optarg; extern int optind; int errflg = 0; int c; char *descriptorFileName; state masterState; while ((c = getopt (argc, argv, "sn:v")) != -1) { switch (c) { case 's': silent = 1; break; case 'n': blipinterval = atoi (optarg); break; case 'v': fprintf (stderr, "wp2x version " VERSION " patchlevel %d\n", PATCHLEVEL); errflg++; break; default: errflg++; break; } } if (errflg) { usage: fprintf (stderr, "usage: wp2x [-v] [-s][-n X] descriptor input > output\n"); fprintf (stderr, " -v for version number\n"); exit (2); } blipcount = blipinterval; if ((argc - optind) < 2) { goto usage; } descriptorFileName = argv[optind]; fprintf (stderr, "Reading config file: %s\n", descriptorFileName); descriptor = dopen (descriptorFileName); do_descriptor_file (descriptor); fclose (descriptor); for (optind++; optind < argc; optind++) { input = efopen (argv[optind], "rb"); masterState.infile = input; masterState.outfile = stdout; if (!process_preamble (&masterState)) { exit (10); } if (!process_input (&masterState)) { exit (11); } fclose (input); } return 0; } wp2x-2.5-mhi/src/Makefile100644 0 0 6060 7122460526 13347 0ustar rootrootSRCS = wp2x.c dopen.c tokens.c charsets.c SRCS += getopt.c OBJS = $(SRCS:.c=.o) CC = gcc -g -O -ansi -funsigned-char CFLAGS = -DUNIX -DWP2X_DIR=\"$(WP2X_DIR)\" -DVERSION=\"$(VERSION)\" wp2x: $(OBJS) $(CC) -o wp2x $(CFLAGS) $(OBJS) install: install -c -o root -g root -m 755 -s wp2x $(BINDIR) depend: makedepend -- $(CFLAGS) -- $(SRCS) indent: indent $(SRCS) clean: rm -f a.out core wp2x *~ *.o # DO NOT DELETE wp2x.o: /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h wp2x.o: /usr/include/gnu/stubs.h wp2x.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h wp2x.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h wp2x.o: /usr/include/bits/types.h /usr/include/libio.h wp2x.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h wp2x.o: /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h wp2x.o: /usr/include/endian.h /usr/include/bits/endian.h wp2x.o: /usr/include/sys/select.h /usr/include/bits/select.h wp2x.o: /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h wp2x.o: /usr/include/alloca.h /usr/include/string.h /usr/include/ctype.h wp2x.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h wp2x.o: /usr/include/bits/confname.h /usr/include/getopt.h wp2x.o: /usr/include/netinet/in.h /usr/include/stdint.h wp2x.o: /usr/include/bits/socket.h /usr/include/bits/sockaddr.h wp2x.o: /usr/include/asm/socket.h /usr/include/asm/sockios.h wp2x.o: /usr/include/bits/in.h /usr/include/bits/byteswap.h wp2x.o: /usr/include/assert.h tokens.h patchlevel.h dopen.o: /usr/include/stdio.h /usr/include/features.h dopen.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h dopen.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h dopen.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h dopen.o: /usr/include/bits/types.h /usr/include/libio.h dopen.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h dopen.o: /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h dopen.o: /usr/include/endian.h /usr/include/bits/endian.h dopen.o: /usr/include/sys/select.h /usr/include/bits/select.h dopen.o: /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h dopen.o: /usr/include/alloca.h /usr/include/string.h tokens.o: /usr/include/stdio.h /usr/include/features.h tokens.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h tokens.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h tokens.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h tokens.o: /usr/include/bits/types.h /usr/include/libio.h tokens.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h tokens.h tokens.o: charsets.h charsets.o: charsets.h getopt.o: /usr/include/stdio.h /usr/include/features.h getopt.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h getopt.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h getopt.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h getopt.o: /usr/include/bits/types.h /usr/include/libio.h getopt.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h getopt.o: /usr/include/string.h /usr/include/getopt.h