Home » Archimedes archive » Acorn User » AU 1998-12.adf » Regulars » StarInfo/Fletcher/reformc/!ReadMe

StarInfo/Fletcher/reformc/!ReadMe

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1998-12.adf » Regulars
Filename: StarInfo/Fletcher/reformc/!ReadMe
Read OK:
File size: 1336 bytes
Load address: 0000
Exec address: 0000
File contents
Quick !ReadMe for ReformC v1.01 (04 Apr 1998)
=========================

This is a simple generic C source code reformatter. It is NOT intended for
use on code you intend to work on. It is intended for reformatting the text
so that it is suitable for import into a form for documentation.

Initially it was designed to convert C code to Impression DDF format.
However, the program is far more versatile than that. It requires a
'description' file to be specified to enable it to determine how to re-write
particular parts of the code. Currently the supported 'parts' of the code
are :

  C style comments
  C++ style comments
  Strings
  Characters
  Directives

Since it is useful to identify comments in printed code, this is the most
important part of the reformatting.

The description files consist of a number of entries which describe the
output format (see 'descs.null' for an example of the format) :

  directive_pre    : Placed before any directive
  directive_post   : Placed after any directive
  string_pre       : Placed before any string
  string_post      : Placed after any string
  char_pre         : Placed before any character literal
  char_post        : Placed after any character literal
  comment_pre      : Placed before any comment
  comment_post     : Placed after any comment
  cppcomment_pre   : Placed before any C++ comment
  cppcomment_post  : Placed after any C++ comment
  escapes          : The characters which need to be escaped
  escape <number>  : What character <number> of the escape characters should be
  line_pre         : Placed at the start of all lines
  line_post        : Placed at the end of all lines, before the newline
  doc_pre          : Placed at the start of the document
  doc_post         : Placed at the end of the document

Be very careful when allocating escape codes. These are quite tricky things
to set up and you MUST set up the correct number.

Within the strings you may use the escapes :
  \\     \
  \"     "
  \b     code 8 (backspace)
  \f     code 12 (form feed)
  \e     code 27 (escape)
  \t     code 9 (tab)
  \n     code 10 (newline)
  \0     code 0 (NUL)
  \x##   code ## in hex

The supplied Descriptions are :

  ddf     Impression DDF format
  ddf_c   Impression DDF format with colour
  epson   Epson compatible format
  html    HTML
  html_c  HTML with nasty colour extension (but look nice!)
  null    No changes (use as a template)
  rtf     Rich Text Format
  shelp   Strong Help
  shelp_c Strong Help with colour

If you place the ReformC directory in your library, you may use the command :

  *ReformC <desc> <infile> <outfile>

Eg.

  *ReformC html c.code output

Will convert c.code into HTML.


Makefiles
---------
Within a makefile you might like to try something like the following. It's
not 100% guarenteed, but might be useful to you (RISC OS style makefiles) :

--8<--------
ReformCflags = epson

output: out_c.addrbook out_c.alphabet out_c.crc32 out_c.fileh \
	out_c.id out_c.mail out_c.mime out_c.multiuser out_c.qptest \
	out_c.quotedp out_c.stripaddr out_c.unixtime out_c.users \
	out_c.uuenctest out_c.zipthings out_h.addrbook out_h.alphabet \
	out_h.b64enc out_h.crc32 out_h.fileh out_h.id out_h.mail \
	out_h.mime out_h.mimemap out_h.multiuser out_h.options \
	out_h.quotedp out_h.strdup out_h.stripaddr out_h.unixtime \
	out_h.users out_h.uuenc out_h.zipthings 
.SUFFIXES: .h .c .out_c .out_h
.c.out_c:
	LibC:reformc $(reformcflags) $< $@
#	LibC:reformc $(reformcflags) $< $@/html
#	@Settype $@/html FAF
#	@Create $@
.h.out_h:
	LibC:reformc $(reformcflags) $< $@
#	LibC:reformc $(reformcflags) $< $@/html
#	@Settype $@/html FAF
#	@Create $@
--8<--------

Changing the output dependency will enable you to name the files you wish
to convert. Changing the reformcflags variable allows you to select a
different description file. The commented section in out_c and out_h may
be useful in producing HTML output that you can immediately view.

'make output' should then produce the files you require. Obviously you
will have to try this a few times to get it right :-)


Contact
-------
I can be contacted at <gerph@innocent.com>.


Thanks
------
Many, many thanks to Chris Johns for suggesting this idea.


Source code
-----------
The source code for ReformC is made available for you to recompile on any
other platform (I believe it will work on SunOS). The copyright for this
work remains with me, and you may not distribute modified versions.

If you lose your source code because you specified the parameters around the
wrong way, or because the program broke, that is not my fault. I am not
liable. That is, no warrenty is implied or given :-)

PS. The executable supplied is for RISC OS.


History
-------
Version 1.00 : 14 Mar 1998
               Accidentally released as version 1.01. oops.
Version 1.01 :�04 Apr 1998 (honest, this /is/ 1.01)
               Fixed bug with \0, added character style changes.
00000000  51 75 69 63 6b 20 21 52  65 61 64 4d 65 20 66 6f  |Quick !ReadMe fo|
00000010  72 20 52 65 66 6f 72 6d  43 20 76 31 2e 30 31 20  |r ReformC v1.01 |
00000020  28 30 34 20 41 70 72 20  31 39 39 38 29 0a 3d 3d  |(04 Apr 1998).==|
00000030  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000040  3d 3d 3d 3d 3d 3d 3d 0a  0a 54 68 69 73 20 69 73  |=======..This is|
00000050  20 61 20 73 69 6d 70 6c  65 20 67 65 6e 65 72 69  | a simple generi|
00000060  63 20 43 20 73 6f 75 72  63 65 20 63 6f 64 65 20  |c C source code |
00000070  72 65 66 6f 72 6d 61 74  74 65 72 2e 20 49 74 20  |reformatter. It |
00000080  69 73 20 4e 4f 54 20 69  6e 74 65 6e 64 65 64 20  |is NOT intended |
00000090  66 6f 72 0a 75 73 65 20  6f 6e 20 63 6f 64 65 20  |for.use on code |
000000a0  79 6f 75 20 69 6e 74 65  6e 64 20 74 6f 20 77 6f  |you intend to wo|
000000b0  72 6b 20 6f 6e 2e 20 49  74 20 69 73 20 69 6e 74  |rk on. It is int|
000000c0  65 6e 64 65 64 20 66 6f  72 20 72 65 66 6f 72 6d  |ended for reform|
000000d0  61 74 74 69 6e 67 20 74  68 65 20 74 65 78 74 0a  |atting the text.|
000000e0  73 6f 20 74 68 61 74 20  69 74 20 69 73 20 73 75  |so that it is su|
000000f0  69 74 61 62 6c 65 20 66  6f 72 20 69 6d 70 6f 72  |itable for impor|
00000100  74 20 69 6e 74 6f 20 61  20 66 6f 72 6d 20 66 6f  |t into a form fo|
00000110  72 20 64 6f 63 75 6d 65  6e 74 61 74 69 6f 6e 2e  |r documentation.|
00000120  0a 0a 49 6e 69 74 69 61  6c 6c 79 20 69 74 20 77  |..Initially it w|
00000130  61 73 20 64 65 73 69 67  6e 65 64 20 74 6f 20 63  |as designed to c|
00000140  6f 6e 76 65 72 74 20 43  20 63 6f 64 65 20 74 6f  |onvert C code to|
00000150  20 49 6d 70 72 65 73 73  69 6f 6e 20 44 44 46 20  | Impression DDF |
00000160  66 6f 72 6d 61 74 2e 0a  48 6f 77 65 76 65 72 2c  |format..However,|
00000170  20 74 68 65 20 70 72 6f  67 72 61 6d 20 69 73 20  | the program is |
00000180  66 61 72 20 6d 6f 72 65  20 76 65 72 73 61 74 69  |far more versati|
00000190  6c 65 20 74 68 61 6e 20  74 68 61 74 2e 20 49 74  |le than that. It|
000001a0  20 72 65 71 75 69 72 65  73 20 61 0a 27 64 65 73  | requires a.'des|
000001b0  63 72 69 70 74 69 6f 6e  27 20 66 69 6c 65 20 74  |cription' file t|
000001c0  6f 20 62 65 20 73 70 65  63 69 66 69 65 64 20 74  |o be specified t|
000001d0  6f 20 65 6e 61 62 6c 65  20 69 74 20 74 6f 20 64  |o enable it to d|
000001e0  65 74 65 72 6d 69 6e 65  20 68 6f 77 20 74 6f 20  |etermine how to |
000001f0  72 65 2d 77 72 69 74 65  0a 70 61 72 74 69 63 75  |re-write.particu|
00000200  6c 61 72 20 70 61 72 74  73 20 6f 66 20 74 68 65  |lar parts of the|
00000210  20 63 6f 64 65 2e 20 43  75 72 72 65 6e 74 6c 79  | code. Currently|
00000220  20 74 68 65 20 73 75 70  70 6f 72 74 65 64 20 27  | the supported '|
00000230  70 61 72 74 73 27 20 6f  66 20 74 68 65 20 63 6f  |parts' of the co|
00000240  64 65 0a 61 72 65 20 3a  0a 0a 20 20 43 20 73 74  |de.are :..  C st|
00000250  79 6c 65 20 63 6f 6d 6d  65 6e 74 73 0a 20 20 43  |yle comments.  C|
00000260  2b 2b 20 73 74 79 6c 65  20 63 6f 6d 6d 65 6e 74  |++ style comment|
00000270  73 0a 20 20 53 74 72 69  6e 67 73 0a 20 20 43 68  |s.  Strings.  Ch|
00000280  61 72 61 63 74 65 72 73  0a 20 20 44 69 72 65 63  |aracters.  Direc|
00000290  74 69 76 65 73 0a 0a 53  69 6e 63 65 20 69 74 20  |tives..Since it |
000002a0  69 73 20 75 73 65 66 75  6c 20 74 6f 20 69 64 65  |is useful to ide|
000002b0  6e 74 69 66 79 20 63 6f  6d 6d 65 6e 74 73 20 69  |ntify comments i|
000002c0  6e 20 70 72 69 6e 74 65  64 20 63 6f 64 65 2c 20  |n printed code, |
000002d0  74 68 69 73 20 69 73 20  74 68 65 20 6d 6f 73 74  |this is the most|
000002e0  0a 69 6d 70 6f 72 74 61  6e 74 20 70 61 72 74 20  |.important part |
000002f0  6f 66 20 74 68 65 20 72  65 66 6f 72 6d 61 74 74  |of the reformatt|
00000300  69 6e 67 2e 0a 0a 54 68  65 20 64 65 73 63 72 69  |ing...The descri|
00000310  70 74 69 6f 6e 20 66 69  6c 65 73 20 63 6f 6e 73  |ption files cons|
00000320  69 73 74 20 6f 66 20 61  20 6e 75 6d 62 65 72 20  |ist of a number |
00000330  6f 66 20 65 6e 74 72 69  65 73 20 77 68 69 63 68  |of entries which|
00000340  20 64 65 73 63 72 69 62  65 20 74 68 65 0a 6f 75  | describe the.ou|
00000350  74 70 75 74 20 66 6f 72  6d 61 74 20 28 73 65 65  |tput format (see|
00000360  20 27 64 65 73 63 73 2e  6e 75 6c 6c 27 20 66 6f  | 'descs.null' fo|
00000370  72 20 61 6e 20 65 78 61  6d 70 6c 65 20 6f 66 20  |r an example of |
00000380  74 68 65 20 66 6f 72 6d  61 74 29 20 3a 0a 0a 20  |the format) :.. |
00000390  20 64 69 72 65 63 74 69  76 65 5f 70 72 65 20 20  | directive_pre  |
000003a0  20 20 3a 20 50 6c 61 63  65 64 20 62 65 66 6f 72  |  : Placed befor|
000003b0  65 20 61 6e 79 20 64 69  72 65 63 74 69 76 65 0a  |e any directive.|
000003c0  20 20 64 69 72 65 63 74  69 76 65 5f 70 6f 73 74  |  directive_post|
000003d0  20 20 20 3a 20 50 6c 61  63 65 64 20 61 66 74 65  |   : Placed afte|
000003e0  72 20 61 6e 79 20 64 69  72 65 63 74 69 76 65 0a  |r any directive.|
000003f0  20 20 73 74 72 69 6e 67  5f 70 72 65 20 20 20 20  |  string_pre    |
00000400  20 20 20 3a 20 50 6c 61  63 65 64 20 62 65 66 6f  |   : Placed befo|
00000410  72 65 20 61 6e 79 20 73  74 72 69 6e 67 0a 20 20  |re any string.  |
00000420  73 74 72 69 6e 67 5f 70  6f 73 74 20 20 20 20 20  |string_post     |
00000430  20 3a 20 50 6c 61 63 65  64 20 61 66 74 65 72 20  | : Placed after |
00000440  61 6e 79 20 73 74 72 69  6e 67 0a 20 20 63 68 61  |any string.  cha|
00000450  72 5f 70 72 65 20 20 20  20 20 20 20 20 20 3a 20  |r_pre         : |
00000460  50 6c 61 63 65 64 20 62  65 66 6f 72 65 20 61 6e  |Placed before an|
00000470  79 20 63 68 61 72 61 63  74 65 72 20 6c 69 74 65  |y character lite|
00000480  72 61 6c 0a 20 20 63 68  61 72 5f 70 6f 73 74 20  |ral.  char_post |
00000490  20 20 20 20 20 20 20 3a  20 50 6c 61 63 65 64 20  |       : Placed |
000004a0  61 66 74 65 72 20 61 6e  79 20 63 68 61 72 61 63  |after any charac|
000004b0  74 65 72 20 6c 69 74 65  72 61 6c 0a 20 20 63 6f  |ter literal.  co|
000004c0  6d 6d 65 6e 74 5f 70 72  65 20 20 20 20 20 20 3a  |mment_pre      :|
000004d0  20 50 6c 61 63 65 64 20  62 65 66 6f 72 65 20 61  | Placed before a|
000004e0  6e 79 20 63 6f 6d 6d 65  6e 74 0a 20 20 63 6f 6d  |ny comment.  com|
000004f0  6d 65 6e 74 5f 70 6f 73  74 20 20 20 20 20 3a 20  |ment_post     : |
00000500  50 6c 61 63 65 64 20 61  66 74 65 72 20 61 6e 79  |Placed after any|
00000510  20 63 6f 6d 6d 65 6e 74  0a 20 20 63 70 70 63 6f  | comment.  cppco|
00000520  6d 6d 65 6e 74 5f 70 72  65 20 20 20 3a 20 50 6c  |mment_pre   : Pl|
00000530  61 63 65 64 20 62 65 66  6f 72 65 20 61 6e 79 20  |aced before any |
00000540  43 2b 2b 20 63 6f 6d 6d  65 6e 74 0a 20 20 63 70  |C++ comment.  cp|
00000550  70 63 6f 6d 6d 65 6e 74  5f 70 6f 73 74 20 20 3a  |pcomment_post  :|
00000560  20 50 6c 61 63 65 64 20  61 66 74 65 72 20 61 6e  | Placed after an|
00000570  79 20 43 2b 2b 20 63 6f  6d 6d 65 6e 74 0a 20 20  |y C++ comment.  |
00000580  65 73 63 61 70 65 73 20  20 20 20 20 20 20 20 20  |escapes         |
00000590  20 3a 20 54 68 65 20 63  68 61 72 61 63 74 65 72  | : The character|
000005a0  73 20 77 68 69 63 68 20  6e 65 65 64 20 74 6f 20  |s which need to |
000005b0  62 65 20 65 73 63 61 70  65 64 0a 20 20 65 73 63  |be escaped.  esc|
000005c0  61 70 65 20 3c 6e 75 6d  62 65 72 3e 20 20 3a 20  |ape <number>  : |
000005d0  57 68 61 74 20 63 68 61  72 61 63 74 65 72 20 3c  |What character <|
000005e0  6e 75 6d 62 65 72 3e 20  6f 66 20 74 68 65 20 65  |number> of the e|
000005f0  73 63 61 70 65 20 63 68  61 72 61 63 74 65 72 73  |scape characters|
00000600  20 73 68 6f 75 6c 64 20  62 65 0a 20 20 6c 69 6e  | should be.  lin|
00000610  65 5f 70 72 65 20 20 20  20 20 20 20 20 20 3a 20  |e_pre         : |
00000620  50 6c 61 63 65 64 20 61  74 20 74 68 65 20 73 74  |Placed at the st|
00000630  61 72 74 20 6f 66 20 61  6c 6c 20 6c 69 6e 65 73  |art of all lines|
00000640  0a 20 20 6c 69 6e 65 5f  70 6f 73 74 20 20 20 20  |.  line_post    |
00000650  20 20 20 20 3a 20 50 6c  61 63 65 64 20 61 74 20  |    : Placed at |
00000660  74 68 65 20 65 6e 64 20  6f 66 20 61 6c 6c 20 6c  |the end of all l|
00000670  69 6e 65 73 2c 20 62 65  66 6f 72 65 20 74 68 65  |ines, before the|
00000680  20 6e 65 77 6c 69 6e 65  0a 20 20 64 6f 63 5f 70  | newline.  doc_p|
00000690  72 65 20 20 20 20 20 20  20 20 20 20 3a 20 50 6c  |re          : Pl|
000006a0  61 63 65 64 20 61 74 20  74 68 65 20 73 74 61 72  |aced at the star|
000006b0  74 20 6f 66 20 74 68 65  20 64 6f 63 75 6d 65 6e  |t of the documen|
000006c0  74 0a 20 20 64 6f 63 5f  70 6f 73 74 20 20 20 20  |t.  doc_post    |
000006d0  20 20 20 20 20 3a 20 50  6c 61 63 65 64 20 61 74  |     : Placed at|
000006e0  20 74 68 65 20 65 6e 64  20 6f 66 20 74 68 65 20  | the end of the |
000006f0  64 6f 63 75 6d 65 6e 74  0a 0a 42 65 20 76 65 72  |document..Be ver|
00000700  79 20 63 61 72 65 66 75  6c 20 77 68 65 6e 20 61  |y careful when a|
00000710  6c 6c 6f 63 61 74 69 6e  67 20 65 73 63 61 70 65  |llocating escape|
00000720  20 63 6f 64 65 73 2e 20  54 68 65 73 65 20 61 72  | codes. These ar|
00000730  65 20 71 75 69 74 65 20  74 72 69 63 6b 79 20 74  |e quite tricky t|
00000740  68 69 6e 67 73 0a 74 6f  20 73 65 74 20 75 70 20  |hings.to set up |
00000750  61 6e 64 20 79 6f 75 20  4d 55 53 54 20 73 65 74  |and you MUST set|
00000760  20 75 70 20 74 68 65 20  63 6f 72 72 65 63 74 20  | up the correct |
00000770  6e 75 6d 62 65 72 2e 0a  0a 57 69 74 68 69 6e 20  |number...Within |
00000780  74 68 65 20 73 74 72 69  6e 67 73 20 79 6f 75 20  |the strings you |
00000790  6d 61 79 20 75 73 65 20  74 68 65 20 65 73 63 61  |may use the esca|
000007a0  70 65 73 20 3a 0a 20 20  5c 5c 20 20 20 20 20 5c  |pes :.  \\     \|
000007b0  0a 20 20 5c 22 20 20 20  20 20 22 0a 20 20 5c 62  |.  \"     ".  \b|
000007c0  20 20 20 20 20 63 6f 64  65 20 38 20 28 62 61 63  |     code 8 (bac|
000007d0  6b 73 70 61 63 65 29 0a  20 20 5c 66 20 20 20 20  |kspace).  \f    |
000007e0  20 63 6f 64 65 20 31 32  20 28 66 6f 72 6d 20 66  | code 12 (form f|
000007f0  65 65 64 29 0a 20 20 5c  65 20 20 20 20 20 63 6f  |eed).  \e     co|
00000800  64 65 20 32 37 20 28 65  73 63 61 70 65 29 0a 20  |de 27 (escape). |
00000810  20 5c 74 20 20 20 20 20  63 6f 64 65 20 39 20 28  | \t     code 9 (|
00000820  74 61 62 29 0a 20 20 5c  6e 20 20 20 20 20 63 6f  |tab).  \n     co|
00000830  64 65 20 31 30 20 28 6e  65 77 6c 69 6e 65 29 0a  |de 10 (newline).|
00000840  20 20 5c 30 20 20 20 20  20 63 6f 64 65 20 30 20  |  \0     code 0 |
00000850  28 4e 55 4c 29 0a 20 20  5c 78 23 23 20 20 20 63  |(NUL).  \x##   c|
00000860  6f 64 65 20 23 23 20 69  6e 20 68 65 78 0a 0a 54  |ode ## in hex..T|
00000870  68 65 20 73 75 70 70 6c  69 65 64 20 44 65 73 63  |he supplied Desc|
00000880  72 69 70 74 69 6f 6e 73  20 61 72 65 20 3a 0a 0a  |riptions are :..|
00000890  20 20 64 64 66 20 20 20  20 20 49 6d 70 72 65 73  |  ddf     Impres|
000008a0  73 69 6f 6e 20 44 44 46  20 66 6f 72 6d 61 74 0a  |sion DDF format.|
000008b0  20 20 64 64 66 5f 63 20  20 20 49 6d 70 72 65 73  |  ddf_c   Impres|
000008c0  73 69 6f 6e 20 44 44 46  20 66 6f 72 6d 61 74 20  |sion DDF format |
000008d0  77 69 74 68 20 63 6f 6c  6f 75 72 0a 20 20 65 70  |with colour.  ep|
000008e0  73 6f 6e 20 20 20 45 70  73 6f 6e 20 63 6f 6d 70  |son   Epson comp|
000008f0  61 74 69 62 6c 65 20 66  6f 72 6d 61 74 0a 20 20  |atible format.  |
00000900  68 74 6d 6c 20 20 20 20  48 54 4d 4c 0a 20 20 68  |html    HTML.  h|
00000910  74 6d 6c 5f 63 20 20 48  54 4d 4c 20 77 69 74 68  |tml_c  HTML with|
00000920  20 6e 61 73 74 79 20 63  6f 6c 6f 75 72 20 65 78  | nasty colour ex|
00000930  74 65 6e 73 69 6f 6e 20  28 62 75 74 20 6c 6f 6f  |tension (but loo|
00000940  6b 20 6e 69 63 65 21 29  0a 20 20 6e 75 6c 6c 20  |k nice!).  null |
00000950  20 20 20 4e 6f 20 63 68  61 6e 67 65 73 20 28 75  |   No changes (u|
00000960  73 65 20 61 73 20 61 20  74 65 6d 70 6c 61 74 65  |se as a template|
00000970  29 0a 20 20 72 74 66 20  20 20 20 20 52 69 63 68  |).  rtf     Rich|
00000980  20 54 65 78 74 20 46 6f  72 6d 61 74 0a 20 20 73  | Text Format.  s|
00000990  68 65 6c 70 20 20 20 53  74 72 6f 6e 67 20 48 65  |help   Strong He|
000009a0  6c 70 0a 20 20 73 68 65  6c 70 5f 63 20 53 74 72  |lp.  shelp_c Str|
000009b0  6f 6e 67 20 48 65 6c 70  20 77 69 74 68 20 63 6f  |ong Help with co|
000009c0  6c 6f 75 72 0a 0a 49 66  20 79 6f 75 20 70 6c 61  |lour..If you pla|
000009d0  63 65 20 74 68 65 20 52  65 66 6f 72 6d 43 20 64  |ce the ReformC d|
000009e0  69 72 65 63 74 6f 72 79  20 69 6e 20 79 6f 75 72  |irectory in your|
000009f0  20 6c 69 62 72 61 72 79  2c 20 79 6f 75 20 6d 61  | library, you ma|
00000a00  79 20 75 73 65 20 74 68  65 20 63 6f 6d 6d 61 6e  |y use the comman|
00000a10  64 20 3a 0a 0a 20 20 2a  52 65 66 6f 72 6d 43 20  |d :..  *ReformC |
00000a20  3c 64 65 73 63 3e 20 3c  69 6e 66 69 6c 65 3e 20  |<desc> <infile> |
00000a30  3c 6f 75 74 66 69 6c 65  3e 0a 0a 45 67 2e 0a 0a  |<outfile>..Eg...|
00000a40  20 20 2a 52 65 66 6f 72  6d 43 20 68 74 6d 6c 20  |  *ReformC html |
00000a50  63 2e 63 6f 64 65 20 6f  75 74 70 75 74 0a 0a 57  |c.code output..W|
00000a60  69 6c 6c 20 63 6f 6e 76  65 72 74 20 63 2e 63 6f  |ill convert c.co|
00000a70  64 65 20 69 6e 74 6f 20  48 54 4d 4c 2e 0a 0a 0a  |de into HTML....|
00000a80  4d 61 6b 65 66 69 6c 65  73 0a 2d 2d 2d 2d 2d 2d  |Makefiles.------|
00000a90  2d 2d 2d 0a 57 69 74 68  69 6e 20 61 20 6d 61 6b  |---.Within a mak|
00000aa0  65 66 69 6c 65 20 79 6f  75 20 6d 69 67 68 74 20  |efile you might |
00000ab0  6c 69 6b 65 20 74 6f 20  74 72 79 20 73 6f 6d 65  |like to try some|
00000ac0  74 68 69 6e 67 20 6c 69  6b 65 20 74 68 65 20 66  |thing like the f|
00000ad0  6f 6c 6c 6f 77 69 6e 67  2e 20 49 74 27 73 0a 6e  |ollowing. It's.n|
00000ae0  6f 74 20 31 30 30 25 20  67 75 61 72 65 6e 74 65  |ot 100% guarente|
00000af0  65 64 2c 20 62 75 74 20  6d 69 67 68 74 20 62 65  |ed, but might be|
00000b00  20 75 73 65 66 75 6c 20  74 6f 20 79 6f 75 20 28  | useful to you (|
00000b10  52 49 53 43 20 4f 53 20  73 74 79 6c 65 20 6d 61  |RISC OS style ma|
00000b20  6b 65 66 69 6c 65 73 29  20 3a 0a 0a 2d 2d 38 3c  |kefiles) :..--8<|
00000b30  2d 2d 2d 2d 2d 2d 2d 2d  0a 52 65 66 6f 72 6d 43  |--------.ReformC|
00000b40  66 6c 61 67 73 20 3d 20  65 70 73 6f 6e 0a 0a 6f  |flags = epson..o|
00000b50  75 74 70 75 74 3a 20 6f  75 74 5f 63 2e 61 64 64  |utput: out_c.add|
00000b60  72 62 6f 6f 6b 20 6f 75  74 5f 63 2e 61 6c 70 68  |rbook out_c.alph|
00000b70  61 62 65 74 20 6f 75 74  5f 63 2e 63 72 63 33 32  |abet out_c.crc32|
00000b80  20 6f 75 74 5f 63 2e 66  69 6c 65 68 20 5c 0a 09  | out_c.fileh \..|
00000b90  6f 75 74 5f 63 2e 69 64  20 6f 75 74 5f 63 2e 6d  |out_c.id out_c.m|
00000ba0  61 69 6c 20 6f 75 74 5f  63 2e 6d 69 6d 65 20 6f  |ail out_c.mime o|
00000bb0  75 74 5f 63 2e 6d 75 6c  74 69 75 73 65 72 20 6f  |ut_c.multiuser o|
00000bc0  75 74 5f 63 2e 71 70 74  65 73 74 20 5c 0a 09 6f  |ut_c.qptest \..o|
00000bd0  75 74 5f 63 2e 71 75 6f  74 65 64 70 20 6f 75 74  |ut_c.quotedp out|
00000be0  5f 63 2e 73 74 72 69 70  61 64 64 72 20 6f 75 74  |_c.stripaddr out|
00000bf0  5f 63 2e 75 6e 69 78 74  69 6d 65 20 6f 75 74 5f  |_c.unixtime out_|
00000c00  63 2e 75 73 65 72 73 20  5c 0a 09 6f 75 74 5f 63  |c.users \..out_c|
00000c10  2e 75 75 65 6e 63 74 65  73 74 20 6f 75 74 5f 63  |.uuenctest out_c|
00000c20  2e 7a 69 70 74 68 69 6e  67 73 20 6f 75 74 5f 68  |.zipthings out_h|
00000c30  2e 61 64 64 72 62 6f 6f  6b 20 6f 75 74 5f 68 2e  |.addrbook out_h.|
00000c40  61 6c 70 68 61 62 65 74  20 5c 0a 09 6f 75 74 5f  |alphabet \..out_|
00000c50  68 2e 62 36 34 65 6e 63  20 6f 75 74 5f 68 2e 63  |h.b64enc out_h.c|
00000c60  72 63 33 32 20 6f 75 74  5f 68 2e 66 69 6c 65 68  |rc32 out_h.fileh|
00000c70  20 6f 75 74 5f 68 2e 69  64 20 6f 75 74 5f 68 2e  | out_h.id out_h.|
00000c80  6d 61 69 6c 20 5c 0a 09  6f 75 74 5f 68 2e 6d 69  |mail \..out_h.mi|
00000c90  6d 65 20 6f 75 74 5f 68  2e 6d 69 6d 65 6d 61 70  |me out_h.mimemap|
00000ca0  20 6f 75 74 5f 68 2e 6d  75 6c 74 69 75 73 65 72  | out_h.multiuser|
00000cb0  20 6f 75 74 5f 68 2e 6f  70 74 69 6f 6e 73 20 5c  | out_h.options \|
00000cc0  0a 09 6f 75 74 5f 68 2e  71 75 6f 74 65 64 70 20  |..out_h.quotedp |
00000cd0  6f 75 74 5f 68 2e 73 74  72 64 75 70 20 6f 75 74  |out_h.strdup out|
00000ce0  5f 68 2e 73 74 72 69 70  61 64 64 72 20 6f 75 74  |_h.stripaddr out|
00000cf0  5f 68 2e 75 6e 69 78 74  69 6d 65 20 5c 0a 09 6f  |_h.unixtime \..o|
00000d00  75 74 5f 68 2e 75 73 65  72 73 20 6f 75 74 5f 68  |ut_h.users out_h|
00000d10  2e 75 75 65 6e 63 20 6f  75 74 5f 68 2e 7a 69 70  |.uuenc out_h.zip|
00000d20  74 68 69 6e 67 73 20 0a  2e 53 55 46 46 49 58 45  |things ..SUFFIXE|
00000d30  53 3a 20 2e 68 20 2e 63  20 2e 6f 75 74 5f 63 20  |S: .h .c .out_c |
00000d40  2e 6f 75 74 5f 68 0a 2e  63 2e 6f 75 74 5f 63 3a  |.out_h..c.out_c:|
00000d50  0a 09 4c 69 62 43 3a 72  65 66 6f 72 6d 63 20 24  |..LibC:reformc $|
00000d60  28 72 65 66 6f 72 6d 63  66 6c 61 67 73 29 20 24  |(reformcflags) $|
00000d70  3c 20 24 40 0a 23 09 4c  69 62 43 3a 72 65 66 6f  |< $@.#.LibC:refo|
00000d80  72 6d 63 20 24 28 72 65  66 6f 72 6d 63 66 6c 61  |rmc $(reformcfla|
00000d90  67 73 29 20 24 3c 20 24  40 2f 68 74 6d 6c 0a 23  |gs) $< $@/html.#|
00000da0  09 40 53 65 74 74 79 70  65 20 24 40 2f 68 74 6d  |.@Settype $@/htm|
00000db0  6c 20 46 41 46 0a 23 09  40 43 72 65 61 74 65 20  |l FAF.#.@Create |
00000dc0  24 40 0a 2e 68 2e 6f 75  74 5f 68 3a 0a 09 4c 69  |$@..h.out_h:..Li|
00000dd0  62 43 3a 72 65 66 6f 72  6d 63 20 24 28 72 65 66  |bC:reformc $(ref|
00000de0  6f 72 6d 63 66 6c 61 67  73 29 20 24 3c 20 24 40  |ormcflags) $< $@|
00000df0  0a 23 09 4c 69 62 43 3a  72 65 66 6f 72 6d 63 20  |.#.LibC:reformc |
00000e00  24 28 72 65 66 6f 72 6d  63 66 6c 61 67 73 29 20  |$(reformcflags) |
00000e10  24 3c 20 24 40 2f 68 74  6d 6c 0a 23 09 40 53 65  |$< $@/html.#.@Se|
00000e20  74 74 79 70 65 20 24 40  2f 68 74 6d 6c 20 46 41  |ttype $@/html FA|
00000e30  46 0a 23 09 40 43 72 65  61 74 65 20 24 40 0a 2d  |F.#.@Create $@.-|
00000e40  2d 38 3c 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 43 68 61  |-8<--------..Cha|
00000e50  6e 67 69 6e 67 20 74 68  65 20 6f 75 74 70 75 74  |nging the output|
00000e60  20 64 65 70 65 6e 64 65  6e 63 79 20 77 69 6c 6c  | dependency will|
00000e70  20 65 6e 61 62 6c 65 20  79 6f 75 20 74 6f 20 6e  | enable you to n|
00000e80  61 6d 65 20 74 68 65 20  66 69 6c 65 73 20 79 6f  |ame the files yo|
00000e90  75 20 77 69 73 68 0a 74  6f 20 63 6f 6e 76 65 72  |u wish.to conver|
00000ea0  74 2e 20 43 68 61 6e 67  69 6e 67 20 74 68 65 20  |t. Changing the |
00000eb0  72 65 66 6f 72 6d 63 66  6c 61 67 73 20 76 61 72  |reformcflags var|
00000ec0  69 61 62 6c 65 20 61 6c  6c 6f 77 73 20 79 6f 75  |iable allows you|
00000ed0  20 74 6f 20 73 65 6c 65  63 74 20 61 0a 64 69 66  | to select a.dif|
00000ee0  66 65 72 65 6e 74 20 64  65 73 63 72 69 70 74 69  |ferent descripti|
00000ef0  6f 6e 20 66 69 6c 65 2e  20 54 68 65 20 63 6f 6d  |on file. The com|
00000f00  6d 65 6e 74 65 64 20 73  65 63 74 69 6f 6e 20 69  |mented section i|
00000f10  6e 20 6f 75 74 5f 63 20  61 6e 64 20 6f 75 74 5f  |n out_c and out_|
00000f20  68 20 6d 61 79 0a 62 65  20 75 73 65 66 75 6c 20  |h may.be useful |
00000f30  69 6e 20 70 72 6f 64 75  63 69 6e 67 20 48 54 4d  |in producing HTM|
00000f40  4c 20 6f 75 74 70 75 74  20 74 68 61 74 20 79 6f  |L output that yo|
00000f50  75 20 63 61 6e 20 69 6d  6d 65 64 69 61 74 65 6c  |u can immediatel|
00000f60  79 20 76 69 65 77 2e 0a  0a 27 6d 61 6b 65 20 6f  |y view...'make o|
00000f70  75 74 70 75 74 27 20 73  68 6f 75 6c 64 20 74 68  |utput' should th|
00000f80  65 6e 20 70 72 6f 64 75  63 65 20 74 68 65 20 66  |en produce the f|
00000f90  69 6c 65 73 20 79 6f 75  20 72 65 71 75 69 72 65  |iles you require|
00000fa0  2e 20 4f 62 76 69 6f 75  73 6c 79 20 79 6f 75 0a  |. Obviously you.|
00000fb0  77 69 6c 6c 20 68 61 76  65 20 74 6f 20 74 72 79  |will have to try|
00000fc0  20 74 68 69 73 20 61 20  66 65 77 20 74 69 6d 65  | this a few time|
00000fd0  73 20 74 6f 20 67 65 74  20 69 74 20 72 69 67 68  |s to get it righ|
00000fe0  74 20 3a 2d 29 0a 0a 0a  43 6f 6e 74 61 63 74 0a  |t :-)...Contact.|
00000ff0  2d 2d 2d 2d 2d 2d 2d 0a  49 20 63 61 6e 20 62 65  |-------.I can be|
00001000  20 63 6f 6e 74 61 63 74  65 64 20 61 74 20 3c 67  | contacted at <g|
00001010  65 72 70 68 40 69 6e 6e  6f 63 65 6e 74 2e 63 6f  |erph@innocent.co|
00001020  6d 3e 2e 0a 0a 0a 54 68  61 6e 6b 73 0a 2d 2d 2d  |m>....Thanks.---|
00001030  2d 2d 2d 0a 4d 61 6e 79  2c 20 6d 61 6e 79 20 74  |---.Many, many t|
00001040  68 61 6e 6b 73 20 74 6f  20 43 68 72 69 73 20 4a  |hanks to Chris J|
00001050  6f 68 6e 73 20 66 6f 72  20 73 75 67 67 65 73 74  |ohns for suggest|
00001060  69 6e 67 20 74 68 69 73  20 69 64 65 61 2e 0a 0a  |ing this idea...|
00001070  0a 53 6f 75 72 63 65 20  63 6f 64 65 0a 2d 2d 2d  |.Source code.---|
00001080  2d 2d 2d 2d 2d 2d 2d 2d  0a 54 68 65 20 73 6f 75  |--------.The sou|
00001090  72 63 65 20 63 6f 64 65  20 66 6f 72 20 52 65 66  |rce code for Ref|
000010a0  6f 72 6d 43 20 69 73 20  6d 61 64 65 20 61 76 61  |ormC is made ava|
000010b0  69 6c 61 62 6c 65 20 66  6f 72 20 79 6f 75 20 74  |ilable for you t|
000010c0  6f 20 72 65 63 6f 6d 70  69 6c 65 20 6f 6e 20 61  |o recompile on a|
000010d0  6e 79 0a 6f 74 68 65 72  20 70 6c 61 74 66 6f 72  |ny.other platfor|
000010e0  6d 20 28 49 20 62 65 6c  69 65 76 65 20 69 74 20  |m (I believe it |
000010f0  77 69 6c 6c 20 77 6f 72  6b 20 6f 6e 20 53 75 6e  |will work on Sun|
00001100  4f 53 29 2e 20 54 68 65  20 63 6f 70 79 72 69 67  |OS). The copyrig|
00001110  68 74 20 66 6f 72 20 74  68 69 73 0a 77 6f 72 6b  |ht for this.work|
00001120  20 72 65 6d 61 69 6e 73  20 77 69 74 68 20 6d 65  | remains with me|
00001130  2c 20 61 6e 64 20 79 6f  75 20 6d 61 79 20 6e 6f  |, and you may no|
00001140  74 20 64 69 73 74 72 69  62 75 74 65 20 6d 6f 64  |t distribute mod|
00001150  69 66 69 65 64 20 76 65  72 73 69 6f 6e 73 2e 0a  |ified versions..|
00001160  0a 49 66 20 79 6f 75 20  6c 6f 73 65 20 79 6f 75  |.If you lose you|
00001170  72 20 73 6f 75 72 63 65  20 63 6f 64 65 20 62 65  |r source code be|
00001180  63 61 75 73 65 20 79 6f  75 20 73 70 65 63 69 66  |cause you specif|
00001190  69 65 64 20 74 68 65 20  70 61 72 61 6d 65 74 65  |ied the paramete|
000011a0  72 73 20 61 72 6f 75 6e  64 20 74 68 65 0a 77 72  |rs around the.wr|
000011b0  6f 6e 67 20 77 61 79 2c  20 6f 72 20 62 65 63 61  |ong way, or beca|
000011c0  75 73 65 20 74 68 65 20  70 72 6f 67 72 61 6d 20  |use the program |
000011d0  62 72 6f 6b 65 2c 20 74  68 61 74 20 69 73 20 6e  |broke, that is n|
000011e0  6f 74 20 6d 79 20 66 61  75 6c 74 2e 20 49 20 61  |ot my fault. I a|
000011f0  6d 20 6e 6f 74 0a 6c 69  61 62 6c 65 2e 20 54 68  |m not.liable. Th|
00001200  61 74 20 69 73 2c 20 6e  6f 20 77 61 72 72 65 6e  |at is, no warren|
00001210  74 79 20 69 73 20 69 6d  70 6c 69 65 64 20 6f 72  |ty is implied or|
00001220  20 67 69 76 65 6e 20 3a  2d 29 0a 0a 50 53 2e 20  | given :-)..PS. |
00001230  54 68 65 20 65 78 65 63  75 74 61 62 6c 65 20 73  |The executable s|
00001240  75 70 70 6c 69 65 64 20  69 73 20 66 6f 72 20 52  |upplied is for R|
00001250  49 53 43 20 4f 53 2e 0a  0a 0a 48 69 73 74 6f 72  |ISC OS....Histor|
00001260  79 0a 2d 2d 2d 2d 2d 2d  2d 0a 56 65 72 73 69 6f  |y.-------.Versio|
00001270  6e 20 31 2e 30 30 20 3a  20 31 34 20 4d 61 72 20  |n 1.00 : 14 Mar |
00001280  31 39 39 38 0a 20 20 20  20 20 20 20 20 20 20 20  |1998.           |
00001290  20 20 20 20 41 63 63 69  64 65 6e 74 61 6c 6c 79  |    Accidentally|
000012a0  20 72 65 6c 65 61 73 65  64 20 61 73 20 76 65 72  | released as ver|
000012b0  73 69 6f 6e 20 31 2e 30  31 2e 20 6f 6f 70 73 2e  |sion 1.01. oops.|
000012c0  0a 56 65 72 73 69 6f 6e  20 31 2e 30 31 20 3a a0  |.Version 1.01 :.|
000012d0  30 34 20 41 70 72 20 31  39 39 38 20 28 68 6f 6e  |04 Apr 1998 (hon|
000012e0  65 73 74 2c 20 74 68 69  73 20 2f 69 73 2f 20 31  |est, this /is/ 1|
000012f0  2e 30 31 29 0a 20 20 20  20 20 20 20 20 20 20 20  |.01).           |
00001300  20 20 20 20 46 69 78 65  64 20 62 75 67 20 77 69  |    Fixed bug wi|
00001310  74 68 20 5c 30 2c 20 61  64 64 65 64 20 63 68 61  |th \0, added cha|
00001320  72 61 63 74 65 72 20 73  74 79 6c 65 20 63 68 61  |racter style cha|
00001330  6e 67 65 73 2e 0a                                 |nges..|
00001336