diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-23 20:53:27 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-23 21:09:31 +0200 |
| commit | e90a213afd92e8bd5db19629c181c0fd572faf42 (patch) | |
| tree | 79cefe9439504d7eac8ba431d972028802fdda0d /braces.1 | |
| download | braces-e90a213afd92e8bd5db19629c181c0fd572faf42.tar.gz braces-e90a213afd92e8bd5db19629c181c0fd572faf42.tar.bz2 braces-e90a213afd92e8bd5db19629c181c0fd572faf42.tar.xz | |
First commit1.0
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | braces.1 | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/braces.1 b/braces.1 new file mode 100644 index 0000000..f70e430 --- /dev/null +++ b/braces.1 @@ -0,0 +1,54 @@ +.TH BRACES 1 BRACES +.SH NAME +braces - count number of brace pairs in code + +.SH SYNOPSIS +.B braces +[-s] +.RI [ file "] ..." + +.SH DESCRIPTION +.B braces +counts the number of brace pairs in code for each specified +file. +.B braces +will treat each file as a C source code or +C header file. If +.I file +is +.BR - , +or if a +.I file +is not specified, the standard input is read. +.PP +If more than one file is specified, each successfully +processed file will have its line count output in the format +.RS +.nf + +\fB\(dq%s:%*s%zu\en\(dq,\fP <\fIfile\fP>\fB,\fP <\fIsome positive integer\fP>\fB, \(dq\(dq,\fP <\fI#brace pairs in code\fP> + +.fi +.RE +The total for all processed files is printed on the last line +with the format +.RS +.nf + +\fB\(dq%zu\en\(dq,\fP <\fItotal #braces in code\fP> + +.fi +.RE +If exactly one or no files are specified, this will be the +only line output. + +.SH OPTIONS +.TP +.B -s +Only output the last line. (The total over all files.) + +.SH NOTES +The result is unspecified for cases where there are unmatched braces. + +.SH SEE ALSO +.BR semicolons (1) |
