Category : C Source Code
Archive   : CPAREN.ZIP
Filename : CPAREN.1
Output of file : CPAREN.1 contained in archive : CPAREN.ZIP
.SH NAME
cparen - add parentheses to C expressions
.SH SYNOPSIS
.B cparen
[
.B \-t
.I types
]
.SH DESCRIPTION
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.
.PP
The input code fragment need not contain complete statements.
For example, the following line is a valid input to
.B cparen:
.br
} else if (x->d_prep > 56 && x->d_assoc == LEFT)
.br
.PP
Normally,
.B cparen
considers identifiers in expressions to be variable names.
The
.B \-t
option allows you to specify a whitespace-separated list of types.
For example,
.br
cparen -t 'amap anop'
.br
Declares "amap" and "anop" as type names rather than variable names.
.SH DIAGNOSTICS
Exit status is 2 if
.B cparen
was invoked improperly,
1 if some other error occurred,
0 if all went well.
.SH AUTHOR
.DS
Brad Needham, Tektronix, Inc.
Copyright (c) 1984 by
Tektronix, Incorporated Beaverton, Oregon 97077
All rights reserved.
.DE
.PP
Permission is hereby granted for personal, non-commercial
reproduction and use of this program, provided that this
notice is included in any copy.
.SH BUGS
.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.
.PP
Because
.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.
.PP
The input is not filtered through the C preprocessor.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/