indent: give indent a try at formatting its own code
Formatting indent.h required the following manual corrections afterwards: The first tab in the comment in line 1 was replaced with a space but shouldn't be. The spacing around the '...' in function prototypes was completely wrong. It looked like 'const char *,...)__printflike', without any spaces. The '*' of the return type 'const char *' was tied to the function name, even though this declaration was only for a single function. In such a case, it's more appropriate to line up the function names. The function-like macros were not indented to -di. This is something that I would not expect from indent, so it's ok to do that manually.
This commit is contained in:
parent
744982a9b6
commit
bd908d33db
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: indent.h,v 1.15 2021/03/13 23:42:23 rillig Exp $ */
|
||||
/* $NetBSD: indent.h,v 1.16 2021/03/14 00:33:25 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
|
@ -41,29 +41,30 @@ __FBSDID("$FreeBSD: head/usr.bin/indent/indent.h 336333 2018-07-16 05:46:50Z pst
|
|||
#define nitems(array) (sizeof (array) / sizeof (array[0]))
|
||||
#endif
|
||||
|
||||
void add_typename(const char *);
|
||||
void alloc_typenames(void);
|
||||
int compute_code_indent(void);
|
||||
int compute_label_indent(void);
|
||||
int indentation_after_range(int, const char *, const char *);
|
||||
int indentation_after(int, const char *);
|
||||
void init_constant_tt(void);
|
||||
void add_typename(const char *);
|
||||
void alloc_typenames(void);
|
||||
int compute_code_indent(void);
|
||||
int compute_label_indent(void);
|
||||
int indentation_after_range(int, const char *, const char *);
|
||||
int indentation_after(int, const char *);
|
||||
void init_constant_tt(void);
|
||||
#ifdef debug
|
||||
void debug_vis_range(const char *, const char *, const char *, const char *);
|
||||
void debug_printf(const char *, ...) __printflike(1, 2);
|
||||
void debug_println(const char *, ...) __printflike(1, 2);
|
||||
const char *token_type_name(token_type);
|
||||
void debug_vis_range(const char *, const char *, const char *,
|
||||
const char *);
|
||||
void debug_printf(const char *, ...) __printflike(1, 2);
|
||||
void debug_println(const char *, ...) __printflike(1, 2);
|
||||
const char * token_type_name(token_type);
|
||||
#else
|
||||
#define debug_printf(fmt, ...) do { } while (false)
|
||||
#define debug_println(fmt, ...) do { } while (false)
|
||||
#define debug_vis_range(prefix, s, e, suffix) do { } while (false)
|
||||
#define debug_printf(fmt, ...) do { } while (false)
|
||||
#define debug_println(fmt, ...) do { } while (false)
|
||||
#define debug_vis_range(prefix, s, e, suffix) do { } while (false)
|
||||
#endif
|
||||
token_type lexi(struct parser_state *);
|
||||
void diag(int, const char *, ...) __printflike(2, 3);
|
||||
void dump_line(void);
|
||||
void fill_buffer(void);
|
||||
void parse(token_type);
|
||||
void process_comment(void);
|
||||
void set_defaults(void);
|
||||
void set_option(char *);
|
||||
void set_profile(const char *);
|
||||
token_type lexi(struct parser_state *);
|
||||
void diag(int, const char *, ...) __printflike(2, 3);
|
||||
void dump_line(void);
|
||||
void fill_buffer(void);
|
||||
void parse(token_type);
|
||||
void process_comment(void);
|
||||
void set_defaults(void);
|
||||
void set_option(char *);
|
||||
void set_profile(const char *);
|
||||
|
|
Loading…
Reference in New Issue