⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 args.c

📁 indent为linux下代码自动格式化工具
💻 C
📖 第 1 页 / 共 4 页
字号:
    {"brs",     PRO_BOOL,                            true,       ON, &settings.braces_on_struct_decl_line,       &exp_bls},    {"brf",     PRO_BOOL,                           false,       ON, &settings.braces_on_func_def_line,		 &exp_blf},    {"br",      PRO_BOOL,                            true,       ON, &settings.btype_2,                          &exp_bl},    {"bls",     PRO_BOOL,                            true,      OFF, &settings.braces_on_struct_decl_line,       &exp_bls},    {"blf",     PRO_BOOL,                           false,      OFF, &settings.braces_on_func_def_line,          &exp_blf},    {"bli",     PRO_INT,                                0, ONOFF_NA, &settings.brace_indent,                     &exp_bli},    {"bl",      PRO_BOOL,                            true,      OFF, &settings.btype_2,                          &exp_bl},    {"bfda",    PRO_BOOL,                           false,       ON, &settings.break_function_decl_args,         &exp_bfda},    {"bfde",    PRO_BOOL,                           false,       ON, &settings.break_function_decl_args_end,     &exp_bfde},    {"bc",      PRO_BOOL,                            true,      OFF, &settings.leave_comma,                      &exp_bc},    {"bbo",     PRO_BOOL,                            true,       ON, &settings.break_before_boolean_operator,    &exp_bbo},    {"bbb",     PRO_BOOL,                           false,       ON, &settings.blanklines_before_blockcomments,  &exp_bbb},    {"bap",     PRO_BOOL,                           false,       ON, &settings.blanklines_after_procs,           &exp_bap},    {"badp",    PRO_BOOL,                           false,       ON, &settings.blanklines_after_declarations_at_proctop,  &exp_badp},    {"bad",     PRO_BOOL,                           false,       ON, &settings.blanklines_after_declarations,    &exp_bad},    {"bacc",    PRO_BOOL,                           false,       ON, &settings.blanklines_around_conditional_compilation, &exp_bacc},    {"T",       PRO_KEY,                                0, ONOFF_NA, 0,                                          &exp_T},    {"ppi",     PRO_INT,                                0, ONOFF_NA, &settings.force_preproc_width,              &exp_ppi},    /* Signify end of structure.  */    {0,         PRO_IGN,                                0, ONOFF_NA, 0,                                          0}};#else /* Default to GNU style *//* Changed to make GNU style the default. */const pro_ty pro[] ={    {"version", PRO_PRSTRING,                           0, ONOFF_NA, (int *) VERSION,                            &exp_version},    {"v",       PRO_BOOL,                           false,       ON, &settings.verbose,                          &exp_v},    {"ut",      PRO_BOOL,                            true,       ON, &settings.use_tabs,                         &exp_ut},    {"ts",      PRO_INT,                                8, ONOFF_NA, &settings.tabsize,                          &exp_ts},    {"st",      PRO_BOOL,                           false,       ON, &settings.use_stdout,                       &exp_st},    {"ss",      PRO_BOOL,                           false,       ON, &settings.space_sp_semicolon,               &exp_ss},    {"sob",     PRO_BOOL,                           false,       ON, &settings.swallow_optional_blanklines,      &exp_sob},    {"sc",      PRO_BOOL,                           false,       ON, &settings.star_comment_cont,                &exp_sc},    {"sbi",     PRO_INT,                                0, ONOFF_NA, &settings.struct_brace_indent,              &exp_sbi},    {"saw",     PRO_BOOL,                            true,       ON, &settings.space_after_while,                &exp_saw},    {"sai",     PRO_BOOL,                            true,       ON, &settings.space_after_if,                   &exp_sai},    {"saf",     PRO_BOOL,                            true,       ON, &settings.space_after_for,                  &exp_saf},    {"psl",     PRO_BOOL,                            true,       ON, &settings.procnames_start_line,             &exp_psl},    {"prs",     PRO_BOOL,                           false,       ON, &settings.parentheses_space,                &exp_prs},#ifdef PRESERVE_MTIME    {"pmt",     PRO_BOOL,                           false,       ON, &settings.preserve_mtime,                   &exp_pmt},#endif    {"pi",      PRO_INT,                               -1, ONOFF_NA, &settings.paren_indent,                     &exp_pi},    {"pcs",     PRO_BOOL,                            true,       ON, &settings.proc_calls_space,                 &exp_pcs},    {"orig",    PRO_SETTINGS,                           0, ONOFF_NA, ORIG_SETTINGS_STRING,                       &exp_orig},    {"o",       PRO_BOOL,                           false,       ON, &settings.expect_output_file,               &exp_o},    {"nv",      PRO_BOOL,                           false,      OFF, &settings.verbose,                          &exp_v},    {"nut",     PRO_BOOL,                            true,      OFF, &settings.use_tabs,                         &exp_ut},    {"nss",     PRO_BOOL,                           false,      OFF, &settings.space_sp_semicolon,               &exp_ss},    {"nsob",    PRO_BOOL,                           false,      OFF, &settings.swallow_optional_blanklines,      &exp_sob},    {"nsc",     PRO_BOOL,                           false,      OFF, &settings.star_comment_cont,                &exp_sc},    {"nsaw",    PRO_BOOL,                            true,      OFF, &settings.space_after_while,                &exp_saw},    {"nsai",    PRO_BOOL,                            true,      OFF, &settings.space_after_if,                   &exp_sai},    {"nsaf",    PRO_BOOL,                            true,      OFF, &settings.space_after_for,                  &exp_saf},    {"npsl",    PRO_BOOL,                            true,      OFF, &settings.procnames_start_line,             &exp_psl},    {"nprs",    PRO_BOOL,                           false,      OFF, &settings.parentheses_space,                &exp_prs},    {"npro",    PRO_IGN,                                0, ONOFF_NA, 0,                                          &exp_pro},#ifdef PRESERVE_MTIME    {"npmt",    PRO_BOOL,                           false,      OFF, &settings.preserve_mtime,                   &exp_pmt},#endif    {"npcs",    PRO_BOOL,                            true,      OFF, &settings.proc_calls_space,                 &exp_pcs},    {"nlps",    PRO_BOOL,                           false,      OFF, &settings.leave_preproc_space,              &exp_lps},    {"nlp",     PRO_BOOL,                            true,      OFF, &settings.lineup_to_parens,                 &exp_lp},    {"nip",     PRO_SETTINGS,                           0, ONOFF_NA, (int *) "-ip0\0",                           &exp_nip},    {"nhnl",    PRO_BOOL,                            true,      OFF, &settings.honour_newlines,                  &exp_hnl},    {"nfca",    PRO_BOOL,                           false,      OFF, &settings.format_comments,                  &exp_fca},    {"nfc1",    PRO_BOOL,                           false,      OFF, &settings.format_col1_comments,             &exp_fc1},    {"neei",    PRO_BOOL,                           false,      OFF, &settings.extra_expression_indent,          &exp_eei},    {"ndj",     PRO_BOOL,                           false,      OFF, &settings.ljust_decl,                       &exp_dj},    {"ncs",     PRO_BOOL,                            true,      OFF, &settings.cast_space,                       &exp_cs},    {"nce",     PRO_BOOL,                           false,      OFF, &settings.cuddle_else,                      &exp_ce},    {"ncdw",    PRO_BOOL,                           false,      OFF, &settings.cuddle_do_while,                  &exp_cdw},    {"ncdb",    PRO_BOOL,                           false,      OFF, &settings.comment_delimiter_on_blankline,   &exp_cdb},    {"nbs",     PRO_BOOL,                           false,      OFF, &settings.blank_after_sizeof,               &exp_bs},    {"nbfda",   PRO_BOOL,                           false,      OFF, &settings.break_function_decl_args,         &exp_bfda},    {"nbfde",   PRO_BOOL,                           false,      OFF, &settings.break_function_decl_args_end,     &exp_bfde},    {"nbc",     PRO_BOOL,                            true,       ON, &settings.leave_comma,                      &exp_bc},    {"nbbo",    PRO_BOOL,                            true,      OFF, &settings.break_before_boolean_operator,    &exp_bbo},    {"nbbb",    PRO_BOOL,                           false,      OFF, &settings.blanklines_before_blockcomments,  &exp_bbb},    {"nbap",    PRO_BOOL,                            true,      OFF, &settings.blanklines_after_procs,           &exp_bap},    {"nbadp",   PRO_BOOL,                           false,      OFF, &settings.blanklines_after_declarations_at_proctop,  &exp_badp},    {"nbad",    PRO_BOOL,                           false,      OFF, &settings.blanklines_after_declarations,    &exp_bad},    {"nbacc",   PRO_BOOL,                           false,      OFF, &settings.blanklines_around_conditional_compilation, &exp_bacc},    {"lps",     PRO_BOOL,                           false,       ON, &settings.leave_preproc_space,              &exp_lps},    {"lp",      PRO_BOOL,                            true,       ON, &settings.lineup_to_parens,                 &exp_lp},    {"lc",      PRO_INT,     DEFAULT_RIGHT_COMMENT_MARGIN, ONOFF_NA, &settings.comment_max_col,                  &exp_lc},    {"l",       PRO_INT,             DEFAULT_RIGHT_MARGIN, ONOFF_NA, &settings.max_col,                          &exp_l},    {"kr",      PRO_SETTINGS,                           0, ONOFF_NA, KR_SETTINGS_STRING,                         &exp_kr},    {"ip",      PRO_INT,                                5, ONOFF_NA, &settings.indent_parameters,                &exp_ip},    {"i",       PRO_INT,                                2, ONOFF_NA, &settings.ind_size,                         &exp_i},    {"hnl",     PRO_BOOL,                            true,       ON, &settings.honour_newlines,                  &exp_hnl},    {"h",       PRO_FUNCTION,                           0, ONOFF_NA, (int *) usage,                              &exp_version},    /* This is now the default. */    {"gnu",     PRO_SETTINGS,                           0, ONOFF_NA, GNU_SETTINGS_STRING,                        &exp_gnu},    {"fca",     PRO_BOOL,                           false,       ON, &settings.format_comments,                  &exp_fca},    {"fc1",     PRO_BOOL,                           false,       ON, &settings.format_col1_comments,             &exp_fc1},    {"eei",     PRO_BOOL,                           false,       ON, &settings.extra_expression_indent,          &exp_eei},    {"dj",      PRO_BOOL,                           false,       ON, &settings.ljust_decl,                       &exp_dj},    {"di",      PRO_INT,                                2, ONOFF_NA, &settings.decl_indent,                      &exp_di},    {"d",       PRO_INT,                                0, ONOFF_NA, &settings.unindent_displace,                &exp_d},    {"cs",      PRO_BOOL,                            true,       ON, &settings.cast_space,                       &exp_cs},    {"cp",      PRO_INT,                                1, ONOFF_NA, &settings.else_endif_col,                   &exp_cp},    {"cli",     PRO_INT,                                0, ONOFF_NA, &settings.case_indent,                      &exp_cli},    {"ci",      PRO_INT,                                0, ONOFF_NA, &settings.continuation_indent,              &exp_ci},    {"ce",      PRO_BOOL,                           false,       ON, &settings.cuddle_else,                      &exp_ce},    {"cdw",     PRO_BOOL,                           false,       ON, &settings.cuddle_do_while,                  &exp_cdw},    {"cdb",     PRO_BOOL,                           false,       ON, &settings.comment_delimiter_on_blankline,   &exp_cdb},    {"cd",      PRO_INT,                               33, ONOFF_NA, &settings.decl_com_ind,                     &exp_cd},    {"cbi",     PRO_INT,                               -1, ONOFF_NA, &settings.case_brace_indent,                &exp_cbi},    {"c++",     PRO_BOOL,                           false,       ON, &settings.c_plus_plus,                      &exp_cpp},    {"c",       PRO_INT,                               33, ONOFF_NA, &settings.com_ind,                          &exp_c},    {"bs",      PRO_BOOL,                           false,       ON, &settings.blank_after_sizeof,               &exp_bs},    {"brs",     PRO_BOOL,                           false,       ON, &settings.braces_on_struct_decl_line,       &exp_bls},    {"bls",     PRO_BOOL,                           false,      OFF, &settings.braces_on_struct_decl_line,       &exp_bls},    {"brf",     PRO_BOOL,                           false,       ON, &settings.braces_on_func_def_line,          &exp_blf},    {"blf",     PRO_BOOL,                           false,      OFF, &settings.braces_on_func_def_line,          &exp_blf},    {"bli",     PRO_INT,                                2, ONOFF_NA, &settings.brace_indent,                     &exp_bli},    {"br",      PRO_BOOL,                           false,       ON, &settings.btype_2,                          &exp_bl},    {"bl",      PRO_BOOL,                           false,      OFF, &settings.btype_2,                          &exp_bl},    {"bfda",    PRO_BOOL,                           false,       ON, &settings.break_function_decl_args,         &exp_bfda},    {"bfde",    PRO_BOOL,                           false,       ON, &settings.break_function_decl_args_end,     &exp_bfde},    {"bc",      PRO_BOOL,                            true,      OFF, &settings.leave_comma,                      &exp_bc},    {"bbo",     PRO_BOOL,                            true,       ON, &settings.break_before_boolean_operator,    &exp_bbo},    {"bbb",     PRO_BOOL,                           false,       ON, &settings.blanklines_before_blockcomments,  &exp_bbb},    {"bap",     PRO_BOOL,                            true,       ON, &settings.blanklines_after_procs,           &exp_bap},    {"badp",    PRO_BOOL,                           false,       ON, &settings.blanklines_after_declarations_at_proctop,  &exp_badp},    {"bad",     PRO_BOOL,                           false,       ON, &settings.blanklines_after_declarations,    &exp_bad},    {"bacc",    PRO_BOOL,                           false,       ON, &settings.blanklines_around_conditional_compilation, &exp_bacc},    {"T",       PRO_KEY,                                0, ONOFF_NA, 0,                                          &exp_T},    {"ppi",     PRO_INT,                                0, ONOFF_NA, &settings.force_preproc_width,              &exp_ppi},    /* Signify end of structure.  */    {0,         PRO_IGN,                                0, ONOFF_NA, 0,                                          0}};#endif /* GNU defaults */typedef struct long_option_conversion{    char *long_name;    char *short_name;} long_option_conversion_ty;const long_option_conversion_ty option_conversions[] ={    {"version",                                     "version"},    {"verbose",                                     "v"},    {"usage",                                       "h"},    {"use-tabs",                                    "ut"},    {"tab-size",                                    "ts"},    {"swallow-optional-blank-lines",                "sob"},    {"struct-brace-indentation",                    "sbi"},    {"start-left-side-of-comments",                 "sc"},    {"standard-output",                             "st"},    {"space-special-semicolon",                     "ss"},    {"space-after-while",                           "saw"},    {"space-after-procedure-calls",                 "pcs"},    {"space-after-parentheses",                     "prs"},    {"space-after-if",                              "sai"},    {"space-after-for",                             "saf"},    {"space-after-cast",                            "cs"},    {"remove-preprocessor-space",                   "nlps"},    {"procnames-start-lines",                       "psl"},#ifdef PRESERVE_MTIME    {"preserve-mtime",                              "pmt"},#endif    {"paren-indentation",                           "pi"},    {"parameter-indentation",                       "ip"},    {"output-file",                                 "o"},    {"output",                                      "o"},    {"original-style",                              "orig"},    {"original",                                    "orig"},    {"no-verbosity",                                "nv"},    {"no-tabs",                                     "nut"},    {"no-space-after-while",                        "nsaw"},    {"no-space-after-parentheses",                  "nprs"},    {"no-space-after-if",                           "nsai"},    {"no-space-after-function-call-names",          "npcs"},    {"no-space-after-for",                          "nsaf"},    {"no-space-after-casts",                        "ncs"},    {"no-parameter-indentation",                    "nip"},    {"no-extra-expression-indentation",             "neei"},    {"no-comment-delimiters-on-blank-lines",        "ncdb"},    {"no-blank-lines-before-block-comments",        "nbbb"},    {"no-blank-lines-after-procedures",             "nbap"},    {"no-blank-lines-after-procedure-declarations", "nbadp"},    {"no-blank-lines-after-ifdefs",                 "nbacc"},    {"no-blank-lines-after-declarations",           "nbad"},    {"no-blank-lines-after-commas",                 "nbc"},    {"no-blank-before-sizeof",                      "nbs"},    {"no-Bill-Shannon",                             "nbs"},    {"line-length",                                 "l"},    {"line-comments-indentation",                   "d"},    {"left-justify-declarations",                   "dj"},    {"leave-preprocessor-space",                    "lps"},    {"leave-optional-blank-lines",                  "nsob"},    {"kernighan-and-ritchie-style",                 "kr"},    {"kernighan-and-ritchie",                       "kr"},    {"k-and-r-style",                               "kr"},    {"indentation-level",                           "i"},    {"indent-level",                                "i"},    {"ignore-profile",                              "npro"},    {"ignore-newlines",                             "nhnl"},    {"honour-newlines",                             "hnl"},    {"help",                                        "h"},    {"gnu-style",                                   "gnu"},    {"format-first-column-comments",                "fc1"},    {"format-all-comments",                         "fca"},    {"extra-expression-indentation",                "eei"},    {"else-endif-column",                           "cp"},    {"dont-star-comments",                          "nsc"},    {"dont-space-special-semicolon",                "nss"},    {"dont-line-up-parentheses",                    "nlp"},    {"dont-left-justify-declarations",              "ndj"},    {"dont-indent-parameters",                      "nip"},    {"dont-format-first-column-comments",           "nfc1"},    {"dont-format-comments",                        "nfca"},    {"dont-cuddle-else",                            "nce"},    {"dont-cuddle-do-while",                        "ncdw"},    {"dont-break-procedure-type",                   "npsl"},    {"dont-break-function-decl-args",               "nbfda"},    {"dont-break-function-decl-args-end",           "nbfde"},    {"declaration-indentation",                     "di"},    {"declaration-comment-column",                  "cd"},    {"cuddle-else",                                 "ce"},    {"cuddle-do-while",                             "cdw"},    {"continue-at-parentheses",                     "lp"},    {"continuation-indentation",                    "ci"},    {"comment-line-length",                         "lc"},    {"comment-indentation",                         "c"},    {"comment-delimiters-on-blank-lines",           "cdb"},    {"case-indentation",                            "cli"},    {"case-brace-indentation",                      "cbi"},    {"c-plus-plus",                                 "c++"},    {"break-function-decl-args",                    "bfda"},    {"break-function-decl-args-end",                "bfde"},    {"break-before-boolean-operator",               "bbo"},    {"break-after-boolean-operator",                "nbbo"},    {"braces-on-struct-decl-line",                  "brs"},    {"braces-on-func-def-line",                     "brf"},    {"braces-on-if-line",                           "br"},    {"braces-after-struct-decl-line",               "bls"},    {"braces-after-func-def-line",                  "blf"},    {"braces-after-if-line",                        "bl"},    {"brace-indent",                                "bli"},    {"blank-lines-before-block-comments",           "bbb"},    {"blank-lines-after-procedures",                "bap"},    {"blank-lines-after-procedure-declarations",    "badp"},    {"blank-lines-after-ifdefs",                    "bacc"},    {"blank-lines-after-declarations",              "bad"},    {"blank-lines-after-commas",                    "bc"},    {"blank-before-sizeof",                         "bs"},    {"berkeley-style",                              "orig"},    {"berkeley",                                    "orig"},    {"Bill-Shannon",                                "bs"},    {"preprocessor-indentation",                    "ppi"},    {0,                                             0},};static void usage (void){  fprintf (stderr, _("usage: indent file [-o outfile ] [ options ]\n"));  fprintf (stderr, _("       indent file1 file2 ... fileN [ options ]\n"));  exit (invocation_error);}/* S1 should be a string.  S2 should be a string, perhaps followed by an   argument.  Compare the two, returning true if they are equal, and if they   are equal set *START_PARAM to point to the argument in S2.  */static BOOLEAN eqin (    const char   * s1,    const char   * s2,    const  char ** start_param){    BOOLEAN ret = true;        while (*s1)    {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -