Re: pgindent issue with EXEC_BACKEND-only typedefs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgindent issue with EXEC_BACKEND-only typedefs
Date
Msg-id 5111.1198250776@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgindent issue with EXEC_BACKEND-only typedefs  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pgindent issue with EXEC_BACKEND-only typedefs  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Alvaro Herrera wrote:
>> indent needs the typedef list.  Maybe we can hack something based on
>> typedefs in the source code, instead of object files.

> The only think of is to grab typedefs from the object file and then also
> try to get them from the souce too and combine them and remove duplicates.

Something I noticed the other day is that pgindent doesn't seem to treat
"struct foo" or "union foo" as a type name, which is pretty silly
because no context is needed at all to recognize that.  We tend not to
do that too much --- the project style is to use a typedef name --- but
there are some places that do it, particularly the regex code.  For
instance there are extra spaces here:

static void
cmtreefree(struct colormap * cm,          union tree * tree,          int level)            /* level number (top == 0)
ofthis block */
 
{

Fixable?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brian Hurt
Date:
Subject: Re: Sorting Improvements for 8.4
Next
From: Tom Lane
Date:
Subject: Re: function body actors (was: [PERFORM] viewing source code)