Fix for 'extern "C"' indenting

Started by Bruce Momjianover 24 years ago3 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Tom found a problem with indenting of "extern C" code blocks. I thought
I had fixed it earlier, but obviously not.

Attached is a patch which is a run of an improved pgindent over several
include files that contained 'extern "C"' blocks.

Do people want this applied or should we just live with a ugly indenting
of a few C files for 7.2?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Attachments:

/bjm/difftext/plainDownload+1336-1334
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: Fix for 'extern "C"' indenting

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Attached is a patch which is a run of an improved pgindent over several
include files that contained 'extern "C"' blocks.
Do people want this applied or should we just live with a ugly indenting
of a few C files for 7.2?

I'd say go for it ... particularly if you already committed the
corresponding pgindent fix. It would be weird to ship a pgindent
that doesn't agree with the formatted files.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: Fix for 'extern "C"' indenting

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Attached is a patch which is a run of an improved pgindent over several
include files that contained 'extern "C"' blocks.
Do people want this applied or should we just live with a ugly indenting
of a few C files for 7.2?

I'd say go for it ... particularly if you already committed the
corresponding pgindent fix. It would be weird to ship a pgindent
that doesn't agree with the formatted files.

Done. FYI, pgindent sometimes doesn't match what we ship because I
tweek it for the _next_ run, which may not happen for 6-9 months.

The interesting case with 'extern "C"' is that pgindent was properly
indenting the block, but in this case, it just made no sense. It also
thought it was in some kind of function and didn't understand certain
prototypes.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026