/plugins/AStylePlugin/tags/astyle_0_8_1/doc/astyle/astyle.html

# · HTML · 1479 lines · 1428 code · 51 blank · 0 comment · 0 complexity · 79abb14d82bb99b223677621a73c00fe MD5 · raw file

Large files are truncated click here to view the full file

  1. <html>
  2. <head>
  3. <TITLE>Artistic Style</TITLE>
  4. <meta http-equiv="Content-Type"
  5. content="text/html; charset=iso-8859-1">
  6. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  7. </head>
  8. <body bgcolor="#ffffff">
  9. <h1 align="center"><font color="#0000a0" size="7"><i>Artistic Style
  10. 1.14.1<BR>
  11. </i></font></h1>
  12. <h3 align="center"><font size="5">A </font><A href="license.html"><font
  13. size="5">Free</font></A><font size="5"> , Fast and Small
  14. Automatic Formatter<br>
  15. for </font><font color="#0000a0" size="5">C</font><font
  16. color="#000000" size="5"> ,</font><font color="#0000a0" size="5">
  17. C++ </font><font color="#000000" size="5">,</font><font
  18. color="#0000a0" size="5"> Java</font><font size="5"> Source Codes</font></h3>
  19. <h3 align="center"><font size="3">by </font><a
  20. href="http://www.bigfoot.com/~davidsont"><font size="3">Tal
  21. Davidson</font></a><font size="3">, Israel (E-mail: </font><A
  22. href="mailto:davidsont@bigfoot.com" ><font size="3">davidsont@bigfoot.com</font></A><font
  23. size="3">)</font></h3>
  24. <blockquote>
  25. <h3 align="center"><font size="3">
  26. <table height=108 cellspacing=1 cellpadding=1 width=473 border=0>
  27. <tr>
  28. <td><strong>Main home Page</strong></td>
  29. <td><a
  30. href="http://astyle.sourceforge.net">http://astyle.sourceforge.net</a></td></tr>
  31. <tr>
  32. <td><strong>Project Page</strong></td>
  33. <td><a
  34. href="http://www.sourceforge.net/projects/astyle">http://www.sourceforge.net/projects/astyle</a></td></tr></table> </font><font
  35. size="3"></font></h3>
  36. <p>&nbsp;</p>
  37. </blockquote>
  38. <p><font color="#000000" size="3">Artistic Style is a <b>reindenter
  39. and reformatter</b> of <b>C++, C and Java </b>source code.</font>
  40. </p>
  41. <p><font color="#000000" size="3">When indenting source code, we
  42. as programmers have a tendency to use both <b>spaces</b> and <b>tab</b>
  43. characters to create the wanted indentation. Moreover, some
  44. editors by default insert spaces instead of tabs when pressing
  45. the tab key, and other editors (Emacs for example) have the
  46. ability to "pretty up" lines by automatically setting
  47. up the white space before the code on the line, possibly
  48. inserting spaces in a code that up to now used only tabs for
  49. indentation</font><font size="4">.</font> </p>
  50. <p><font size="3">Since the <b>NUMBER</b> of space characters
  51. showed on screen for each tab character in the source code
  52. changes between editors (until the user sets up the number to his
  53. liking...), </font><font color="#000000" size="3"><b>one of the
  54. standard problems facing programmers when moving from one source
  55. code editor to another</b> is that code containing both spaces
  56. and tabs that was up to now perfectly indented, suddently becomes
  57. a mess to look at when changing to another editor. Even if you as
  58. a programmer take care to ONLY use spaces or tabs, looking at
  59. other peoples source code can still be problematic.</font> </p>
  60. <p align="left"><font color="#000000" size="3">To address this
  61. problem I have created Artistic Style - a series of filters,
  62. written in <b>C++</b>, that automatically reindent &amp; reformat
  63. C/C++/Java source files. These can be used from a <b>command line</b>,
  64. or it can be <b>incorporated as classes in another C++ program</b>.</font>&nbsp;
  65. <br>
  66. &nbsp; </p>
  67. <h3>Read <A href="astyle_release_notes.html">Release Notes</A><BR></h3>
  68. <p> </p>
  69. <h3>Read <A href="license.html">License</A></h3>
  70. <blockquote>
  71. <p>Artistic Style may be used and&nbsp; distributed under
  72. EITHER the <font size="4"><b>Artistic License</b></font> or
  73. the <font size="4"><b>GNU General Public License (GPL)</b></font>.
  74. <BR></p></blockquote>
  75. <h3><font size=4>New versions, Comments, Questions, Bugs and Ideas for
  76. Improvement:</font></h3>
  77. <UL dir=ltr style="MARGIN-RIGHT: 0px">
  78. <LI dir=ltr>
  79. <DIV><FONT size=3><STRONG>Visit Astyle's project page at </STRONG></FONT><a
  80. href="http://www.sourceforge.net/projects/astyle"><FONT
  81. size=3><STRONG>http://www.sourceforge.net/projects/astyle</STRONG></FONT></a><FONT
  82. size=3><STRONG>&nbsp;for:</STRONG></FONT></DIV>
  83. <UL>
  84. <LI>Astyle sources and binaries
  85. <LI><font >Mailing lists</font>
  86. <LI>
  87. <DIV><font >Bug tracking
  88. facilities<BR> </font></DIV></LI></UL>
  89. <LI><font size=3><STRONG>Author's e-mail: Reach me
  90. directly at </STRONG> </font><A
  91. href="mailto:davidsont@bigfoot.com"><font
  92. size=3><STRONG>davidsont@bigfoot.com</STRONG></font></A>&nbsp;<br></LI></UL>
  93. <h3><font color="#000000" size="4">To use from the command line:</font></h3>
  94. <blockquote>
  95. <p><font color="#000000" size="3">1) Unzip astyle.zip and
  96. compile 'astyle' (read README.txt for instructions).</font> </p>
  97. <p><font color="#000000" size="3">2) Either place the
  98. resulting executable file's directory in your PATH
  99. system-variable, or move the executable to a directory that
  100. appears in your PATH system-variable.</font> </p>
  101. <p><font color="#000000" size="3">3) Run it with the
  102. following syntax:</font> </p>
  103. <blockquote>
  104. <p><font color="#800080" size="3" face="Times New Roman"><b><tt>astyle
  105. </tt></b></font><font color="#000080" size="3"
  106. face="Times New Roman"><b><tt>[options] </tt></b></font><font
  107. color="#ff0000" size="5" face="Times New Roman"><b><tt>&lt;</tt></b></font><font
  108. color="#800080" size="3" face="Times New Roman"><b><tt>
  109. OriginalSourceFile </tt></b></font><font color="#ff0000"
  110. size="5" face="Times New Roman"><b><tt>&gt;</tt></b></font><font
  111. color="#800080" size="3" face="Times New Roman"><b><tt>
  112. BeautifiedSourceFile</tt></b></font> </p>
  113. <blockquote>
  114. <p><font size="4"><b>OR</b></font></p>
  115. </blockquote>
  116. <p><font color="#800080" size="3" face="Times New Roman"><b><tt>astyle
  117. </tt></b></font><font color="#000080" size="3"
  118. face="Times New Roman"><b><tt>[options] </tt></b></font><font
  119. color="#800080" size="3" face="Times New Roman"><b><tt>Foo.java
  120. Bar.javaAnotherBar.java</tt></b></font><font
  121. color="#000080" size="3" face="Times New Roman"><b><tt> [
  122. . . . ]</tt></b></font> </p>
  123. <p><font color="#000000" size="3">The </font><font
  124. color="#ff0000" size="5"><b>&lt;</b></font><font
  125. color="#000000" size="3"> and</font><font color="#ff0000"
  126. size="5"><b> &gt;</b></font><font color="#000000"
  127. size="3"> characters are used to redirect the files into
  128. standard input and out of standard output - don't forget
  129. them!!!</font> <br>
  130. &nbsp; </p>
  131. <p><font color="#330000" size="3">The newly indented file
  132. </font><font color="#ff0000" size="3"><strong>RETAINS the
  133. original file name</strong></font><font color="#330000"
  134. size="3">, while a copy of the original file is created
  135. with a "</font><font color="#ff0000" size="3"><strong>.orig</strong></font><font
  136. color="#330000" size="3">" appended to the original
  137. file name.</font><font size="2"> </font><font
  138. color="#330000" size="3">Thus, after indenting </font><font
  139. color="#800080" size="3"><strong>Foo.java</strong></font><font
  140. color="#330000" size="3"> as above, the indented result
  141. will be named </font><font color="#993399" size="3"><strong>Foo.java</strong></font><font
  142. color="#330000" size="3">, while the original
  143. pre-indented file will be renamed to </font><font
  144. color="#993399" size="3"><strong>Foo.java.orig</strong> </font><font
  145. color="#330000" size="3">.</font></p>
  146. </blockquote>
  147. </blockquote>
  148. <h3><font color="#000000" size="4">Options:</font></h3>
  149. <blockquote>
  150. <p><font size="3">Not specifying any option will bring to
  151. C/C++ style indentation, with a default of 4 spaces per
  152. indent, and NO formatting.</font><font size="2"> </font></p>
  153. <p><font color="#000000" size="4"><strong>Options may be
  154. written in two different ways:</strong></font></p>
  155. <ol>
  156. <li><strong>Long options:</strong><p>These options start
  157. with '<font color="#ff0000"><strong>--</strong></font>',
  158. and <font color="#ff0000"><strong>must be written one
  159. at a time</strong></font><br>
  160. (e.g. <font color="#000080" size="3"
  161. face="Times New Roman"><strong>--brackets=attach</strong></font><font
  162. size="2"><b>&nbsp;</b></font><font color="#000080"
  163. size="3" face="Times New Roman"><strong>--pad</strong></font><font
  164. size="2"><b>&nbsp;</b></font><font color="#000080"
  165. size="3" face="Times New Roman"><strong>--indent=spaces=4</strong></font>
  166. ).</p>
  167. <li><strong>Short Options:</strong><p>These options start
  168. with a single '<font color="#ff0000"><strong>-</strong></font>',
  169. and <font color="#ff0000" size="3"><strong>may be
  170. appended together</strong></font><font size="4">.</font><br>
  171. Thus, writing <font color="#000080" size="3"
  172. face="Times New Roman"><strong>-bps4</strong></font>
  173. is the same as writing <font color="#000080" size="4"
  174. face="Times New Roman"><strong>-</strong></font><font
  175. color="#000080" size="3" face="Times New Roman"><strong>b</strong></font><font
  176. size="2"><b>&nbsp;-</b></font><font color="#000080"
  177. size="3" face="Times New Roman"><strong>p</strong></font><font
  178. size="2"><b>&nbsp;-</b></font><font color="#000080"
  179. size="3" face="Times New Roman"><strong>s4</strong></font><font
  180. color="#000080"><strong> </strong></font><font
  181. color="#400040" size="2" face="Courier New">.<br>
  182. </font></p>
  183. </li>
  184. </ol>
  185. <p><font color="#000000" size="4"><strong>A </strong></font><font
  186. color="#ff0000" size="4"><strong>default options file</strong></font><font
  187. color="#000000" size="4"><strong> may be used to define
  188. default options:</strong></font></p>
  189. <ul>
  190. <li><font color="#000000" size="3">Artistic Style looks
  191. for the default options file in the following order: <br>
  192. 1. The value of the the system variable </font><font
  193. color="#000080" size="3"><strong>ARTISTIC_STYLE_OPTIONS</strong></font><font
  194. color="#000000" size="3"> if one exists.<br>
  195. 2. The file named <strong>.astylerc</strong> in the
  196. directory pointed to by the </font><font
  197. color="#000080" size="3"><strong>HOME</strong></font><font
  198. color="#000000" size="3"> system variable (i.e. </font><font
  199. color="#000080" size="3"><strong>$PATH</strong></font><font
  200. color="#000000" size="3"><strong>/.astylerc</strong>)<br>
  201. 3. The file named <strong>.astylerc</strong> in the
  202. directory pointed to by the </font><font
  203. color="#000080" size="3"><strong>HOMEPATH</strong></font><font
  204. color="#000000" size="3"> system variable (i.e. </font><font
  205. color="#000080" size="3"><strong>%HOMEPATH%</strong></font><font
  206. color="#000000" size="3"><strong>\.astylerc</strong>)</font></li>
  207. </ul>
  208. <ul>
  209. <li><font color="#000000" size="3">Options may be set
  210. apart by new-lines, tabs or spaces.</font>
  211. <li><font color="#000000" size="3">Long options <strong>may
  212. be written in the options file without the preceding
  213. '--'</strong>.</font>
  214. <li><font color="#000000" size="3">Lines within the
  215. options file that begin with '</font><font
  216. color="#ff0000" size="3"><strong>#</strong></font><font
  217. color="#000000" size="3">' are considered <strong>line-comments</strong>.<br>
  218. </font>
  219. <li><font color="#000000" size="3">Example contents of a
  220. default options file:</font><blockquote>
  221. <p><font color="#ff0000" size="3"
  222. face="Times New Roman"><tt># default parsing is
  223. of java files</tt></font><font color="#800080"
  224. size="3" face="Times New Roman"><tt><br>
  225. mode=java<br>
  226. </tt></font><font color="#ff0000" size="3"
  227. face="Times New Roman"><tt># brackets should be
  228. attached to pre-bracket lines</tt></font><font
  229. color="#800080" size="3" face="Times New Roman"><tt><br>
  230. brackets=attach<br>
  231. </tt></font><font color="#ff0000" size="3"
  232. face="Times New Roman"><tt># set 6 spaces per
  233. indent</tt></font><font color="#800080" size="3"
  234. face="Times New&#13;&#10;
  235. Roman">&lt;tt&gt;&lt;br&gt;indent=spaces=6<br></TT></font><font color="#ff0000" size="3"
  236. face="Times New Roman"><tt># indent switch blocks</tt></font><font
  237. color="#800080" size="3" face="Times New Roman"><tt><br>
  238. indent-switches</tt></font><font color="#000000"
  239. size="3"><br>
  240. </font><font color="#ff0000" size="3"
  241. face="Times New Roman"><tt># suffix of original
  242. files should be .pre</tt></font><font
  243. color="#000000" size="3" face="Times New Roman"><tt><br>
  244. </tt></font><font color="#800080" size="3"
  245. face="Times New Roman"><tt>suffix=.pre<br>
  246. </tt></font></p>
  247. </blockquote>
  248. </li>
  249. </ul>
  250. <p><font color="#000000" size="4">The following </font><font
  251. color="#000099" size="4"><b>predefined style</b></font><font
  252. color="#000000" size="4"><b> options</b> are currently
  253. avaiable:</font></p>
  254. <blockquote>
  255. <p><font color="#000080" size="3"><strong>--style=ansi</strong></font><font
  256. color="#000000" size="3"><br>
  257. </font>ANSI style formatting/indenting.</p>
  258. <blockquote>
  259. <p><font color="#800080" size="3"><b><tt>namespace
  260. foospace<br>
  261. </tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  262. color="#800080" size="3"><b><tt><br>
  263. &nbsp;&nbsp;&nbsp; int Foo()<br>
  264. &nbsp;&nbsp;&nbsp; </tt></b></font><font
  265. color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  266. color="#800080" size="3"><b><tt><br>
  267. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (isBar)<br>
  268. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  269. color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  270. color="#800080" size="3"><b><tt><br>
  271. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  272. &nbsp;&nbsp;&nbsp; bar();<br>
  273. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  274. &nbsp;&nbsp;&nbsp; return 1;<br>
  275. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  276. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  277. color="#800080" size="3"><b><tt><br>
  278. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br>
  279. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  280. &nbsp;&nbsp;&nbsp; return 0;<br>
  281. &nbsp;&nbsp;&nbsp; </tt></b></font><font
  282. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  283. color="#800080" size="3"><b><tt><br>
  284. </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
  285. </blockquote>
  286. <p><font color="#000080"><strong>--style=kr</strong></font><br>
  287. Kernighan&amp;Ritchie style formatting/indenting.</p>
  288. <blockquote>
  289. <p><font color="#800080" size="3"><b><tt>namespace
  290. foospace</tt></b></font><font color="#ff0000"
  291. size="3"><b><tt> {</tt></b></font><font
  292. color="#800080" size="3"><b><tt><br>
  293. &nbsp;&nbsp;&nbsp; int Foo()</tt></b></font><font
  294. color="#ff0000" size="3"><b><tt> {</tt></b></font><font
  295. color="#800080" size="3"><b><tt><br>
  296. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (isBar)</tt></b></font><font
  297. color="#ff0000" size="3"><b><tt> {</tt></b></font><font
  298. color="#800080" size="3"><b><tt><br>
  299. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  300. &nbsp;&nbsp;&nbsp; bar();<br>
  301. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  302. &nbsp;&nbsp;&nbsp; return 1;<br>
  303. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  304. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  305. color="#800080" size="3"><b><tt> else<br>
  306. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  307. &nbsp;&nbsp;&nbsp; return 0;<br>
  308. &nbsp;&nbsp;&nbsp; </tt></b></font><font
  309. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  310. color="#800080" size="3"><b><tt><br>
  311. </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
  312. </blockquote>
  313. <p><font color="#000080"><strong>--style=linux</strong></font><br>
  314. Linux style formatting/indenting (brackets are broken
  315. apart from class/function declarations, but connected to
  316. command lines, and indents are set to 8 spaces).</p>
  317. <blockquote>
  318. <p><font color="#800080" size="3"><b><tt>namespace
  319. foospace<br>
  320. </tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  321. color="#800080" size="3"><b><tt><br>
  322. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int Foo()<br>
  323. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  324. color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  325. color="#800080" size="3"><b><tt><br>
  326. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  327. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (isBar)</tt></b></font><font
  328. color="#ff0000" size="3"><b><tt> {</tt></b></font><font
  329. color="#800080" size="3"><b><tt><br>
  330. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  331. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  332. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; bar();<br>
  333. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  334. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  335. return 1;<br>
  336. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  337. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  338. color="#800080" size="3"><b><tt> else </tt></b></font><font
  339. color="#800080" size="3"><b><tt> <br>
  340. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  341. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  342. return 0;<br>
  343. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  344. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  345. color="#800080" size="3"><b><tt><br>
  346. </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
  347. </blockquote>
  348. <p><font color="#000080"><strong>--style=gnu</strong></font><br>
  349. GNU style formatting/indenting.</p>
  350. <blockquote>
  351. <p><font color="#800080" size="3"><b><tt>namespace
  352. foospace<br>
  353. &nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  354. color="#800080" size="3"><b><tt><br>
  355. &nbsp;&nbsp;&nbsp; int Foo()<br>
  356. &nbsp;&nbsp;&nbsp; &nbsp; </tt></b></font><font
  357. color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  358. color="#800080" size="3"><b><tt><br>
  359. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (isBar)<br>
  360. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; </tt></b></font><font
  361. color="#ff0000" size="3"><b><tt>{</tt></b></font><font
  362. color="#800080" size="3"><b><tt><br>
  363. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  364. &nbsp;&nbsp;&nbsp; bar();<br>
  365. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  366. &nbsp;&nbsp;&nbsp; return 1;<br>
  367. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; </tt></b></font><font
  368. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  369. color="#800080" size="3"><b><tt><br>
  370. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br>
  371. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  372. &nbsp;&nbsp;return 0;<br>
  373. &nbsp;&nbsp;&nbsp; &nbsp; </tt></b></font><font
  374. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  375. color="#800080" size="3"><b><tt><br>
  376. </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
  377. </blockquote>
  378. <p><font color="#000080"><strong>--style=java</strong></font><br>
  379. Java style formatting/indenting.</p>
  380. <blockquote>
  381. <p><font color="#800080" size="3"><b><tt>class
  382. foospace</tt></b></font><font color="#ff0000"
  383. size="3"><b><tt> {</tt></b></font><font
  384. color="#800080" size="3"><b><tt><br>
  385. &nbsp;&nbsp;&nbsp; int Foo()</tt></b></font><font
  386. color="#ff0000" size="3"><b><tt> {</tt></b></font><font
  387. color="#800080" size="3"><b><tt><br>
  388. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (isBar)</tt></b></font><font
  389. color="#ff0000" size="3"><b><tt> {</tt></b></font><font
  390. color="#800080" size="3"><b><tt><br>
  391. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  392. &nbsp;&nbsp;&nbsp; bar();<br>
  393. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  394. &nbsp;&nbsp;&nbsp; return 1;<br>
  395. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font
  396. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  397. color="#800080" size="3"><b><tt> else<br>
  398. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  399. &nbsp;&nbsp;&nbsp; return 0;<br>
  400. &nbsp;&nbsp;&nbsp; </tt></b></font><font
  401. color="#ff0000" size="3"><b><tt>}</tt></b></font><font
  402. color="#800080" size="3"><b><tt><br>
  403. </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
  404. </blockquote>
  405. </blockquote>
  406. <p><font color="#000000" size="4">The following </font><font
  407. color="#000099" size="4"><b>indentation</b></font><font
  408. color="#000000" size="4"><b> options</b> are currently
  409. available:</font></p>
  410. </blockquote>
  411. <blockquote>
  412. <blockquote>
  413. <p><font color="#000080" size="3"><b>-c</b></font><font
  414. color="#000080" size="4"><b> </b></font><font size="3">OR
  415. </font><font color="#000080" size="3"><strong>--mode=c</strong></font><font
  416. size="3"><br>
  417. Indent a C or C++ file.</font><font size="2"> </font></p>
  418. <p><font color="#000080" size="3"><b>-j</b></font><font
  419. size="3"> OR </font><font color="#000080" size="3"><strong>--mode=java</strong></font><font
  420. size="3"><br>
  421. Indent a Java file.</font><font size="2"> </font></p>
  422. <p><font color="#000080" size="4"><b>-s</b></font><font
  423. color="#ff0000" size="4"><b>#</b></font><font size=3
  424. > OR </font><font color=#000080 size=3
  425. ><strong
  426. >--indent=spaces=</strong></font><font color=#ff0000
  427. size=3><strong
  428. >#</strong></font><font size=3><br
  429. >Indent using </font><font color=#ff0000 size=3
  430. >#</font><font size=3> spaces per
  431. indent (e.g. </font><font size=4><b
  432. >-s</b></font><font color=#ff0000 size=3
  433. ><b>4</b></font><font size=3
  434. > OR <strong
  435. >--indent=spaces=</strong></font><font color=#ff0000
  436. size=3><strong
  437. >4</strong></font><font size=3
  438. >).</font> </p>
  439. <p><font color=#000080 size=4><strong>-t </strong><font color=#000000
  440. size=3>OR</font><strong> -t<font color=red>#</font></strong></font><font
  441. size=3> OR </font><font color=#000080 size=3><strong>--indent=tab=<font
  442. color=red>#</font></strong></font><font size=3><br>Indent using tab
  443. characters.</font> Treat each tab as <font color=red>#</font> spaces. If no
  444. '#' is set, treats tabs as 4 spaces.</p>
  445. <p><font color=#000080 size=4><strong>-T<font
  446. color=red>#</font></strong><font size=3><font color=#000000> OR </font><font
  447. color=#000080><strong>--force-indent=tab=<font
  448. color=red>#</font></strong></font><br><font color=#000000>Indent using tab
  449. characters.</font><font color=#000000> Treat each tab as </font><font
  450. color=red>#</font><font color=#000000> spaces. Uses tabs as indents in areas
  451. '--indent=tab' prefers to use spaces, such as inside multi-line
  452. statements.</font></font></font></p>
  453. <p><font color=#000080 size=4><strong>-C</strong></font><font size=3
  454. > OR</font><font color=#000080 size=4
  455. ><b> --</b></font><font
  456. color=#000080 size=3><b
  457. >indent-classes</b></font><font size=2
  458. ><br></font><font size=3
  459. >Indent 'class' blocks so that the headers 'public:',
  460. 'protected:' and 'private:' are indented in the class block.</font></p>
  461. <blockquote>
  462. <p><font color=#330000 size=3
  463. >The default:</font></p></blockquote>
  464. <blockquote>
  465. <p><font color=#800080 size=3><b
  466. ><tt>class Foo<br
  467. ></tt></b></font><font color=#ff0000 size=3
  468. ><b><tt
  469. >{</tt></b></font><font color=#800080 size=3
  470. ><b><tt><br
  471. >public:<br>&nbsp;&nbsp;&nbsp;
  472. Foo();<br>&nbsp;&nbsp;&nbsp; virtual ~Foo();<br
  473. ></tt></b></font><font color=#ff0000 size=3
  474. ><b><tt
  475. >}</tt></b></font><font color=#800080 size=3
  476. ><b><tt
  477. >;</tt></b></font></p>
  478. <p><font color=#330000 size=3
  479. >becomes:</font> </p>
  480. <p><font color=#800080 size=3><b
  481. ><tt>class Foo<br
  482. ></tt></b></font><font color=#ff0000 size=3
  483. ><b><tt
  484. >{</tt></b></font><font color=#800080 size=3
  485. ><b><tt><br
  486. >&nbsp;&nbsp;&nbsp; public:<br
  487. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Foo();<br
  488. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; virtual
  489. ~Foo();<br></tt></b></font><font color=#ff0000 size=3
  490. ><b><tt
  491. >}</tt></b></font><font color=#800080 size=3
  492. ><b><tt
  493. >;</tt></b></font></p></blockquote>
  494. <p><font color=#000080 size=4><b
  495. >-S</b></font><font size=3>
  496. OR</font><font color=#000080 size=4><b
  497. > --</b></font><font color=#000080 size=3
  498. ><b>indent-switches</b></font><font
  499. size=2><br></font><font size=3
  500. >Indent 'switch' blocks so that the 'case XXX:' headers
  501. are indented in the class block.</font></p>
  502. <blockquote>
  503. <p><font color=#330000 size=3
  504. >The default:</font></p></blockquote>
  505. <blockquote>
  506. <p><font color=#800080 size=3><b
  507. ><tt>switch (foo)<br
  508. ></tt></b></font><font color=#ff0000 size=3
  509. ><b><tt
  510. >{</tt></b></font><font color=#800080 size=3
  511. ><b><tt><br
  512. >case 1:<br>&nbsp;&nbsp;&nbsp; a +=
  513. 2;<br>&nbsp;&nbsp;&nbsp; break;<br
  514. ><br>default:<br
  515. >&nbsp;&nbsp;&nbsp; a += 2;<br
  516. >&nbsp;&nbsp;&nbsp; break;<br
  517. ></tt></b></font><font color=#ff0000 size=3
  518. ><b><tt
  519. >}</tt></b></font></p>
  520. <p><font color=#330000 size=3
  521. >becomes:</font> </p>
  522. <p><font color=#800080 size=3><b
  523. ><tt>switch (foo)<br
  524. ></tt></b></font><font color=#ff0000 size=3
  525. ><b><tt
  526. >{</tt></b></font><font color=#800080 size=3
  527. ><b><tt><br
  528. >&nbsp;&nbsp;&nbsp; case 1:<br
  529. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a += 2;<br
  530. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br
  531. ><br>&nbsp;&nbsp;&nbsp;
  532. default:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a
  533. += 2;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  534. break;<br></tt></b></font><font color=#ff0000 size=3
  535. ><b><tt
  536. >}</tt></b></font></p></blockquote>
  537. <p><font color=#000080 size=4><b
  538. >-K</b></font><font size=3>
  539. OR</font><font color=#000080 size=4><b
  540. > --</b></font><font color=#000080 size=3
  541. ><b>indent-cases</b></font><font
  542. size=2><br></font><font size=3
  543. >Indent 'case XXX:' lines so that they are flush with
  544. the comand lines under them.</font></p>
  545. <blockquote>
  546. <p><font color=#330000 size=3
  547. >The default:</font></p></blockquote>
  548. <blockquote>
  549. <p><font color=#800080 size=3><b
  550. ><tt>switch (foo)<br
  551. ></tt></b></font><font color=#ff0000 size=3
  552. ><b><tt
  553. >{</tt></b></font><font color=#800080 size=3
  554. ><b><tt><br
  555. >case 1:<br>&nbsp;&nbsp;&nbsp;
  556. </tt></b></font><font color=#ff0000 size=3><b
  557. ><tt>{<br
  558. ></tt></b></font><font color=#800080 size=3
  559. ><b><tt
  560. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a += 2;<br
  561. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br
  562. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  563. color=#ff0000 size=3><b><tt
  564. >}<br></tt></b></font><font
  565. color=#800080 size=3><b><tt
  566. ><br>default:<br
  567. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  568. color=#ff0000 size=3><b><tt
  569. >{<br></tt></b></font><font
  570. color=#800080 size=3><b><tt
  571. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a += 2;<br
  572. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br
  573. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  574. color=#ff0000 size=3><b><tt
  575. >}</tt></b></font><font color=#800080 size=3
  576. ><b><tt><br
  577. ></tt></b></font><font color=#ff0000 size=3
  578. ><b><tt
  579. >}</tt></b></font></p>
  580. <p><font color=#330000 size=3
  581. >becomes:</font> </p>
  582. <p><font color=#800080 size=3><b
  583. ><tt>switch (foo)<br
  584. ></tt></b></font><font color=#ff0000 size=3
  585. ><b><tt
  586. >{</tt></b></font><font color=#800080 size=3
  587. ><b><tt><br
  588. >&nbsp;&nbsp;&nbsp; case 1:<br
  589. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  590. color=#ff0000 size=3><b><tt
  591. >{<br></tt></b></font><font
  592. color=#800080 size=3><b><tt
  593. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a += 2;<br
  594. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br
  595. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  596. color=#ff0000 size=3><b><tt
  597. >}<br></tt></b></font><font
  598. color=#800080 size=3><b><tt
  599. ><br>&nbsp;&nbsp;&nbsp;
  600. default:<br>&nbsp;&nbsp;&nbsp; </tt></b></font><font
  601. color=#ff0000 size=3><b><tt
  602. >{<br></tt></b></font><font
  603. color=#800080 size=3><b><tt
  604. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a += 2;<br
  605. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br
  606. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  607. color=#ff0000 size=3><b><tt
  608. >}</tt></b></font><font color=#800080 size=3
  609. ><b><tt><br
  610. ></tt></b></font><font color=#ff0000 size=3
  611. ><b><tt
  612. >}</tt></b></font></p></blockquote>
  613. <p><font color=#000080 size=4><b
  614. >-B</b></font><font size=3>
  615. OR</font><font color=#000080 size=4><b
  616. > --</b></font><font color=#000080 size=3
  617. ><b>indent-brackets</b></font><font
  618. size=3><br>Add extra indentation
  619. to brackets.</font> </p>
  620. <blockquote>
  621. <p><font color=#330000 size=3
  622. >The default:</font></p>
  623. <p><font color=#993399 size=3><b
  624. ><tt>if (isFoo)</tt></b></font>
  625. <br><font color=#ff0000 size=3
  626. ><b><tt
  627. >{</tt></b></font> <br><font
  628. size=3><b><tt
  629. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  630. color=#993399 size=3><b><tt
  631. >bar();</tt></b></font> <br><font
  632. color=#ff0000 size=3><b><tt
  633. >}</tt></b></font> <br><font
  634. color=#993399 size=3><b><tt
  635. >else</tt></b></font> <br><font
  636. color=#ff0000 size=3><b><tt
  637. >{</tt></b></font> <br><font
  638. size=3><b><tt
  639. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  640. color=#993399 size=3><b><tt
  641. >anotherBar();</tt></b></font> <br
  642. ><font color=#ff0000 size=3><b
  643. ><tt>}</tt></b></font></p>
  644. <p><font color=#330000 size=3
  645. >becomes:</font> </p>
  646. <p><font color=#993399 size=3><b
  647. ><tt>if (isFoo)</tt></b></font>
  648. <br><font size=3><b
  649. ><tt>&nbsp;&nbsp;&nbsp;
  650. </tt></b></font><font color=#ff0000 size=3><b
  651. ><tt>{</tt></b></font> <br
  652. ><font size=3><b
  653. ><tt>&nbsp;&nbsp;&nbsp;
  654. </tt></b></font><font color=#993399 size=3><b
  655. ><tt>bar();</tt></b></font> <br
  656. ><font size=3><b
  657. ><tt>&nbsp;&nbsp;&nbsp;
  658. </tt></b></font><font color=#ff0000 size=3><b
  659. ><tt>}</tt></b></font> <br
  660. ><font color=#993399 size=3><b
  661. ><tt>else</tt></b></font> <br
  662. ><font size=3><b
  663. ><tt>&nbsp;&nbsp;&nbsp;
  664. </tt></b></font><font color=#ff0000 size=3><b
  665. ><tt>{</tt></b></font> <br
  666. ><font size=3><b
  667. ><tt>&nbsp;&nbsp;&nbsp;
  668. </tt></b></font><font color=#993399 size=3><b
  669. ><tt
  670. >anotherBar();</tt></b></font> <br
  671. ><font size=3><b
  672. ><tt>&nbsp;&nbsp;&nbsp;
  673. </tt></b></font><font color=#ff0000 size=3><b
  674. ><tt
  675. >}</tt></b></font></p></blockquote>
  676. <p><font color=#000080 size=4><b
  677. >-G</b></font><font size=3>
  678. OR</font><font color=#000080 size=4><b
  679. > --</b></font><font color=#000080 size=3
  680. ><b>indent-blocks</b></font><font
  681. size=3><br>Add extra indentation
  682. to entire blocks.</font> </p>
  683. <blockquote>
  684. <p><font color=#330000 size=3
  685. >The default:</font></p>
  686. <p><font color=#993399 size=3><b
  687. ><tt>if (isFoo)</tt></b></font>
  688. <br><font color=#ff0000 size=3
  689. ><b><tt
  690. >{</tt></b></font> <br><font
  691. size=3><b><tt
  692. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  693. color=#993399 size=3><b><tt
  694. >bar();</tt></b></font> <br><font
  695. color=#ff0000 size=3><b><tt
  696. >}</tt></b></font> <br><font
  697. color=#993399 size=3><b><tt
  698. >else</tt></b></font> <br><font
  699. size=3><b><tt
  700. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  701. color=#993399 size=3><b><tt
  702. >anotherBar();</tt></b></font> </p>
  703. <p>becomes:</p>
  704. <p><font color=#993399 size=3><b
  705. ><tt>if (isFoo)</tt></b></font>
  706. <br><font size=3><b
  707. ><tt>&nbsp;&nbsp;&nbsp;
  708. </tt></b></font><font color=#ff0000 size=3><b
  709. ><tt>{</tt></b></font> <br
  710. ><font size=3><b
  711. ><tt>&nbsp;&nbsp;&nbsp;
  712. &nbsp;&nbsp;&nbsp; </tt></b></font><font color=#993399 size=3
  713. ><b><tt
  714. >bar();</tt></b></font> <br><font
  715. size=3><b><tt
  716. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  717. color=#ff0000 size=3><b><tt
  718. >}</tt></b></font> <br><font
  719. color=#993399 size=3><b><tt
  720. >else</tt></b></font> <font face="Courier New" size=3
  721. ><b><tt><br
  722. ></tt></b></font><font size=3><b
  723. ><tt>&nbsp;&nbsp;&nbsp;
  724. </tt></b></font><font color=#993399 size=3><b
  725. ><tt
  726. >anotherBar();</tt></b></font> </p></blockquote>
  727. <p><font color=#000080 size=4><b
  728. >-N</b></font><font size=3>
  729. OR</font><font color=#000080 size=4><b
  730. > --</b></font><font color=#000080 size=3
  731. ><b
  732. >indent-namespaces</b></font><font size=2
  733. ><br></font><font size=3
  734. >Add extra indentation to namespaces.</font> </p>
  735. <blockquote>
  736. <p><font color=#330000 size=3
  737. >The default:</font></p></blockquote>
  738. <blockquote>
  739. <p><font color=#800080 size=3><b
  740. ><tt>namespace foospace<br
  741. ></tt></b></font><font color=#ff0000 size=3
  742. ><b><tt
  743. >{</tt></b></font><font color=#800080 size=3
  744. ><b><tt><br
  745. >class Foo<br
  746. ></tt></b></font><font color=#ff0000 size=3
  747. ><b><tt
  748. >{</tt></b></font><font color=#800080 size=3
  749. ><b><tt><br
  750. >&nbsp;&nbsp;&nbsp; public:<br
  751. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Foo();<br
  752. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; virtual
  753. ~Foo();<br></tt></b></font><font color=#ff0000 size=3
  754. ><b><tt
  755. >}</tt></b></font><font color=#800080 size=3
  756. ><b><tt>;<br
  757. ></tt></b></font><font color=#ff0000 size=3
  758. ><b><tt
  759. >}</tt></b></font></p>
  760. <p><font color=#330000 size=3
  761. >becomes:</font> </p>
  762. <p><font color=#800080 size=3><b
  763. ><tt>namespace foospace<br
  764. ></tt></b></font><font color=#ff0000 size=3
  765. ><b><tt
  766. >{</tt></b></font><font color=#800080 size=3
  767. ><b><tt><br
  768. >&nbsp;&nbsp;&nbsp; class Foo<br
  769. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  770. color=#ff0000 size=3><b><tt
  771. >{</tt></b></font><font color=#800080 size=3
  772. ><b><tt><br
  773. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public:<br
  774. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  775. &nbsp;&nbsp;&nbsp; Foo();<br>&nbsp;&nbsp;&nbsp;
  776. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; virtual ~Foo();<br
  777. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  778. color=#ff0000 size=3><b><tt
  779. >}</tt></b></font><font color=#800080 size=3
  780. ><b><tt>;<br
  781. ></tt></b></font><font color=#ff0000 size=3
  782. ><b><tt
  783. >}</tt></b></font></p></blockquote>
  784. <p>&nbsp;</p>
  785. <p><font color=#000080 size=4><b
  786. >-L</b></font><font size=3>
  787. OR</font><font color=#000080 size=4><b
  788. > --</b></font><font color=#000080 size=3
  789. ><b>indent-labels</b></font><font
  790. size=2><br></font><font size=3
  791. >Add extra indentation to labels so they they appear 1
  792. indent less than the current indentation, rather than being flushed to the
  793. left (the default).</font> </p>
  794. <blockquote>
  795. <p><font color=#330000 size=3
  796. >The default:</font></p></blockquote>
  797. <blockquote>
  798. <p><font color=#800080 size=3><b
  799. ><tt>int foospace()<br
  800. ></tt></b></font><font color=#ff0000 size=3
  801. ><b><tt
  802. >{</tt></b></font><font color=#800080 size=3
  803. ><b><tt><br
  804. >&nbsp;&nbsp;&nbsp; while (isFoo)<br
  805. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  806. color=#ff0000 size=3><b><tt
  807. >{<br></tt></b></font><font
  808. color=#800080 size=3><b><tt
  809. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  810. ...</tt></b></font><font color=#ff0000 size=3><b
  811. ><tt><br
  812. ></tt></b></font><font color=#800080 size=3
  813. ><b><tt
  814. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goto error;<br
  815. ><br>error:<br
  816. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br
  817. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  818. color=#ff0000 size=3><b><tt
  819. >}</tt></b></font><font color=#800080 size=3
  820. ><b><tt><br
  821. ></tt></b></font><font color=#ff0000 size=3
  822. ><b><tt
  823. >}</tt></b></font></p>
  824. <p><font color=#330000 size=3
  825. >becomes:</font> </p>
  826. <p><font color=#800080 size=3><b
  827. ><tt>int foospace()<br
  828. ></tt></b></font><font color=#ff0000 size=3
  829. ><b><tt
  830. >{</tt></b></font><font color=#800080 size=3
  831. ><b><tt><br
  832. >&nbsp;&nbsp;&nbsp; while (isFoo)<br
  833. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  834. color=#ff0000 size=3><b><tt
  835. >{<br></tt></b></font><font
  836. color=#800080 size=3><b><tt
  837. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  838. ...</tt></b></font><font color=#ff0000 size=3><b
  839. ><tt><br
  840. ></tt></b></font><font color=#800080 size=3
  841. ><b><tt
  842. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goto error;<br
  843. ><br>&nbsp;&nbsp;&nbsp; error:<br
  844. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br
  845. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  846. color=#ff0000 size=3><b><tt
  847. >}</tt></b></font><font color=#800080 size=3
  848. ><b><tt><br
  849. ></tt></b></font><font color=#ff0000 size=3
  850. ><b><tt
  851. >}</tt></b></font></p></blockquote>
  852. <p><font color=#000080 size=3><b
  853. >-M</b></font><font color=#ff0000 size=4
  854. ><b>#</b></font><font size=3
  855. > OR </font><font color=#000080 size=3
  856. ><b
  857. >--max-instatement-indent=</b></font><font color=#ff0000
  858. size=3><b>#</b></font><font
  859. color=#000080 size=4><b> <br
  860. ></b></font>Indent a maximal <font color=#ff0000
  861. >#</font> spaces in a continuous statement, relatively
  862. to the previous line (e.g. <strong
  863. >--max-instatement-indent=</strong><font color=#ff0000
  864. size=3><strong>40</strong></font>)
  865. </p>
  866. <p><font color=#000080 size=4><b
  867. >-m</b></font><font color=#ff0000 size=4
  868. ><b>#</b></font><font size=3
  869. > OR</font><b> <font color=#000080
  870. size=4>--</font><font color=#000080 size=3
  871. >min-conditional</font></b><font color=#000080 size=3
  872. ><b>-indent=</b></font><font
  873. color=#ff0000 size=3><b
  874. >#</b></font><font size=2><br
  875. ></font>Set the
  876. minimal indent that is added when a header is built of multiple-lines. This
  877. indent makes helps to easily separate the header from the command statements
  878. that follow. The default setting for this option is <font color=#ff0000
  879. >twice the current indent</font>. (e.g. <strong
  880. >--min-conditional-indent=<font color=#ff0000
  881. >8</font></strong>) </p>
  882. <blockquote>
  883. <p><font color=#330000 >The default:</font></p></blockquote>
  884. <blockquote>
  885. <p><font color=#800080 ><b
  886. ><tt>// default setting makes
  887. this non-bracketed code clear<br>if (a &lt; b<br
  888. >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; || c &gt;
  889. d)<br>&nbsp;&nbsp;&nbsp; foo++;<br
  890. ><br>// but creates an
  891. exaggerated indent in this bracketed code<br>if (a
  892. &lt; b<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  893. || c &gt; d)<br></tt></b></font><font color=#ff0000
  894. ><b><tt
  895. >{</tt></b></font><font color=#800080
  896. ><b><tt><br
  897. >&nbsp;&nbsp;&nbsp; foo++;<br
  898. ></tt></b></font><font color=#ff0000
  899. ><b><tt
  900. >}</tt></b></font></p>
  901. <p><font color=#330000 >When setting <b
  902. >--min-conditional=0</b> :</font></p>
  903. <p><font color=#800080 ><b
  904. ><tt>// setting makes this
  905. non-bracketed code less clear<br>if (a &lt; b<br
  906. >&nbsp;&nbsp;&nbsp; || c &gt; d)<br
  907. >&nbsp;&nbsp;&nbsp; foo++;<br><br
  908. >// but makes this bracketed code prettier<br
  909. >if (a &lt; b<br
  910. >&nbsp;&nbsp;&nbsp; || c &gt; d)<br
  911. ></tt></b></font><font color=#ff0000
  912. ><b><tt
  913. >{</tt></b></font><font color=#800080
  914. ><b><tt><br
  915. >&nbsp;&nbsp;&nbsp; foo++;<br
  916. ></tt></b></font><font color=#ff0000
  917. ><b><tt
  918. >}</tt></b></font></p></blockquote>
  919. <p><font > <FONT color=#000080><FONT
  920. size=4><STRONG><FONT size=3>--indent-preprocessor</FONT><BR></STRONG><FONT
  921. color=#000000 size=3>Indent&nbsp;multi-line preprocessor definitions. should
  922. be used with <STRONG>--convert-tabs</STRONG> for proper results. Does a
  923. pretty good job, but can not perform miracles in obfuscated preprocessor
  924. definitions.</FONT></FONT></FONT></font> </p>
  925. <p><STRONG><FONT
  926. color=#000080>--convert-tabs<BR></FONT></STRONG><FONT color=#000000
  927. size=3>Converts tabs into single spaces.</FONT> </p>
  928. <p><font color=#000080 size=4><STRONG>-E</STRONG></font><font size=3>
  929. OR</font><b> <font color=#000080 size=4
  930. >--</font><font color=#000080 size=3
  931. >fill-empty-lines</font></b><font size=2
  932. ><br></font><font size=3
  933. >Fill empty lines with the white space of their previous
  934. lines.</font> </p>
  935. </blockquote>
  936. <h3><font color=#000000 size=4>The
  937. following </font><font color=#000099 size=4
  938. >formatting</font><font color=#000000 size=4
  939. ><b> options</b> are currently
  940. available:</font></h3>
  941. <blockquote>
  942. <p><font color=#000080 size=3><b
  943. >-b</b></font><font size=3> OR
  944. </font><font color=#000080 size=3><strong
  945. >--brackets=break</strong></font><font size=3
  946. ><br>Break brackets&nbsp; from
  947. their pre-block statements ( i.e. ANSI C, C++ style ).</font> </p>
  948. <blockquote>
  949. <p><font color=#993399 size=3><b
  950. ><tt>if (isFoo)</tt></b></font>
  951. <br><font color=#ff0000 size=3
  952. ><b><tt
  953. >{</tt></b></font> <br><font
  954. size=3><b><tt
  955. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  956. color=#993399 size=3><b><tt
  957. >bar();</tt></b></font> <br><font
  958. color=#ff0000 size=3><b><tt
  959. >}</tt></b></font> <br><font
  960. color=#993399 size=3><b><tt
  961. >else</tt></b></font> <br><font
  962. color=#ff0000 size=3><b><tt
  963. >{</tt></b></font> <br><font
  964. size=3><b><tt
  965. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  966. color=#993399 size=3><b><tt
  967. >anotherBar();</tt></b></font> <br
  968. ><font color=#ff0000 size=3><b
  969. ><tt
  970. >}</tt></b></font></p></blockquote>
  971. <p><font color=#000080 size=3><b
  972. >-a</b></font><font size=3> OR
  973. </font><font color=#000080 size=3><strong
  974. >--brackets=attach</strong></font><font size=3
  975. ><br>Attach brackets to their
  976. pre-block statements ( i.e. Java , K&amp;R style ).</font> </p>
  977. <blockquote>
  978. <p><font color=#993399 size=3><b
  979. ><tt>if
  980. (isFoo)</tt></b></font><font color=#ff0000 size=3><b
  981. ><tt>{</tt></b></font> <br
  982. ><font size=3><b
  983. ><tt
  984. >&nbsp;&nbsp;</tt></b></font><font color=#993399
  985. size=3><b><tt
  986. >&nbsp; bar();</tt></b></font> <br
  987. ><font color=#ff0000 size=3><b
  988. ><tt>}</tt></b></font><font
  989. size=3><b><tt
  990. > </tt></b></font><font color=#993399 size=3
  991. ><b><tt>else
  992. </tt></b></font><font color=#ff0000 size=3><b
  993. ><tt>{</tt></b></font> <br
  994. ><font size=3><b
  995. ><tt
  996. >&nbsp;&nbsp;&nbsp;</tt></b></font><font color=#993399
  997. size=3><b><tt
  998. > anotherBar();</tt></b></font> <br
  999. ><font color=#ff0000 size=3><b
  1000. ><tt
  1001. >}</tt></b></font></p></blockquote>
  1002. <p><font color=#000080 size=3><b
  1003. >-l</b></font><font size=3> OR
  1004. </font><font color=#000080 size=3><strong
  1005. >--brackets=linux</strong></font><font size=3
  1006. ><br></font>Break brackets from
  1007. class/function declarations, but attach brackets to <font size=3
  1008. >pre-block </font>command statements.</p>
  1009. <blockquote>
  1010. <p><font color=#800080 size=3><b
  1011. ><tt>namespace foospace<br
  1012. ></tt></b></font><font color=#ff0000 size=3
  1013. ><b><tt
  1014. >{</tt></b></font><font color=#800080 size=3
  1015. ><b><tt><br
  1016. >&nbsp;&nbsp;&nbsp; int Foo()<br
  1017. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  1018. color=#ff0000 size=3><b><tt
  1019. >{</tt></b></font><font color=#800080 size=3
  1020. ><b><tt><br
  1021. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if
  1022. (isBar)</tt></b></font><font color=#ff0000 size=3><b
  1023. ><tt> {</tt></b></font><font
  1024. color=#800080 size=3><b><tt
  1025. ><br>&nbsp;&nbsp;&nbsp;
  1026. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; bar();<br
  1027. >&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  1028. &nbsp;&nbsp;&nbsp; return 1;<br>&nbsp;&nbsp;&nbsp;
  1029. &nbsp;&nbsp;&nbsp; </tt></b></font><font color=#ff0000 size=3
  1030. ><b><tt
  1031. >}</tt></b></font><font color=#800080 size=3
  1032. ><b><tt>
  1033. else<br>&nbsp;&nbsp;&nbsp;
  1034. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; return 0;<br
  1035. >&nbsp;&nbsp;&nbsp; </tt></b></font><font
  1036. color=#ff0000 size=3><b><tt
  1037. >}</tt></b></font><font color=#800080 size=3
  1038. ><b><tt><br
  1039. ></tt></b></font><font color=#ff0000 size=3
  1040. ><b><tt
  1041. >}</tt></b></font></p></blockquote><font color=#000080
  1042. size=3>
  1043. <P><FONT><FONT color=navy size=3
  1044. ><STRONG
  1045. >--brackets=break-closing-headers</STRONG></FONT></FONT><FONT
  1046. size=3><BR><FONT color=black
  1047. >When used with either <STRONG
  1048. >'--brackets=attach'</STRONG> or <STRONG>'--brackets=
  1049. linux'</STRONG> , breaks closing
  1050. headers (e.g. 'else', 'catch', ...) from their immediately preceding closing
  1051. brackets.).</FONT></FONT> </P>
  1052. <BLOCKQUOTE><FONT color=#993399 size=3
  1053. ><TT>
  1054. <P><FONT color=#993399
  1055. size=3><TT><STRONG>if (isFoo)<FONT color=#ff0000 size=3><TT
  1056. >{</TT></FONT></STRONG><STRONG><FONT color=#000080
  1057. ><FONT face="Times New Roman">
  1058. <BR></FONT><FONT size=3><TT
  1059. >&nbsp;&nbsp;</TT></FONT></FONT><FONT color=#993399
  1060. size=3><TT>&nbsp;
  1061. bar();</TT></FONT></STRONG><STRONG><FONT face="Times New Roman" color=#000080
  1062. > <BR></FONT><FONT color=#ff0000
  1063. size=3><TT
  1064. >}</TT></FONT><FONT color=#000080 size=3><TT
  1065. ></TT></FONT><FONT color=#993399 size=3
  1066. ><TT>else </TT></FONT><FONT
  1067. color=#ff0000 size=3><TT
  1068. >{</TT></FONT></STRONG><STRONG><FONT color=#000080
  1069. ><FONT face="Times New Roman">
  1070. <BR></FONT><FONT size=3><TT
  1071. >&nbsp;&nbsp;&nbsp;</TT></FONT></FONT><FONT
  1072. color=#993399 size=3><TT>
  1073. anotherBar();</TT></FONT></STRONG><STRONG><FONT face="Times New Roman" color=#000080
  1074. > <BR></FONT><FONT color=#ff0000
  1075. size=3><TT
  1076. >}</TT></FONT></STRONG></TT></FONT></P><FONT
  1077. color=#ff0000 size=3><TT>
  1078. <p><STRONG><font face="Times New Roman" color=#330000 size=3
  1079. >becomes:</font> </STRONG> </p>
  1080. <p></TT></FONT><STRONG>if (isFoo)
  1081. </STRONG></TT></FONT><STRONG><FONT
  1082. color=#ff0000 size=3><TT
  1083. >{</TT></FONT> <BR><FONT size=3
  1084. ><TT
  1085. >&nbsp;&nbsp;</TT></FONT><FONT color=#993399 size=3
  1086. ><TT>&nbsp; bar();</TT></FONT>
  1087. <BR><FONT color=#ff0000 size=3
  1088. ><TT
  1089. >}</TT></FONT></STRONG><STRONG><FONT size=3><TT
  1090. > <BR></TT></FONT><FONT
  1091. color=#993399 size=3><TT>else
  1092. </TT></FONT><FONT color=#ff0000 size=3><TT
  1093. >{</TT></FONT> <BR><FONT size=3
  1094. ><TT
  1095. >&nbsp;&nbsp;&nbsp;</TT></FONT><FONT color=#993399
  1096. size=3><TT>
  1097. anotherBar();</TT></FONT> <BR><FONT color=#ff0000
  1098. size=3><TT
  1099. >}</TT></FONT></STRONG></P></BLOCKQUOTE>
  1100. <P><FONT color=#ff0000 size=3><TT
  1101. ></TT></FONT>&nbsp;</P>
  1102. <P><FONT size=+0><FONT color=navy
  1103. size=3><STRONG>--break-blocks</STRONG></FONT></FONT><FONT size=3
  1104. ><BR><FONT color=#000000
  1105. ><STRONG>Pad empty lines around header block