This is a workaround for an acknowledged upstream bug; it basically
reverts this logic to the way it was in NetBSD indent. While there
may eventually be a different upstream fix, this will do for our
purposes. Add a regression test case that illustrates the problem,
and tweak declarations.0.stdout for slightly different formatting
produced for a function pointer typedef.
}
ps.in_or_st = true; /* this might be a structure or initialization
* declaration */
- ps.in_decl = ps.decl_on_line = ps.last_token != type_def;
+ ps.in_decl = ps.decl_on_line = true;
if ( /* !ps.in_or_st && */ ps.dec_nest <= 0)
ps.just_saw_decl = 2;
prefix_blankline_requested = 0;
/* $FreeBSD$ */
/* See r303570 */
-typedef void (*voidptr) (int *);
+typedef void (*voidptr) (int *);
static const struct {
double x;
--- /dev/null
+typedef enum
+{
+PREWARM_PREFETCH, /* comment */
+PREWARM_READ, /* more comment */
+PREWARM_BUFFER /* more comment */
+} PrewarmType;
--- /dev/null
+typedef enum {
+ PREWARM_PREFETCH, /* comment */
+ PREWARM_READ, /* more comment */
+ PREWARM_BUFFER /* more comment */
+} PrewarmType;