FILE: TXTFORMAT.ZIP FILE SIZE: 21889 FILE DATE: 10-21-1999 UPLOADED BY: Michael Kuhn mkuhn@csd.clark.net AUTHOR: Clarion coding MKuhn (see comments) TYPE: FREE VERSION: 2.0 DESCRIPTION: Text Formatting routines that provide simple word processing formatting functions. Application is setup as a .dll. There are two procedures that are used: FormatInit() and FormatText(). Text commands are sent to FormatText that control the way that the verbage is assembled in a memory buffer. COMMENTS: I coded this in Clarion so I would have some simple way to format text in a buffer that could be then printed on a Clarion report. For regular form letters or simple documents it will work just great and with low overhead. Software Tools in Pascal Kernighan & Plaugher (1980's?) Text Formatter Chapter This design was probably the Unix utility "roff". The more sophisticated successors where "nroff", "troff", and "ditroff". Version 1.0 8-19-1999 These are the basic formatting commands that were outlined in the Chapter on Text Formatting .sp - space N number of lines .br - force output buffer to clear .fi - fill on, add words to output buffer .nf - fill off, send each input line to output buffer .ju - justify text to right margin .nj - no justify, ragged right margin .ls - set line spacing .lm - set left margin .rm - set right margin .ti - temporary indent Version 1.5 9-12-1999 1. Fixed some minor problems 2. Left this out by mistake .ce - center N number of lines 3. added variable text substitution using a "queue" .qu var text add entry to queue where. . . var = variable name text = string that variable is substitued with string can be quoted to include blanks .qd dump queue to output During "textout". . . "checkvar" is called to scan inbuf for variables (names delimited like ), the text associated with variable is substituted. Example: .qu billingdate "September 11, 1999" .qu amountdue $324.56 Your account that was billed on is overdue. Please pay the amount due of upon receipt. Thank You Version 2.0 10-15-1999 Found some more bugs that caused program faults.