Category : C Source Code
Archive   : CPAREN.ZIP
Filename : CPAREN.1

Output of file : CPAREN.1 contained in archive : CPAREN.ZIP
.TH CPAREN "4/12/83" "Tek local"
cparen - add parentheses to C expressions
.B cparen
.B \-t
.I types
Written for those of us who can never remember the precedence and
associativity of operators in C,
.B cparen
reads lines of C code from standard-in,
adds parentheses to indicate operator binding in expressions,
then writes the resultant code to standard-out.
The input code fragment need not contain complete statements.
For example, the following line is a valid input to
.B cparen:
} else if (x->d_prep > 56 && x->d_assoc == LEFT)
.B cparen
considers identifiers in expressions to be variable names.
.B \-t
option allows you to specify a whitespace-separated list of types.
For example,
cparen -t 'amap anop'
Declares "amap" and "anop" as type names rather than variable names.
Exit status is 2 if
.B cparen
was invoked improperly,
1 if some other error occurred,
0 if all went well.
Brad Needham, Tektronix, Inc.

Copyright (c) 1984 by
Tektronix, Incorporated Beaverton, Oregon 97077
All rights reserved.
Permission is hereby granted for personal, non-commercial
reproduction and use of this program, provided that this
notice is included in any copy.
.B Cparen
assumes that the input code fragment came from a syntactically correct
C program -- it does not attempt to give reasonable syntax-error messages.
.B cparen
focuses on C statments it does not recognize other constructs e.g.
variable or function declarations.
It cannot process a whole C program.
The input is not filtered through the C preprocessor.

  3 Responses to “Category : C Source Code
Archive   : CPAREN.ZIP
Filename : CPAREN.1

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: