~ubuntu-branches/ubuntu/trusty/indent/trusty

« back to all changes in this revision

Viewing changes to doc/indent.texinfo

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2002-01-27 18:47:28 UTC
  • Revision ID: james.westby@ubuntu.com-20020127184728-5w6lnpj072bqil91
Tags: upstream-2.2.7
ImportĀ upstreamĀ versionĀ 2.2.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\input texinfo   @c -*-texinfo-*-
 
2
@c %**start of header
 
3
@setfilename indent.info
 
4
@settitle @command{indent}:  Indent and Format C Program Source
 
5
@finalout
 
6
 
 
7
@include version.texi
 
8
@c %**end of header
 
9
 
 
10
@c smallbook
 
11
@c Note: some of the long options are too long for the index in
 
12
@c       smallbook format.  This will need some thought.  --rjc
 
13
 
 
14
@dircategory Indent Code Formatter
 
15
@direntry
 
16
* Indent: (indent).             C code formatter.
 
17
@end direntry
 
18
 
 
19
 
 
20
@synindex cp ky
 
21
@setchapternewpage odd
 
22
 
 
23
@c !BEGIN INTRO
 
24
@ifinfo
 
25
@sp 10
 
26
This is Edition @value{EDITION} of @cite{The @command{indent} Manual},
 
27
for Indent Version @value{VERSION}, last updated @value{UPDATED}.
 
28
@c !END INTRO
 
29
@c @vskip 0pt plus 1filll
 
30
 
 
31
@c !BEGIN COPYING
 
32
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 
33
Copyright (C) 1995, 1996 Joseph Arceneaux.
 
34
Copyright (C) 1999 Carlo Wood.
 
35
Copyright (C) 2001 David Ingamells.
 
36
 
 
37
Permission is granted to make and distribute verbatim copies of
 
38
this manual provided the copyright notice and this permission notice
 
39
are preserved on all copies.
 
40
 
 
41
@ignore
 
42
Permission is granted to copy and distribute modified versions of this
 
43
manual under the conditions for verbatim copying, provided also that the
 
44
section entitled ``GNU General Public License'' is included exactly as
 
45
in the original, and provided that the entire resulting derived work is
 
46
distributed under the terms of a permission notice identical to this
 
47
one.
 
48
 
 
49
Permission is granted to copy and distribute translations of this manual
 
50
into another language, under the above conditions for modified versions,
 
51
except that the section entitled ``GNU General Public License'' may be
 
52
included in a translation approved by the author instead of in the
 
53
original English.
 
54
@end ignore
 
55
@c !END COPYING
 
56
@end ifinfo
 
57
 
 
58
@titlepage
 
59
@title Indent
 
60
@subtitle Format C Code
 
61
@sp 1
 
62
@subtitle Edition @value{EDITION}, for Indent Version @value{VERSION}
 
63
@subtitle @value{UPDATED}
 
64
@c !BEGIN AUTHORS
 
65
@author Carlo Wood
 
66
@author Joseph Arceneaux
 
67
@author Jim Kingdon
 
68
@author David Ingamells
 
69
@c !END AUTHORS
 
70
@page
 
71
@vskip 0pt plus1filll
 
72
Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software
 
73
Foundation, Inc.
 
74
 
 
75
Copyright @copyright{} 1995, 1996 Joseph Arceneaux.
 
76
 
 
77
Copyright @copyright{} 1999, Carlo Wood.
 
78
 
 
79
Copyright @copyright{} 2001, David Ingamells.
 
80
 
 
81
Permission is granted to make and distribute verbatim copies of
 
82
this manual provided the copyright notice and this permission notice
 
83
are preserved on all copies.
 
84
 
 
85
Permission is granted to copy and distribute modified versions of this
 
86
manual under the conditions for verbatim copying, provided that the entire
 
87
resulting derived work is distributed under the terms of a permission
 
88
notice identical to this one.
 
89
 
 
90
Permission is granted to copy and distribute translations of this manual
 
91
into another language, under the above conditions for modified versions,
 
92
except that this permission notice may be stated in a translation approved
 
93
by the Foundation.
 
94
@end titlepage
 
95
@page
 
96
 
 
97
@c put the following line in the the file dir in the info directory
 
98
@c under wherever you have installed emacs (assuming that
 
99
@c the info file made from this file is in the file "indent")
 
100
@c * indent:(indent).  How to change the appearance of a C program.
 
101
 
 
102
@ifinfo
 
103
@node Top, Indent Program, (dir), (dir)
 
104
@top @command{indent}:  Indent and Format C Program Source
 
105
 
 
106
The @command{indent} program
 
107
@c !BEGIN NAME
 
108
changes the appearance of a C program by inserting or deleting whitespace.  
 
109
@c !END NAME
 
110
 
 
111
This is Edition @value{EDITION}, @value{UPDATED}, of @cite{The @command{indent} Manual},
 
112
for Indent Version @value{VERSION}.
 
113
 
 
114
@menu
 
115
* Indent Program::              The @command{indent} Program
 
116
* Option Summary::              Option Summary
 
117
* Index::                       Index
 
118
@end menu
 
119
@end ifinfo
 
120
 
 
121
@node Indent Program, Option Summary, Top, Top
 
122
@chapter The @command{indent} Program
 
123
 
 
124
@c !BEGIN DESCRIPTION
 
125
@iftex
 
126
The @command{indent} program changes the appearance of a C program by
 
127
inserting or deleting whitespace.
 
128
@end iftex
 
129
@ifinfo
 
130
The @command{indent} program
 
131
@end ifinfo
 
132
@iftex
 
133
It
 
134
@end iftex
 
135
can be used to make code easier to read.  It can also convert from one
 
136
style of writing C to another.  
 
137
 
 
138
@command{indent} understands a substantial amount about the syntax of C,
 
139
but it also attempts to cope with incomplete and misformed syntax.
 
140
 
 
141
In version 1.2 and more recent versions, the GNU style of indenting is
 
142
the default.
 
143
@c !END DESCRIPTION
 
144
 
 
145
@menu
 
146
* Invoking indent::             Invoking @command{indent}
 
147
* Backup files::                Backup Files
 
148
* Common styles::               Common styles
 
149
* Blank lines::                 Blank lines
 
150
* Comments::                    Comments
 
151
* Statements::                  Statements
 
152
* Declarations::                Declarations
 
153
* Indentation::                 Indentation
 
154
* Breaking long lines::         Breaking long lines
 
155
* Disabling Formatting::        Disabling Formatting
 
156
* Miscellaneous options::       Miscellaneous options
 
157
* Bugs::                        Bugs
 
158
* Copyright::                   Copyright
 
159
@end menu
 
160
 
 
161
@c !BEGIN THEREST
 
162
@node Invoking indent, Backup files,  , Indent Program
 
163
@section Invoking @command{indent}
 
164
@cindex Invoking @command{indent}
 
165
@cindex Starting @command{indent}
 
166
@cindex Beginning @command{indent}
 
167
 
 
168
As of version 1.3, the format of the @command{indent} command is:
 
169
 
 
170
@example
 
171
@group
 
172
 
 
173
indent [@var{options}] [@var{input-files}]
 
174
 
 
175
indent [@var{options}] [@var{single-input-file}] [-o @var{output-file}]
 
176
 
 
177
@end group
 
178
@end example
 
179
 
 
180
This format is different from earlier versions and other versions of
 
181
@command{indent}.
 
182
 
 
183
In the first form, one or more input files are specified.  @command{indent}
 
184
makes a backup copy of each file, and the original file is replaced with
 
185
its indented version.  @xref{Backup files}, for an explanation of how
 
186
backups are made.
 
187
 
 
188
@cindex Output File Specification
 
189
@kindex -o
 
190
@kindex --output-file
 
191
In the second form, only one input file is specified.  In this case, or
 
192
when the standard input is used, you may specify an output file after
 
193
the @option{-o} option.
 
194
 
 
195
@cindex Standard Output
 
196
@kindex -st
 
197
@kindex --standard-output
 
198
To cause @command{indent} to write to standard output, use the @option{-st}
 
199
option.  This is only allowed when there is only one input file, or when
 
200
the standard input is used.
 
201
 
 
202
@cindex Using Standard Input
 
203
If no input files are named, the standard input is read for input.
 
204
Also, if a filename named @option{-} is specified, then the standard input
 
205
is read.
 
206
 
 
207
As an example, each of the following commands will input the program
 
208
@file{slithy_toves.c} and write its indented text to
 
209
@file{slithy_toves.out}:
 
210
 
 
211
@example
 
212
@group
 
213
 
 
214
indent slithy_toves.c -o slithy_toves.out
 
215
 
 
216
indent -st slithy_toves.c > slithy_toves.out
 
217
 
 
218
cat slithy_toves.c | indent -o slithy_toves.out
 
219
 
 
220
@end group
 
221
@end example
 
222
 
 
223
@cindex Long options, use of
 
224
Most other options to @command{indent} control how programs are formatted.
 
225
As of version 1.2, @command{indent} also recognizes a long name for each
 
226
option name.  Long options are prefixed by either @option{--} or
 
227
@option{+}.
 
228
@footnote{ @option{+} is being superseded by @option{--} to
 
229
maintain consistency with the POSIX standard.}
 
230
 In most of this document,
 
231
the traditional, short names are used for the sake of brevity.
 
232
@xref{Option Summary}, for a list of options, including both long and
 
233
short names.
 
234
 
 
235
Here is another example:
 
236
 
 
237
@example
 
238
indent -br test/metabolism.c -l85
 
239
@end example
 
240
 
 
241
This will indent the program @file{test/metabolism.c} using the
 
242
@option{-br} and @option{-l85} options, write the output back to
 
243
@file{test/metabolism.c}, and write the original contents of
 
244
@file{test/metabolism.c} to a backup file in the directory @file{test}.
 
245
 
 
246
Equivalent invocations using long option names for this example would
 
247
be:
 
248
 
 
249
@example
 
250
@group
 
251
 
 
252
indent --braces-on-if-line --line-length185 test/metabolism.c
 
253
 
 
254
indent +braces-on-if-line +line-length185 test/metabolism.c
 
255
 
 
256
@end group
 
257
@end example
 
258
 
 
259
@cindex @file{.indent.pro} file
 
260
@cindex Initialization file
 
261
@kindex -npro
 
262
@kindex --ignore-profile
 
263
If you find that you often use @command{indent} with the same options, you
 
264
may put those options into a file named @file{.indent.pro}.
 
265
@command{indent} will first look for @file{.indent.pro} in the current
 
266
directory and use that if found.  Otherwise, @command{indent} will search
 
267
your home directory for @file{.indent.pro} and use that file if it is
 
268
found.  This behaviour is different from that of other versions of
 
269
@command{indent}, which load both files if they both exist.
 
270
 
 
271
The format of @file{.indent.pro} is simply a list of options, just as
 
272
they would appear on the command line, separated by white space (tabs,
 
273
spaces, and newlines).  Options in @file{.indent.pro} may be surrounded by C
 
274
or C++ comments, in which case they are ignored.
 
275
 
 
276
Command line switches are handled @emph{after} processing
 
277
@file{.indent.pro}.  Options specified later override arguments
 
278
specified earlier, with one exception: Explicitly specified options
 
279
always override background options (@pxref{Common styles}).  You can
 
280
prevent @command{indent} from reading an @file{.indent.pro} file by
 
281
specifying the @option{-npro} option.@refill
 
282
 
 
283
@node Backup files, Common styles, Invoking indent, Indent Program
 
284
@comment  node-name,  next,  previous,  up
 
285
@section Backup Files
 
286
 
 
287
@cindex backup files
 
288
As of version 1.3, GNU @command{indent} makes GNU-style backup files, the
 
289
same way GNU Emacs does.  This means that either @dfn{simple} or
 
290
@dfn{numbered} backup filenames may be made.
 
291
 
 
292
Simple backup file names are generated by appending a suffix to the
 
293
original file name.  The default for this suffix is the
 
294
one-character string @file{~} (tilde).  Thus, the backup file for
 
295
@file{python.c} would be @file{python.c~}.
 
296
 
 
297
Instead of the default, you may specify any string as a suffix by
 
298
setting the environment variable @env{SIMPLE_BACKUP_SUFFIX} to
 
299
your preferred suffix.
 
300
 
 
301
Numbered backup versions of a file @file{momeraths.c} look like
 
302
@file{momeraths.c.~23~}, where 23 is the version of this particular
 
303
backup.  When making a numbered backup of the file @file{src/momeraths.c},
 
304
the backup file will be named @file{src/momeraths.c.~@var{V}~}, where
 
305
@var{V} is one greater than the highest version currently existing in
 
306
the directory @file{src}.  The environment variable @env{VERSION_WIDTH}
 
307
controls the number of digits, using left zero padding when necessary.
 
308
For instance, setting this variable to "2" will lead to the backup
 
309
file being named @file{momeraths.c.~04~}.
 
310
 
 
311
The type of backup file made is controlled by the value of the
 
312
environment variable @env{VERSION_CONTROL}.  If it is the string
 
313
@samp{simple}, then only simple backups will be made.  If its value is
 
314
the string @samp{numbered}, then numbered backups will be made.  If its
 
315
value is @samp{numbered-existing}, then numbered backups will be made if
 
316
there @emph{already exist} numbered backups for the file being indented;
 
317
otherwise, a simple backup is made.  If @env{VERSION_CONTROL} is not
 
318
set, then @command{indent} assumes the behaviour of
 
319
@samp{numbered-existing}.
 
320
 
 
321
Other versions of @command{indent} use the suffix @file{.BAK} in naming
 
322
backup files.  This behaviour can be emulated by setting
 
323
@env{SIMPLE_BACKUP_SUFFIX} to @samp{.BAK}.
 
324
 
 
325
Note also that other versions of @command{indent} make backups in the
 
326
current directory, rather than in the directory of the source file as
 
327
GNU @command{indent} now does.
 
328
 
 
329
@node Common styles, Blank lines, Backup files, Indent Program
 
330
@comment  node-name,  next,  previous,  up
 
331
@section Common styles
 
332
 
 
333
There are several common styles of C code, including the GNU style, the
 
334
Kernighan & Ritchie style, and the original Berkeley style.  A style may
 
335
be selected with a single @dfn{background} option, which specifies a set
 
336
of values for all other options.  However, explicitly specified options
 
337
always override options implied by a background option.
 
338
 
 
339
@cindex GNU style
 
340
@kindex -gnu
 
341
@kindex --gnu-style
 
342
As of version 1.2, the default style of GNU @command{indent} is the GNU
 
343
style.  Thus, it is no longer necessary to specify the option
 
344
@option{-gnu} to obtain this format, although doing so will not cause an
 
345
error.  Option settings which correspond to the GNU style are:
 
346
 
 
347
@example
 
348
@group
 
349
-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
 
350
-ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai
 
351
-saw -nsc -nsob
 
352
@end group
 
353
@end example
 
354
 
 
355
The GNU coding style is that preferred by the GNU project.  It is the
 
356
style that the GNU Emacs C mode encourages and which is used in the C
 
357
portions of GNU Emacs.  (People interested in writing programs for
 
358
Project GNU should get a copy of @cite{The GNU Coding Standards}, which
 
359
also covers semantic and portability issues such as memory usage, the
 
360
size of integers, etc.)
 
361
 
 
362
@cindex Kernighan & Ritchie style
 
363
@kindex -kr
 
364
@kindex --k-and-r-style
 
365
@comment --kernighan-and-ritchie-style works, too, as does
 
366
@comment --kernighan-and-ritchie.  Which is most intuitive?
 
367
The Kernighan & Ritchie style is used throughout their well-known book
 
368
@cite{The C Programming Language}.  It is enabled with the @option{-kr}
 
369
option.  The Kernighan & Ritchie style corresponds to the following set
 
370
of options:
 
371
 
 
372
@example
 
373
@group
 
374
-nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0
 
375
-cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs
 
376
-nprs -npsl -saf -sai -saw -nsc -nsob -nss
 
377
@end group
 
378
@end example
 
379
 
 
380
@noindent
 
381
Kernighan & Ritchie style does not put comments to the right of code in
 
382
the same column at all times (nor does it use only one space to the
 
383
right of the code), so for this style @command{indent} has arbitrarily
 
384
chosen column 33.
 
385
 
 
386
@cindex Berkeley style
 
387
@cindex Original Berkeley style
 
388
@kindex -orig
 
389
@kindex --original
 
390
The style of the original Berkeley @command{indent} may be obtained by
 
391
specifying @option{-orig} (or by specifying @option{--original}, using the
 
392
long option name).  This style is equivalent to the following settings:
 
393
 
 
394
@example
 
395
@group
 
396
-nbad -nbap -bbo -bc -br -brs -c33 -cd33 -cdb -ce -ci4 -cli0
 
397
-cp33 -di16 -fc1 -fca -hnl -i4 -ip4 -l75 -lp -npcs -nprs -psl
 
398
-saf -sai -saw -sc -nsob -nss -ts8
 
399
@end group
 
400
@end example
 
401
 
 
402
@node Blank lines, Comments, Common styles, Indent Program
 
403
@comment  node-name,  next,  previous,  up
 
404
@section Blank lines
 
405
@cindex Blank lines
 
406
 
 
407
Various programming styles use blank lines in different places.
 
408
@command{indent} has a number of options to insert or delete blank lines in
 
409
specific places.
 
410
 
 
411
The @option{-bad} option causes @command{indent} to force a blank line after
 
412
every block of declarations.  The @option{-nbad} option causes
 
413
@command{indent} not to force such blank lines.
 
414
 
 
415
The @option{-bap} option forces a blank line after every procedure body.
 
416
The @option{-nbap} option forces no such blank line.
 
417
 
 
418
@kindex -bbb
 
419
@kindex --blank-lines-before-block-comments
 
420
@kindex -nbbb
 
421
@kindex --no-blank-lines-before-block-comments
 
422
The @option{-bbb} option forces a blank line before every boxed comment
 
423
(@xref{Comments}.)
 
424
The @option{-nbbb} option does not force such blank lines.
 
425
 
 
426
@kindex -sob
 
427
@kindex --swallow-optional-blank-lines
 
428
@kindex -nsob
 
429
@kindex --leave-optional-blank-lines
 
430
The @option{-sob} option causes @command{indent} to swallow optional blank
 
431
lines (that is, any optional blank lines present in the input will be
 
432
removed from the output).  If the @option{-nsob} is specified, any blank
 
433
lines present in the input file will be copied to the output file.
 
434
 
 
435
@ifinfo
 
436
@menu
 
437
* -bad::                        More on the @option{-bad} option.
 
438
* -bap::                        More on the @option{-bap} option.
 
439
@end menu
 
440
@end ifinfo
 
441
 
 
442
@node -bad, -bap,  , Blank lines
 
443
@comment  node-name,  next,  previous,  up
 
444
@subsection --blank-lines-after-declarations
 
445
 
 
446
The @option{-bad} option forces a blank line after every block of
 
447
declarations.  The @option{-nbad} option does not add any such blank
 
448
lines.
 
449
 
 
450
For example, given the input
 
451
@example
 
452
@group
 
453
char *foo;
 
454
char *bar;
 
455
/* This separates blocks of declarations.  */
 
456
int baz;
 
457
@end group
 
458
@end example
 
459
 
 
460
@kindex -bad
 
461
@kindex --blank-lines-after-declarations
 
462
@kindex -nbad
 
463
@kindex --no-blank-lines-after-declarations
 
464
@noindent
 
465
@code{indent -bad} produces
 
466
 
 
467
@example
 
468
@group
 
469
char *foo;
 
470
char *bar;
 
471
 
 
472
/* This separates blocks of declarations.  */
 
473
int baz;
 
474
@end group
 
475
@end example
 
476
 
 
477
@noindent
 
478
and @code{indent -nbad} produces
 
479
 
 
480
@example
 
481
@group
 
482
char *foo;
 
483
char *bar;
 
484
/* This separates blocks of declarations.  */
 
485
int baz;
 
486
@end group
 
487
@end example
 
488
 
 
489
@node -bap,  , -bad, Blank lines
 
490
@comment  node-name,  next,  previous,  up
 
491
@subsection --blank-lines-after-procedures
 
492
 
 
493
@kindex -bap
 
494
@kindex --blank-lines-after-procedures
 
495
@kindex -nbap
 
496
@kindex --no-blank-lines-after-procedures
 
497
The @option{-bap} option forces a blank line after every procedure body.
 
498
 
 
499
For example, given the input
 
500
 
 
501
@example
 
502
@group
 
503
int
 
504
foo ()
 
505
@{
 
506
  puts("Hi");
 
507
@}
 
508
/* The procedure bar is even less interesting.  */
 
509
char *
 
510
bar ()
 
511
@{
 
512
  puts("Hello");
 
513
@}
 
514
@end group
 
515
@end example
 
516
 
 
517
@noindent
 
518
@code{indent -bap} produces
 
519
 
 
520
@example
 
521
@group
 
522
int
 
523
foo ()
 
524
@{
 
525
  puts ("Hi");
 
526
@}
 
527
 
 
528
/* The procedure bar is even less interesting.  */
 
529
char *
 
530
bar ()
 
531
@{
 
532
  puts ("Hello");
 
533
@}
 
534
@end group
 
535
@end example
 
536
 
 
537
@noindent
 
538
@c A better `group' would be better than `need'.
 
539
@need 1250
 
540
and @code{indent -nbap} produces
 
541
 
 
542
@example
 
543
@group
 
544
int
 
545
foo ()
 
546
@{
 
547
  puts ("Hi");
 
548
@}
 
549
/* The procedure bar is even less interesting.  */
 
550
char *
 
551
bar ()
 
552
@{
 
553
  puts ("Hello");
 
554
@}
 
555
@end group
 
556
@end example
 
557
 
 
558
@noindent
 
559
No blank line will be added after the procedure @code{foo}.
 
560
 
 
561
@node Comments, Statements, Blank lines, Indent Program
 
562
@comment  node-name,  next,  previous,  up
 
563
@section Comments
 
564
@cindex Comments
 
565
 
 
566
@command{indent} formats both C and C++ comments. C comments are begun with
 
567
@samp{/*}, terminated with @samp{*/} and may contain newline characters.
 
568
C++ comments begin with the delimiter @samp{//} and end at the newline.
 
569
 
 
570
@command{indent} handles comments differently depending upon their context.
 
571
@command{indent} attempts to distinguish between comments which follow
 
572
statements, comments which follow declarations, comments following
 
573
preprocessor directives, and comments which are not preceded by code of
 
574
any sort, i.e., they begin the text of the line (although not
 
575
neccessarily in column 1).
 
576
 
 
577
@command{indent} further distinguishes between comments found outside of
 
578
procedures and aggregates, and those found within them.  In particular,
 
579
comments beginning a line found within a procedure will be indented to
 
580
the column at which code is currently indented.  The exception to this a
 
581
comment beginning in the leftmost column;  such a comment is output
 
582
at that column.
 
583
 
 
584
@command{indent} attempts to leave @dfn{boxed comments} unmodified.  The
 
585
general idea of such a comment is that it is enclosed in a rectangle or
 
586
``box'' of stars or dashes to visually set it apart.  More precisely,
 
587
boxed comments are defined as those in which the initial @samp{/*} is
 
588
followed immediately by the character @samp{*}, @samp{=}, @samp{_}, or
 
589
@samp{-}, or those in which the beginning comment delimiter (@samp{/*})
 
590
is on a line by itself, and the following line begins with a @samp{*} in
 
591
the same column as the star of the opening delimiter.
 
592
 
 
593
Examples of boxed comments are:
 
594
 
 
595
@example
 
596
@group
 
597
/**********************
 
598
 * Comment in a box!! *
 
599
 **********************/
 
600
 
 
601
       /*
 
602
        * A different kind of scent,
 
603
        * for a different kind of comment.
 
604
        */
 
605
@end group
 
606
@end example
 
607
 
 
608
@command{indent} attempts to leave boxed comments exactly as they are found
 
609
in the source file.  Thus the indentation of the comment is unchanged,
 
610
and its length is not checked in any way.  The only alteration made is
 
611
that an embedded tab character may be converted into the appropriate
 
612
number of spaces.
 
613
 
 
614
If the @option{-bbb} option is specified, all such boxed comments will be
 
615
preceded by a blank line, unless such a comment is preceded by code.
 
616
 
 
617
@kindex -fca
 
618
@kindex --format-all-comments
 
619
@kindex -nfca
 
620
@kindex --dont-format-comments
 
621
@kindex -fc1
 
622
@kindex --format-first-column-comments
 
623
@kindex -nfc1
 
624
@kindex --dont-format-first-column-comments
 
625
Comments which are not boxed comments may be formatted, which means that
 
626
the line is broken to fit within a right margin and left-filled with
 
627
whitespace.  Single newlines are equivalent to a space, but blank lines
 
628
(two or more newlines in a row) are taken to mean a paragraph break.
 
629
Formatting of comments which begin after the first column is enabled
 
630
with the @option{-fca} option.  To format those beginning in column one,
 
631
specify @option{-fc1}.  Such formatting is disabled by default.
 
632
 
 
633
The right margin for formatting defaults to 78, but may be changed with
 
634
the @option{-lc} option.  If the margin specified does not allow the
 
635
comment to be printed, the margin will be automatically extended for the
 
636
duration of that comment.  The margin is not respected if the comment is
 
637
not being formatted.
 
638
 
 
639
@kindex -d@var{n}
 
640
@kindex --line-comments-indentation@var{n}
 
641
If the comment begins a line (i.e., there is no program text to its
 
642
left), it will be indented to the column it was found in unless the
 
643
comment is within a block of code.  In that case, such a comment will be
 
644
aligned with the indented code of that block (unless the comment began
 
645
in the first column).  This alignment may be affected by the @option{-d}
 
646
option, which specifies an amount by which such comments are moved to
 
647
the @emph{left}, or unindented.  For example, @option{-d2} places comments
 
648
two spaces to the left of code.  By default, comments are aligned with
 
649
code, unless they begin in the first column, in which case they are left
 
650
there by default --- to get them aligned with the code, specify @option{-fc1}.
 
651
 
 
652
@kindex -c@var{n}
 
653
@kindex --comment-indentation@var{n}
 
654
@kindex -cd@var{n}
 
655
@kindex --declaration-comment-column@var{n}
 
656
@kindex -cp@var{n}
 
657
@kindex --else-endif-column@var{n}
 
658
Comments to the right of code will appear by default in column 33.
 
659
This may be changed with one of three options.  @option{-c} will specify
 
660
the column for comments following code, @option{-cd} specifies the
 
661
column for comments following declarations, and @option{-cp} specifies
 
662
the column for comments following preprocessor directives @code{#else}
 
663
and @code{#endif}.
 
664
 
 
665
If the code to the left of the comment exceeds the beginning column,
 
666
the comment column will be extended to the next tabstop column past
 
667
the end of the code, or in the case of preprocessor directives, to one
 
668
space past the end of the directive.  This extension lasts only for
 
669
the output of that particular comment.
 
670
 
 
671
@kindex -cdb
 
672
@kindex --comment-delimiters-on-blank-lines
 
673
@kindex -ncdb
 
674
@kindex --no-comment-delimiters-on-blank-lines
 
675
The @option{-cdb} option places the comment delimiters on blank lines.
 
676
Thus, a single line comment like @code{/* Loving hug */} can be
 
677
transformed into:
 
678
 
 
679
@example
 
680
@group
 
681
/*
 
682
   Loving hug
 
683
 */
 
684
@end group
 
685
@end example
 
686
 
 
687
@kindex -sc
 
688
@kindex --star-left-side-of-comments
 
689
@kindex -nsc
 
690
@kindex --dont-star-comments
 
691
Stars can be placed at the beginning of multi-line comments with the
 
692
@option{-sc} option.  Thus, the single-line comment above can be
 
693
transformed (with @option{-cdb -sc}) into:
 
694
 
 
695
@example
 
696
@group
 
697
/*
 
698
 * Loving hug
 
699
 */
 
700
@end group
 
701
@end example
 
702
 
 
703
@node Statements, Declarations, Comments, Indent Program
 
704
@comment  node-name,  next,  previous,  up
 
705
@section Statements
 
706
 
 
707
@kindex -br
 
708
@kindex --braces-on-if-line
 
709
@kindex -bl
 
710
@kindex --braces-after-if-line
 
711
The @option{-br} or @option{-bl} option specifies how to format braces.
 
712
 
 
713
@c another paragraph that needs to be attached to its example.
 
714
@need 650
 
715
The @option{-br} option formats statement braces like this:
 
716
 
 
717
@example
 
718
@group
 
719
if (x > 0) @{
 
720
  x--;
 
721
@}
 
722
@end group
 
723
@end example
 
724
 
 
725
@noindent
 
726
The @option{-bl} option formats them like this:
 
727
 
 
728
@example
 
729
@group
 
730
if (x > 0)
 
731
  @{
 
732
    x--;
 
733
  @}
 
734
@end group
 
735
@end example
 
736
 
 
737
@kindex -bli@var{n}
 
738
@kindex --brace-indent@var{n}
 
739
If you use the @option{-bl} option, you may also want to specify the
 
740
@option{-bli} option.  This option specifies the number of spaces by
 
741
which braces are indented.  @option{-bli2}, the default, gives the
 
742
result shown above.  @option{-bli0} results in the following:
 
743
 
 
744
@example
 
745
@group
 
746
if (x > 0)
 
747
@{
 
748
  x--;
 
749
@}
 
750
@end group
 
751
@end example
 
752
 
 
753
@kindex -ce
 
754
@kindex --cuddle-else
 
755
@kindex -dce
 
756
@kindex --dont-cuddle-else
 
757
If you are using the @option{-br} option, you probably want to also use
 
758
the @option{-ce} option.  This causes the @code{else} in an if-then-else
 
759
construct to cuddle up to the immediately preceding @samp{@}}.  For
 
760
example, with @option{-br -ce} you get the following:
 
761
 
 
762
@example
 
763
@group
 
764
if (x > 0) @{
 
765
  x--;
 
766
@} else @{
 
767
  fprintf (stderr, "...something wrong?\n");
 
768
@}
 
769
@end group
 
770
@end example
 
771
 
 
772
@noindent
 
773
With @option{-br -nce} that code would appear as
 
774
 
 
775
@example
 
776
@group
 
777
if (x > 0) @{
 
778
  x--;
 
779
@}
 
780
else @{
 
781
  fprintf (stderr, "...something wrong?\n");
 
782
@}
 
783
@end group
 
784
@end example
 
785
 
 
786
@kindex -cdw
 
787
@kindex --cuddle-do-while
 
788
@kindex -ncdw
 
789
@kindex --dont-cuddle-do-while
 
790
This causes the @code{while} in a do-while
 
791
loop to cuddle up to the immediately preceding @samp{@}}.  For
 
792
example, with @option{-cdw} you get the following:
 
793
 
 
794
@example
 
795
@group
 
796
do @{
 
797
  x--;
 
798
@} while (x);
 
799
@end group
 
800
@end example
 
801
 
 
802
@noindent
 
803
With @option{-ncdw} that code would appear as
 
804
 
 
805
@example
 
806
@group
 
807
do @{
 
808
  x--;
 
809
@}
 
810
while (x);
 
811
@end group
 
812
@end example
 
813
 
 
814
@kindex -cli@var{n}
 
815
@kindex --case-indentation@var{n}
 
816
The @option{-cli} option specifies the number of spaces that case labels
 
817
should be indented to the right of the containing @code{switch}
 
818
statement.
 
819
 
 
820
@noindent
 
821
The default gives code like:
 
822
 
 
823
@example
 
824
@group
 
825
switch (i)
 
826
  @{
 
827
  case 0:
 
828
    break;
 
829
  case 1:
 
830
    @{
 
831
      ++i;
 
832
    @}
 
833
  default:
 
834
    break;
 
835
  @}
 
836
@end group
 
837
@end example
 
838
 
 
839
@need 1550
 
840
Using the @option{-cli2} that would become:
 
841
 
 
842
@example
 
843
@group
 
844
switch (i)
 
845
  @{
 
846
    case 0:
 
847
      break;
 
848
    case 1:
 
849
      @{
 
850
        ++i;
 
851
      @}
 
852
    default:
 
853
      break;
 
854
  @}
 
855
@end group
 
856
@end example
 
857
 
 
858
@kindex -cbi@var{n}
 
859
@kindex --case-brace-indentation@var{n}
 
860
The indentation of the braces below a case statement can be
 
861
controlled with the @option{-cbi@var{n}} option.  For example,
 
862
using @option{-cli2 -cbi0} results in:
 
863
 
 
864
@example
 
865
@group
 
866
switch (i)
 
867
  @{
 
868
    case 0:
 
869
      break;
 
870
    case 1:
 
871
    @{
 
872
      ++i;
 
873
    @}
 
874
    default:
 
875
      break;
 
876
  @}
 
877
@end group
 
878
@end example
 
879
 
 
880
@kindex -ss
 
881
@kindex --space-special-semicolon
 
882
@kindex -nss
 
883
@kindex --dont-space-special-semicolon
 
884
If a semicolon is on the same line as a @code{for} or @code{while}
 
885
statement, the @option{-ss} option will cause a space to be placed before
 
886
the semicolon.  This emphasizes the semicolon, making it clear that the
 
887
body of the @code{for} or @code{while} statement is an empty statement.
 
888
@option{-nss} disables this feature.
 
889
 
 
890
@kindex -pcs
 
891
@kindex --space-after-procedure-calls
 
892
@kindex -npcs
 
893
@kindex --no-space-after-function-call-names
 
894
The @option{-pcs} option causes a space to be placed between the name of
 
895
the procedure being called and the @samp{(} (for example, @w{@code{puts
 
896
("Hi");}}.  The @option{-npcs} option would give @code{puts("Hi");}).
 
897
@refill
 
898
 
 
899
@kindex -cs
 
900
@kindex --space-after-cast
 
901
@kindex -ncs
 
902
@kindex --no-space-after-casts
 
903
If the @option{-cs} option is specified, @command{indent} puts a space after
 
904
a cast operator.
 
905
 
 
906
@kindex -bs
 
907
@kindex --blank-after-sizeof
 
908
The @option{-bs} option ensures that there is a space between the
 
909
keyword @code{sizeof} and its argument.  In some versions, this is
 
910
known as the @samp{Bill_Shannon} option.
 
911
 
 
912
@kindex -saf
 
913
@kindex --space-after-for
 
914
@kindex -nsaf
 
915
@kindex --no-space-after-for
 
916
The @option{-saf} option forces a space between an @code{for}
 
917
and the following parenthesis.  This is the default.
 
918
 
 
919
@kindex -sai
 
920
@kindex --space-after-if
 
921
@kindex -nsai
 
922
@kindex --no-space-after-if
 
923
The @option{-sai} option forces a space between an @code{if}
 
924
and the following parenthesis.  This is the default.
 
925
 
 
926
@kindex -saw
 
927
@kindex --space-after-while
 
928
@kindex -nsaw
 
929
@kindex --no-space-after-while
 
930
The @option{-saw} option forces a space between an @code{while}
 
931
and the following parenthesis.  This is the default.
 
932
 
 
933
@kindex -prs
 
934
@kindex --space-after-parentheses
 
935
The @option{-prs} option causes all parentheses to be seperated with
 
936
a space from the what is between them.  For example, using @option{-prs}
 
937
results in code like:
 
938
 
 
939
@example
 
940
@group
 
941
  while ( ( e_code - s_code ) < ( dec_ind - 1 ) )
 
942
    @{
 
943
      set_buf_break ( bb_dec_ind );
 
944
      *e_code++ = ' ';
 
945
    @}
 
946
@end group
 
947
@end example
 
948
 
 
949
@node Declarations, Indentation, Statements, Indent Program
 
950
@comment  node-name,  next,  previous,  up
 
951
@section Declarations
 
952
 
 
953
@kindex -di@var{n}
 
954
@kindex --declaration-indentation@var{n}
 
955
By default @command{indent} will line up identifiers, in the column
 
956
specified by the @option{-di} option.  For example, @option{-di16} makes
 
957
things look like:
 
958
 
 
959
@example
 
960
@group
 
961
int             foo;
 
962
char           *bar;
 
963
@end group
 
964
@end example
 
965
 
 
966
Using a small value (such as one or two) for the @option{-di} option can
 
967
be used to cause the identifiers to be placed in the first available
 
968
position; for example:
 
969
 
 
970
@example
 
971
@group
 
972
int foo;
 
973
char *bar;
 
974
@end group
 
975
@end example
 
976
 
 
977
The value given to the @option{-di} option will still affect variables
 
978
which are put on separate lines from their types, for example
 
979
@option{-di2} will lead to:
 
980
 
 
981
@example
 
982
@group
 
983
int
 
984
  foo;
 
985
@end group
 
986
@end example
 
987
 
 
988
@kindex -bc
 
989
@kindex --blank-lines-after-commas
 
990
@kindex -nbc
 
991
@kindex --no-blank-lines-after-commas
 
992
If the @option{-bc} option is specified, a newline is forced after each
 
993
comma in a declaration.  For example,
 
994
 
 
995
@example
 
996
@group
 
997
int a,
 
998
  b,
 
999
  c;
 
1000
@end group
 
1001
@end example
 
1002
 
 
1003
@noindent
 
1004
With the @option{-nbc} option this would look like
 
1005
 
 
1006
@example
 
1007
int a, b, c;
 
1008
@end example
 
1009
 
 
1010
@kindex -bfda
 
1011
@kindex --break-function-decl-args
 
1012
@kindex -nbfda
 
1013
@kindex --dont-break-function-decl-args
 
1014
The @option{-bfda} option causes a newline to be forced after the comma
 
1015
separating the arguments of a function declaration.  The arguments will
 
1016
appear at the current indention level matching the opening paren.  This 
 
1017
is particularly helpful for functions with long argument lists.   For 
 
1018
example,
 
1019
 
 
1020
@example
 
1021
@group
 
1022
void foo (int arg1, char arg2, int *arg3, long arg4, char arg5);
 
1023
@end group
 
1024
@end example
 
1025
@noindent
 
1026
With the @option{-bfda} option this would look like
 
1027
 
 
1028
@example
 
1029
void foo (int arg1,
 
1030
          char arg2,
 
1031
          int *arg3,
 
1032
          long arg4,
 
1033
          char arg5);
 
1034
@end example
 
1035
 
 
1036
@kindex -psl
 
1037
@kindex --procnames-start-lines
 
1038
@kindex -npsl
 
1039
@kindex --dont-break-procedure-type
 
1040
@cindex @command{etags} requires @option{-psl}
 
1041
The @option{-psl} option causes the type of a procedure being defined to
 
1042
be placed on the line before the name of the procedure.  This style is
 
1043
required for the @command{etags} program to work correctly, as well as some
 
1044
of the @code{c-mode} functions of Emacs.
 
1045
 
 
1046
@kindex -T
 
1047
@cindex Typenames
 
1048
@cindex typedef
 
1049
You must use the @option{-T}
 
1050
option to tell @command{indent} the name of all the typenames in your
 
1051
program that are defined by @code{typedef}.  @option{-T} can be specified
 
1052
more than once, and all names specified are used.  For example, if your
 
1053
program contains
 
1054
 
 
1055
@example
 
1056
@group
 
1057
typedef unsigned long CODE_ADDR;
 
1058
typedef enum @{red, blue, green@} COLOR;
 
1059
@end group
 
1060
@end example
 
1061
 
 
1062
@noindent
 
1063
you would use the options @option{-T CODE_ADDR -T COLOR}.
 
1064
 
 
1065
The @option{-brs} or @option{-bls} option specifies how to format braces
 
1066
in struct declarations.  The @option{-brs} option formats braces like
 
1067
this:
 
1068
 
 
1069
@example
 
1070
@group
 
1071
struct foo @{
 
1072
  int x;
 
1073
@};
 
1074
@end group
 
1075
@end example
 
1076
 
 
1077
@noindent
 
1078
The @option{-bls} option formats them like this:
 
1079
 
 
1080
@example
 
1081
@group
 
1082
struct foo
 
1083
@{
 
1084
  int x;
 
1085
@};
 
1086
@end group
 
1087
@end example
 
1088
 
 
1089
@node Indentation, Breaking long lines, Declarations, Indent Program
 
1090
@comment  node-name,  next,  previous,  up
 
1091
@section Indentation
 
1092
 
 
1093
@kindex -i@var{n}
 
1094
@kindex --indent-level@var{n}
 
1095
@kindex -ci@var{n}
 
1096
@kindex --continuation-indentation@var{n}
 
1097
@kindex -lp
 
1098
@kindex --continue-at-parentheses
 
1099
@kindex -nlp
 
1100
@kindex --dont-line-up-parentheses
 
1101
One issue in the formatting of code is how far each line should be
 
1102
indented from the left margin.  When the beginning of a statement such
 
1103
as @code{if} or @code{for} is encountered, the indentation level is
 
1104
increased by the value specified by the @option{-i} option.  For example,
 
1105
use @option{-i8} to specify an eight character indentation for each
 
1106
level.  When a statement is broken across two lines, the second line is
 
1107
indented by a number of additional spaces specified by the @option{-ci}
 
1108
option.  @option{-ci} defaults to 0.  However, if the @option{-lp} option is
 
1109
specified, and a line has a left parenthesis which is not closed on that
 
1110
line, then continuation lines will be lined up to start at the character
 
1111
position just after the left parenthesis.  This processing also applies
 
1112
to @samp{[} and applies to @samp{@{} when it occurs in initialization
 
1113
lists.  For example, a piece of continued code might look like this with
 
1114
@option{-nlp -ci3} in effect:
 
1115
 
 
1116
@example
 
1117
@group
 
1118
  p1 = first_procedure (second_procedure (p2, p3),
 
1119
     third_procedure (p4, p5));
 
1120
@end group
 
1121
@end example
 
1122
 
 
1123
@noindent
 
1124
With @option{-lp} in effect the code looks somewhat clearer:
 
1125
 
 
1126
@example
 
1127
@group
 
1128
  p1 = first_procedure (second_procedure (p2, p3),
 
1129
                        third_procedure (p4, p5));
 
1130
@end group
 
1131
@end example
 
1132
 
 
1133
@kindex -ts@var{n}
 
1134
@kindex --tab-size@var{n}
 
1135
When a statement is broken in between two or more paren pairs (...),
 
1136
each extra pair causes the indentation level extra indentation:
 
1137
 
 
1138
@example
 
1139
@group
 
1140
if ((((i < 2 &&
 
1141
        k > 0) || p == 0) &&
 
1142
    q == 1) ||
 
1143
  n = 0)
 
1144
@end group
 
1145
@end example
 
1146
 
 
1147
@noindent
 
1148
The option @option{-ip@var{N}} can be used to set the extra offset per paren.
 
1149
For instance, @option{-ip0} would format the above as:
 
1150
 
 
1151
@example
 
1152
@group
 
1153
if ((((i < 2 &&
 
1154
  k > 0) || p == 0) &&
 
1155
  q == 1) ||
 
1156
  n = 0)
 
1157
@end group
 
1158
@end example
 
1159
 
 
1160
@noindent
 
1161
@command{indent} assumes that tabs are placed at regular intervals of both
 
1162
input and output character streams.  These intervals are by default 8
 
1163
columns wide, but (as of version 1.2) may be changed by the @option{-ts}
 
1164
option.  Tabs are treated as the equivalent number of spaces.
 
1165
 
 
1166
@kindex -ip@var{n}
 
1167
@kindex --parameter-indentation@var{n}
 
1168
@kindex -nip
 
1169
@kindex --no-parameter-indentation
 
1170
The indentation of type declarations in old-style function definitions
 
1171
is controlled by the @option{-ip} parameter.  This is a numeric parameter
 
1172
specifying how many spaces to indent type declarations.  For example,
 
1173
the default @w{@option{-ip5}} makes definitions look like this:
 
1174
 
 
1175
@example
 
1176
@group
 
1177
char *
 
1178
create_world (x, y, scale)
 
1179
     int x;
 
1180
     int y;
 
1181
     float scale;
 
1182
@{
 
1183
  . . .
 
1184
@}
 
1185
@end group
 
1186
@end example
 
1187
 
 
1188
For compatibility with other versions of indent, the option @option{-nip}
 
1189
is provided, which is equivalent to @option{-ip0}.
 
1190
 
 
1191
@kindex -lps
 
1192
@kindex --leave-preprocessor-space
 
1193
@kindex -nlps
 
1194
@kindex --remove-preprocessor-space
 
1195
ANSI C allows white space to be placed on preprocessor command lines
 
1196
between the character @samp{#} and the command name.  By default,
 
1197
@command{indent} removes this space, but specifying the @option{-lps} option
 
1198
directs @command{indent} to leave this space unmodified.
 
1199
 
 
1200
@node Breaking long lines, Disabling Formatting, Indentation, Indent Program
 
1201
@comment  node-name,  next,  previous,  up
 
1202
@section Breaking long lines
 
1203
 
 
1204
@kindex -l@var{n}
 
1205
@kindex --line-length@var{n}
 
1206
With the option @option{-l@var{n}}, or @option{--line-length@var{n}}, it is
 
1207
possible to specify the maximum length of a line of C code, not including
 
1208
possible comments that follow it.
 
1209
 
 
1210
When lines become longer then the specified line length, GNU @command{indent}
 
1211
tries to break the line at a logical place.  This is new as of version 2.1
 
1212
however and not very intelligent or flexible yet.
 
1213
 
 
1214
@kindex -bbo
 
1215
@kindex --break-before-boolean-operator
 
1216
@kindex -nbbo
 
1217
@kindex --break-after-boolean-operator
 
1218
@kindex -hnl
 
1219
@kindex --honour-newlines
 
1220
@kindex -nhnl
 
1221
@kindex --ignore-newlines
 
1222
Currently there are two options that allows one to interfere with the
 
1223
algorithm that determines where to break a line.
 
1224
 
 
1225
The @option{-bbo} option causes GNU @command{indent} to prefer to break
 
1226
long lines before the boolean operators @code{&&} and @code{||}.  The
 
1227
@option{-nbbo} option causes GNU @command{indent} not have that
 
1228
preference.  For example, the default option @option{-bbo} (together
 
1229
with @option{--line-length60} and @option{--ignore-newlines}) makes code
 
1230
look like this:
 
1231
 
 
1232
@example
 
1233
@group
 
1234
  if (mask
 
1235
      && ((mask[0] == '\0')
 
1236
          || (mask[1] == '\0'
 
1237
              && ((mask[0] == '0') || (mask[0] == '*')))))
 
1238
@end group
 
1239
@end example
 
1240
 
 
1241
Using the option @option{-nbbo} will make it look like this:
 
1242
 
 
1243
@example
 
1244
@group
 
1245
  if (mask &&
 
1246
      ((mask[0] == '\0') ||
 
1247
       (mask[1] == '\0' &&
 
1248
        ((mask[0] == '0') || (mask[0] == '*')))))
 
1249
@end group
 
1250
@end example
 
1251
 
 
1252
The default @option{-hnl}, however, honours newlines in the input file by
 
1253
giving them the highest possible priority to break lines at.  For example,
 
1254
when the input file looks like this:
 
1255
 
 
1256
@example
 
1257
@group
 
1258
  if (mask
 
1259
      && ((mask[0] == '\0')
 
1260
      || (mask[1] == '\0' && ((mask[0] == '0') || (mask[0] == '*')))))
 
1261
@end group
 
1262
@end example
 
1263
 
 
1264
@noindent
 
1265
then using the option @option{-hnl}, or @option{--honour-newlines},
 
1266
together with the previously mentioned @option{-nbbo} and
 
1267
@option{--line-length60}, will cause the output not to be what is given
 
1268
in the last example but instead will prefer to break at the positions
 
1269
where the code was broken in the input file:
 
1270
 
 
1271
@example
 
1272
@group
 
1273
  if (mask
 
1274
      && ((mask[0] == '\0')
 
1275
          || (mask[1] == '\0' &&
 
1276
              ((mask[0] == '0') || (mask[0] == '*')))))
 
1277
@end group
 
1278
@end example
 
1279
 
 
1280
The idea behind this option is that lines which are too long, but are already
 
1281
broken up, will not be touched by GNU @command{indent}.  Really messy code
 
1282
should be run through @command{indent} at least once using the
 
1283
@option{--ignore-newlines} option though.
 
1284
 
 
1285
@node Disabling Formatting, Miscellaneous options, Breaking long lines, Indent Program
 
1286
@comment  node-name,  next,  previous,  up
 
1287
@section Disabling Formatting
 
1288
 
 
1289
Formatting of C code may be disabled for portions of a program by
 
1290
embedding special @dfn{control comments} in the program.  To turn off
 
1291
formatting for a section of a program, place the disabling control
 
1292
comment @code{/* *INDENT-OFF* */} on a line by itself just before that
 
1293
section.  Program text scanned after this control comment is output
 
1294
precisely as input with no modifications until the corresponding
 
1295
enabling comment is scanned on a line by itself.  The disabling control
 
1296
comment is @code{/* *INDENT-ON* */}, and any text following the comment
 
1297
on the line is also output unformatted.  Formatting begins again with
 
1298
the input line following the enabling control comment.
 
1299
 
 
1300
More precisely, @command{indent} does not attempt to verify the closing
 
1301
delimiter (@code{*/}) for these C comments, and any whitespace on the
 
1302
line is totally transparent.
 
1303
 
 
1304
These control comments also function in their C++ formats, namely
 
1305
@code{// *INDENT-OFF*} and @code{// *INDENT-ON*}.
 
1306
 
 
1307
It should be noted that the internal state of @command{indent} remains
 
1308
unchanged over the course of the unformatted section.  Thus, for
 
1309
example, turning off formatting in the middle of a function and
 
1310
continuing it after the end of the function may lead to bizarre
 
1311
results.  It is therefore wise to be somewhat modular in selecting code
 
1312
to be left unformatted.
 
1313
 
 
1314
As a historical note, some earlier versions of @command{indent} produced
 
1315
error messages beginning with @code{*INDENT**}.  These versions of
 
1316
@command{indent} were written to ignore any input text lines which began
 
1317
with such error messages.  I have removed this incestuous feature from
 
1318
GNU @command{indent}.
 
1319
 
 
1320
@node Miscellaneous options, Bugs, Disabling Formatting, Indent Program
 
1321
@comment  node-name,  next,  previous,  up
 
1322
@section Miscellaneous options
 
1323
 
 
1324
@kindex -version
 
1325
To find out what version of @command{indent} you have, use the command
 
1326
@code{indent -version}.  This will report the version number of
 
1327
@command{indent}, without doing any of the normal processing.
 
1328
 
 
1329
@kindex -v
 
1330
@kindex --verbose
 
1331
@kindex -nv
 
1332
@kindex --no-verbosity
 
1333
@comment Would --terse be better?  I think not, but perhaps accepting
 
1334
@comment --no-verbose would avoid error messages.
 
1335
The @option{-v} option can be used to turn on verbose mode.  When in
 
1336
verbose mode, @command{indent} reports when it splits one line of input
 
1337
into two more more lines of output, and gives some size statistics at
 
1338
completion. 
 
1339
 
 
1340
@kindex -pmt
 
1341
@kindex --preserve-mtime
 
1342
@kindex -npmt
 
1343
The @option{-pmt} option causes @command{indent} to preserve the access
 
1344
and modification times on the output files.  Using this option
 
1345
has the advantage that running indent on all source and header
 
1346
files in a project won't cause @code{make} to rebuild all targets.
 
1347
This option is only available on Operating Systems that have the
 
1348
POSIX @code{utime(2)} function.
 
1349
 
 
1350
@node Bugs, Copyright, Miscellaneous options, Indent Program
 
1351
@comment  node-name,  next,  previous,  up
 
1352
@section Bugs
 
1353
 
 
1354
Please report any bugs to @email{bug-indent@@gnu.org}.
 
1355
 
 
1356
When @command{indent} is run twice on a file, with the same profile,
 
1357
it should @emph{never} change that file the second time.  With the
 
1358
current design of @command{indent}, this can not be guaranteed, however,
 
1359
and it has not been extensively tested.
 
1360
 
 
1361
@command{indent} does not understand C.  In some cases this leads to
 
1362
the inability to join lines.  The result is that running a file
 
1363
through @command{indent} is @emph{irreversible}, even if the used input
 
1364
file was the result of running @command{indent} with a given profile
 
1365
(@file{.indent.pro}).
 
1366
 
 
1367
While an attempt was made to get @command{indent} working for C++, is
 
1368
will not do a good job on any C++ source except the very simple.
 
1369
 
 
1370
@command{indent} does not look at the given @option{--line-length} option
 
1371
when writing comments to the output file.  This results often in comments
 
1372
being put far to the right.  In order to prohibit @command{indent} from
 
1373
joining a broken line that has a comment at the end, make sure that the
 
1374
comments start on the first line of the break.
 
1375
 
 
1376
@command{indent} does not count lines and comments (see the @option{-v}
 
1377
option) when @command{indent} is turned off with 
 
1378
@code{/* *INDENT-OFF* */}.
 
1379
 
 
1380
Comments of the form @code{/*UPPERCASE*/} are not treated as comment but as an
 
1381
identifier, causing them to be joined with the next line. This renders
 
1382
comments of this type useless, unless they are embedded in the code to
 
1383
begin with.
 
1384
 
 
1385
@node Copyright,  , Bugs, Indent Program
 
1386
@comment  node-name,  next,  previous,  up
 
1387
@section Copyright
 
1388
 
 
1389
The following copyright notice applies to the @command{indent} program.
 
1390
The copyright and copying permissions for this manual appear near the
 
1391
beginning of @file{indent.texinfo} and @file{indent.info}, and near the
 
1392
end of @file{indent.1}.
 
1393
 
 
1394
@display
 
1395
Copyright @copyright{} 2001 David Ingamells.
 
1396
Copyright @copyright{} 1999 Carlo Wood.
 
1397
Copyright @copyright{} 1995, 1996 Joseph Arceneaux.
 
1398
Copyright @copyright{} 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation
 
1399
Copyright @copyright{} 1985 Sun Microsystems, Inc.
 
1400
Copyright @copyright{} 1980 The Regents of the University of California.
 
1401
Copyright @copyright{} 1976 Board of Trustees of the University of Illinois.
 
1402
All rights reserved.
 
1403
 
 
1404
Redistribution and use in source and binary forms are permitted
 
1405
provided that the above copyright notice and this paragraph are
 
1406
duplicated in all such forms and that any documentation,
 
1407
advertising materials, and other materials related to such
 
1408
distribution and use acknowledge that the software was developed
 
1409
by the University of California, Berkeley, the University of Illinois,
 
1410
Urbana, and Sun Microsystems, Inc.  The name of either University
 
1411
or Sun Microsystems may not be used to endorse or promote products
 
1412
derived from this software without specific prior written permission.
 
1413
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 
1414
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 
1415
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
 
1416
PURPOSE.
 
1417
@end display
 
1418
@c !END THEREST
 
1419
 
 
1420
@node Option Summary, Index, Indent Program, Top
 
1421
@appendix Option Summary
 
1422
 
 
1423
Here is a list of all the options for @command{indent}, alphabetized by
 
1424
short option.  It is followed by a cross key alphabetized by long option.
 
1425
 
 
1426
@c !BEGIN OPTIONS
 
1427
@c The cross references are all on lines by themselves because this
 
1428
@c looks better in both printed output and Info.  4 Feb 1992  --rjc
 
1429
@table @samp
 
1430
@item -bad
 
1431
@itemx --blank-lines-after-declarations
 
1432
Force blank lines after the declarations.@*
 
1433
@xref{Blank lines}.
 
1434
 
 
1435
@item -bap
 
1436
@itemx --blank-lines-after-procedures
 
1437
Force blank lines after procedure bodies.@*
 
1438
@xref{Blank lines}.
 
1439
 
 
1440
@item -bbb
 
1441
@itemx --blank-lines-before-block-comments
 
1442
Force blank lines before block comments.@*
 
1443
@xref{Blank lines}.
 
1444
 
 
1445
@item -bbo
 
1446
@itemx --break-before-boolean-operator
 
1447
Prefer to break long lines before boolean operators.@*
 
1448
@xref{Breaking long lines}.
 
1449
 
 
1450
@item -bc
 
1451
@itemx --blank-lines-after-commas
 
1452
Force newline after comma in declaration.@*
 
1453
@xref{Declarations}.
 
1454
 
 
1455
@item -bl
 
1456
@itemx --braces-after-if-line
 
1457
Put braces on line after @code{if}, etc.@*
 
1458
@xref{Statements}.
 
1459
 
 
1460
@item -bli@var{n}
 
1461
@itemx --brace-indent@var{n}
 
1462
Indent braces @var{n} spaces.@*
 
1463
@xref{Statements}.
 
1464
 
 
1465
@item -bls
 
1466
@itemx --braces-after-struct-decl-line
 
1467
Put braces on the line after @code{struct} declaration lines.@*
 
1468
@xref{Declarations}.
 
1469
 
 
1470
@item -br
 
1471
@itemx --braces-on-if-line
 
1472
Put braces on line with @code{if}, etc.@*
 
1473
@xref{Statements}.
 
1474
 
 
1475
@item -brs
 
1476
@itemx --braces-on-struct-decl-line
 
1477
Put braces on @code{struct} declaration line.@*
 
1478
@xref{Declarations}.
 
1479
 
 
1480
@item -bs
 
1481
@itemx --Bill-Shannon
 
1482
@itemx --blank-before-sizeof
 
1483
Put a space between @code{sizeof} and its argument.@*
 
1484
@xref{Statements}.
 
1485
 
 
1486
@item -c@var{n}
 
1487
@itemx --comment-indentation@var{n}
 
1488
Put comments to the right of code in column @var{n}.@*
 
1489
@xref{Comments}.
 
1490
 
 
1491
@item -cbi@var{n}
 
1492
@itemx --case-brace-indentation@var{n}
 
1493
Indent braces after a case label N spaces.@*
 
1494
@xref{Statements}.
 
1495
 
 
1496
@item -cd@var{n}
 
1497
@itemx --declaration-comment-column@var{n}
 
1498
Put comments to the right of the declarations in column @var{n}.@*
 
1499
@xref{Comments}.
 
1500
 
 
1501
@item -cdb
 
1502
@itemx --comment-delimiters-on-blank-lines
 
1503
Put comment delimiters on blank lines.@*
 
1504
@xref{Comments}.
 
1505
 
 
1506
@item -cdw
 
1507
@itemx --cuddle-do-while
 
1508
Cuddle while of @code{do @{@} while;} and preceeding @samp{@}}.@*
 
1509
@xref{Comments}.
 
1510
 
 
1511
@item -ce
 
1512
@itemx --cuddle-else
 
1513
Cuddle else and preceeding @samp{@}}.@*
 
1514
@xref{Comments}.
 
1515
 
 
1516
@item -ci@var{n}
 
1517
@itemx --continuation-indentation@var{n}
 
1518
Continuation indent of @var{n} spaces.@*
 
1519
@xref{Statements}.
 
1520
 
 
1521
@item -cli@var{n}
 
1522
@itemx --case-indentation@var{n}
 
1523
Case label indent of @var{n} spaces.@*
 
1524
@xref{Statements}.
 
1525
 
 
1526
@item -cp@var{n}
 
1527
@itemx --else-endif-column@var{n}
 
1528
Put comments to the right of @code{#else} and 
 
1529
@code{#endif} statements in column @var{n}.@*
 
1530
@xref{Comments}.
 
1531
 
 
1532
@item -cs
 
1533
@itemx --space-after-cast
 
1534
Put a space after a cast operator.@*
 
1535
@xref{Statements}.
 
1536
 
 
1537
@item -d@var{n}
 
1538
@itemx --line-comments-indentation@var{n}
 
1539
Set indentation of comments not to the right 
 
1540
of code to @var{n} spaces.@*
 
1541
@xref{Comments}.
 
1542
 
 
1543
@item -bfda
 
1544
@itemx --break-function-decl-args
 
1545
Align all arguments in a declaration with opening paren.@*
 
1546
@xref{Declarations}.
 
1547
 
 
1548
@item -di@var{n}
 
1549
@itemx --declaration-indentation@var{n}
 
1550
Put variables in column @var{n}.@*
 
1551
@xref{Declarations}.
 
1552
 
 
1553
@item -fc1
 
1554
@itemx --format-first-column-comments
 
1555
Format comments in the first column.@*
 
1556
@xref{Comments}.
 
1557
 
 
1558
@item -fca
 
1559
@itemx --format-all-comments
 
1560
Do not disable all formatting of comments.@*
 
1561
@xref{Comments}.
 
1562
 
 
1563
@item -gnu
 
1564
@itemx --gnu-style
 
1565
Use GNU coding style.  This is the default.@*
 
1566
@xref{Common styles}.
 
1567
 
 
1568
@item -hnl
 
1569
@itemx --honour-newlines
 
1570
Prefer to break long lines at the position of newlines in the input.@*
 
1571
@xref{Breaking long lines}.
 
1572
 
 
1573
@item -i@var{n}
 
1574
@itemx --indent-level@var{n}
 
1575
Set indentation level to @var{n} spaces.@*
 
1576
@xref{Indentation}.
 
1577
 
 
1578
@item -ip@var{n}
 
1579
@itemx --parameter-indentation@var{n}
 
1580
Indent parameter types in old-style function 
 
1581
definitions by @var{n} spaces.@*
 
1582
@xref{Indentation}.
 
1583
 
 
1584
@item -kr
 
1585
@itemx --k-and-r-style
 
1586
Use Kernighan & Ritchie coding style.@*
 
1587
@xref{Common styles}.
 
1588
 
 
1589
@item -l@var{n}
 
1590
@itemx --line-length@var{n}
 
1591
Set maximum line length for non-comment lines to @var{n}.@*
 
1592
@xref{Breaking long lines}.
 
1593
 
 
1594
@item -lc@var{n}
 
1595
@itemx --comment-line-length@var{n}
 
1596
Set maximum line length for comment formatting to @var{n}.@*
 
1597
@xref{Comments}.
 
1598
 
 
1599
@item -lp
 
1600
@itemx --continue-at-parentheses
 
1601
Line up continued lines at parentheses.@*
 
1602
@xref{Indentation}.
 
1603
 
 
1604
@item -lps
 
1605
@itemx --leave-preprocessor-space
 
1606
Leave space between @samp{#} and preprocessor directive.@*
 
1607
@xref{Indentation}.
 
1608
 
 
1609
@item -nbad
 
1610
@itemx --no-blank-lines-after-declarations
 
1611
Do not force blank lines after declarations.@*
 
1612
@xref{Blank lines}.
 
1613
 
 
1614
@item -nbap
 
1615
@itemx --no-blank-lines-after-procedures
 
1616
Do not force blank lines after procedure bodies.@*
 
1617
@xref{Blank lines}.
 
1618
 
 
1619
@ignore
 
1620
@comment Didn't do anything, so I removed it
 
1621
@item -nbbb
 
1622
@itemx --no-blank-lines-before-block-comments
 
1623
Do not force blank-lines before block comments.@*
 
1624
@xref{Blank lines}.
 
1625
@end ignore
 
1626
 
 
1627
@item -nbbo
 
1628
@itemx --break-after-boolean-operator
 
1629
Do not prefer to break long lines before boolean operators.@*
 
1630
@xref{Breaking long lines}.
 
1631
 
 
1632
@item -nbc
 
1633
@itemx --no-blank-lines-after-commas
 
1634
Do not force newlines after commas in declarations.@*
 
1635
@xref{Declarations}.
 
1636
 
 
1637
@item -nbfda
 
1638
@itemx --dont-break-function-decl-args
 
1639
Don't put each argument in a function declaration on a seperate line.@*
 
1640
@xref{Declarations}.
 
1641
 
 
1642
@item -ncdb
 
1643
@itemx --no-comment-delimiters-on-blank-lines
 
1644
Do not put comment delimiters on blank lines.@*
 
1645
@xref{Comments}.
 
1646
 
 
1647
@item -ncdw
 
1648
@itemx --dont-cuddle-do-while
 
1649
Do not cuddle @code{@}} and the @code{while} of a @code{do @{@} while;}.@*
 
1650
@xref{Statements}.
 
1651
 
 
1652
@item -nce
 
1653
@itemx --dont-cuddle-else
 
1654
Do not cuddle @code{@}} and @code{else}.@*
 
1655
@xref{Statements}.
 
1656
 
 
1657
@item -ncs
 
1658
@itemx --no-space-after-casts
 
1659
Do not put a space after cast operators.@*
 
1660
@xref{Statements}.
 
1661
 
 
1662
@item -nfc1
 
1663
@itemx --dont-format-first-column-comments
 
1664
Do not format comments in the first column as normal.@*
 
1665
@xref{Comments}.
 
1666
 
 
1667
@item -nfca
 
1668
@itemx --dont-format-comments
 
1669
Do not format any comments.@*
 
1670
@xref{Comments}.
 
1671
 
 
1672
@item -nhnl
 
1673
@itemx --ignore-newlines
 
1674
Do not prefer to break long lines at the position of newlines in the input.@*
 
1675
@xref{Breaking long lines}.
 
1676
 
 
1677
@item -nip
 
1678
@itemx --no-parameter-indentation
 
1679
Zero width indentation for parameters.@*
 
1680
@xref{Indentation}.
 
1681
 
 
1682
@item -nlp
 
1683
@itemx --dont-line-up-parentheses
 
1684
Do not line up parentheses.@*
 
1685
@xref{Statements}.
 
1686
 
 
1687
@item -npcs
 
1688
@itemx --no-space-after-function-call-names
 
1689
Do not put space after the function in function calls.@*
 
1690
@xref{Statements}.
 
1691
 
 
1692
@item -nprs
 
1693
@itemx --no-space-after-parentheses
 
1694
Do not put a space after every '(' and before every ')'.@*
 
1695
@xref{Statements}.
 
1696
 
 
1697
@item -npsl
 
1698
@itemx --dont-break-procedure-type
 
1699
Put the type of a procedure on the same line as its name.@*
 
1700
@xref{Declarations}.
 
1701
 
 
1702
@item -nsaf
 
1703
@itemx --no-space-after-for
 
1704
Do not put a space after every @code{for}.@*
 
1705
@xref{Statements}.
 
1706
 
 
1707
@item -nsai
 
1708
@itemx --no-space-after-if
 
1709
Do not put a space after every @code{if}.@*
 
1710
@xref{Statements}.
 
1711
 
 
1712
@item -nsaw
 
1713
@itemx --no-space-after-while
 
1714
Do not put a space after every @code{while}.@*
 
1715
@xref{Statements}.
 
1716
 
 
1717
@item -nsc
 
1718
@itemx --dont-star-comments
 
1719
Do not put the @samp{*} character at the left of comments.@*
 
1720
@xref{Comments}.
 
1721
 
 
1722
@item -nsob
 
1723
@itemx --leave-optional-blank-lines
 
1724
Do not swallow optional blank lines.@*
 
1725
@xref{Blank lines}.
 
1726
 
 
1727
@item -nss  
 
1728
@itemx --dont-space-special-semicolon
 
1729
Do not force a space before the semicolon after certain statements.
 
1730
Disables @option{-ss}.@*
 
1731
@xref{Statements}.
 
1732
 
 
1733
@item -nut
 
1734
@itemx --no-tabs
 
1735
Use spaces instead of tabs.@*
 
1736
@xref{Indentation}.
 
1737
 
 
1738
@item -nv
 
1739
@itemx --no-verbosity
 
1740
Disable verbose mode.@*
 
1741
@xref{Miscellaneous options}.
 
1742
 
 
1743
@item -orig
 
1744
@itemx --original
 
1745
Use the original Berkeley coding style.@*
 
1746
@xref{Common styles}.
 
1747
 
 
1748
@item -npro
 
1749
@itemx --ignore-profile
 
1750
Do not read @file{.indent.pro} files.@*
 
1751
@xref{Invoking indent}.
 
1752
 
 
1753
@item -pcs  
 
1754
@itemx --space-after-procedure-calls
 
1755
Insert a space between the name of the 
 
1756
procedure being called and the @samp{(}.@*
 
1757
@xref{Statements}.
 
1758
 
 
1759
@item -pi@var{n}
 
1760
@itemx --paren-indentation@var{n}
 
1761
Specify the extra indentation per open parentheses '(' when a
 
1762
statement is broken.
 
1763
@xref{Statements}.
 
1764
 
 
1765
@item -pmt
 
1766
@itemx --preserve-mtime
 
1767
Preserve access and modification times on output files.
 
1768
@xref{Miscellaneous options}.
 
1769
 
 
1770
@item -prs
 
1771
@itemx --space-after-parentheses
 
1772
Put a space after every '(' and before every ')'.@*
 
1773
@xref{Statements}.
 
1774
 
 
1775
@item -psl
 
1776
@itemx --procnames-start-lines
 
1777
Put the type of a procedure on the line before its name.@*
 
1778
@xref{Declarations}.
 
1779
 
 
1780
@item -saf
 
1781
@itemx --space-after-for
 
1782
Put a space after each @code{for}.@*
 
1783
@xref{Statements}.
 
1784
 
 
1785
@item -sai
 
1786
@itemx --space-after-if
 
1787
Put a space after each @code{if}.@*
 
1788
@xref{Statements}.
 
1789
 
 
1790
@item -saw
 
1791
@itemx --space-after-while
 
1792
Put a space after each @code{while}.@*
 
1793
@xref{Statements}.
 
1794
 
 
1795
@item -sbi@var{n}
 
1796
@itemx --struct-brace-indentation@var{n}
 
1797
Indent braces of a struct, union or enum N spaces.@*
 
1798
@xref{Statements}.
 
1799
 
 
1800
@item -sc
 
1801
@itemx --start-left-side-of-comments
 
1802
Put the @samp{*} character at the left of comments.@*
 
1803
@xref{Comments}.
 
1804
 
 
1805
@item -sob
 
1806
@itemx --swallow-optional-blank-lines
 
1807
Swallow optional blank lines.@*
 
1808
@xref{Blank lines}.
 
1809
 
 
1810
@item -ss
 
1811
@itemx --space-special-semicolon
 
1812
On one-line @code{for} and @code{while} statments, 
 
1813
force a blank before the semicolon.@*
 
1814
@xref{Statements}.
 
1815
 
 
1816
@item -st
 
1817
@itemx --standard-output
 
1818
Write to standard output.@*
 
1819
@xref{Invoking indent}.
 
1820
 
 
1821
@item -T   
 
1822
Tell @command{indent} the name of typenames.@*
 
1823
@xref{Declarations}.
 
1824
 
 
1825
@item -ts@var{n}
 
1826
@itemx --tab-size@var{n}
 
1827
Set tab size to @var{n} spaces.@*
 
1828
@xref{Indentation}.
 
1829
 
 
1830
@item -ut
 
1831
@itemx --use-tabs
 
1832
Use tabs. This is the default.@*
 
1833
@xref{Indentation}.
 
1834
 
 
1835
@item -v
 
1836
@itemx --verbose
 
1837
Enable verbose mode.@*
 
1838
@xref{Miscellaneous options}.
 
1839
 
 
1840
@item -version
 
1841
Output the version number of @command{indent}.@*
 
1842
@xref{Miscellaneous options}.
 
1843
@end table
 
1844
@c !END OPTIONS
 
1845
 
 
1846
@c !BEGIN CROSSREF
 
1847
@subheading Options' Cross Key
 
1848
 
 
1849
Here is a list of options alphabetized by long option, to help you find
 
1850
the corresponding short option.
 
1851
 
 
1852
@iftex
 
1853
@sp 2
 
1854
@end iftex
 
1855
@tex
 
1856
\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill}
 
1857
 
 
1858
{\tt
 
1859
\line{ --blank-lines-after-commas \leaderfill         -bc\ \ }  
 
1860
\line{ --blank-lines-after-declarations \leaderfill   -bad\ } 
 
1861
\line{ --blank-lines-after-procedures \leaderfill     -bap\ }  
 
1862
\line{ --blank-lines-before-block-comments \leaderfill -bbb\ }
 
1863
\line{ --braces-after-if-line \leaderfill            -bl\ \ } 
 
1864
\line{ --brace-indent \leaderfill                -bli@var{n}}
 
1865
\line{ --braces-after-struct-decl-line \leaderfill    -bls\ \ }
 
1866
\line{ --break-after-boolean-operator \leaderfill     -nbbo\ \ }
 
1867
\line{ --break-before-boolean-operator \leaderfill    -bbo\ \ }
 
1868
\line{ --break-function-decl-args \leaderfill         -bfda} 
 
1869
\line{ --braces-on-if-line \leaderfill               -br\ \ }      
 
1870
\line{ --braces-on-struct-decl-line \leaderfill       -brs\ \ }
 
1871
\line{ --case-indentation \leaderfill            -cli@var{n}}
 
1872
\line{ --case-brace-indentation \leaderfill      -cbi@var{n}}
 
1873
\line{ --comment-delimiters-on-blank-lines \leaderfill -cdb\ }
 
1874
\line{ --comment-indentation \leaderfill       -c@var{n}\ \ } 
 
1875
\line{ --continuation-indentation       \leaderfill -ci@var{n}\ } 
 
1876
\line{ --continue-at-parentheses  \leaderfill   -lp\ \ }            
 
1877
\line{ --cuddle-do-while \leaderfill                     -cdw\ \ }
 
1878
\line{ --cuddle-else \leaderfill                         -ce\ \ }
 
1879
\line{ --declaration-comment-column \leaderfill  -cd@var{n}\ } 
 
1880
\line{ --declaration-indentation \leaderfill     -di@var{n}\ } 
 
1881
\line{ --dont-break-function-decl-args \leaderfill       -nbfda} 
 
1882
\line{ --dont-break-procedure-type \leaderfill           -npsl} 
 
1883
\line{ --dont-cuddle-do-while \leaderfill                -ncdw\ \ }
 
1884
\line{ --dont-cuddle-else \leaderfill                    -nce\ }  
 
1885
\line{ --dont-format-comments \leaderfill                -nfca} 
 
1886
\line{ --dont-format-first-column-comments \leaderfill   -nfc1} 
 
1887
\line{ --dont-line-up-parentheses \leaderfill            -nlp\ }  
 
1888
\line{ --dont-space-special-semicolon \leaderfill        -nss\ }
 
1889
\line{ --dont-star-comments \leaderfill                  -nsc\ }  
 
1890
\line{ --else-endif-column \leaderfill             -cp@var{n}\ }
 
1891
\line{ --format-all-comments \leaderfill                 -fca\ }  
 
1892
\line{ --format-first-column-comments \leaderfill        -fc1\ }  
 
1893
\line{ --gnu-style \leaderfill                           -gnu\ }  
 
1894
\line{ --honour-newlines \leaderfill                     -hnl\ \ }
 
1895
\line{ --ignore-newlines \leaderfill                     -nhnl\ \ }
 
1896
\line{ --ignore-profile \leaderfill                      -npro} 
 
1897
\line{ --indent-level \leaderfill                  -i@var{n}\ \ }
 
1898
\line{ --k-and-r-style \leaderfill                       -kr\ \ }
 
1899
\line{ --leave-optional-blank-lines \leaderfill          -nsob}    
 
1900
\line{ --line-comments-indentation \leaderfill      -d@var{n}\ \ }
 
1901
\line{ --leave-preprocessor-space \leaderfill       -lps\ }
 
1902
\line{ --line-length \leaderfill                    -l@var{n}\ \ }
 
1903
\line{ --no-blank-lines-after-commas \leaderfill         -nbc\ }   
 
1904
\line{ --no-blank-lines-after-declarations \leaderfill   -nbad}  
 
1905
\line{ --no-blank-lines-after-procedures \leaderfill     -nbap}  
 
1906
\line{ --no-blank-lines-before-block-comments \leaderfill -nbbb}
 
1907
\line{ --no-comment-delimiters-on-blank-lines \leaderfill -ncdb}  
 
1908
\line{ --no-space-after-casts \leaderfill               -ncs\ }    
 
1909
\line{ --no-parameter-indentation \leaderfill               -nip\ }    
 
1910
\line{ --no-space-after-for \leaderfill             -nsaf}
 
1911
\line{ --no-space-after-function-call-names \leaderfill -npcs}   
 
1912
\line{ --no-space-after-if \leaderfill             -nsai}
 
1913
\line{ --no-space-after-parentheses \leaderfill          -nprs}
 
1914
\line{ --no-space-after-while \leaderfill             -nsaw}
 
1915
\line{ --no-tabs \leaderfill                            -nut\ \ } 
 
1916
\line{ --no-verbosity \leaderfill                       -nv\ \ }
 
1917
\line{ --original \leaderfill                      -orig}
 
1918
\line{ --parameter-indentation \leaderfill         -ip@var{n}\ } 
 
1919
\line{ --paren-indentation \leaderfill             -pi@var{n}\ }
 
1920
\line{ --preserve-mtime \leaderfill                -pmt\ }
 
1921
\line{ --procnames-start-lines \leaderfill         -psl\ }  
 
1922
\line{ --space-after-cast \leaderfill              -cs\ \ } 
 
1923
\line{ --space-after-for \leaderfill               -saf\ }
 
1924
\line{ --space-after-if \leaderfill                -sai\ }
 
1925
\line{ --space-after-parentheses \leaderfill       -prs\ }
 
1926
\line{ --space-after-procedure-calls \leaderfill   -pcs\ }  
 
1927
\line{ --space-after-while \leaderfill             -saw\ }
 
1928
\line{ --space-special-semicolon \leaderfill       -ss\ \ } 
 
1929
\line{ --standard-output \leaderfill      -st\ \ } 
 
1930
\line{ --start-left-side-of-comments \leaderfill   -sc\ \ }
 
1931
\line{ --struct-brace-indentation \leaderfill      -sbi@var{n}}
 
1932
\line{ --swallow-optional-blank-lines \leaderfill  -sob\ } 
 
1933
\line{ --tab-size \leaderfill          -ts@var{n}\ }  
 
1934
\line{ --use-tabs \leaderfill          -ut\ \ } 
 
1935
\line{ --verbose \leaderfill       -v\ \ \ }  
 
1936
}
 
1937
@end tex
 
1938
 
 
1939
@ifinfo
 
1940
@example
 
1941
--blank-lines-after-commas                      -bc             
 
1942
--blank-lines-after-declarations                -bad            
 
1943
--blank-lines-after-procedures                  -bap            
 
1944
--blank-lines-before-block-comments             -bbb            
 
1945
--braces-after-if-line                          -bl             
 
1946
--brace-indent                                  -bli
 
1947
--braces-after-struct-decl-line                 -bls
 
1948
--braces-on-if-line                             -br             
 
1949
--braces-on-struct-decl-line                    -brs
 
1950
--break-after-boolean-operator                  -nbbo
 
1951
--break-before-boolean-operator                 -bbo
 
1952
--break-function-decl-args                      -bfda
 
1953
--case-indentation                              -cli@var{n}     
 
1954
--case-brace-indentation                        -cbi@var{n}
 
1955
--comment-delimiters-on-blank-lines             -cdb            
 
1956
--comment-indentation                           -c@var{n}       
 
1957
--continuation-indentation                      -ci@var{n}      
 
1958
--continue-at-parentheses                       -lp             
 
1959
--cuddle-do-while                               -cdw
 
1960
--cuddle-else                                   -ce             
 
1961
--declaration-comment-column                    -cd@var{n}      
 
1962
--declaration-indentation                       -di@var{n}      
 
1963
--dont-break-function-decl-args                 -nbfda
 
1964
--dont-break-procedure-type                     -npsl           
 
1965
--dont-cuddle-do-while                          -ncdw
 
1966
--dont-cuddle-else                              -nce            
 
1967
--dont-format-comments                          -nfca           
 
1968
--dont-format-first-column-comments             -nfc1           
 
1969
--dont-line-up-parentheses                      -nlp            
 
1970
--dont-space-special-semicolon                  -nss
 
1971
--dont-star-comments                            -nsc            
 
1972
--else-endif-column                             -cp@var{n}
 
1973
--format-all-comments                           -fca            
 
1974
--format-first-column-comments                  -fc1            
 
1975
--gnu-style                                     -gnu            
 
1976
--honour-newlines                               -hnl
 
1977
--ignore-newlines                               -nhnl
 
1978
--ignore-profile                                -npro           
 
1979
--indent-level                                  -i@var{n}       
 
1980
--k-and-r-style                                 -kr             
 
1981
--leave-optional-blank-lines                    -nsob           
 
1982
--leave-preprocessor-space                      -lps
 
1983
--line-comments-indentation                     -d@var{n}       
 
1984
--line-length                                   -l@var{n}       
 
1985
--no-blank-lines-after-commas                   -nbc            
 
1986
--no-blank-lines-after-declarations             -nbad           
 
1987
--no-blank-lines-after-procedures               -nbap           
 
1988
--no-blank-lines-before-block-comments          -nbbb           
 
1989
--no-comment-delimiters-on-blank-lines          -ncdb           
 
1990
--no-space-after-casts                          -ncs            
 
1991
--no-parameter-indentation                      -nip            
 
1992
--no-space-after-for                            -nsaf
 
1993
--no-space-after-function-call-names            -npcs           
 
1994
--no-space-after-if                             -nsai
 
1995
--no-space-after-parentheses                    -nprs
 
1996
--no-space-after-while                          -nsaw
 
1997
--no-tabs                                       -nut
 
1998
--no-verbosity                                  -nv             
 
1999
--original                                      -orig
 
2000
--parameter-indentation                         -ip@var{n}      
 
2001
--paren-indentation                             -pi@var{n}
 
2002
--preserve-mtime                                -pmt
 
2003
--procnames-start-lines                         -psl            
 
2004
--space-after-cast                              -cs             
 
2005
--space-after-for                               -saf
 
2006
--space-after-if                                -sai
 
2007
--space-after-parentheses                       -prs
 
2008
--space-after-procedure-calls                   -pcs            
 
2009
--space-after-while                             -saw
 
2010
--space-special-semicolon                       -ss             
 
2011
--standard-output                               -st             
 
2012
--start-left-side-of-comments                   -sc             
 
2013
--struct-brace-indentation                      -sbi@var{n}
 
2014
--swallow-optional-blank-lines                  -sob            
 
2015
--tab-size                                      -ts@var{n}      
 
2016
--use-tabs                                      -ut
 
2017
--verbose                                       -v              
 
2018
@end example
 
2019
@end ifinfo
 
2020
@c !END CROSSREF
 
2021
 
 
2022
@node Index,  , Option Summary, Top
 
2023
@unnumbered Index
 
2024
 
 
2025
@printindex ky
 
2026
 
 
2027
@page
 
2028
@contents
 
2029
@bye