34static char sccsid[] =
"@(#)indent.c 5.17 (Berkeley) 6/7/93";
50#define DECLARE_INDENT_GLOBALS 1
182 for (
i = 1;
i < argc; ++
i)
183 if (
strcmp(argv[
i],
"-npro") == 0)
185 else if (argv[
i][0] ==
'-' && argv[
i][1] ==
'P' && argv[
i][2] !=
'\0')
191 for (
i = 1;
i < argc; ++
i) {
196 if (argv[
i][0] !=
'-') {
208 errx(1,
"input and output files must be different");
215 errx(1,
"unknown parameter: %s", argv[
i]);
324 diag2(1,
"Internal buffer overflow - Move big comment from right after if, while, or whatever");
393 diag2(0,
"Line broken");
440 errx(1,
"input too long");
462 diag2(1,
"Stuff missing from end of file");
465 printf(
"There were %d output lines and %d comments\n",
467 printf(
"(Lines with comments)/(Lines with code): %6.3f\n",
483 diag2(0,
"Line broken");
538 diag3(0,
"Reached internal limit of %d unclosed parens",
747 diag2(1,
"Unbalanced parens");
796 diag2(1,
"Unbalanced parens");
811 diag3(0,
"Reached internal limit of %d struct levels",
844 diag2(1,
"Unbalanced parens");
853 diag2(0,
"Line broken");
896 diag2(0,
"Line broken");
907 diag2(0,
"Line broken");
1112 errx(1,
"input too long");
1138 diag2(1,
"#if stack overflow");
1142 diag2(1,
s_lab[3] ==
'i' ?
"Unmatched #elif" :
"Unmatched #else");
1150 diag2(1,
"Unmatched #endif");
1171 diag2(1,
"Unrecognized cpp directive");
1207 char buff[8 * 1024];
1212 while (p >
in_name && *p !=
'/')
void set_profile(const char *profile_name)
void err(int eval, const char *fmt,...)
void errx(int eval, const char *fmt,...)
static void bakcopy(void)
static void indent_declaration(int cur_dec_ind, int tabs_to_var)
int compute_code_target(void)
int lexi(struct parser_state *)
void diag2(int, const char *)
void diag3(int, const char *, int)
int count_spaces_until(int, char *, char *)
void alloc_typenames(void)
int block_comment_max_col
int blanklines_after_procs
int postfix_blankline_requested
struct parser_state state_stack[5]
int prefix_blankline_requested
#define CHECK_SIZE_CODE(desired_size)
int extra_expression_indent
int format_block_comments
int comment_delimiter_on_blankline
#define CHECK_SIZE_LAB(desired_size)
struct parser_state match_state[5]
int blanklines_around_conditional_compilation
int swallow_optional_blanklines
int lineup_to_parens_always
int blanklines_after_declarations_at_proctop
static XLogRecPtr startpos
int in_parameter_declaration