CToolsDoc.tioga
Eduardo Pelegri-Llopart, February 23, 1989 6:23:13 am PST
Foote, October 12, 1990 10:24 am PDT
Michael Plass, July 23, 1993 10:29 am PDT
CTools
CEDAR 10.1 FOR INTERNAL XEROX USE ONLY
CTools
a repository of tools to use C in Cedar
Eduardo Pelegri-Llopart
© Copyright 1988, 1991 Xerox Corporation. All rights reserved.
Abstract: C needs all the help it can get; let us use Tioga & Cedar to pretty it up a little
Created by: Eduardo Pelegri-Llopart
Maintained by: Eduardo Pelegri-Llopart <pelegri.pa>
Keywords: c, prettyprinting, tioga, interoperate, language tools
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. PrettyPrinting Tools
CFormatting
If you install CFormatting, it will register with TEdit the operation "SetCLooksOp" with the key $SetCLooks. When invoked this operation will associate looks to the characters selected in a way similar to how SetMesaLooks works. The formatter knows about (ANSI C) reserved keywords, C preprocessor keywords, and standard library routines, as well as some common aliases. It does not do any C preprocessing.
Also defined by CFormatting is the "CLooksAndIndentation" Tioga operation, which is like SetCLooksOp but also adds node structure depending on the nesting of the bracketing characters {[()]}. The node structure usually allows easier Tioga editing, but is different than the usual c indentation conventions.
bugs: the indentation of "ambiguous" else clauses is wrong; also the insides of case constructs do not get indented. The workaround to both of these problems is to add braces {which may clarify things for the reader as well}.
C style
The C style provides a set of useful abbreviations (while, if, etc) created by Peter Kessler and Michael Plass.
2. Commands
CLooksAndIndentation filename ...
Like the CLooksAndIndentation tiogaop, but does whole files.
3. Others
How to create a C tioga from a plain C file.
The easiest way is to use CLooksAndIndentation.
Another way is to use Dupri to convert white-space into tree nodes, and then C formatting to clean it up. On the way, you might want to set the style to C (and likely you will have to wait as Cedar fetches new fonts).
Or, you can do the transformation via REdit.
What can I do with a Tioga C file?
There is a version of the C compiler that uses a preprocessor that maps 015s into 012s and ignores anything after the first NULL. The compiler can be reached on the CSL Suns through /project/pcedar2.0/bin/ccc (for cedar cc, of course!)
The C compilers can be reached from Cedar/PCedar through ComplexCc. The UserProfile entry ComplexCc.CC defaults to "/bin/cc" and indicates the compiler to use; setting it to "/project/pcedar2.0/bin/ccc" will give you the special preprocessor.