34 static char sccsid[] =
"@(#)args.c 8.1 (Berkeley) 6/6/93";
54 #define INDENT_VERSION "2.1.2"
180 static char prof[] =
".indent.pro";
182 if (profile_name == NULL)
183 snprintf(fname,
sizeof(fname),
"%s/%s", getenv(
"HOME"), prof);
185 snprintf(fname,
sizeof(fname),
"%s", profile_name + 2);
207 while ((
i = getc(f)) != EOF) {
208 if (
i ==
'*' && !
comment && p >
buf && p[-1] ==
'/') {
211 }
else if (
i ==
'/' &&
comment && p >
buf && p[-1] ==
'*') {
214 }
else if (isspace((
unsigned char)
i)) {
264 const char *param_start;
281 if (*param_start == 0)
294 if (*param_start == 0)
300 if (*param_start == 0)
310 errx(1,
"set_option: internal error: p_special %d", p->
p_special);
322 if (!isdigit((
unsigned char)*param_start)) {
326 *p->
p_obj = atoi(param_start);
330 errx(1,
"set_option: internal error: p_type %d", p->
p_type);
340 if ((file = fopen(
str,
"r")) == NULL) {
341 fprintf(stderr,
"indent: cannot open file %s\n",
str);
344 while ((fgets(line, BUFSIZ, file)) != NULL) {
346 line[strcspn(line,
" \t\n\r")] =
'\0';
static const char * eqin(const char *s1, const char *s2)
void add_typedefs_from_file(const char *str)
void set_profile(const char *profile_name)
static void scan_profile(FILE *f)
void set_option(char *arg)
const char * option_source
void errx(int eval, const char *fmt,...)
void add_typename(const char *)
int blanklines_after_declarations
int block_comment_max_col
int blanklines_after_procs
int blanklines_before_blockcomments
int extra_expression_indent
int format_block_comments
int comment_delimiter_on_blankline
int blanklines_around_conditional_compilation
int swallow_optional_blanklines
int lineup_to_parens_always
int blanklines_after_declarations_at_proctop