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

📄 indent.h

📁 indent为linux下代码自动格式化工具
💻 H
📖 第 1 页 / 共 2 页
字号:
					   procedure and its name) */extern int expect_output_file;	/* Means "-o" was specified. */extern int proc_calls_space;	/* If true, procedure calls look like: foo				   (bar) rather than foo(bar) */extern int cast_space;		/* If true, casts look like: r                           *				   (char *) bar rather than (char *)bar *//* If comments which start in column 1 are to be magically reformatted */extern int format_col1_comments;/* If any comments are to be reformatted */extern int format_comments;extern int suppress_blanklines;	/* set iff following blanklines should be				   suppressed */extern int continuation_indent;	/* set to the indentation between the edge of				   code and continuation lines in spaces */extern int lineup_to_parens;	/* if true, continued code within parens will				   be lined up to the open paren */extern int leave_preproc_space;	/* if true, leave the spaces between				   '#' and preprocessor commands. *//* The position that we will line the current line up with when it comes time   to print it (if we are lining up to parentheses).  */extern int paren_target;/* true iff a blank should always be inserted after sizeof */extern int blank_after_sizeof;extern int blanklines_after_declarations_at_proctop;	/* This is vaguely							   similar to							   blanklines_after_decla							   rations except that							   it only applies to							   the first set of							   declarations in a							   procedure (just after							   the first '{') and it							   causes a blank line							   to be generated even							   if there are no							   declarations */extern int block_comment_max_col;extern int extra_expression_indent;	/* True if continuation lines from					   the expression part of "if(e)",					   "while(e)", "for(e;e;e)" should be					   indented an extra tab stop so that					   they don't conflict with the code					   that follows *//* The following are all controlled by command line switches (as are some of   the things above).  */extern int leave_comma;		/* if true, never break declarations after				   commas */extern int decl_com_ind;	/* the column in which comments after				   declarations should be put */extern int case_indent;		/* The distance to indent case labels from				   the switch statement */extern int com_ind;		/* the column in which comments to the right				   of code should start */extern int decl_indent;		/* column to indent declared identifiers to */extern int ljust_decl;		/* true if declarations should be left				   justified */extern int unindent_displace;	/* comments not to the right of code will be				   placed this many indentation levels to the				   left of code */extern int else_if;		/* True iff else if pairs should be handled				   specially *//* Number of spaces to indent parameters.  */extern int indent_parameters;/* The size of one indentation level in spaces.  */extern int ind_size;/* The number of columns a tab character generates. */extern int tabsize;/* Nonzero if we should use standard input/output when files are not   explicitly specified.  */extern int use_stdinout;/* -troff font state information */struct fstate{  char font[4];  char size;  int allcaps:1;};char *chfont ();extern struct fstate keywordf,	/* keyword font */  stringf,			/* string font */  boxcomf,			/* Box comment font */  blkcomf,			/* Block comment font */  scomf,			/* Same line comment font */  bodyf;			/* major body font *//* This structure contains information relating to the state of parsing the   code.  The difference is that the state is saved on #if and restored on   #else.  */struct parser_state{  struct parser_state *next;  enum codes last_token;  struct fstate cfont;		/* Current font */  /* This is the parsers stack, and the current allocated size.  */  enum codes *p_stack;  int p_stack_size;  /* This stack stores indentation levels */  /* Currently allocated size is stored in p_stack_size.  */  int *il;  /* If the last token was an ident and is a reserved word,     remember the type. */  enum rwcodes last_rw;  /* Used to store case stmt indentation levels.  */  /* Currently allocated size is stored in p_stack_size.  */  int *cstk;  /* Pointer to the top of stack of the p_stack, il and cstk arrays. */  int tos;  int box_com;			/* set to true when we are in a "boxed"				   comment. In that case, the first non-blank				   char should be lined up with the / in /* */  /* Shift comments by this many columns.  */  int comment_delta;  /* Value of comment_delta for the following line.  */  int n_comment_delta;  int cast_mask;		/* indicates which close parens close off				   casts */  /* A bit for each paren level, set if the open paren was in a context which     indicates that this pair of parentheses is not a cast.  */  int noncast_mask;  int sizeof_mask;		/* indicates which close parens close off				   sizeof''s */  int block_init;		/* true iff inside a block initialization */  int block_init_level;		/* The level of brace nesting in an				   initialization */  int last_nl;			/* this is true if the last thing scanned was				   a newline */  int in_or_st;			/* Will be true iff there has been a				   declarator (e.g. int or char) and no left				   paren since the last semicolon. When true,				   a '{' is starting a structure definition				   or an initialization list */  int bl_line;			/* set to 1 by dump_line if the line is				   blank */  int col_1;			/* set to true if the last token started in				   column 1 */  int com_col;			/* this is the column in which the current				   coment should start */  int dec_nest;			/* current nesting level for structure or				   init */  int decl_on_line;		/* set to true if this line of code has part				   of a declaration on it */  int i_l_follow;		/* the level in spaces to which ind_level				   should be set after the current line is				   printed */  int in_decl;			/* set to true when we are in a declaration				   stmt.  The processing of braces is then				   slightly different */  int in_stmt;			/* set to 1 while in a stmt */  int ind_level;		/* the current indentation level in spaces */  int ind_stmt;			/* set to 1 if next line should have an extra				   indentation level because we are in the				   middle of a stmt */  int last_u_d;			/* set to true after scanning a token which				   forces a following operator to be unary */  int p_l_follow;		/* used to remember how to indent following				   statement */  int paren_level;		/* parenthesization level. used to indent				   within stmts */  int paren_depth;		/* Depth of paren nesting anywhere. */  /* Column positions of paren at each level.  If positive, it contains just     the number of characters of code on the line up to and including the     right parenthesis character.  If negative, it contains the opposite of     the actual level of indentation in characters (that is, the indentation     of the line has been added to the number of characters and the sign has     been reversed to indicate that this has been done).  */  short *paren_indents;		/* column positions of each paren */  int paren_indents_size;	/* Currently allocated size.  */  int pcase;			/* set to 1 if the current line label is a				   case.  It is printed differently from a				   regular label */  int search_brace;		/* set to true by parse when it is necessary				   to buffer up all info up to the start of a				   stmt after an if, while, etc */  int use_ff;			/* set to one if the current line should be				   terminated with a form feed */  int want_blank;		/* set to true when the following token				   should be prefixed by a blank. (Said				   prefixing is ignored in some cases.) */  int its_a_keyword;  int sizeof_keyword;  int dumped_decl_indent;  int in_parameter_declaration;  char *procname;		/* The name of the current procedure */  char *procname_end;		/* One char past the last one in procname */  int just_saw_decl;};/* All manipulations of the parser state occur at the top of stack (tos). A   stack is kept for conditional compilation (unrelated to the p_stack, il, &   cstk stacks)--it is implemented as a linked list via the next field.  */extern struct parser_state *parser_state_tos;/* The column in which comments to the right of #else and #endif should   start.  */extern int else_endif_col;

⌨️ 快捷键说明

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