Reprinted please indicate the source and the author contact: http://blog.csdn.net/mimepp
Contact information: Yu Tao <yut616 at Sohu dot com>
Linux Kernel has a script lindent to help youCodeMake a good code format.
Example:/usr/src/linux-headers-2.6.22-14/scripts/lindent
It uses the indent command to optimize the code.
Indent-NPRO-Kr-i8-TS8-sob-L80-SS-NCS
Parameter description:
-NPRO or -- ignore-profile do not read indent's configuration file. indent. Pro.
-Kr specifies the format of kernighan & Ritchie.
-I8 -- indent-level: set the number of cells to 8.
-TS8: Set the tab Length
-Sob or -- swallow-optional-blank-lines Delete unnecessary blank lines.
-Line feed of L80 Code exceeding 80
-SS or -- space-special-semicolon if the for section contains only one line, add a space before the semicolon.
-NCs or -- no-space-after-casts should not be empty after cast.