The format I'm currently using is-the kr-i4-ts4-nsob-l80-ss-ncs-cp1-bap-nbc-bl-bli0-ncdb-ncdw-nce-cli0-d0-pcs-nprs-saf-sai-saw-nssindent command uses to reformat a C language program...
My current format is
-Kr-i4-ts4-nsob-l80-ss-ncs-cp1-bap-nbc-bl-bli0-ncdb-ncdw-nce-cli0-d0-pcs-nprs-saf -sai-saw-nss
Indent command
Purpose
Reformat a C-language program.
Syntax
Indent InputFile [OutputFile] [-nbad |-bad] [-nbap |-bap] [-nbbb |-bbb] [-nbc |-bc] [-br |-bl] [-cn] [-cdn] [-ncdb |-cdb] [-nce |-ce] [-cin] [-clin] [-dn] [-din] [- ndj |-dj] [-nei |-ei] [-fa] [-nfa] [-nfc1 |-fc1] [-in] [-nip |-ip] [- ln] [-lcn] [-nlp |-lp] [-npro] [-npcs |-pcs] [-nps |-ps] [-npsl |-psl] [- nsc |-SC] [-nsob |-sob] [-nslb |-slb] [-st] [-troff] [-nv |-v] [-TType] ...
Description
The indent command reformats a C program in the format specified with the command input flag.
If only the InputFile parameter is specified, the reformatted file is written back to the InputFile parameter, and the backup copy of an InputFile is written back to the current directory. the file name is suffixed with. BAK.
If the OutputFile parameter is specified, the indent command runs a check to ensure that its name is different from that of the InputFile parameter.
To set your own default profile for the indent command, create a file named. indent. pro in your logon directory or the current directory. This file contains the logos you want to include, which are separated by spaces, tabs, or line breaks.
The. indent. pro files in the current directory overwrite those in your logon Directory (except the-T Type flag, which is cumulative ). If the indent command is run and a profile exists, the profile is read to set the default configuration of the program. However, the flag on the command line overwrites the profile flag.
Function description: adjusts the format of the original C code file.
Syntax: indent [parameter] [source file] or indent [parameter] [source file] [-o target file]
Note: indent can identify and format the original code file of C to facilitate reading by programmers.
Parameters:
-Bad or-blank-lines-after-declarations add blank lines to the declaration section.
-Bap or-blank-lines-after-procedures in the program or add blank lines.
-Bbb or-blank-lines-after-block-comments add blank lines after the comment section.
-Bc or-blank-lines-after-commas in the declaration section, if there is a comma, it is a line break.
-Bl or-braces-after-if-line if (or else, for, and so on) are different from the "{" and "}" in the subsequent execution section.
-Bli <缩排格数> Or-brace-indent <缩排格数> Set the number of cells to be scaled down.
-Br or-braces-on-if-line if (or else, for, and so on) are different from the "{" and "}" in the subsequent execution of the segment.
-Bs or-blank-before-sizeof is empty after sizeof.
-C <栏数> Or-comment-indentation <栏数> Place the comment in the column specified on the right of the program code.
-Cd <栏数> Or-declaration-comment-column <栏数> Place the comment in the column specified on the right of the declaration.
-Cdb or-comment-delimiters-on-blank-lines comments are represented in a row.
-Ce or-cuddle-else places the else after "}" (the end of the if execution segment.
-Ci <缩排格数> Or-continuation-indentation <缩排格数> This section describes the number of cells that are scaled down after a line break when the length is too long.
-Cli <缩排格数> Or-case-indentation- <缩排格数> When case is used, switch is used to shrink the number of cells.
-Cp <栏数> Or-else-endif-column <栏数> Place the comment in the column specified on the right of the description of else and elseif.
-Cs or-space-after-cast is empty after cast.
-D <缩排格数> Or-line-comments-indentation <缩排格数> Set the number of bins for comments that are not placed on the right of the program code.
-Di <栏数> Or-declaration-indentation <栏数> Place the variables in the declaration section in the specified column.
-Fc1 or-format-first-column-comments: set the format of the comment placed at the top of each line.
-Fca or-format-all-comments: set the format of all comments.
-Gnu or-gnu-style specifies the GNU format, which is the default value.
-I <格数> Or-indent-level <格数> Set the number of cells to be scaled down.
-Ip <格数> Or-parameter-indentation <格数> Set the number of slashes for the parameter.
-Kr or-k-and-r-style specifies the format of Kernighan & Ritchie.
-Lp or-continue-at-parentheses describes long and line breaks. when the description contains an arc, the content of the starting column of each line in the arc is vertically arranged.
-Nbad or-no-blank-lines-after-declarations do not add blank lines after the declaration section.
-Nbap or-no-blank-lines-after-procedures do not add blank lines after the program.
-Nbbb or-no-blank-lines-after-block-comments do not add blank lines after the comment section.
-In the declaration section of-nbc or-no-blank-lines-after-commas, do not wrap the line even if a comma appears.
-Ncdb or-no-comment-delimiters-on-blank-lines annotator should not be a line of its own.
-Nce or-dont-cuddle-else do not place the else after.
-Ncs or-no-space-after-casts should not be empty after cast.
-Nfc1 or-dont-format-first-column-comments do not format comments placed at the front of each line.
-Nfca or-dont-format-comments do not format any comments.
-Do not contract the nip or-no-parameter-indentation parameter.
-When nlp or-dont-line-up-parentheses statements are too long to wrap a line and the description contains an arc, you do not need to vertically arrange the Start column of each line in the arc.
-Npcs or-no-space-after-function-call-names do not add spaces after the called function name.
-Npro or-ignore-profile should not read indent's configuration file. indent. pro.
-Put the npsl or-dont-break-procedure-type program type in the same line as the program name.
-Do not add an asterisk (*) to the left of the nsc or-dont-star-comments annotation (*).
-Nsob or-leave-optional-semicolon does not need to process redundant blank rows.
-Nss or-dont-space-special-semicolon if the for or while section contains only one row, no space is added before the semicolon.
-Nv or-no-verbosity does not display detailed information.
-Orig or-original uses the Berkeley format.
-Pcs or-space-after-procedure-cils add a space between the called function name and.
-The psl or-procnames-start-lines program type is placed in the first line of the program name.
-SC or-start-left-side-of-comments add an asterisk (*) to the left of each line comment (*).
-Sob or-swallow-optional-blank-lines delete unnecessary blank lines.
-Ss or-space-special-semicolon if there is a row in the for or swile section, add a space before the semicolon.
-St or-standard-output displays the result on the standard output device.
-T: The data type name is scaled down.
-Ts <格数> Or-tab-size <格数> Set the length of the tab.
-V or-verbose displays detailed information during execution.
-Version: displays the version information.
Description of Indent code formatting
Description of the indent parameter value used
-- Blank-lines-after-declarations: add blank lines after the bad variable declaration
-- Add blank lines after the blank-lines-after-procedures bap function is completed
-- Blank-lines-before-block-comments: add blank lines before the bbb block comment.
-- Break-before-boolean-operator bbo long row, branch before logical operators
-- In the blank-lines-after-commas nbc variable declaration, variables separated by commas are not separated.
-- Braces-after-if-line bl "if" and "{" are divided into two rows.
-- Brace-indent 0 bli0 "{" do not continue indent
-- Braces-after-struct-decl-line topology defines the structure, "struct" and "{" Branch
-- Comment-indentationn c33 statement and the comment starts at row 33
-- Declaration-comment-columnn cd33 variable declaration and comments start at row 33
-- Comment-delimiters-on-blank-lines ncdb does not change a single row comment to a block comment
-- Cuddle-do-while ncdw "do --- while" "while" and "}" before it start with another line
-- Cuddle-else nce "else" and "}" start with another line
-- Case-indentation 0 the case statement in cli0 switch has 0 spaces.
-- Else-endif-columnn cp33 # else, # the comments after endif start at row 33.
-- Space-after-cast cs: add space after type conversion
-- Line-comments-indentation n d0 single row comment (not starting from column 1), not indented to the left
-- Disable break-function-decl-args nbfda: One row of function parameters.
-- Declaration-indentationn di2 variable declaration. the variable starts from two rows, that is, the alignment is unnecessary.
-- Format-first-column-comments nfc1 does not format the comment starting from the first line
-- Format-all-comments nfca does not enable the function of formatting all comments.
-- Honor-newlines hnl Prefer to break long lines at the position of newlines in the input.
-- Indent-leveln i4: specifies the number of indentations. if it is an integer multiple of the tabs, tab is used for indenting. otherwise, spaces are used for filling.
-- Parameter-indentationn ip5 the parameter description in the old style function definition is indented by five spaces
-- Line-length 75 l75 non-comments rows up to 75
-- Continue-at-parentheses lp start from the parentheses in the last row
-- Space-after-procedure-callpcs function and insert a space "("
-- Space-after-parentheses nprs inserts no space before "(" ")"
-- Procnames-start-lines psl put the function name and return type in two rows for definition
-- Space-after-for saf for is followed by a space
-- Space-after-if sai if is followed by a space
-- Space-after-while saw while is followed by a space
-- Start-left-side-of-comments nsc is not added to the generated block comment *
-- Swallow-optional-blank-lines nsob do not remove the added blank lines
-- Space-special-semicolon nss: for or while statement in a row, no blank before.
-- Tab-size ts4 a tab has four spaces (to be able to exclude "-in ")
-- Use-tabs ut use tab to indent
Author siriurs28