home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / code / p_txtomw.sit / txtomw.c next >
MacBinary  |  1988-12-09  |  11.8 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: txtomw.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Dec 9 18:25:58 1988, modified Fri Dec 9 18:25:58 1988, creator 'MPS ', type ASCII, 11420 bytes "txtomw.c" , at 0x2d1c 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 74 78 74 6f 6d 77 | 2e 63 00 00 00 00 00 00 |..txtomw|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2c 9c 00 | 00 01 7e 9f c6 11 86 9f |.....,..|..~.....|
|00000060| c6 11 86 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a7 32 00 00 |........|.....2..|
|00000080| 2f 2a 0d 09 74 78 74 6f | 6d 77 2e 63 0d 0d 09 54 |/*..txto|mw.c...T|
|00000090| 68 69 73 20 69 73 20 61 | 20 73 6b 65 6c 65 74 6f |his is a| skeleto|
|000000a0| 6e 20 70 72 6f 67 72 61 | 6d 20 66 6f 72 20 63 6f |n progra|m for co|
|000000b0| 6e 76 65 72 74 69 6e 67 | 20 74 65 78 74 20 66 69 |nverting| text fi|
|000000c0| 6c 65 73 20 69 6e 74 6f | 20 4d 61 63 57 72 69 74 |les into| MacWrit|
|000000d0| 65 20 64 6f 63 75 6d 65 | 6e 74 73 2e 0d 09 49 74 |e docume|nts...It|
|000000e0| 20 69 73 20 77 72 69 74 | 74 65 6e 20 69 6e 20 4d | is writ|ten in M|
|000000f0| 50 57 20 43 20 32 2e 30 | 2e 32 20 62 75 74 20 69 |PW C 2.0|.2 but i|
|00000100| 74 20 73 68 6f 75 6c 64 | 20 62 65 20 65 61 73 79 |t should| be easy|
|00000110| 20 74 6f 20 6d 6f 64 69 | 66 79 20 69 74 20 73 6f | to modi|fy it so|
|00000120| 20 69 74 20 63 6f 6d 70 | 69 6c 65 73 0d 09 75 6e | it comp|iles..un|
|00000130| 64 65 72 20 6f 74 68 65 | 72 20 43 20 63 6f 6d 70 |der othe|r C comp|
|00000140| 69 6c 65 72 73 20 28 65 | 2e 67 2e 20 75 6e 64 65 |ilers (e|.g. unde|
|00000150| 72 20 55 4e 49 58 20 61 | 73 20 73 6f 6d 65 6f 6e |r UNIX a|s someon|
|00000160| 65 20 77 61 6e 74 65 64 | 20 74 6f 20 64 6f 29 20 |e wanted| to do) |
|00000170| 69 66 20 79 6f 75 20 68 | 61 76 65 0d 09 74 68 65 |if you h|ave..the|
|00000180| 20 6e 65 63 65 73 73 61 | 72 79 20 4d 61 63 69 6e | necessa|ry Macin|
|00000190| 74 6f 73 68 20 68 65 61 | 64 65 72 20 66 69 6c 65 |tosh hea|der file|
|000001a0| 73 2e 0d 0d 09 46 6f 72 | 6d 61 74 20 63 68 61 6e |s....For|mat chan|
|000001b0| 67 65 73 20 63 61 6e 20 | 62 65 20 61 64 64 65 64 |ges can |be added|
|000001c0| 20 74 6f 20 74 68 65 20 | 74 65 78 74 20 61 63 63 | to the |text acc|
|000001d0| 6f 72 64 69 6e 67 20 74 | 6f 20 73 6f 6d 65 20 72 |ording t|o some r|
|000001e0| 75 6c 65 73 2e 20 41 73 | 20 69 74 20 69 73 2c 20 |ules. As| it is, |
|000001f0| 6f 6e 6c 79 0d 09 6f 6e | 65 20 66 6f 72 6d 61 74 |only..on|e format|
|00000200| 74 69 6e 67 20 63 6f 64 | 65 20 69 73 20 72 65 63 |ting cod|e is rec|
|00000210| 6f 67 6e 69 7a 65 64 20 | 61 6e 64 20 74 68 61 74 |ognized |and that|
|00000220| 20 69 73 20 61 20 27 3e | 27 20 74 6f 20 73 69 67 | is a '>|' to sig|
|00000230| 6e 69 66 79 20 74 68 65 | 20 62 65 67 69 6e 6e 69 |nify the| beginni|
|00000240| 6e 67 20 6f 66 0d 09 69 | 74 61 6c 69 63 20 74 65 |ng of..i|talic te|
|00000250| 78 74 20 61 6e 64 20 27 | 3c 27 20 74 6f 20 73 69 |xt and '|<' to si|
|00000260| 67 6e 69 66 79 20 74 68 | 65 20 65 6e 64 2e 20 41 |gnify th|e end. A|
|00000270| 73 20 49 20 75 73 65 64 | 20 69 74 20 6f 72 69 67 |s I used| it orig|
|00000280| 69 6e 61 6c 6c 79 20 74 | 68 65 72 65 20 77 65 72 |inally t|here wer|
|00000290| 65 20 66 61 72 0d 09 6d | 6f 72 65 20 63 6f 6d 70 |e far..m|ore comp|
|000002a0| 6c 65 78 20 66 6f 72 6d | 61 74 74 69 6e 67 20 63 |lex form|atting c|
|000002b0| 6f 64 65 73 20 61 6e 64 | 20 69 74 20 73 68 6f 75 |odes and| it shou|
|000002c0| 6c 64 20 62 65 20 66 61 | 69 72 6c 79 20 65 61 73 |ld be fa|irly eas|
|000002d0| 79 20 74 6f 20 61 64 64 | 20 74 68 65 6d 20 69 6e |y to add| them in|
|000002e0| 2e 0d 0d 09 4d 61 63 69 | 6e 74 6f 73 68 20 54 65 |....Maci|ntosh Te|
|000002f0| 63 68 20 4e 6f 74 65 20 | 23 31 32 20 73 68 6f 75 |ch Note |#12 shou|
|00000300| 6c 64 20 62 65 20 68 65 | 6c 70 66 75 6c 20 69 6e |ld be he|lpful in|
|00000310| 20 75 6e 64 65 72 73 74 | 61 6e 64 69 6e 67 20 74 | underst|anding t|
|00000320| 68 65 20 77 6f 72 6b 69 | 6e 67 73 20 6f 66 0d 09 |he worki|ngs of..|
|00000330| 74 68 65 20 70 72 6f 67 | 72 61 6d 2e 20 57 68 65 |the prog|ram. Whe|
|00000340| 6e 20 6e 65 65 64 65 64 | 20 49 20 70 65 65 6b 65 |n needed| I peeke|
|00000350| 64 20 69 6e 74 6f 20 67 | 65 6e 75 69 6e 20 4d 61 |d into g|enuin Ma|
|00000360| 63 57 72 69 74 65 20 66 | 69 6c 65 73 20 61 6e 64 |cWrite f|iles and|
|00000370| 20 73 61 77 20 77 68 61 | 74 0d 09 77 61 73 20 64 | saw wha|t..was d|
|00000380| 6f 6e 65 2e 20 49 20 66 | 6f 6c 6c 6f 77 65 64 20 |one. I f|ollowed |
|00000390| 76 65 72 79 20 63 6c 6f | 73 65 6c 79 20 77 68 61 |very clo|sely wha|
|000003a0| 74 20 4d 61 63 57 72 69 | 74 65 20 64 6f 65 73 20 |t MacWri|te does |
|000003b0| 62 75 74 20 73 6f 6d 65 | 74 68 69 6e 67 20 6f 66 |but some|thing of|
|000003c0| 20 77 68 61 74 0d 09 6d | 79 20 70 72 6f 67 72 61 | what..m|y progra|
|000003d0| 6d 20 64 6f 65 73 20 6d | 61 79 20 62 65 20 75 6e |m does m|ay be un|
|000003e0| 6e 65 63 65 73 73 61 72 | 79 2e 0d 0d 09 54 68 65 |necessar|y....The|
|000003f0| 20 63 6f 64 65 20 69 73 | 20 6e 6f 74 20 74 6f 20 | code is| not to |
|00000400| 68 65 61 76 69 6c 79 20 | 63 6f 6d 6d 65 6e 74 65 |heavily |commente|
|00000410| 64 2c 20 62 75 74 20 73 | 68 6f 75 6c 64 20 28 68 |d, but s|hould (h|
|00000420| 6f 70 65 66 75 6c 6c 79 | 29 20 62 65 20 72 65 61 |opefully|) be rea|
|00000430| 73 6f 6e 61 62 6c 79 0d | 09 63 6c 65 61 72 2e 0d |sonably.|.clear..|
|00000440| 0d 09 49 66 20 79 6f 75 | 20 61 72 65 20 75 73 69 |..If you| are usi|
|00000450| 6e 67 20 4d 50 57 20 43 | 20 32 2e 30 2e 32 20 79 |ng MPW C| 2.0.2 y|
|00000460| 6f 75 20 63 61 6e 20 63 | 6f 6d 70 69 6c 65 20 74 |ou can c|ompile t|
|00000470| 68 65 20 66 69 6c 65 20 | 77 69 74 68 6f 75 74 20 |he file |without |
|00000480| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 73 0d 09 75 |modifica|tions..u|
|00000490| 73 69 6e 67 20 74 68 65 | 73 65 20 63 6f 6d 6d 61 |sing the|se comma|
|000004a0| 6e 64 73 3a 0d 09 09 43 | 20 74 78 74 6f 6d 77 2e |nds:...C| txtomw.|
|000004b0| 63 0d 09 09 4c 69 6e 6b | 20 74 78 74 6f 6d 77 2e |c...Link| txtomw.|
|000004c0| 63 2e 6f 20 b6 0d 09 09 | 09 22 7b 43 4c 69 62 72 |c.o ....|."{CLibr|
|000004d0| 61 72 69 65 73 7d 22 43 | 52 75 6e 74 69 6d 65 2e |aries}"C|Runtime.|
|000004e0| 6f 20 b6 0d 09 09 09 22 | 7b 43 4c 69 62 72 61 72 |o ....."|{CLibrar|
|000004f0| 69 65 73 7d 22 53 74 64 | 43 4c 69 62 2e 6f 20 b6 |ies}"Std|CLib.o .|
|00000500| 0d 09 09 09 22 7b 43 4c | 69 62 72 61 72 69 65 73 |...."{CL|ibraries|
|00000510| 7d 22 43 49 6e 74 65 72 | 66 61 63 65 2e 6f 20 b6 |}"CInter|face.o .|
|00000520| 0d 09 09 09 2d 6f 20 74 | 78 74 6f 6d 77 0d 0d 0d |....-o t|xtomw...|
|00000530| 09 49 20 77 6f 75 6c 64 | 20 62 65 20 68 61 70 70 |.I would| be happ|
|00000540| 79 20 74 6f 20 68 65 61 | 72 20 66 72 6f 6d 20 79 |y to hea|r from y|
|00000550| 6f 75 20 69 66 20 74 68 | 69 73 20 69 73 20 74 6f |ou if th|is is to|
|00000560| 20 61 6e 79 20 75 73 65 | 20 74 6f 20 79 6f 75 20 | any use| to you |
|00000570| 61 6e 64 20 65 76 65 6e | 0d 09 68 61 70 70 69 65 |and even|..happie|
|00000580| 72 20 69 66 20 79 6f 75 | 20 73 65 6e 64 20 6d 65 |r if you| send me|
|00000590| 20 74 68 65 20 6e 69 66 | 74 79 20 69 6d 70 72 6f | the nif|ty impro|
|000005a0| 76 65 6d 65 6e 74 73 20 | 79 6f 75 20 6d 61 6b 65 |vements |you make|
|000005b0| 20 74 6f 20 69 74 2e 0d | 09 50 6c 65 61 73 65 20 | to it..|.Please |
|000005c0| 66 65 65 6c 20 66 72 65 | 65 20 74 6f 20 70 61 73 |feel fre|e to pas|
|000005d0| 73 20 74 68 69 73 20 6f | 6e 20 74 6f 20 6f 74 68 |s this o|n to oth|
|000005e0| 65 72 73 2c 20 70 72 65 | 66 65 72 61 62 6c 79 20 |ers, pre|ferably |
|000005f0| 77 69 74 68 20 6d 79 20 | 6e 61 6d 65 20 69 6e 63 |with my |name inc|
|00000600| 6c 75 64 65 64 2e 0d 0d | 09 47 69 73 6c 69 20 52 |luded...|.Gisli R|
|00000610| 75 6e 61 72 20 48 6a 61 | 6c 74 61 73 6f 6e 0d 09 |unar Hja|ltason..|
|00000620| 55 6e 69 76 65 72 73 69 | 74 79 20 6f 66 20 49 63 |Universi|ty of Ic|
|00000630| 65 6c 61 6e 64 0d 09 09 | 28 75 6e 64 65 72 67 72 |eland...|(undergr|
|00000640| 61 64 20 74 69 6c 20 7e | 31 39 39 30 29 0d 09 55 |ad til ~|1990)..U|
|00000650| 55 43 50 3a 0d 09 09 67 | 72 68 40 72 68 69 2e 68 |UCP:...g|rh@rhi.h|
|00000660| 69 2e 69 73 0d 09 09 67 | 72 68 40 6b 72 61 66 6c |i.is...g|rh@krafl|
|00000670| 61 2e 55 55 43 50 0d 09 | 42 49 58 3a 0d 09 09 67 |a.UUCP..|BIX:...g|
|00000680| 69 73 6c 69 0d 09 44 45 | 4c 50 48 49 3a 0d 09 09 |isli..DE|LPHI:...|
|00000690| 47 49 53 4c 49 0d 09 53 | 6e 61 69 6c 20 6d 61 69 |GISLI..S|nail mai|
|000006a0| 6c 3a 0d 09 09 4e 6a 61 | 6c 73 67 61 74 61 20 31 |l:...Nja|lsgata 1|
|000006b0| 32 0d 09 09 49 53 2d 31 | 30 31 20 52 65 79 6b 6a |2...IS-1|01 Reykj|
|000006c0| 61 76 69 6b 0d 09 09 49 | 43 45 4c 41 4e 44 0d 2a |avik...I|CELAND.*|
|000006d0| 2f 0d 0d 2f 2a 20 53 74 | 61 6e 64 61 72 64 20 43 |/../* St|andard C|
|000006e0| 20 68 65 61 64 65 72 73 | 20 2a 2f 0d 23 69 6e 63 | headers| */.#inc|
|000006f0| 6c 75 64 65 09 3c 73 74 | 64 69 6f 2e 68 3e 0d 23 |lude.<st|dio.h>.#|
|00000700| 69 6e 63 6c 75 64 65 09 | 3c 69 6f 63 74 6c 2e 68 |include.|<ioctl.h|
|00000710| 3e 0d 23 69 6e 63 6c 75 | 64 65 09 3c 73 74 72 69 |>.#inclu|de.<stri|
|00000720| 6e 67 2e 68 3e 0d 0d 2f | 2a 20 4d 61 63 69 6e 74 |ng.h>../|* Macint|
|00000730| 6f 73 68 20 68 65 61 64 | 65 72 73 20 28 64 69 72 |osh head|ers (dir|
|00000740| 65 63 74 6c 79 20 75 73 | 65 64 20 66 75 6e 63 74 |ectly us|ed funct|
|00000750| 69 6f 6e 73 20 61 6e 64 | 20 74 79 70 65 73 20 69 |ions and| types i|
|00000760| 6e 20 63 6f 6d 6d 65 6e | 74 73 29 20 2a 2f 0d 23 |n commen|ts) */.#|
|00000770| 69 6e 63 6c 75 64 65 09 | 3c 74 79 70 65 73 2e 68 |include.|<types.h|
|00000780| 3e 0d 09 2f 2a 20 48 61 | 6e 64 6c 65 20 2a 2f 0d |>../* Ha|ndle */.|
|00000790| 23 69 6e 63 6c 75 64 65 | 09 3c 71 75 69 63 6b 64 |#include|.<quickd|
|000007a0| 72 61 77 2e 68 3e 0d 09 | 2f 2a 20 49 6e 69 74 47 |raw.h>..|/* InitG|
|000007b0| 72 61 66 20 2a 2f 0d 23 | 69 6e 63 6c 75 64 65 09 |raf */.#|include.|
|000007c0| 3c 66 6f 6e 74 73 2e 68 | 3e 0d 09 2f 2a 20 49 6e |<fonts.h|>../* In|
|000007d0| 69 74 46 6f 6e 74 73 20 | 2a 2f 0d 23 69 6e 63 6c |itFonts |*/.#incl|
|000007e0| 75 64 65 09 3c 77 69 6e | 64 6f 77 73 2e 68 3e 0d |ude.<win|dows.h>.|
|000007f0| 09 2f 2a 20 49 6e 69 74 | 57 69 6e 64 6f 77 73 20 |./* Init|Windows |
|00000800| 2a 2f 0d 23 69 6e 63 6c | 75 64 65 09 3c 64 69 61 |*/.#incl|ude.<dia|
|00000810| 6c 6f 67 73 2e 68 3e 0d | 09 2f 2a 20 49 6e 69 74 |logs.h>.|./* Init|
|00000820| 44 69 61 6c 6f 67 73 20 | 2a 2f 0d 23 69 6e 63 6c |Dialogs |*/.#incl|
|00000830| 75 64 65 09 3c 72 65 73 | 6f 75 72 63 65 73 2e 68 |ude.<res|ources.h|
|00000840| 3e 0d 09 2f 2a 20 43 72 | 65 61 74 65 52 65 73 46 |>../* Cr|eateResF|
|00000850| 69 6c 65 2c 20 4f 70 65 | 6e 52 65 73 46 69 6c 65 |ile, Ope|nResFile|
|00000860| 2c 20 52 6d 76 65 52 65 | 73 6f 75 72 63 65 2c 20 |, RmveRe|source, |
|00000870| 47 65 74 52 65 73 6f 75 | 72 63 65 2c 0d 09 09 09 |GetResou|rce,....|
|00000880| 41 64 64 52 65 73 6f 75 | 72 63 65 2c 20 43 6c 6f |AddResou|rce, Clo|
|00000890| 73 65 52 65 73 46 69 6c | 65 20 2a 2f 0d 23 69 6e |seResFil|e */.#in|
|000008a0| 63 6c 75 64 65 09 3c 70 | 61 63 6b 61 67 65 73 2e |clude.<p|ackages.|
|000008b0| 68 3e 0d 09 2f 2a 20 4e | 75 6d 54 6f 53 74 72 69 |h>../* N|umToStri|
|000008c0| 6e 67 2c 20 53 46 47 65 | 74 46 69 6c 65 2c 20 53 |ng, SFGe|tFile, S|
|000008d0| 46 52 65 70 6c 79 20 2a | 2f 0d 23 69 6e 63 6c 75 |FReply *|/.#inclu|
|000008e0| 64 65 09 3c 6d 65 6d 6f | 72 79 2e 68 3e 0d 09 2f |de.<memo|ry.h>../|
|000008f0| 2a 20 4d 61 78 41 70 70 | 6c 5a 6f 6e 65 20 2a 2f |* MaxApp|lZone */|
|00000900| 0d 23 69 6e 63 6c 75 64 | 65 09 3c 66 69 6c 65 73 |.#includ|e.<files|
|00000910| 2e 68 3e 0d 09 2f 2a 20 | 47 65 74 46 49 6e 66 6f |.h>../* |GetFInfo|
|00000920| 2c 20 53 65 74 46 49 6e | 66 6f 2c 20 41 6c 6c 6f |, SetFIn|fo, Allo|
|00000930| 63 61 74 65 2c 20 53 65 | 74 56 6f 6c 2c 20 46 49 |cate, Se|tVol, FI|
|00000940| 6e 66 6f 20 2a 2f 0d 23 | 69 6e 63 6c 75 64 65 09 |nfo */.#|include.|
|00000950| 3c 6f 73 75 74 69 6c 73 | 2e 68 3e 0d 09 2f 2a 20 |<osutils|.h>../* |
|00000960| 50 74 72 54 6f 48 61 6e | 64 20 2a 2f 0d 23 69 6e |PtrToHan|d */.#in|
|00000970| 63 6c 75 64 65 09 3c 73 | 74 72 69 6e 67 73 2e 68 |clude.<s|trings.h|
|00000980| 3e 0d 09 2f 2a 20 70 32 | 63 73 74 72 20 2a 2f 0d |>../* p2|cstr */.|
|00000990| 0d 2f 2a 20 4e 6f 74 65 | 3a 20 73 6f 6d 65 20 6f |./* Note|: some o|
|000009a0| 66 20 74 68 65 73 65 20 | 61 72 65 20 75 6e 6e 65 |f these |are unne|
|000009b0| 63 65 73 73 61 72 79 20 | 69 6e 20 4d 50 57 20 43 |cessary |in MPW C|
|000009c0| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 66 75 6e | because| the fun|
|000009d0| 63 74 69 6f 6e 73 20 75 | 73 65 64 0d 09 09 61 72 |ctions u|sed...ar|
|000009e0| 65 20 6e 6f 74 20 64 65 | 63 6c 61 72 65 64 20 69 |e not de|clared i|
|000009f0| 6e 20 74 68 65 20 63 6f | 72 72 65 73 70 6f 6e 64 |n the co|rrespond|
|00000a00| 69 6e 67 20 68 65 61 64 | 65 72 20 66 69 6c 65 20 |ing head|er file |
|00000a10| 2a 2f 0d 0d 2f 2a 20 4d | 61 63 57 72 69 74 65 20 |*/../* M|acWrite |
|00000a20| 68 65 61 64 65 72 20 2a | 2f 0d 23 69 6e 63 6c 75 |header *|/.#inclu|
|00000a30| 64 65 09 22 74 78 74 6f | 6d 77 2e 68 22 0d 0d 23 |de."txto|mw.h"..#|
|00000a40| 64 65 66 69 6e 65 20 4e | 45 57 4c 49 4e 45 09 30 |define N|EWLINE.0|
|00000a50| 78 30 44 0d 0d 23 64 65 | 66 69 6e 65 20 42 55 46 |x0D..#de|fine BUF|
|00000a60| 53 49 5a 09 34 30 39 36 | 0d 23 64 65 66 69 6e 65 |SIZ.4096|.#define|
|00000a70| 20 4d 41 58 50 41 52 53 | 09 31 30 30 30 0d 20 2f | MAXPARS|.1000. /|
|00000a80| 2a 20 4d 61 78 69 6d 75 | 6d 20 6e 75 6d 62 65 72 |* Maximu|m number|
|00000a90| 20 6f 66 20 70 61 72 61 | 67 72 61 70 68 73 20 74 | of para|graphs t|
|00000aa0| 68 61 74 20 61 72 65 20 | 74 6f 20 62 65 20 69 6e |hat are |to be in|
|00000ab0| 20 61 20 73 69 6e 67 6c | 65 20 6f 75 74 70 75 74 | a singl|e output|
|00000ac0| 20 66 69 6c 65 2e 0d 09 | 09 54 68 69 73 20 63 61 | file...|.This ca|
|00000ad0| 6e 20 62 65 20 61 73 20 | 68 69 67 68 20 61 73 20 |n be as |high as |
|00000ae0| 33 32 30 30 30 20 62 75 | 74 20 74 68 65 6e 20 74 |32000 bu|t then t|
|00000af0| 68 65 20 22 70 61 72 73 | 22 20 61 72 72 61 79 20 |he "pars|" array |
|00000b00| 74 61 6b 65 73 20 61 62 | 6f 75 74 20 35 31 32 4b |takes ab|out 512K|
|00000b10| 2e 0d 09 09 4f 66 20 63 | 6f 75 72 73 65 20 49 20 |....Of c|ourse I |
|00000b20| 63 6f 75 6c 64 20 68 61 | 76 65 20 72 65 73 69 7a |could ha|ve resiz|
|00000b30| 65 64 20 69 74 20 64 79 | 6e 61 6d 69 63 61 6c 6c |ed it dy|namicall|
|00000b40| 79 2c 20 62 75 74 20 49 | 20 64 69 64 6e 27 74 2e |y, but I| didn't.|
|00000b50| 2e 2e 20 2a 2f 0d 0d 63 | 68 61 72 09 09 2a 67 65 |.. */..c|har..*ge|
|00000b60| 74 64 6f 63 28 29 3b 0d | 0d 09 73 74 72 75 63 74 |tdoc();.|..struct|
|00000b70| 20 64 6f 63 5f 68 65 61 | 64 65 72 09 64 68 65 61 | doc_hea|der.dhea|
|00000b80| 64 3b 0d 09 46 49 4c 45 | 09 09 09 2a 69 6e 66 69 |d;..FILE|...*infi|
|00000b90| 6c 65 2c 20 2a 6f 75 74 | 66 69 6c 65 3b 0d 09 73 |le, *out|file;..s|
|00000ba0| 68 6f 72 74 09 09 09 6f | 75 74 63 6f 75 6e 74 3b |hort...o|utcount;|
|00000bb0| 0d 09 70 61 72 5f 69 6e | 66 6f 09 2a 70 61 72 73 |..par_in|fo.*pars|
|00000bc0| 3b 0d 09 70 61 72 5f 69 | 6e 66 6f 09 68 65 61 64 |;..par_i|nfo.head|
|00000bd0| 70 61 72 73 5b 32 5d 3b | 0d 09 70 61 72 5f 69 6e |pars[2];|..par_in|
|00000be0| 66 6f 09 66 6f 6f 74 70 | 61 72 73 5b 32 5d 3b 0d |fo.footp|ars[2];.|
|00000bf0| 09 73 68 6f 72 74 09 09 | 09 70 61 72 63 6f 75 6e |.short..|.parcoun|
|00000c00| 74 3b 0d 09 66 6f 72 6d | 61 74 09 09 66 6f 6e 74 |t;..form|at..font|
|00000c10| 63 68 5b 32 30 30 5d 3b | 0d 09 6c 6f 6e 67 09 09 |ch[200];|..long..|
|00000c20| 09 66 6f 72 6d 61 74 63 | 6f 75 6e 74 3b 0d 09 70 |.formatc|ount;..p|
|00000c30| 61 72 5f 64 61 74 61 09 | 2a 63 75 72 5f 70 61 72 |ar_data.|*cur_par|
|00000c40| 3b 0d 09 72 75 6c 65 72 | 09 09 09 72 75 6c 3b 0d |;..ruler|...rul;.|
|00000c50| 09 6c 6f 6e 67 09 09 09 | 63 75 72 70 6f 73 2c 20 |.long...|curpos, |
|00000c60| 70 72 65 76 70 6f 73 3b | 0d 09 6c 6f 6e 67 09 09 |prevpos;|..long..|
|00000c70| 09 70 72 65 76 69 6e 70 | 6f 73 3b 0d 09 63 68 61 |.previnp|os;..cha|
|00000c80| 72 09 09 09 66 69 6c 65 | 6e 61 6d 65 5b 36 34 5d |r...file|name[64]|
|00000c90| 2c 20 6f 75 74 66 69 6c | 65 6e 61 6d 65 5b 36 34 |, outfil|ename[64|
|00000ca0| 5d 3b 0d 09 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |];..unsi|gned cha|
|00000cb0| 72 09 2a 62 75 66 66 65 | 72 3b 0d 0d 6d 61 69 6e |r.*buffe|r;..main|
|00000cc0| 28 29 0d 7b 0d 09 72 65 | 67 69 73 74 65 72 20 69 |().{..re|gister i|
|00000cd0| 6e 74 09 69 2c 20 6a 3b | 0d 09 73 68 6f 72 74 09 |nt.i, j;|..short.|
|00000ce0| 6c 65 6e 67 74 68 2c 20 | 6c 69 6e 65 6c 65 6e 67 |length, |lineleng|
|00000cf0| 74 68 2c 20 63 75 72 73 | 69 7a 65 2c 20 63 75 72 |th, curs|ize, cur|
|00000d00| 73 74 79 6c 65 2c 20 63 | 75 72 66 6f 6e 74 2c 20 |style, c|urfont, |
|00000d10| 73 74 61 65 72 64 3b 0d | 0d 09 49 6e 69 74 47 72 |staerd;.|..InitGr|
|00000d20| 61 66 28 26 71 64 2e 74 | 68 65 50 6f 72 74 29 3b |af(&qd.t|hePort);|
|00000d30| 0d 09 49 6e 69 74 46 6f | 6e 74 73 28 29 3b 0d 09 |..InitFo|nts();..|
|00000d40| 49 6e 69 74 57 69 6e 64 | 6f 77 73 28 29 3b 0d 09 |InitWind|ows();..|
|00000d50| 49 6e 69 74 44 69 61 6c | 6f 67 73 28 30 29 3b 0d |InitDial|ogs(0);.|
|00000d60| 09 4d 61 78 41 70 70 6c | 5a 6f 6e 65 28 29 3b 0d |.MaxAppl|Zone();.|
|00000d70| 0d 09 6d 65 6d 73 65 74 | 28 26 64 68 65 61 64 2c |..memset|(&dhead,|
|00000d80| 20 30 2c 20 73 69 7a 65 | 6f 66 28 64 68 65 61 64 | 0, size|of(dhead|
|00000d90| 29 29 3b 0d 09 64 68 65 | 61 64 2e 76 65 72 73 69 |));..dhe|ad.versi|
|00000da0| 6f 6e 20 3d 20 36 3b 0d | 09 64 68 65 61 64 2e 72 |on = 6;.|.dhead.r|
|00000db0| 75 6c 65 72 5f 64 69 73 | 70 6c 61 79 20 3d 20 2d |uler_dis|play = -|
|00000dc0| 31 3b 0d 09 64 68 65 61 | 64 2e 61 63 74 69 76 65 |1;..dhea|d.active|
|00000dd0| 5f 64 6f 63 20 3d 20 2d | 31 3b 09 2f 2a 20 6d 61 |_doc = -|1;./* ma|
|00000de0| 6b 65 73 20 4d 61 63 57 | 72 69 74 65 20 72 65 63 |kes MacW|rite rec|
|00000df0| 61 6c 63 75 6c 61 74 65 | 20 6c 69 6e 65 20 68 65 |alculate| line he|
|00000e00| 69 67 68 74 73 0d 09 09 | 09 09 09 09 09 09 09 09 |ights...|........|
|00000e10| 09 09 09 09 09 61 6e 64 | 20 70 61 72 61 67 72 61 |.....and| paragra|
|00000e20| 70 68 20 70 6f 73 69 74 | 69 6f 6e 73 20 2a 2f 0d |ph posit|ions */.|
|00000e30| 09 64 68 65 61 64 2e 73 | 74 61 72 74 5f 70 61 67 |.dhead.s|tart_pag|
|00000e40| 65 20 3d 20 31 3b 0d 0d | 09 64 68 65 61 64 2e 68 |e = 1;..|.dhead.h|
|00000e50| 65 61 64 65 72 5f 70 61 | 72 61 67 72 61 70 68 73 |eader_pa|ragraphs|
|00000e60| 20 3d 20 32 3b 0d 09 64 | 68 65 61 64 2e 66 6f 6f | = 2;..d|head.foo|
|00000e70| 74 65 72 5f 70 61 72 61 | 67 72 61 70 68 73 20 3d |ter_para|graphs =|
|00000e80| 20 32 3b 0d 09 64 68 65 | 61 64 2e 73 74 61 72 74 | 2;..dhe|ad.start|
|00000e90| 5f 70 61 67 65 20 3d 20 | 31 3b 0d 09 64 68 65 61 |_page = |1;..dhea|
|00000ea0| 64 2e 6d 61 69 6e 2e 73 | 74 61 72 74 5f 73 65 6c |d.main.s|tart_sel|
|00000eb0| 20 3d 20 64 68 65 61 64 | 2e 6d 61 69 6e 2e 65 6e | = dhead|.main.en|
|00000ec0| 64 5f 73 65 6c 20 3d 20 | 30 78 31 30 30 30 30 3b |d_sel = |0x10000;|
|00000ed0| 0d 09 64 68 65 61 64 2e | 6d 61 69 6e 2e 70 61 67 |..dhead.|main.pag|
|00000ee0| 65 5f 6e 75 6d 62 65 72 | 5f 70 6f 73 20 3d 20 30 |e_number|_pos = 0|
|00000ef0| 78 46 46 46 32 30 30 31 | 45 3b 0d 09 64 68 65 61 |xFFF2001|E;..dhea|
|00000f00| 64 2e 6d 61 69 6e 2e 64 | 61 74 65 5f 70 6f 73 20 |d.main.d|ate_pos |
|00000f10| 3d 20 30 78 46 46 46 32 | 30 30 41 36 3b 0d 09 64 |= 0xFFF2|00A6;..d|
|00000f20| 68 65 61 64 2e 6d 61 69 | 6e 2e 74 69 6d 65 5f 70 |head.mai|n.time_p|
|00000f30| 6f 73 20 3d 20 30 78 46 | 46 46 32 30 31 37 34 3b |os = 0xF|FF20174;|
|00000f40| 0d 09 64 68 65 61 64 2e | 6d 61 69 6e 2e 75 6e 75 |..dhead.|main.unu|
|00000f50| 73 65 64 20 3d 20 2d 31 | 3b 0d 09 64 68 65 61 64 |sed = -1|;..dhead|
|00000f60| 2e 6d 61 69 6e 2e 6f 76 | 61 6c 5f 72 65 64 72 61 |.main.ov|al_redra|
|00000f70| 77 20 3d 20 2d 31 3b 0d | 09 64 68 65 61 64 2e 6d |w = -1;.|.dhead.m|
|00000f80| 61 69 6e 2e 61 63 74 69 | 76 65 5f 73 74 79 6c 65 |ain.acti|ve_style|
|00000f90| 20 3d 20 2d 31 3b 0d 09 | 64 68 65 61 64 2e 6d 61 | = -1;..|dhead.ma|
|00000fa0| 69 6e 2e 61 63 74 69 76 | 65 5f 66 6f 6e 74 20 3d |in.activ|e_font =|
|00000fb0| 20 2d 31 3b 0d 0d 09 6d | 65 6d 63 70 79 28 26 64 | -1;...m|emcpy(&d|
|00000fc0| 68 65 61 64 2e 68 65 61 | 64 65 72 2c 20 26 64 68 |head.hea|der, &dh|
|00000fd0| 65 61 64 2e 6d 61 69 6e | 2c 20 73 69 7a 65 6f 66 |ead.main|, sizeof|
|00000fe0| 28 77 69 6e 64 5f 76 61 | 72 29 29 3b 0d 09 6d 65 |(wind_va|r));..me|
|00000ff0| 6d 63 70 79 28 26 64 68 | 65 61 64 2e 66 6f 6f 74 |mcpy(&dh|ead.foot|
|00001000| 65 72 2c 20 26 64 68 65 | 61 64 2e 6d 61 69 6e 2c |er, &dhe|ad.main,|
|00001010| 20 73 69 7a 65 6f 66 28 | 77 69 6e 64 5f 76 61 72 | sizeof(|wind_var|
|00001020| 29 29 3b 0d 0d 09 62 75 | 66 66 65 72 20 3d 20 28 |));...bu|ffer = (|
|00001030| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 09 2a 29 |unsigned| char.*)|
|00001040| 6d 61 6c 6c 6f 63 28 42 | 55 46 53 49 5a 29 3b 0d |malloc(B|UFSIZ);.|
|00001050| 09 69 66 20 28 21 62 75 | 66 66 65 72 29 0d 09 09 |.if (!bu|ffer)...|
|00001060| 65 78 69 74 28 29 3b 0d | 09 63 75 72 5f 70 61 72 |exit();.|.cur_par|
|00001070| 20 3d 20 28 70 61 72 5f | 64 61 74 61 20 2a 29 6d | = (par_|data *)m|
|00001080| 61 6c 6c 6f 63 28 42 55 | 46 53 49 5a 2b 73 69 7a |alloc(BU|FSIZ+siz|
|00001090| 65 6f 66 28 70 61 72 5f | 64 61 74 61 29 29 3b 0d |eof(par_|data));.|
|000010a0| 09 69 66 20 28 21 63 75 | 72 5f 70 61 72 29 0d 09 |.if (!cu|r_par)..|
|000010b0| 09 65 78 69 74 28 29 3b | 0d 09 70 61 72 73 20 3d |.exit();|..pars =|
|000010c0| 20 28 70 61 72 5f 69 6e | 66 6f 20 2a 29 6d 61 6c | (par_in|fo *)mal|
|000010d0| 6c 6f 63 28 4d 41 58 50 | 41 52 53 2a 73 69 7a 65 |loc(MAXP|ARS*size|
|000010e0| 6f 66 28 70 61 72 5f 69 | 6e 66 6f 29 29 3b 0d 09 |of(par_i|nfo));..|
|000010f0| 69 66 20 28 21 70 61 72 | 73 29 0d 09 09 65 78 69 |if (!par|s)...exi|
|00001100| 74 28 29 3b 0d 09 6d 65 | 6d 73 65 74 28 70 61 72 |t();..me|mset(par|
|00001110| 73 2c 20 30 2c 20 4d 41 | 58 50 41 52 53 2a 73 69 |s, 0, MA|XPARS*si|
|00001120| 7a 65 6f 66 28 70 61 72 | 5f 69 6e 66 6f 29 29 3b |zeof(par|_info));|
|00001130| 0d 0d 2f 2a 20 49 20 61 | 73 73 75 6d 65 20 74 68 |../* I a|ssume th|
|00001140| 61 74 20 6f 6e 6c 79 20 | 6f 6e 65 20 6b 69 6e 64 |at only |one kind|
|00001150| 20 6f 66 20 72 75 6c 65 | 72 20 69 73 20 6e 65 65 | of rule|r is nee|
|00001160| 64 65 64 2e 20 59 6f 75 | 20 73 68 6f 75 6c 64 20 |ded. You| should |
|00001170| 62 65 20 61 62 6c 65 20 | 74 6f 0d 09 09 61 64 64 |be able |to...add|
|00001180| 20 73 6f 6d 65 20 6d 6f | 72 65 20 65 61 73 69 6c | some mo|re easil|
|00001190| 79 2e 20 2a 2f 0d 09 72 | 75 6c 2e 6c 65 66 74 5f |y. */..r|ul.left_|
|000011a0| 6d 61 72 67 69 6e 20 3d | 20 34 3b 0d 09 72 75 6c |margin =| 4;..rul|
|000011b0| 2e 72 69 67 68 74 5f 6d | 61 72 67 69 6e 20 3d 20 |.right_m|argin = |
|000011c0| 34 38 30 3b 0d 09 72 75 | 6c 2e 6a 75 73 74 20 3d |480;..ru|l.just =|
|000011d0| 20 33 3b 0d 09 72 75 6c | 2e 74 61 62 5f 6e 75 6d | 3;..rul|.tab_num|
|000011e0| 62 20 3d 20 31 3b 0d 09 | 72 75 6c 2e 73 70 61 63 |b = 1;..|rul.spac|
|000011f0| 69 6e 67 20 3d 20 30 3b | 0d 09 72 75 6c 2e 69 6e |ing = 0;|..rul.in|
|00001200| 64 65 6e 74 20 3d 20 34 | 3b 0d 09 72 75 6c 2e 74 |dent = 4|;..rul.t|
|00001210| 61 62 5f 61 72 72 61 79 | 5b 30 5d 20 3d 20 2d 34 |ab_array|[0] = -4|
|00001220| 36 30 3b 0d 0d 09 77 68 | 69 6c 65 20 28 31 29 20 |60;...wh|ile (1) |
|00001230| 7b 0d 09 09 69 6e 66 69 | 6c 65 20 3d 20 66 6f 70 |{...infi|le = fop|
|00001240| 65 6e 28 67 65 74 64 6f | 63 28 66 69 6c 65 6e 61 |en(getdo|c(filena|
|00001250| 6d 65 29 2c 20 22 72 22 | 29 3b 0d 0d 09 09 70 72 |me), "r"|);....pr|
|00001260| 65 76 69 6e 70 6f 73 20 | 3d 20 30 3b 0d 09 09 6f |evinpos |= 0;...o|
|00001270| 75 74 63 6f 75 6e 74 20 | 3d 20 70 61 72 63 6f 75 |utcount |= parcou|
|00001280| 6e 74 20 3d 20 63 75 72 | 70 6f 73 20 3d 20 30 3b |nt = cur|pos = 0;|
|00001290| 0d 0d 09 09 63 75 72 66 | 6f 6e 74 20 3d 20 74 69 |....curf|ont = ti|
|000012a0| 6d 65 73 3b 0d 09 09 63 | 75 72 73 69 7a 65 20 3d |mes;...c|ursize =|
|000012b0| 20 31 32 3b 0d 09 09 63 | 75 72 73 74 79 6c 65 20 | 12;...c|urstyle |
|000012c0| 3d 20 6e 6f 72 6d 61 6c | 3b 0d 0d 09 09 6f 70 65 |= normal|;....ope|
|000012d0| 6e 5f 6f 75 74 66 69 6c | 65 28 29 3b 0d 0d 09 09 |n_outfil|e();....|
|000012e0| 77 68 69 6c 65 20 28 21 | 28 66 65 6f 66 28 69 6e |while (!|(feof(in|
|000012f0| 66 69 6c 65 29 29 29 20 | 7b 0d 09 09 09 69 66 20 |file))) |{....if |
|00001300| 28 66 74 65 6c 6c 28 69 | 6e 66 69 6c 65 29 20 2d |(ftell(i|nfile) -|
|00001310| 20 70 72 65 76 69 6e 70 | 6f 73 20 3e 20 35 30 30 | previnp|os > 500|
|00001320| 30 30 20 7c 7c 20 70 61 | 72 63 6f 75 6e 74 20 3e |00 || pa|rcount >|
|00001330| 3d 20 4d 41 58 50 41 52 | 53 29 20 7b 0d 09 09 09 |= MAXPAR|S) {....|
|00001340| 09 2f 2a 20 4d 61 6b 65 | 20 61 20 6e 65 77 20 6f |./* Make| a new o|
|00001350| 75 74 70 75 74 20 66 69 | 6c 65 20 69 66 20 74 68 |utput fi|le if th|
|00001360| 65 20 63 75 72 72 65 6e | 74 20 6f 75 74 70 75 74 |e curren|t output|
|00001370| 20 66 69 6c 65 0d 09 09 | 09 09 09 09 65 78 63 65 | file...|....exce|
|00001380| 65 64 73 20 35 30 30 30 | 30 20 63 68 61 72 61 63 |eds 5000|0 charac|
|00001390| 74 65 72 73 20 6f 72 20 | 4d 41 58 50 41 52 53 20 |ters or |MAXPARS |
|000013a0| 70 61 72 61 67 72 61 70 | 68 73 2e 0d 09 09 09 09 |paragrap|hs......|
|000013b0| 09 09 54 68 65 20 6c 69 | 6d 69 74 61 74 69 6f 6e |..The li|mitation|
|000013c0| 20 6f 66 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f | of the |number o|
|000013d0| 66 20 63 68 61 72 61 63 | 74 65 72 73 20 69 73 20 |f charac|ters is |
|000013e0| 73 69 6d 70 6c 79 0d 09 | 09 09 09 09 09 70 72 61 |simply..|.....pra|
|000013f0| 63 74 69 63 61 6c 3b 20 | 4d 61 63 57 72 69 74 65 |ctical; |MacWrite|
|00001400| 20 69 73 20 73 6c 6f 77 | 20 77 69 74 68 20 6c 61 | is slow| with la|
|00001410| 72 67 65 20 66 69 6c 65 | 73 2e 20 2a 2f 0d 0d 09 |rge file|s. */...|
|00001420| 09 09 09 70 72 65 76 69 | 6e 70 6f 73 20 3d 20 66 |...previ|npos = f|
|00001430| 74 65 6c 6c 28 69 6e 66 | 69 6c 65 29 3b 0d 0d 09 |tell(inf|ile);...|
|00001440| 09 09 09 63 6c 6f 73 65 | 5f 6f 75 74 66 69 6c 65 |...close|_outfile|
|00001450| 28 29 3b 0d 0d 09 09 09 | 09 6f 70 65 6e 5f 6f 75 |();.....|.open_ou|
|00001460| 74 66 69 6c 65 28 29 3b | 0d 09 09 09 7d 0d 0d 09 |tfile();|....}...|
|00001470| 09 09 66 67 65 74 73 28 | 62 75 66 66 65 72 2c 20 |..fgets(|buffer, |
|00001480| 42 55 46 53 49 5a 2c 20 | 69 6e 66 69 6c 65 29 3b |BUFSIZ, |infile);|
|00001490| 0d 0d 09 09 09 6c 69 6e | 65 6c 65 6e 67 74 68 20 |.....lin|elength |
|000014a0| 3d 20 73 74 72 6c 65 6e | 28 62 75 66 66 65 72 29 |= strlen|(buffer)|
|000014b0| 3b 0d 0d 09 09 09 69 20 | 3d 20 30 3b 0d 09 09 09 |;.....i |= 0;....|
|000014c0| 77 68 69 6c 65 20 28 69 | 20 3c 20 6c 69 6e 65 6c |while (i| < linel|
|000014d0| 65 6e 67 74 68 29 20 7b | 0d 09 09 09 09 66 6f 72 |ength) {|.....for|
|000014e0| 6d 61 74 63 6f 75 6e 74 | 20 3d 20 31 3b 0d 09 09 |matcount| = 1;...|
|000014f0| 09 09 66 63 28 66 6f 6e | 74 63 68 2c 20 30 2c 20 |..fc(fon|tch, 0, |
|00001500| 63 75 72 73 69 7a 65 2c | 20 63 75 72 73 74 79 6c |cursize,| curstyl|
|00001510| 65 2c 20 63 75 72 66 6f | 6e 74 29 3b 0d 0d 09 09 |e, curfo|nt);....|
|00001520| 09 09 66 6f 72 20 28 6a | 20 3d 20 30 3b 20 69 20 |..for (j| = 0; i |
|00001530| 3c 20 6c 69 6e 65 6c 65 | 6e 67 74 68 3b 20 2b 2b |< linele|ngth; ++|
|00001540| 69 29 20 7b 0d 09 09 09 | 09 09 73 77 69 74 63 68 |i) {....|..switch|
|00001550| 20 28 62 75 66 66 65 72 | 5b 69 5d 29 20 7b 0d 0d | (buffer|[i]) {..|
|00001560| 09 09 09 09 09 09 63 61 | 73 65 20 27 3e 27 3a 0d |......ca|se '>':.|
|00001570| 09 09 09 09 09 09 09 63 | 75 72 73 74 79 6c 65 20 |.......c|urstyle |
|00001580| 3d 20 69 74 61 6c 69 63 | 3b 0d 09 09 09 09 09 09 |= italic|;.......|
|00001590| 09 66 63 28 66 6f 6e 74 | 63 68 20 2b 20 66 6f 72 |.fc(font|ch + for|
|000015a0| 6d 61 74 63 6f 75 6e 74 | 2b 2b 2c 20 6a 2c 20 63 |matcount|++, j, c|
|000015b0| 75 72 73 69 7a 65 2c 20 | 63 75 72 73 74 79 6c 65 |ursize, |curstyle|
|000015c0| 2c 20 63 75 72 66 6f 6e | 74 29 3b 0d 09 09 09 09 |, curfon|t);.....|
|000015d0| 09 09 09 62 72 65 61 6b | 3b 0d 0d 09 09 09 09 09 |...break|;.......|
|000015e0| 09 63 61 73 65 20 27 3c | 27 3a 0d 09 09 09 09 09 |.case '<|':......|
|000015f0| 09 09 63 75 72 73 74 79 | 6c 65 20 3d 20 6e 6f 72 |..cursty|le = nor|
|00001600| 6d 61 6c 3b 0d 09 09 09 | 09 09 09 09 66 63 28 66 |mal;....|....fc(f|
|00001610| 6f 6e 74 63 68 20 2b 20 | 66 6f 72 6d 61 74 63 6f |ontch + |formatco|
|00001620| 75 6e 74 2b 2b 2c 20 6a | 2c 20 63 75 72 73 69 7a |unt++, j|, cursiz|
|00001630| 65 2c 20 63 75 72 73 74 | 79 6c 65 2c 20 63 75 72 |e, curst|yle, cur|
|00001640| 66 6f 6e 74 29 3b 0d 09 | 09 09 09 09 09 09 62 72 |font);..|......br|
|00001650| 65 61 6b 3b 0d 0d 09 09 | 09 09 09 09 2f 2a 20 61 |eak;....|..../* a|
|00001660| 64 64 20 6d 6f 72 65 20 | 61 73 20 6e 65 65 64 65 |dd more |as neede|
|00001670| 64 20 2a 2f 0d 0d 09 09 | 09 09 09 09 64 65 66 61 |d */....|....defa|
|00001680| 75 6c 74 3a 0d 09 09 09 | 09 09 09 09 63 75 72 5f |ult:....|....cur_|
|00001690| 70 61 72 2d 3e 74 65 78 | 74 5b 6a 2b 2b 5d 20 3d |par->tex|t[j++] =|
|000016a0| 20 62 75 66 66 65 72 5b | 69 5d 3b 0d 09 09 09 09 | buffer[|i];.....|
|000016b0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 09 7d |...break|;......}|
|000016c0| 0d 09 09 09 09 7d 0d 0d | 09 77 72 69 74 65 5f 70 |.....}..|.write_p|
|000016d0| 61 72 3a 09 2f 2a 20 6a | 75 6d 70 20 74 6f 20 74 |ar:./* j|ump to t|
|000016e0| 68 69 73 20 6c 61 62 65 | 6c 20 69 66 20 79 6f 75 |his labe|l if you|
|000016f0| 20 77 61 6e 74 20 74 6f | 20 6d 61 6b 65 20 61 20 | want to| make a |
|00001700| 6e 65 77 20 70 61 72 61 | 67 72 61 70 68 20 69 6e |new para|graph in|
|00001710| 20 74 68 65 0d 09 09 09 | 09 09 09 09 09 09 6d 69 | the....|......mi|
|00001720| 64 64 6c 65 20 6f 66 20 | 61 6e 20 69 6e 70 75 74 |ddle of |an input|
|00001730| 20 6c 69 6e 65 20 28 69 | 74 27 73 20 73 65 65 6d | line (i|t's seem|
|00001740| 73 20 74 6f 20 6d 65 20 | 74 6f 20 62 65 20 74 68 |s to me |to be th|
|00001750| 65 20 63 6c 65 61 6e 65 | 73 74 0d 09 09 09 09 09 |e cleane|st......|
|00001760| 09 09 09 09 77 61 79 20 | 74 6f 20 62 72 65 61 6b |....way |to break|
|00001770| 20 6f 75 74 20 6f 66 20 | 74 68 65 20 27 73 77 69 | out of |the 'swi|
|00001780| 74 63 68 27 20 73 74 61 | 74 65 6d 65 6e 74 20 61 |tch' sta|tement a|
|00001790| 6e 64 20 74 68 65 20 27 | 66 6f 72 27 20 6c 6f 6f |nd the '|for' loo|
|000017a0| 70 0d 09 09 09 09 09 09 | 09 09 09 61 74 20 6f 6e |p.......|...at on|
|000017b0| 63 65 29 20 2a 2f 0d 09 | 09 09 09 69 66 20 28 63 |ce) */..|...if (c|
|000017c0| 75 72 5f 70 61 72 2d 3e | 74 65 78 74 5b 6a 2d 31 |ur_par->|text[j-1|
|000017d0| 5d 20 21 3d 20 4e 45 57 | 4c 49 4e 45 29 0d 09 09 |] != NEW|LINE)...|
|000017e0| 09 09 09 63 75 72 5f 70 | 61 72 2d 3e 74 65 78 74 |...cur_p|ar->text|
|000017f0| 5b 6a 2b 2b 5d 20 3d 20 | 4e 45 57 4c 49 4e 45 3b |[j++] = |NEWLINE;|
|00001800| 0d 09 09 09 09 63 75 72 | 5f 70 61 72 2d 3e 6c 65 |.....cur|_par->le|
|00001810| 6e 67 74 68 20 3d 20 6a | 3b 0d 09 09 09 09 70 72 |ngth = j|;.....pr|
|00001820| 65 76 70 6f 73 20 3d 20 | 63 75 72 70 6f 73 3b 0d |evpos = |curpos;.|
|00001830| 09 09 09 09 6c 65 6e 67 | 74 68 20 3d 20 28 6a 20 |....leng|th = (j |
|00001840| 2b 20 33 29 20 26 20 2d | 32 3b 0d 09 09 09 09 66 |+ 3) & -|2;.....f|
|00001850| 77 72 69 74 65 28 63 75 | 72 5f 70 61 72 2c 20 6c |write(cu|r_par, l|
|00001860| 65 6e 67 74 68 2c 20 31 | 2c 20 6f 75 74 66 69 6c |ength, 1|, outfil|
|00001870| 65 29 3b 0d 09 09 09 09 | 70 75 74 77 28 28 66 6f |e);.....|putw((fo|
|00001880| 72 6d 61 74 63 6f 75 6e | 74 20 2a 20 73 69 7a 65 |rmatcoun|t * size|
|00001890| 6f 66 28 66 6f 72 6d 61 | 74 29 29 3c 3c 31 36 2c |of(forma|t))<<16,|
|000018a0| 20 6f 75 74 66 69 6c 65 | 29 3b 0d 09 09 09 09 66 | outfile|);.....f|
|000018b0| 73 65 65 6b 28 6f 75 74 | 66 69 6c 65 2c 20 2d 32 |seek(out|file, -2|
|000018c0| 2c 20 31 29 3b 0d 09 09 | 09 09 2f 2a 20 62 61 63 |, 1);...|../* bac|
|000018d0| 6b 75 70 20 32 20 62 79 | 74 65 73 20 62 65 63 61 |kup 2 by|tes beca|
|000018e0| 75 73 65 20 27 70 75 74 | 77 27 20 70 75 74 73 20 |use 'put|w' puts |
|000018f0| 34 20 62 79 74 65 73 0d | 09 09 09 09 09 09 28 77 |4 bytes.|......(w|
|00001900| 68 79 20 69 73 6e 27 74 | 20 74 68 65 72 65 20 61 |hy isn't| there a|
|00001910| 20 32 20 62 79 74 65 20 | 27 70 75 74 27 29 20 2a | 2 byte |'put') *|
|00001920| 2f 0d 09 09 09 09 66 77 | 72 69 74 65 28 66 6f 6e |/.....fw|rite(fon|
|00001930| 74 63 68 2c 20 73 69 7a | 65 6f 66 28 66 6f 72 6d |tch, siz|eof(form|
|00001940| 61 74 29 2c 20 66 6f 72 | 6d 61 74 63 6f 75 6e 74 |at), for|matcount|
|00001950| 2c 20 6f 75 74 66 69 6c | 65 29 3b 0d 09 09 09 09 |, outfil|e);.....|
|00001960| 63 75 72 70 6f 73 20 3d | 20 70 72 65 76 70 6f 73 |curpos =| prevpos|
|00001970| 20 2b 20 6c 65 6e 67 74 | 68 20 2b 20 32 20 2b 20 | + lengt|h + 2 + |
|00001980| 66 6f 72 6d 61 74 63 6f | 75 6e 74 20 2a 20 73 69 |formatco|unt * si|
|00001990| 7a 65 6f 66 28 66 6f 72 | 6d 61 74 29 3b 0d 0d 09 |zeof(for|mat);...|
|000019a0| 09 09 09 70 61 72 73 5b | 70 61 72 63 6f 75 6e 74 |...pars[|parcount|
|000019b0| 5d 2e 68 65 69 67 68 74 | 20 3d 20 31 3b 09 2f 2a |].height| = 1;./*|
|000019c0| 20 74 65 78 74 20 70 61 | 72 61 67 72 61 70 68 20 | text pa|ragraph |
|000019d0| 28 4d 61 63 57 72 69 74 | 65 20 77 69 6c 6c 20 63 |(MacWrit|e will c|
|000019e0| 61 6c 63 75 6c 61 74 65 | 0d 09 09 09 09 09 09 09 |alculate|........|
|000019f0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 74 68 65 |........|.....the|
|00001a00| 20 63 6f 72 72 65 63 74 | 20 68 65 69 67 68 74 29 | correct| height)|
|00001a10| 20 2a 2f 0d 09 09 09 09 | 70 61 72 73 5b 70 61 72 | */.....|pars[par|
|00001a20| 63 6f 75 6e 74 5d 2e 70 | 61 72 5f 64 61 74 61 20 |count].p|ar_data |
|00001a30| 3d 20 28 63 68 61 72 20 | 2a 29 70 72 65 76 70 6f |= (char |*)prevpo|
|00001a40| 73 3b 0d 09 09 09 09 70 | 61 72 73 5b 70 61 72 63 |s;.....p|ars[parc|
|00001a50| 6f 75 6e 74 5d 2e 70 61 | 72 5f 6c 65 6e 20 3d 20 |ount].pa|r_len = |
|00001a60| 63 75 72 70 6f 73 20 2d | 20 70 72 65 76 70 6f 73 |curpos -| prevpos|
|00001a70| 3b 0d 09 09 09 09 70 61 | 72 63 6f 75 6e 74 2b 2b |;.....pa|rcount++|
|00001a80| 3b 0d 09 09 09 7d 0d 09 | 09 7d 0d 0d 09 09 63 6c |;....}..|.}....cl|
|00001a90| 6f 73 65 5f 6f 75 74 66 | 69 6c 65 28 29 3b 0d 09 |ose_outf|ile();..|
|00001aa0| 09 66 63 6c 6f 73 65 28 | 69 6e 66 69 6c 65 29 3b |.fclose(|infile);|
|00001ab0| 0d 09 7d 0d 7d 0d 0d 6f | 70 65 6e 5f 6f 75 74 66 |..}.}..o|pen_outf|
|00001ac0| 69 6c 65 28 29 0d 7b 0d | 09 46 49 6e 66 6f 09 09 |ile().{.|.FInfo..|
|00001ad0| 66 75 70 70 6c 3b 0d 09 | 73 68 6f 72 74 09 09 73 |fuppl;..|short..s|
|00001ae0| 6b 72 61 72 6e 72 3b 0d | 09 6c 6f 6e 67 09 09 6c |krarnr;.|.long..l|
|00001af0| 65 6e 67 74 68 3b 0d 09 | 63 68 61 72 09 09 6e 75 |ength;..|char..nu|
|00001b00| 6d 5b 35 5d 3b 0d 09 48 | 61 6e 64 6c 65 09 73 68 |m[5];..H|andle.sh|
|00001b10| 3b 0d 0d 09 4e 75 6d 54 | 6f 53 74 72 69 6e 67 28 |;...NumT|oString(|
|00001b20| 2b 2b 6f 75 74 63 6f 75 | 6e 74 2c 20 6e 75 6d 29 |++outcou|nt, num)|
|00001b30| 3b 0d 09 73 74 72 63 70 | 79 28 6f 75 74 66 69 6c |;..strcp|y(outfil|
|00001b40| 65 6e 61 6d 65 2c 20 66 | 69 6c 65 6e 61 6d 65 29 |ename, f|ilename)|
|00001b50| 3b 0d 09 73 74 72 63 61 | 74 28 73 74 72 63 61 74 |;..strca|t(strcat|
|00001b60| 28 6f 75 74 66 69 6c 65 | 6e 61 6d 65 2c 20 6e 75 |(outfile|name, nu|
|00001b70| 6d 29 2c 20 22 2e 6d 77 | 22 29 3b 0d 09 2f 2a 20 |m), ".mw|");../* |
|00001b80| 6e 61 6d 65 20 74 68 65 | 20 6f 75 74 70 75 74 20 |name the| output |
|00001b90| 66 69 6c 65 20 77 69 74 | 68 20 20 74 68 65 20 69 |file wit|h the i|
|00001ba0| 6e 70 75 74 20 66 69 6c | 65 6e 61 6d 65 0d 09 09 |nput fil|ename...|
|00001bb0| 09 77 69 74 68 20 61 20 | 66 6f 6c 6c 6f 77 69 6e |.with a |followin|
|00001bc0| 67 20 6e 75 6d 62 65 72 | 20 61 6e 64 20 73 75 66 |g number| and suf|
|00001bd0| 66 69 78 20 2e 6d 77 20 | 2a 2f 0d 09 6f 75 74 66 |fix .mw |*/..outf|
|00001be0| 69 6c 65 20 3d 20 66 6f | 70 65 6e 28 6f 75 74 66 |ile = fo|pen(outf|
|00001bf0| 69 6c 65 6e 61 6d 65 2c | 20 22 77 22 29 3b 0d 0d |ilename,| "w");..|
|00001c00| 09 47 65 74 46 49 6e 66 | 6f 28 6f 75 74 66 69 6c |.GetFInf|o(outfil|
|00001c10| 65 6e 61 6d 65 2c 20 30 | 2c 20 26 66 75 70 70 6c |ename, 0|, &fuppl|
|00001c20| 29 3b 0d 09 66 75 70 70 | 6c 2e 66 64 54 79 70 65 |);..fupp|l.fdType|
|00001c30| 20 3d 20 27 57 4f 52 44 | 27 3b 0d 09 66 75 70 70 | = 'WORD|';..fupp|
|00001c40| 6c 2e 66 64 43 72 65 61 | 74 6f 72 20 3d 20 27 4d |l.fdCrea|tor = 'M|
|00001c50| 41 43 41 27 3b 0d 09 53 | 65 74 46 49 6e 66 6f 28 |ACA';..S|etFInfo(|
|00001c60| 6f 75 74 66 69 6c 65 6e | 61 6d 65 2c 20 30 2c 20 |outfilen|ame, 0, |
|00001c70| 26 66 75 70 70 6c 29 3b | 0d 0d 09 2f 2a 20 74 68 |&fuppl);|.../* th|
|00001c80| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 36 20 73 74 |e follow|ing 6 st|
|00001c90| 61 74 65 6d 65 6e 74 73 | 20 61 72 65 20 72 65 61 |atements| are rea|
|00001ca0| 6c 6c 79 20 75 6e 6e 65 | 63 65 73 73 61 72 79 20 |lly unne|cessary |
|00001cb0| 75 6e 6c 65 73 73 20 79 | 6f 75 20 68 61 76 65 20 |unless y|ou have |
|00001cc0| 74 6f 0d 09 09 09 6f 70 | 65 6e 20 74 68 65 20 66 |to....op|en the f|
|00001cd0| 69 6c 65 73 20 77 69 74 | 68 20 4d 69 63 72 6f 73 |iles wit|h Micros|
|00001ce0| 6f 66 74 20 57 6f 72 64 | 2c 20 65 76 65 6e 20 74 |oft Word|, even t|
|00001cf0| 68 65 6e 20 74 68 65 20 | 66 69 72 73 74 20 73 74 |hen the |first st|
|00001d00| 61 74 65 6d 65 6e 74 0d | 09 09 09 73 68 6f 75 6c |atement.|...shoul|
|00001d10| 64 20 73 75 66 66 69 63 | 65 20 28 69 2e 65 2e 20 |d suffic|e (i.e. |
|00001d20| 6d 61 6b 65 20 61 6e 20 | 65 6d 70 74 79 20 72 65 |make an |empty re|
|00001d30| 73 6f 75 72 63 65 20 66 | 6f 72 6b 29 20 2a 2f 0d |source f|ork) */.|
|00001d40| 09 43 72 65 61 74 65 52 | 65 73 46 69 6c 65 28 6f |.CreateR|esFile(o|
|00001d50| 75 74 66 69 6c 65 6e 61 | 6d 65 29 3b 0d 09 73 6b |utfilena|me);..sk|
|00001d60| 72 61 72 6e 72 20 3d 20 | 4f 70 65 6e 52 65 73 46 |rarnr = |OpenResF|
|00001d70| 69 6c 65 28 6f 75 74 66 | 69 6c 65 6e 61 6d 65 29 |ile(outf|ilename)|
|00001d80| 3b 0d 09 52 6d 76 65 52 | 65 73 6f 75 72 63 65 28 |;..RmveR|esource(|
|00001d90| 47 65 74 52 65 73 6f 75 | 72 63 65 28 27 53 54 52 |GetResou|rce('STR|
|00001da0| 20 27 2c 20 37 30 30 29 | 29 3b 0d 09 50 74 72 54 | ', 700)|);..PtrT|
|00001db0| 6f 48 61 6e 64 28 22 5c | 70 20 65 74 6e 72 6f 61 |oHand("\|p etnroa|
|00001dc0| 69 73 64 6c 68 63 66 70 | 22 2c 20 26 73 68 2c 20 |isdlhcfp|", &sh, |
|00001dd0| 31 36 29 3b 0d 09 41 64 | 64 52 65 73 6f 75 72 63 |16);..Ad|dResourc|
|00001de0| 65 28 73 68 2c 20 27 53 | 54 52 20 27 2c 20 37 30 |e(sh, 'S|TR ', 70|
|00001df0| 30 2c 20 22 22 29 3b 0d | 09 43 6c 6f 73 65 52 65 |0, "");.|.CloseRe|
|00001e00| 73 46 69 6c 65 28 73 6b | 72 61 72 6e 72 29 3b 0d |sFile(sk|rarnr);.|
|00001e10| 0d 09 70 61 72 63 6f 75 | 6e 74 20 3d 20 31 3b 0d |..parcou|nt = 1;.|
|00001e20| 0d 09 69 6f 63 74 6c 28 | 66 69 6c 65 6e 6f 28 6f |..ioctl(|fileno(o|
|00001e30| 75 74 66 69 6c 65 29 2c | 20 46 49 4f 52 45 46 4e |utfile),| FIOREFN|
|00001e40| 55 4d 2c 20 26 73 6b 72 | 61 72 6e 72 29 3b 0d 09 |UM, &skr|arnr);..|
|00001e50| 6c 65 6e 67 74 68 20 3d | 20 73 69 7a 65 6f 66 28 |length =| sizeof(|
|00001e60| 64 68 65 61 64 29 3b 0d | 09 41 6c 6c 6f 63 61 74 |dhead);.|.Allocat|
|00001e70| 65 28 73 6b 72 61 72 6e | 72 2c 20 26 6c 65 6e 67 |e(skrarn|r, &leng|
|00001e80| 74 68 29 3b 0d 09 69 6f | 63 74 6c 28 66 69 6c 65 |th);..io|ctl(file|
|00001e90| 6e 6f 28 6f 75 74 66 69 | 6c 65 29 2c 20 46 49 4f |no(outfi|le), FIO|
|00001ea0| 53 45 54 45 4f 46 2c 20 | 6c 65 6e 67 74 68 29 3b |SETEOF, |length);|
|00001eb0| 0d 09 66 73 65 65 6b 28 | 6f 75 74 66 69 6c 65 2c |..fseek(|outfile,|
|00001ec0| 20 73 69 7a 65 6f 66 28 | 64 68 65 61 64 29 2c 20 | sizeof(|dhead), |
|00001ed0| 30 29 3b 0d 0d 09 2f 2a | 20 6d 61 6b 65 20 61 20 |0);.../*| make a |
|00001ee0| 72 75 6c 65 72 20 61 6e | 64 20 61 6e 20 65 6d 70 |ruler an|d an emp|
|00001ef0| 74 79 20 6c 69 6e 65 20 | 66 6f 72 20 74 68 65 20 |ty line |for the |
|00001f00| 66 6f 6f 74 65 72 20 61 | 6e 64 20 68 65 61 64 65 |footer a|nd heade|
|00001f10| 72 20 2a 2f 0d 0d 09 70 | 72 65 76 70 6f 73 20 3d |r */...p|revpos =|
|00001f20| 20 66 74 65 6c 6c 28 6f | 75 74 66 69 6c 65 29 3b | ftell(o|utfile);|
|00001f30| 0d 09 66 77 72 69 74 65 | 28 26 72 75 6c 2c 20 73 |..fwrite|(&rul, s|
|00001f40| 69 7a 65 6f 66 28 72 75 | 6c 29 2c 20 31 2c 20 6f |izeof(ru|l), 1, o|
|00001f50| 75 74 66 69 6c 65 29 3b | 0d 09 63 75 72 70 6f 73 |utfile);|..curpos|
|00001f60| 20 3d 20 70 72 65 76 70 | 6f 73 20 2b 20 73 69 7a | = prevp|os + siz|
|00001f70| 65 6f 66 28 72 75 6c 29 | 3b 0d 0d 09 66 63 28 66 |eof(rul)|;...fc(f|
|00001f80| 6f 6e 74 63 68 2c 20 30 | 2c 20 31 32 2c 20 6e 6f |ontch, 0|, 12, no|
|00001f90| 72 6d 61 6c 2c 20 74 69 | 6d 65 73 29 3b 0d 0d 09 |rmal, ti|mes);...|
|00001fa0| 66 6f 6f 74 70 61 72 73 | 5b 30 5d 2e 68 65 69 67 |footpars|[0].heig|
|00001fb0| 68 74 20 3d 20 30 3b 0d | 09 66 6f 6f 74 70 61 72 |ht = 0;.|.footpar|
|00001fc0| 73 5b 30 5d 2e 70 61 72 | 5f 64 61 74 61 20 3d 20 |s[0].par|_data = |
|00001fd0| 28 63 68 61 72 20 2a 29 | 70 72 65 76 70 6f 73 3b |(char *)|prevpos;|
|00001fe0| 0d 09 66 6f 6f 74 70 61 | 72 73 5b 30 5d 2e 70 61 |..footpa|rs[0].pa|
|00001ff0| 72 5f 6c 65 6e 20 3d 20 | 63 75 72 70 6f 73 20 2d |r_len = |curpos -|
|00002000| 20 70 72 65 76 70 6f 73 | 3b 0d 0d 09 70 72 65 76 | prevpos|;...prev|
|00002010| 70 6f 73 20 3d 20 63 75 | 72 70 6f 73 3b 0d 09 70 |pos = cu|rpos;..p|
|00002020| 75 74 77 28 73 69 7a 65 | 6f 66 28 66 6f 72 6d 61 |utw(size|of(forma|
|00002030| 74 29 2c 20 6f 75 74 66 | 69 6c 65 29 3b 0d 09 66 |t), outf|ile);..f|
|00002040| 77 72 69 74 65 28 66 6f | 6e 74 63 68 2c 20 73 69 |write(fo|ntch, si|
|00002050| 7a 65 6f 66 28 66 6f 72 | 6d 61 74 29 2c 20 31 2c |zeof(for|mat), 1,|
|00002060| 20 6f 75 74 66 69 6c 65 | 29 3b 0d 09 63 75 72 70 | outfile|);..curp|
|00002070| 6f 73 20 3d 20 70 72 65 | 76 70 6f 73 20 2b 20 34 |os = pre|vpos + 4|
|00002080| 20 2b 20 73 69 7a 65 6f | 66 28 66 6f 72 6d 61 74 | + sizeo|f(format|
|00002090| 29 3b 0d 0d 09 66 6f 6f | 74 70 61 72 73 5b 31 5d |);...foo|tpars[1]|
|000020a0| 2e 68 65 69 67 68 74 20 | 3d 20 31 3b 0d 09 66 6f |.height |= 1;..fo|
|000020b0| 6f 74 70 61 72 73 5b 31 | 5d 2e 70 61 72 5f 64 61 |otpars[1|].par_da|
|000020c0| 74 61 20 3d 20 28 63 68 | 61 72 20 2a 29 70 72 65 |ta = (ch|ar *)pre|
|000020d0| 76 70 6f 73 3b 0d 09 66 | 6f 6f 74 70 61 72 73 5b |vpos;..f|ootpars[|
|000020e0| 31 5d 2e 70 61 72 5f 6c | 65 6e 20 3d 20 63 75 72 |1].par_l|en = cur|
|000020f0| 70 6f 73 20 2d 20 70 72 | 65 76 70 6f 73 3b 0d 0d |pos - pr|evpos;..|
|00002100| 09 64 68 65 61 64 2e 66 | 6f 6f 74 65 72 2e 69 6e |.dhead.f|ooter.in|
|00002110| 66 6f 5f 61 72 72 61 79 | 20 3d 20 28 63 68 61 72 |fo_array| = (char|
|00002120| 20 2a 29 70 72 65 76 70 | 6f 73 3b 0d 09 64 68 65 | *)prevp|os;..dhe|
|00002130| 61 64 2e 66 6f 6f 74 65 | 72 2e 69 6e 66 6f 5f 6c |ad.foote|r.info_l|
|00002140| 65 6e 67 74 68 20 3d 20 | 32 20 2a 20 73 69 7a 65 |ength = |2 * size|
|00002150| 6f 66 28 70 61 72 5f 69 | 6e 66 6f 29 3b 0d 0d 09 |of(par_i|nfo);...|
|00002160| 70 72 65 76 70 6f 73 20 | 3d 20 63 75 72 70 6f 73 |prevpos |= curpos|
|00002170| 3b 0d 09 66 77 72 69 74 | 65 28 26 72 75 6c 2c 20 |;..fwrit|e(&rul, |
|00002180| 73 69 7a 65 6f 66 28 72 | 75 6c 29 2c 20 31 2c 20 |sizeof(r|ul), 1, |
|00002190| 6f 75 74 66 69 6c 65 29 | 3b 0d 09 63 75 72 70 6f |outfile)|;..curpo|
|000021a0| 73 20 3d 20 70 72 65 76 | 70 6f 73 20 2b 20 73 69 |s = prev|pos + si|
|000021b0| 7a 65 6f 66 28 72 75 6c | 29 3b 0d 0d 09 68 65 61 |zeof(rul|);...hea|
|000021c0| 64 70 61 72 73 5b 30 5d | 2e 68 65 69 67 68 74 20 |dpars[0]|.height |
|000021d0| 3d 20 30 3b 0d 09 68 65 | 61 64 70 61 72 73 5b 30 |= 0;..he|adpars[0|
|000021e0| 5d 2e 70 61 72 5f 64 61 | 74 61 20 3d 20 28 63 68 |].par_da|ta = (ch|
|000021f0| 61 72 20 2a 29 70 72 65 | 76 70 6f 73 3b 0d 09 68 |ar *)pre|vpos;..h|
|00002200| 65 61 64 70 61 72 73 5b | 30 5d 2e 70 61 72 5f 6c |eadpars[|0].par_l|
|00002210| 65 6e 20 3d 20 73 69 7a | 65 6f 66 28 72 75 6c 29 |en = siz|eof(rul)|
|00002220| 3b 0d 0d 09 70 72 65 76 | 70 6f 73 20 3d 20 63 75 |;...prev|pos = cu|
|00002230| 72 70 6f 73 3b 0d 09 70 | 75 74 77 28 73 69 7a 65 |rpos;..p|utw(size|
|00002240| 6f 66 28 66 6f 72 6d 61 | 74 29 2c 20 6f 75 74 66 |of(forma|t), outf|
|00002250| 69 6c 65 29 3b 0d 09 66 | 77 72 69 74 65 28 66 6f |ile);..f|write(fo|
|00002260| 6e 74 63 68 2c 20 73 69 | 7a 65 6f 66 28 66 6f 72 |ntch, si|zeof(for|
|00002270| 6d 61 74 29 2c 20 31 2c | 20 6f 75 74 66 69 6c 65 |mat), 1,| outfile|
|00002280| 29 3b 0d 09 63 75 72 70 | 6f 73 20 3d 20 70 72 65 |);..curp|os = pre|
|00002290| 76 70 6f 73 20 2b 20 34 | 20 2b 20 73 69 7a 65 6f |vpos + 4| + sizeo|
|000022a0| 66 28 66 6f 72 6d 61 74 | 29 3b 0d 0d 09 68 65 61 |f(format|);...hea|
|000022b0| 64 70 61 72 73 5b 31 5d | 2e 68 65 69 67 68 74 20 |dpars[1]|.height |
|000022c0| 3d 20 31 3b 0d 09 68 65 | 61 64 70 61 72 73 5b 31 |= 1;..he|adpars[1|
|000022d0| 5d 2e 70 61 72 5f 64 61 | 74 61 20 3d 20 28 63 68 |].par_da|ta = (ch|
|000022e0| 61 72 20 2a 29 70 72 65 | 76 70 6f 73 3b 0d 09 68 |ar *)pre|vpos;..h|
|000022f0| 65 61 64 70 61 72 73 5b | 31 5d 2e 70 61 72 5f 6c |eadpars[|1].par_l|
|00002300| 65 6e 20 3d 20 63 75 72 | 70 6f 73 20 2d 20 70 72 |en = cur|pos - pr|
|00002310| 65 76 70 6f 73 3b 0d 0d | 09 2f 2a 20 61 6e 64 20 |evpos;..|./* and |
|00002320| 61 20 72 75 6c 65 72 20 | 66 6f 72 20 74 68 65 20 |a ruler |for the |
|00002330| 6d 61 69 6e 20 70 61 72 | 74 20 2a 2f 0d 0d 09 70 |main par|t */...p|
|00002340| 72 65 76 70 6f 73 20 3d | 20 63 75 72 70 6f 73 3b |revpos =| curpos;|
|00002350| 0d 09 66 77 72 69 74 65 | 28 26 72 75 6c 2c 20 73 |..fwrite|(&rul, s|
|00002360| 69 7a 65 6f 66 28 72 75 | 6c 29 2c 20 31 2c 20 6f |izeof(ru|l), 1, o|
|00002370| 75 74 66 69 6c 65 29 3b | 0d 09 63 75 72 70 6f 73 |utfile);|..curpos|
|00002380| 20 3d 20 70 72 65 76 70 | 6f 73 20 2b 20 73 69 7a | = prevp|os + siz|
|00002390| 65 6f 66 28 72 75 6c 29 | 3b 0d 0d 09 70 61 72 73 |eof(rul)|;...pars|
|000023a0| 5b 30 5d 2e 68 65 69 67 | 68 74 20 3d 20 30 3b 0d |[0].heig|ht = 0;.|
|000023b0| 09 70 61 72 73 5b 30 5d | 2e 70 61 72 5f 64 61 74 |.pars[0]|.par_dat|
|000023c0| 61 20 3d 20 28 63 68 61 | 72 20 2a 29 70 72 65 76 |a = (cha|r *)prev|
|000023d0| 70 6f 73 3b 0d 09 70 61 | 72 73 5b 30 5d 2e 70 61 |pos;..pa|rs[0].pa|
|000023e0| 72 5f 6c 65 6e 20 3d 20 | 73 69 7a 65 6f 66 28 72 |r_len = |sizeof(r|
|000023f0| 75 6c 29 3b 0d 7d 0d 0d | 0d 63 6c 6f 73 65 5f 6f |ul);.}..|.close_o|
|00002400| 75 74 66 69 6c 65 28 29 | 0d 7b 0d 09 6d 65 6d 73 |utfile()|.{..mems|
|00002410| 65 74 28 62 75 66 66 65 | 72 2c 20 30 2c 20 70 61 |et(buffe|r, 0, pa|
|00002420| 72 63 6f 75 6e 74 20 3e | 20 32 20 3f 20 70 61 72 |rcount >| 2 ? par|
|00002430| 63 6f 75 6e 74 20 2a 20 | 32 20 3a 20 34 29 3b 0d |count * |2 : 4);.|
|00002440| 09 2f 2a 20 62 75 66 66 | 65 72 20 69 73 20 75 73 |./* buff|er is us|
|00002450| 65 64 20 66 6f 72 20 74 | 68 65 20 6c 69 6e 65 68 |ed for t|he lineh|
|00002460| 65 69 67 68 74 20 61 72 | 72 61 79 73 2c 20 74 68 |eight ar|rays, th|
|00002470| 65 20 6c 69 6e 68 65 69 | 67 68 74 20 69 73 20 73 |e linhei|ght is s|
|00002480| 65 74 0d 09 09 09 74 6f | 20 30 20 28 7a 65 72 6f |et....to| 0 (zero|
|00002490| 29 20 66 6f 72 20 61 6c | 6c 20 70 61 72 61 67 72 |) for al|l paragr|
|000024a0| 61 70 68 73 20 2a 2f 0d | 0d 09 2f 2a 20 6e 6f 77 |aphs */.|../* now|
|000024b0| 20 49 20 6d 61 6b 65 20 | 74 68 65 20 70 61 72 61 | I make |the para|
|000024c0| 67 72 61 70 68 20 69 6e | 66 6f 20 66 6f 72 20 74 |graph in|fo for t|
|000024d0| 68 65 20 68 65 61 64 65 | 72 20 61 6e 64 20 66 6f |he heade|r and fo|
|000024e0| 6f 74 65 72 20 2a 2f 0d | 0d 09 70 72 65 76 70 6f |oter */.|..prevpo|
|000024f0| 73 20 3d 20 63 75 72 70 | 6f 73 3b 0d 09 66 77 72 |s = curp|os;..fwr|
|00002500| 69 74 65 28 62 75 66 66 | 65 72 2c 20 34 2c 20 31 |ite(buff|er, 4, 1|
|00002510| 2c 20 6f 75 74 66 69 6c | 65 29 3b 0d 09 63 75 72 |, outfil|e);..cur|
|00002520| 70 6f 73 20 3d 20 70 72 | 65 76 70 6f 73 20 2b 20 |pos = pr|evpos + |
|00002530| 34 3b 0d 0d 09 64 68 65 | 61 64 2e 66 6f 6f 74 65 |4;...dhe|ad.foote|
|00002540| 72 2e 6c 69 6e 68 65 69 | 67 68 74 5f 61 72 72 61 |r.linhei|ght_arra|
|00002550| 79 20 3d 20 28 63 68 61 | 72 20 2a 29 70 72 65 76 |y = (cha|r *)prev|
|00002560| 70 6f 73 3b 0d 09 64 68 | 65 61 64 2e 66 6f 6f 74 |pos;..dh|ead.foot|
|00002570| 65 72 2e 6c 69 6e 68 65 | 69 67 68 74 5f 6c 65 6e |er.linhe|ight_len|
|00002580| 20 3d 20 34 3b 0d 0d 09 | 70 72 65 76 70 6f 73 20 | = 4;...|prevpos |
|00002590| 3d 20 63 75 72 70 6f 73 | 3b 0d 09 66 77 72 69 74 |= curpos|;..fwrit|
|000025a0| 65 28 66 6f 6f 74 70 61 | 72 73 2c 20 73 69 7a 65 |e(footpa|rs, size|
|000025b0| 6f 66 28 70 61 72 5f 69 | 6e 66 6f 29 2c 20 32 2c |of(par_i|nfo), 2,|
|000025c0| 20 6f 75 74 66 69 6c 65 | 29 3b 0d 09 63 75 72 70 | outfile|);..curp|
|000025d0| 6f 73 20 3d 20 70 72 65 | 76 70 6f 73 20 2b 20 32 |os = pre|vpos + 2|
|000025e0| 20 2a 20 73 69 7a 65 6f | 66 28 70 61 72 5f 69 6e | * sizeo|f(par_in|
|000025f0| 66 6f 29 3b 0d 0d 09 64 | 68 65 61 64 2e 66 6f 6f |fo);...d|head.foo|
|00002600| 74 65 72 2e 69 6e 66 6f | 5f 61 72 72 61 79 20 3d |ter.info|_array =|
|00002610| 20 28 63 68 61 72 20 2a | 29 70 72 65 76 70 6f 73 | (char *|)prevpos|
|00002620| 3b 0d 09 64 68 65 61 64 | 2e 66 6f 6f 74 65 72 2e |;..dhead|.footer.|
|00002630| 69 6e 66 6f 5f 6c 65 6e | 67 74 68 20 3d 20 32 20 |info_len|gth = 2 |
|00002640| 2a 20 73 69 7a 65 6f 66 | 28 70 61 72 5f 69 6e 66 |* sizeof|(par_inf|
|00002650| 6f 29 3b 0d 0d 09 70 72 | 65 76 70 6f 73 20 3d 20 |o);...pr|evpos = |
|00002660| 63 75 72 70 6f 73 3b 0d | 09 66 77 72 69 74 65 28 |curpos;.|.fwrite(|
|00002670| 62 75 66 66 65 72 2c 20 | 34 2c 20 31 2c 20 6f 75 |buffer, |4, 1, ou|
|00002680| 74 66 69 6c 65 29 3b 0d | 09 63 75 72 70 6f 73 20 |tfile);.|.curpos |
|00002690| 3d 20 70 72 65 76 70 6f | 73 20 2b 20 34 3b 0d 0d |= prevpo|s + 4;..|
|000026a0| 09 64 68 65 61 64 2e 68 | 65 61 64 65 72 2e 6c 69 |.dhead.h|eader.li|
|000026b0| 6e 68 65 69 67 68 74 5f | 61 72 72 61 79 20 3d 20 |nheight_|array = |
|000026c0| 28 63 68 61 72 20 2a 29 | 70 72 65 76 70 6f 73 3b |(char *)|prevpos;|
|000026d0| 0d 09 64 68 65 61 64 2e | 68 65 61 64 65 72 2e 6c |..dhead.|header.l|
|000026e0| 69 6e 68 65 69 67 68 74 | 5f 6c 65 6e 20 3d 20 34 |inheight|_len = 4|
|000026f0| 3b 0d 0d 09 70 72 65 76 | 70 6f 73 20 3d 20 63 75 |;...prev|pos = cu|
|00002700| 72 70 6f 73 3b 0d 09 66 | 77 72 69 74 65 28 68 65 |rpos;..f|write(he|
|00002710| 61 64 70 61 72 73 2c 20 | 73 69 7a 65 6f 66 28 70 |adpars, |sizeof(p|
|00002720| 61 72 5f 69 6e 66 6f 29 | 2c 20 32 2c 20 6f 75 74 |ar_info)|, 2, out|
|00002730| 66 69 6c 65 29 3b 0d 09 | 63 75 72 70 6f 73 20 3d |file);..|curpos =|
|00002740| 20 70 72 65 76 70 6f 73 | 20 2b 20 32 20 2a 20 73 | prevpos| + 2 * s|
|00002750| 69 7a 65 6f 66 28 70 61 | 72 5f 69 6e 66 6f 29 3b |izeof(pa|r_info);|
|00002760| 0d 0d 09 64 68 65 61 64 | 2e 68 65 61 64 65 72 2e |...dhead|.header.|
|00002770| 69 6e 66 6f 5f 61 72 72 | 61 79 20 3d 20 28 63 68 |info_arr|ay = (ch|
|00002780| 61 72 20 2a 29 70 72 65 | 76 70 6f 73 3b 0d 09 64 |ar *)pre|vpos;..d|
|00002790| 68 65 61 64 2e 68 65 61 | 64 65 72 2e 69 6e 66 6f |head.hea|der.info|
|000027a0| 5f 6c 65 6e 67 74 68 20 | 3d 20 32 20 2a 20 73 69 |_length |= 2 * si|
|000027b0| 7a 65 6f 66 28 70 61 72 | 5f 69 6e 66 6f 29 3b 0d |zeof(par|_info);.|
|000027c0| 0d 09 2f 2a 20 74 68 65 | 6e 20 74 68 65 20 70 61 |../* the|n the pa|
|000027d0| 72 61 67 72 61 70 68 20 | 69 6e 66 6f 20 66 6f 72 |ragraph |info for|
|000027e0| 20 74 68 65 20 6d 61 69 | 6e 20 70 61 72 74 20 2a | the mai|n part *|
|000027f0| 2f 0d 0d 09 70 72 65 76 | 70 6f 73 20 3d 20 63 75 |/...prev|pos = cu|
|00002800| 72 70 6f 73 3b 0d 09 66 | 77 72 69 74 65 28 62 75 |rpos;..f|write(bu|
|00002810| 66 66 65 72 2c 20 32 2c | 20 70 61 72 63 6f 75 6e |ffer, 2,| parcoun|
|00002820| 74 2c 20 6f 75 74 66 69 | 6c 65 29 3b 0d 09 63 75 |t, outfi|le);..cu|
|00002830| 72 70 6f 73 20 3d 20 70 | 72 65 76 70 6f 73 20 2b |rpos = p|revpos +|
|00002840| 20 70 61 72 63 6f 75 6e | 74 20 2a 20 32 3b 0d 0d | parcoun|t * 2;..|
|00002850| 09 64 68 65 61 64 2e 6d | 61 69 6e 2e 6c 69 6e 68 |.dhead.m|ain.linh|
|00002860| 65 69 67 68 74 5f 61 72 | 72 61 79 20 3d 20 28 63 |eight_ar|ray = (c|
|00002870| 68 61 72 20 2a 29 70 72 | 65 76 70 6f 73 3b 0d 09 |har *)pr|evpos;..|
|00002880| 64 68 65 61 64 2e 6d 61 | 69 6e 2e 6c 69 6e 68 65 |dhead.ma|in.linhe|
|00002890| 69 67 68 74 5f 6c 65 6e | 20 3d 20 70 61 72 63 6f |ight_len| = parco|
|000028a0| 75 6e 74 20 2a 20 32 3b | 0d 0d 09 70 72 65 76 70 |unt * 2;|...prevp|
|000028b0| 6f 73 20 3d 20 63 75 72 | 70 6f 73 3b 0d 09 66 77 |os = cur|pos;..fw|
|000028c0| 72 69 74 65 28 70 61 72 | 73 2c 20 73 69 7a 65 6f |rite(par|s, sizeo|
|000028d0| 66 28 70 61 72 5f 69 6e | 66 6f 29 2c 20 70 61 72 |f(par_in|fo), par|
|000028e0| 63 6f 75 6e 74 2c 20 6f | 75 74 66 69 6c 65 29 3b |count, o|utfile);|
|000028f0| 0d 09 63 75 72 70 6f 73 | 20 3d 20 70 72 65 76 70 |..curpos| = prevp|
|00002900| 6f 73 20 2b 20 70 61 72 | 63 6f 75 6e 74 20 2a 20 |os + par|count * |
|00002910| 73 69 7a 65 6f 66 28 70 | 61 72 5f 69 6e 66 6f 29 |sizeof(p|ar_info)|
|00002920| 3b 0d 0d 09 64 68 65 61 | 64 2e 6d 61 69 6e 5f 70 |;...dhea|d.main_p|
|00002930| 61 72 61 67 72 61 70 68 | 73 20 3d 20 70 61 72 63 |aragraph|s = parc|
|00002940| 6f 75 6e 74 3b 0d 09 64 | 68 65 61 64 2e 6d 61 69 |ount;..d|head.mai|
|00002950| 6e 2e 69 6e 66 6f 5f 61 | 72 72 61 79 20 3d 20 28 |n.info_a|rray = (|
|00002960| 63 68 61 72 20 2a 29 70 | 72 65 76 70 6f 73 3b 0d |char *)p|revpos;.|
|00002970| 09 64 68 65 61 64 2e 6d | 61 69 6e 2e 69 6e 66 6f |.dhead.m|ain.info|
|00002980| 5f 6c 65 6e 67 74 68 20 | 3d 20 63 75 72 70 6f 73 |_length |= curpos|
|00002990| 2d 70 72 65 76 70 6f 73 | 3b 0d 0d 09 2f 2a 20 74 |-prevpos|;.../* t|
|000029a0| 68 65 20 66 72 65 65 20 | 6c 69 73 74 20 69 73 20 |he free |list is |
|000029b0| 6e 65 78 74 20 2a 2f 0d | 0d 09 70 72 65 76 70 6f |next */.|..prevpo|
|000029c0| 73 20 3d 20 63 75 72 70 | 6f 73 3b 0d 09 70 75 74 |s = curp|os;..put|
|000029d0| 77 28 70 72 65 76 70 6f | 73 20 2b 20 38 2c 20 6f |w(prevpo|s + 8, o|
|000029e0| 75 74 66 69 6c 65 29 3b | 0d 09 70 75 74 77 28 30 |utfile);|..putw(0|
|000029f0| 2c 20 6f 75 74 66 69 6c | 65 29 3b 0d 09 63 75 72 |, outfil|e);..cur|
|00002a00| 70 6f 73 20 3d 20 70 72 | 65 76 70 6f 73 20 2b 20 |pos = pr|evpos + |
|00002a10| 38 3b 0d 0d 09 64 68 65 | 61 64 2e 66 72 65 65 5f |8;...dhe|ad.free_|
|00002a20| 6c 69 73 74 20 3d 20 28 | 63 68 61 72 20 2a 29 70 |list = (|char *)p|
|00002a30| 72 65 76 70 6f 73 3b 0d | 09 64 68 65 61 64 2e 66 |revpos;.|.dhead.f|
|00002a40| 72 65 65 5f 6c 65 6e 20 | 3d 20 64 68 65 61 64 2e |ree_len |= dhead.|
|00002a50| 66 72 65 65 5f 61 6c 6c | 6f 63 20 3d 20 38 3b 0d |free_all|oc = 8;.|
|00002a60| 0d 09 69 6f 63 74 6c 28 | 66 69 6c 65 6e 6f 28 6f |..ioctl(|fileno(o|
|00002a70| 75 74 66 69 6c 65 29 2c | 20 46 49 4f 53 45 54 45 |utfile),| FIOSETE|
|00002a80| 4f 46 2c 20 66 74 65 6c | 6c 28 6f 75 74 66 69 6c |OF, ftel|l(outfil|
|00002a90| 65 29 29 3b 0d 0d 09 2f | 2a 20 77 72 69 74 65 20 |e));.../|* write |
|00002aa0| 6f 75 74 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |out the |document|
|00002ab0| 20 68 65 61 64 65 72 20 | 2a 2f 0d 0d 09 72 65 77 | header |*/...rew|
|00002ac0| 69 6e 64 28 6f 75 74 66 | 69 6c 65 29 3b 0d 09 66 |ind(outf|ile);..f|
|00002ad0| 77 72 69 74 65 28 26 64 | 68 65 61 64 2c 20 73 69 |write(&d|head, si|
|00002ae0| 7a 65 6f 66 28 64 68 65 | 61 64 29 2c 20 31 2c 20 |zeof(dhe|ad), 1, |
|00002af0| 6f 75 74 66 69 6c 65 29 | 3b 0d 0d 09 66 63 6c 6f |outfile)|;...fclo|
|00002b00| 73 65 28 6f 75 74 66 69 | 6c 65 29 3b 0d 7d 0d 0d |se(outfi|le);.}..|
|00002b10| 63 68 61 72 20 2a 0d 67 | 65 74 64 6f 63 28 68 65 |char *.g|etdoc(he|
|00002b20| 69 74 69 29 0d 63 68 61 | 72 09 2a 68 65 69 74 69 |iti).cha|r.*heiti|
|00002b30| 3b 0d 7b 0d 09 53 46 52 | 65 70 6c 79 09 09 09 72 |;.{..SFR|eply...r|
|00002b40| 65 70 6c 79 3b 0d 09 50 | 6f 69 6e 74 09 09 09 09 |eply;..P|oint....|
|00002b50| 70 74 3b 0d 0d 09 70 74 | 2e 68 20 3d 20 70 74 2e |pt;...pt|.h = pt.|
|00002b60| 76 20 3d 20 38 32 3b 09 | 09 2f 2a 20 74 6f 70 6c |v = 82;.|./* topl|
|00002b70| 65 66 74 20 69 73 20 69 | 6e 20 28 38 32 2c 38 32 |eft is i|n (82,82|
|00002b80| 29 20 2a 2f 0d 0d 09 53 | 46 47 65 74 46 69 6c 65 |) */...S|FGetFile|
|00002b90| 28 26 70 74 2c 20 30 2c | 20 30 2c 20 31 2c 20 22 |(&pt, 0,| 0, 1, "|
|00002ba0| 54 45 58 54 22 2c 20 30 | 2c 20 26 72 65 70 6c 79 |TEXT", 0|, &reply|
|00002bb0| 29 3b 0d 09 69 66 20 28 | 21 72 65 70 6c 79 2e 67 |);..if (|!reply.g|
|00002bc0| 6f 6f 64 29 0d 09 09 65 | 78 69 74 28 29 3b 0d 0d |ood)...e|xit();..|
|00002bd0| 09 53 65 74 56 6f 6c 28 | 30 2c 20 72 65 70 6c 79 |.SetVol(|0, reply|
|00002be0| 2e 76 52 65 66 4e 75 6d | 29 3b 0d 0d 09 72 65 74 |.vRefNum|);...ret|
|00002bf0| 75 72 6e 28 73 74 72 63 | 70 79 28 68 65 69 74 69 |urn(strc|py(heiti|
|00002c00| 2c 20 70 32 63 73 74 72 | 28 26 72 65 70 6c 79 2e |, p2cstr|(&reply.|
|00002c10| 66 4e 61 6d 65 29 29 29 | 3b 0d 7d 0d 0d 0d 2f 2a |fName)))|;.}.../*|
|00002c20| 20 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 70 | This fu|nction p|
|00002c30| 75 74 73 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 |uts the |paramete|
|00002c40| 72 73 20 69 6e 74 6f 20 | 61 20 66 6f 72 6d 61 74 |rs into |a format|
|00002c50| 20 72 75 6e 2e 20 2a 2f | 0d 0d 66 63 28 66 70 2c | run. */|..fc(fp,|
|00002c60| 20 66 69 72 73 74 5f 63 | 68 2c 20 73 69 7a 2c 20 | first_c|h, siz, |
|00002c70| 73 74 79 6c 2c 20 66 6f | 6e 74 6e 75 6d 29 0d 66 |styl, fo|ntnum).f|
|00002c80| 6f 72 6d 61 74 20 2a 66 | 70 3b 0d 73 68 6f 72 74 |ormat *f|p;.short|
|00002c90| 09 66 69 72 73 74 5f 63 | 68 3b 0d 63 68 61 72 09 |.first_c|h;.char.|
|00002ca0| 73 69 7a 3b 0d 63 68 61 | 72 09 73 74 79 6c 3b 0d |siz;.cha|r.styl;.|
|00002cb0| 73 68 6f 72 74 09 66 6f | 6e 74 6e 75 6d 3b 0d 7b |short.fo|ntnum;.{|
|00002cc0| 0d 09 66 70 2d 3e 62 65 | 67 69 6e 5f 70 6f 73 20 |..fp->be|gin_pos |
|00002cd0| 3d 20 66 69 72 73 74 5f | 63 68 3b 0d 09 66 70 2d |= first_|ch;..fp-|
|00002ce0| 3e 73 69 7a 65 20 3d 20 | 73 69 7a 3b 0d 09 66 70 |>size = |siz;..fp|
|00002cf0| 2d 3e 73 74 79 6c 65 20 | 3d 20 73 74 79 6c 3b 0d |->style |= styl;.|
|00002d00| 09 66 70 2d 3e 66 6f 6e | 74 5f 6e 75 6d 62 20 3d |.fp->fon|t_numb =|
|00002d10| 20 66 6f 6e 74 6e 75 6d | 3b 0d 7d 0d 00 00 00 00 | fontnum|;.}.....|
|00002d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00002d90| 60 6c 42 67 2f 03 2f 2b | 00 72 a8 e8 4a 1f 67 62 |`lBg/./+|.r..J.gb|
|00002da0| 42 67 2f 03 28 6b 00 76 | 28 54 54 4c 30 2e ff fc |Bg/.(k.v|(TTL0...|
|00002db0| 08 74 78 74 6f 6d 77 2e | 63 2d 02 00 00 00 54 45 |.txtomw.|c-....TE|
|00002dc0| 58 54 4d 50 53 20 01 00 | 00 80 00 80 00 15 00 00 |XTMPS ..|........|
|00002dd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 80 00 80 |..TEXTMP|S ......|
|00002de0| 00 15 00 00 e4 ea 00 01 | 1f 72 00 00 00 00 00 00 |........|.r......|
|00002df0| 00 00 9c 45 96 2f 00 00 | 2c 9c 00 00 01 7e 2d 40 |...E./..|,....~-@|
|00002e00| 00 14 4e 75 41 f8 09 fa | 2f 08 20 eb 00 10 20 ab |..NuA...|/. ... .|
|00002e10| 00 14 2f 2b 00 08 44 6f | 00 02 44 57 a8 a8 20 6b |../+..Do|..DW.. k|
|00002e20| 00 76 42 41 61 1a 48 78 | 09 fa 2f 38 0a 06 a8 a9 |.vBAa.Hx|../8....|
|00002e30| 30 2e ff fc 53 40 91 78 | 09 fa 72 01 20 6b 00 72 |0...S@.x|..r. k.r|
|00002e40| 2f 08 48 78 09 fa 61 00 | fe 84 2f 00 3f 01 50 e7 |/.Hx..a.|../.?.P.|
|00002e50| 61 00 fe a0 4e 75 00 00 | 00 00 7f f0 40 10 40 10 |a...Nu..|....@.@.|
|00002e60| 40 10 40 10 40 10 40 10 | 40 10 40 10 40 10 7f f0 |@.@.@.@.|@.@.@...|
|00002e70| 00 00 00 00 00 00 00 00 | 00 00 7f f0 41 10 49 30 |........|....A.I0|
|00002e80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 dd 02 7e |...H..Mo|naco...~|
|00002e90| 01 dd 02 7f 01 de 02 7d | 01 de 02 7e 01 df 00 1f |.......}|...~....|
|00002ea0| 01 df 02 7d 00 00 00 06 | 00 02 00 3f 00 06 01 c8 |...}....|...?....|
|00002eb0| 02 55 00 3f 00 06 01 c8 | 02 55 9f c5 cb 36 00 00 |.U.?....|.U...6..|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00002ed0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 03 56 14 |...L...L|...2..V.|
|00002ee0| 08 d2 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00002ef0| 00 0a 03 ed ff ff 00 00 | 00 00 00 04 54 e0 00 00 |........|....T...|
+--------+-------------------------+-------------------------+--------+--------+