Index of /tcl/ftparchive/sorted/print/frink-1.2p18

      Name                   Last modified     Size  Description

[DIR] Parent Directory 29-Jan-99 12:29 - [   ] CHANGES 07-Dec-95 03:03 5k [   ] README 07-Dec-95 03:03 3k [CMP] frink-1.2p18.tar.gz 18-Dec-95 20:06 24k

			Frink 1.2

Frink is a tcl formatting program. It can prettify your program,
minimise or obfuscate it. You pass it filenames (or the stdin) and
the output is generated to stdout. There are a variety of options you
can pass in :

-a 	: add spaces after {} and "" when processing -command. (default = OFF)
-b 	: add braces (see manual page for details) (default = OFF)
-B	: turn OFF processing code passed to the bind command.
-c <n>	: set further indent for continuations to n. default = 2
-C	: turn OFF processing code passed to the catch command.
-d	: remove braces in certain (safe) circumstances (default = OFF)
-e	: produce "else". default = OFF
-g	: indent switch cases. default = OFF
-h	: print information about options.
-i <n>	: set indent for each level to n. default = 4
-j	: remove non-essential blank lines. (default = OFF)
-k	: remove non-essential braces. (default = OFF)
-l	: try for one-liners
-m	: minimise the code by removing redundant spacing. default = OFF
-n 	: do not generate tab characters. default = OFF
-o	: obfuscate : default = OFF
-p <v>	: If v is a number prduec that many blank lines after each
	  proc definition, otherwise produce whatever format the code
	  indicates. No codes are defined yet..... (default = do nothing)
-r	: remove comments. default = OFF
-s <c>	: format according to style name "c". (no style names defined yet)
-t <n>  : set tabs every n characters.
-T	: produce "then". default = OFF
-u	: Safe to remove brackets from round elseif conditions. default = OFF
-v	: put { } round variable names here appropriate.
-w <n>	: set line length. default = 80
-x	: produce "xf style" continuations
-X	: recognise tclX features
-z	: do not put a single space before the \ character on continuations.

Please try it and let me know how else you would like to be able to
tailor the output. (And all the bugs you find as well) Currently it is
geared very much towards the style of tcl programming that I use myself.

Obfuscation is not particularly sophisticated yet. In particular it
can be (in most cases) reversed by running the obfuscated program
through frink again!

Frink uses quite a few heuristics (i.e. a bunch of ad hoc hacks) to
improve both formatting and minimisation. In some obscure cases these
may burn you. Please let me know of any cases you find. Suggestions for
new heuristics are always welcome.

Currently frink supports straightforward tcl (it doesn't do case
either) and [incr tcl]. I will be adding support for other common
extensions where this is appropriate. N.B. frink assumes that you are
running it over a correct tcl program. If this is not the case then
all bets are off! There are some constructions possible in tcl where
it is impossible to determine the correct formatting except at
runtime. If you use these, sorry, but frink can't help you.

To install frink run the configure program, set the values and click
on install. The configure script is produced using my Obeah system (q.v.)

Comment handling is poor - suggestions are welcome for how it could be
improved.....

Lindsay
Lindsay.Marshall@newcastle.ac.uk