blob: f70e430f234ae40b871c9e3ea68d668a5e0268b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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)
|