Linux indent command

Source: Internet
Author: User

Introduction:
The indent command can identify and format the original code file of C for programmers to read.

Syntax:

Indent [parameter] [source file] indent [parameter] [source file] [-O target file]

Options:
-Bad: Add blank lines to the declaration section.
-BAP: Add blank lines to the program.
-Bbb: Add blank lines after the comment section.
-BC: In the Declaration section, if there is a comma, It is a line break.
-Bl: If (or else, for, etc.) is different from the "{" and "}" in the subsequent execution section.
-Bli <Number of scaled-down cells>: sets the number of {} scaled-down cells.
-Br: If (or else, for, and so on) is different from the "{" and "}" in the subsequent execution of the limit segment.
-BS: an empty space after sizeof.
-C <Number of columns>: Place comments in the column specified on the right of the program code.
-CD <Number of columns>: Place comments in the column specified on the right of the Declaration.
-CDB: The comment symbol is a row.
-Ce: place the else after "}" (the end of the IF execution segment.
-Ci <Number of bins to be scaled down>: this parameter specifies the number of bins to be scaled down after a new line feed when a long row is changed.
-Cli <number of cells to be scaled down>: the number of cells to be scaled down by switch when case is used.
-CP <Number of columns>: Place comments in the column specified on the right of the else and elseif statements.
-Cs: an empty space after cast.
-D <Number of bins to be scaled down>: set the number of bins for comments not placed on the right of the program code.
-Di <Number of columns>: place the variables in the Declaration section in the specified column.
-FC1: set the format of the comment placed at the frontend of each line.
-FCA: set the format of all annotations.
-GNU: Specifies the GNU format, which is the default value.
-I <number of cells>: set the number of cells to be scaled down.
-IP <grid number>: set the number of slashes of the parameter.
-Kr: Specify the format of kernighan & Ritchie.
-LP: when the description is too long and contains a line break, the content of the starting column of each line in the arc is vertically arranged.
-Nbad: do not add blank lines after the claim section.
-NBAP: do not add blank lines after the program.
-Nbbb: do not add blank lines after the comment section.
-NBC: In the Declaration section, do not wrap the line even if there is a comma.
-Ncdb: The annotator must not be a single line.
-Nce: do not place else after.
-NCS: Do not leave a space after cast.
-Nfc1: Do not format comments placed at the frontend of each line.
-Nfca: Do not format any comments.
-NIP: Do not scale down the parameters.
-NLP: if the description is too long and contains a line feed, you do not have to vertically arrange the start column of each line in the ARC.
-NPCs: do not add spaces after the called function name.
-NPRO: Do not read the indent configuration file. indent. Pro.
-Npsl: The program type and program name are placed in the same line.
-NSC: do not add an asterisk (*) to the left of the annotation (*).
-Nsob: no extra blank rows need to be processed.
-NSS: If the for or while section contains only one row, no space is added before the semicolon.
-NV: detailed information is not displayed.
-Orig: uses the Berkeley format.
-PCS: Add a space between the called function name and.
-PSL: The program type is placed in the first line of the program name.
-SC: add an asterisk (*) to the left of each line comment (*).
-Sob: Delete unnecessary blank rows.
-SS: If a row exists in the for or swile segments, add a space before the semicolon.
-St: display the result on the standard output device.
-T: the data type name is scaled down.
-Ts: Set the length of the tab.
-V: detailed information is displayed during execution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.